name
stringlengths 1
473k
| code
stringlengths 7
647k
| asm
stringlengths 4
3.39M
| file
stringlengths 8
196
|
---|---|---|---|
pnga_uses_ma | logical pnga_uses_ma()
{
#ifdef AVOID_MA_STORAGE
return FALSE;
#else
if(!GAinitialized) return FALSE;
if(ARMCI_Uses_shm()) return FALSE;
else return TRUE;
#endif
} | xorl %eax, %eax
retq
nopw %cs:(%rax,%rax)
| /GlobalArrays[P]ga/global/src/base.c |
pnga_set_pgroup | void pnga_set_pgroup(Integer g_a, Integer p_handle)
{
Integer ga_handle = g_a + GA_OFFSET;
if (GA[ga_handle].actv == 1)
pnga_error("Cannot set processor configuration on array that has been allocated",0);
if (p_handle == GA_World_Proc_Group || PGRP_LIST[p_handle].actv == 1) {
GA[ga_handle].p_handle = (int) (p_handle);
} else {
pnga_error("Processor group does not exist",0);
}
} | subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
movq %rax, (%rsp)
leaq 0xcabbc(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x1, 0x8(%rax)
jne 0xcb118
leaq 0xacd35(%rip), %rdi # 0x177e44
xorl %eax, %eax
movl %eax, %esi
callq 0x47840
movq 0x8(%rsp), %rax
leaq 0xc5458(%rip), %rcx # 0x19057c
movslq (%rcx), %rcx
cmpq %rcx, %rax
je 0xcb145
leaq 0xcabd5(%rip), %rax # 0x195d08
movq (%rax), %rax
imulq $0x28, 0x8(%rsp), %rcx
addq %rcx, %rax
cmpl $0x1, 0x8(%rax)
jne 0xcb169
movq 0x8(%rsp), %rax
movl %eax, %ecx
leaq 0xcab5d(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rdx # imm = 0x368
addq %rdx, %rax
movl %ecx, 0x210(%rax)
jmp 0xcb179
leaq 0xacd18(%rip), %rdi # 0x177e88
xorl %eax, %eax
movl %eax, %esi
callq 0x47840
addq $0x18, %rsp
retq
nop
| /GlobalArrays[P]ga/global/src/base.c |
pnga_set_restricted | void pnga_set_restricted(Integer g_a, Integer *list, Integer size)
{
Integer i, ig, id=0, me, p_handle, has_data, nproc;
Integer ga_handle = g_a + GA_OFFSET;
GA[ga_handle].num_rstrctd = size;
GA[ga_handle].rstrctd_list = (Integer*)malloc(size*sizeof(Integer));
GA[ga_handle].rank_rstrctd = (Integer*)malloc((GAnproc)*sizeof(Integer));
p_handle = GA[ga_handle].p_handle;
if (p_handle == -2) p_handle = pnga_pgroup_get_default();
if (p_handle > 0) {
me = PGRP_LIST[p_handle].map_proc_list[GAme];
nproc = PGRP_LIST[p_handle].map_nproc;
} else {
me = GAme;
nproc = GAnproc;
}
has_data = 0;
for (i=0; i<GAnproc; i++) {
GA[ga_handle].rank_rstrctd[i] = -1;
}
for (i=0; i<size; i++) {
GA[ga_handle].rstrctd_list[i] = list[i];
/* check if processor is in list */
if (me == list[i]) {
has_data = 1;
id = i;
}
/* check if processor is in group */
if (list[i] < 0 || list[i] >= nproc)
pnga_error("Invalid processor in list",list[i]);
ig = list[i];
GA[ga_handle].rank_rstrctd[ig] = i;
}
GA[ga_handle].has_data = has_data;
GA[ga_handle].rstrctd_id = id;
} | subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x50(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
movq %rax, (%rsp)
movq 0x40(%rsp), %rcx
leaq 0xc9669(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rdx # imm = 0x368
addq %rdx, %rax
movq %rcx, 0x2a8(%rax)
movq 0x40(%rsp), %rdi
shlq $0x3, %rdi
callq 0x3340
movq %rax, %rcx
leaq 0xc963c(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rdx # imm = 0x368
addq %rdx, %rax
movq %rcx, 0x2a0(%rax)
leaq 0xc9700(%rip), %rax # 0x195d90
movq (%rax), %rdi
shlq $0x3, %rdi
callq 0x3340
movq %rax, %rcx
leaq 0xc960a(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rdx # imm = 0x368
addq %rdx, %rax
movq %rcx, 0x2c0(%rax)
leaq 0xc95ee(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rcx # imm = 0x368
addq %rcx, %rax
movslq 0x210(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $-0x2, 0x18(%rsp)
jne 0xcc6ee
callq 0xca4f0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jle 0xcc73e
leaq 0xc960b(%rip), %rax # 0x195d08
movq (%rax), %rax
imulq $0x28, 0x18(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
leaq 0xc968c(%rip), %rcx # 0x195da0
movq (%rcx), %rcx
movslq (%rax,%rcx,4), %rax
movq %rax, 0x20(%rsp)
leaq 0xc95e1(%rip), %rax # 0x195d08
movq (%rax), %rax
imulq $0x28, 0x18(%rsp), %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0xcc75c
leaq 0xc965b(%rip), %rax # 0x195da0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0xc963c(%rip), %rax # 0x195d90
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
leaq 0xc9616(%rip), %rcx # 0x195d90
cmpq (%rcx), %rax
jge 0xcc7b8
leaq 0xc952a(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rcx # imm = 0x368
addq %rcx, %rax
movq 0x2c0(%rax), %rax
movq 0x38(%rsp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0xcc76e
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x40(%rsp), %rax
jge 0xcc8bc
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xc94ca(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rcx # imm = 0x368
addq %rcx, %rax
movq 0x2a0(%rax), %rax
movq 0x38(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
movq 0x48(%rsp), %rcx
movq 0x38(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0xcc82c
movq $0x1, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0xcc852
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x8(%rsp), %rax
jl 0xcc86c
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xabae1(%rip), %rdi # 0x178348
callq 0x47840
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdx
leaq 0xc9425(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rcx # imm = 0x368
addq %rcx, %rax
movq 0x2c0(%rax), %rax
movq 0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0xcc7c1
movq 0x10(%rsp), %rcx
leaq 0xc93e8(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rdx # imm = 0x368
addq %rdx, %rax
movq %rcx, 0x2b0(%rax)
movq 0x28(%rsp), %rcx
leaq 0xc93c7(%rip), %rax # 0x195cb0
movq (%rax), %rax
imulq $0x368, (%rsp), %rdx # imm = 0x368
addq %rdx, %rax
movq %rcx, 0x2b8(%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| /GlobalArrays[P]ga/global/src/base.c |
pnga_create_irreg | logical pnga_create_irreg(
Integer type, /* MA type */
Integer ndim, /* number of dimensions */
Integer dims[], /* array of dimensions */
char *array_name, /* array name */
Integer map[], /* decomposition map array */
Integer nblock[], /* number of blocks for each dimension in map */
Integer *g_a) /* array handle (output) */
{
Integer d,width[MAXDIM];
logical status;
for (d=0; d<ndim; d++) width[d] = 0;
status = pnga_create_ghosts_irreg(type, ndim, dims, width,
array_name, map, nblock, g_a);
return status;
} | subq $0x98, %rsp
movq 0xa0(%rsp), %rax
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq %r9, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x88(%rsp), %rax
jge 0xd647c
movq 0x60(%rsp), %rax
movq $0x0, 0x20(%rsp,%rax,8)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0xd644f
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x70(%rsp), %r9
movq 0x68(%rsp), %r10
movq 0xa0(%rsp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xd6070
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
| /GlobalArrays[P]ga/global/src/base.c |
pnga_compare_distr | logical pnga_compare_distr(Integer g_a, Integer g_b)
{
int h_a =(int)g_a + GA_OFFSET;
int h_b =(int)g_b + GA_OFFSET;
int h_a_maplen = calc_maplen(h_a);
int h_b_maplen = calc_maplen(h_b);
int i;
_ga_sync_begin = 1; _ga_sync_end=1; /*remove any previous masking*/
ga_check_handleM(g_a, "distribution a");
ga_check_handleM(g_b, "distribution b");
if(GA[h_a].ndim != GA[h_b].ndim) return FALSE;
for(i=0; i <GA[h_a].ndim; i++)
if(GA[h_a].dims[i] != GA[h_b].dims[i]) return FALSE;
if (GA[h_a].distr_type != GA[h_b].distr_type) return FALSE;
if (GA[h_a].distr_type == REGULAR) {
if (h_a_maplen != h_b_maplen) return FALSE;
for(i=0; i <h_a_maplen; i++){
if(GA[h_a].mapc[i] != GA[h_b].mapc[i]) return FALSE;
if(GA[h_a].mapc[i] == -1) break;
}
} else if (GA[h_a].distr_type == BLOCK_CYCLIC ||
GA[h_a].distr_type == SCALAPACK || GA[h_a].distr_type == TILED) {
for (i=0; i<GA[h_a].ndim; i++) {
if (GA[h_a].block_dims[i] != GA[h_b].block_dims[i]) return FALSE;
}
for (i=0; i<GA[h_a].ndim; i++) {
if (GA[h_a].num_blocks[i] != GA[h_b].num_blocks[i]) return FALSE;
}
if (GA[h_a].distr_type == SCALAPACK || GA[h_a].distr_type == TILED) {
for (i=0; i<GA[h_a].ndim; i++) {
if (GA[h_a].nblock[i] != GA[h_b].nblock[i]) return FALSE;
}
}
} else if (GA[h_a].distr_type == TILED_IRREG) {
if (h_a_maplen != h_b_maplen) return FALSE;
for(i=0; i <h_a_maplen; i++){
if(GA[h_a].mapc[i] != GA[h_b].mapc[i]) return FALSE;
if(GA[h_a].mapc[i] == -1) break;
}
for (i=0; i<GA[h_a].ndim; i++) {
if (GA[h_a].nblock[i] != GA[h_b].nblock[i]) return FALSE;
}
}
if (GA[h_a].num_rstrctd == GA[h_b].num_rstrctd) {
if (GA[h_a].num_rstrctd > 0) {
for (i=0; i<GA[h_a].num_rstrctd; i++) {
if (GA[h_a].rstrctd_list[i] != GA[h_b].rstrctd_list[i]) return FALSE;
}
}
} else {
return FALSE;
}
return TRUE;
} | subq $0x438, %rsp # imm = 0x438
movq %rdi, 0x428(%rsp)
movq %rsi, 0x420(%rsp)
movq 0x428(%rsp), %rax
addl $0x3e8, %eax # imm = 0x3E8
movl %eax, 0x41c(%rsp)
movq 0x420(%rsp), %rax
addl $0x3e8, %eax # imm = 0x3E8
movl %eax, 0x418(%rsp)
movl 0x41c(%rsp), %edi
callq 0xd7730
movl %eax, 0x414(%rsp)
movl 0x418(%rsp), %edi
callq 0xd7730
movl %eax, 0x410(%rsp)
leaq 0xb0bf4(%rip), %rax # 0x190570
movl $0x1, (%rax)
leaq 0xb0beb(%rip), %rax # 0x190574
movl $0x1, (%rax)
movq 0x428(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
cmpq $0x0, %rax
jl 0xdf9c0
movq 0x428(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
leaq 0xb0bc0(%rip), %rcx # 0x190578
movslq (%rcx), %rcx
cmpq %rcx, %rax
jl 0xdf9f2
leaq 0x300(%rsp), %rdi
leaq 0x98059(%rip), %rsi # 0x177a28
leaq 0x98dc2(%rip), %rdx # 0x178798
movb $0x0, %al
callq 0x3080
leaq 0x300(%rsp), %rdi
movq 0x428(%rsp), %rsi
callq 0x47840
leaq 0xb62b7(%rip), %rax # 0x195cb0
movq (%rax), %rax
movq 0x428(%rsp), %rcx
addq $0x3e8, %rcx # imm = 0x3E8
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0xdfa4d
leaq 0x200(%rsp), %rdi
leaq 0x98017(%rip), %rsi # 0x177a41
leaq 0x98d67(%rip), %rdx # 0x178798
movb $0x0, %al
callq 0x3080
leaq 0x200(%rsp), %rdi
movq 0x428(%rsp), %rsi
callq 0x47840
movq 0x420(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
cmpq $0x0, %rax
jl 0xdfa7e
movq 0x420(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
leaq 0xb0b02(%rip), %rcx # 0x190578
movslq (%rcx), %rcx
cmpq %rcx, %rax
jl 0xdfab0
leaq 0x100(%rsp), %rdi
leaq 0x97f9b(%rip), %rsi # 0x177a28
leaq 0x98d13(%rip), %rdx # 0x1787a7
movb $0x0, %al
callq 0x3080
leaq 0x100(%rsp), %rdi
movq 0x420(%rsp), %rsi
callq 0x47840
leaq 0xb61f9(%rip), %rax # 0x195cb0
movq (%rax), %rax
movq 0x420(%rsp), %rcx
addq $0x3e8, %rcx # imm = 0x3E8
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0xdfb01
movq %rsp, %rdi
leaq 0x97f5e(%rip), %rsi # 0x177a41
leaq 0x98cbd(%rip), %rdx # 0x1787a7
movb $0x0, %al
callq 0x3080
movq %rsp, %rdi
movq 0x420(%rsp), %rsi
callq 0x47840
leaq 0xb61a8(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movswl (%rax), %eax
leaq 0xb6189(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
je 0xdfb54
movq $0x0, 0x430(%rsp)
jmp 0xe03be
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
leaq 0xb6143(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x41c(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xdfc06
leaq 0xb6120(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movslq 0x40c(%rsp), %rcx
movq 0x30(%rax,%rcx,8), %rax
leaq 0xb60f7(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movslq 0x40c(%rsp), %rdx
cmpq 0x30(%rcx,%rdx,8), %rax
je 0xdfbee
movq $0x0, 0x430(%rsp)
jmp 0xe03be
jmp 0xdfbf0
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xdfb5f
leaq 0xb60a3(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movl 0x224(%rax), %eax
leaq 0xb6081(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
cmpl 0x224(%rcx), %eax
je 0xdfc5d
movq $0x0, 0x430(%rsp)
jmp 0xe03be
leaq 0xb604c(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x0, 0x224(%rax)
jne 0xdfd88
movl 0x414(%rsp), %eax
cmpl 0x410(%rsp), %eax
je 0xdfca7
movq $0x0, 0x430(%rsp)
jmp 0xe03be
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
cmpl 0x414(%rsp), %eax
jge 0xdfd83
leaq 0xb5fe3(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq 0x1e8(%rax), %rax
movslq 0x40c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
leaq 0xb5fb4(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movq 0x1e8(%rcx), %rcx
movslq 0x40c(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0xdfd37
movq $0x0, 0x430(%rsp)
jmp 0xe03be
leaq 0xb5f72(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq 0x1e8(%rax), %rax
movslq 0x40c(%rsp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0xdfd6b
jmp 0xdfd83
jmp 0xdfd6d
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xdfcb2
jmp 0xe0268
leaq 0xb5f21(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x1, 0x224(%rax)
je 0xdfdfb
leaq 0xb5efc(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x2, 0x224(%rax)
je 0xdfdfb
leaq 0xb5ed7(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x3, 0x224(%rax)
jne 0xe0082
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
leaq 0xb5e9c(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x41c(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xdfeb7
leaq 0xb5e75(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movslq 0x40c(%rsp), %rcx
movq 0x228(%rax,%rcx,8), %rax
leaq 0xb5e49(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movslq 0x40c(%rsp), %rdx
cmpq 0x228(%rcx,%rdx,8), %rax
je 0xdfe9f
movq $0x0, 0x430(%rsp)
jmp 0xe03be
jmp 0xdfea1
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xdfe06
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
leaq 0xb5de0(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x41c(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xdff73
leaq 0xb5db9(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movslq 0x40c(%rsp), %rcx
movq 0x260(%rax,%rcx,8), %rax
leaq 0xb5d8d(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movslq 0x40c(%rsp), %rdx
cmpq 0x260(%rcx,%rdx,8), %rax
je 0xdff5b
movq $0x0, 0x430(%rsp)
jmp 0xe03be
jmp 0xdff5d
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xdfec2
leaq 0xb5d36(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x2, 0x224(%rax)
je 0xdffc1
leaq 0xb5d11(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x3, 0x224(%rax)
jne 0xe007d
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
leaq 0xb5cd6(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x41c(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xe007b
leaq 0xb5caf(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movslq 0x40c(%rsp), %rcx
movl 0xa0(%rax,%rcx,4), %eax
leaq 0xb5c84(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movslq 0x40c(%rsp), %rdx
cmpl 0xa0(%rcx,%rdx,4), %eax
je 0xe0063
movq $0x0, 0x430(%rsp)
jmp 0xe03be
jmp 0xe0065
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xdffcc
jmp 0xe007d
jmp 0xe0266
leaq 0xb5c27(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x4, 0x224(%rax)
jne 0xe0264
movl 0x414(%rsp), %eax
cmpl 0x410(%rsp), %eax
je 0xe00cc
movq $0x0, 0x430(%rsp)
jmp 0xe03be
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
cmpl 0x414(%rsp), %eax
jge 0xe01a8
leaq 0xb5bbe(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq 0x1e8(%rax), %rax
movslq 0x40c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
leaq 0xb5b8f(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movq 0x1e8(%rcx), %rcx
movslq 0x40c(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0xe015c
movq $0x0, 0x430(%rsp)
jmp 0xe03be
leaq 0xb5b4d(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq 0x1e8(%rax), %rax
movslq 0x40c(%rsp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0xe0190
jmp 0xe01a8
jmp 0xe0192
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xe00d7
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
leaq 0xb5aef(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x41c(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xe0262
leaq 0xb5ac8(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movslq 0x40c(%rsp), %rcx
movl 0xa0(%rax,%rcx,4), %eax
leaq 0xb5a9d(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movslq 0x40c(%rsp), %rdx
cmpl 0xa0(%rcx,%rdx,4), %eax
je 0xe024a
movq $0x0, 0x430(%rsp)
jmp 0xe03be
jmp 0xe024c
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xe01b3
jmp 0xe0264
jmp 0xe0266
jmp 0xe0268
leaq 0xb5a41(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq 0x2a8(%rax), %rax
leaq 0xb5a1e(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
cmpq 0x2a8(%rcx), %rax
jne 0xe03a4
leaq 0xb59f5(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpq $0x0, 0x2a8(%rax)
jle 0xe03a2
movl $0x0, 0x40c(%rsp)
movslq 0x40c(%rsp), %rax
leaq 0xb59b8(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x41c(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
cmpq 0x2a8(%rcx), %rax
jge 0xe03a0
leaq 0xb598f(%rip), %rax # 0x195cb0
movq (%rax), %rax
movslq 0x41c(%rsp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq 0x2a0(%rax), %rax
movslq 0x40c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
leaq 0xb5960(%rip), %rcx # 0x195cb0
movq (%rcx), %rcx
movslq 0x418(%rsp), %rdx
imulq $0x368, %rdx, %rdx # imm = 0x368
addq %rdx, %rcx
movq 0x2a0(%rcx), %rcx
movslq 0x40c(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0xe0388
movq $0x0, 0x430(%rsp)
jmp 0xe03be
jmp 0xe038a
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0xe02e9
jmp 0xe03a2
jmp 0xe03b2
movq $0x0, 0x430(%rsp)
jmp 0xe03be
movq $0x1, 0x430(%rsp)
movq 0x430(%rsp), %rax
addq $0x438, %rsp # imm = 0x438
retq
nop
| /GlobalArrays[P]ga/global/src/base.c |
pnga_gather | void pnga_gather(Integer g_a, void* v, void *subscript, Integer c_flag, Integer nv)
{
if (nv < 1) return;
ga_check_handleM(g_a, "nga_gather");
GAstat.numgat++;
#ifdef USE_GATSCAT_NEW
gai_gatscat_new(GATHER,g_a,v,subscript,c_flag,nv,&GAbytes.gattot,&GAbytes.gatloc, NULL);
#else
gai_gatscat(GATHER,g_a,v,subscript,nv,&GAbytes.gattot,&GAbytes.gatloc, NULL);
#endif
} | subq $0x248, %rsp # imm = 0x248
movq %rdi, 0x240(%rsp)
movq %rsi, 0x238(%rsp)
movq %rdx, 0x230(%rsp)
movq %rcx, 0x228(%rsp)
movq %r8, 0x220(%rsp)
cmpq $0x1, 0x220(%rsp)
jge 0xffaaf
jmp 0xffbda
movq 0x240(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
cmpq $0x0, %rax
jl 0xffae0
movq 0x240(%rsp), %rax
addq $0x3e8, %rax # imm = 0x3E8
leaq 0x90aa0(%rip), %rcx # 0x190578
movslq (%rcx), %rcx
cmpq %rcx, %rax
jl 0xffb12
leaq 0x120(%rsp), %rdi
leaq 0x77f39(%rip), %rsi # 0x177a28
leaq 0x79417(%rip), %rdx # 0x178f0d
movb $0x0, %al
callq 0x3080
leaq 0x120(%rsp), %rdi
movq 0x240(%rsp), %rsi
callq 0x47840
leaq 0x96197(%rip), %rax # 0x195cb0
movq (%rax), %rax
movq 0x240(%rsp), %rcx
addq $0x3e8, %rcx # imm = 0x3E8
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0xffb67
leaq 0x20(%rsp), %rdi
leaq 0x77efa(%rip), %rsi # 0x177a41
leaq 0x793bf(%rip), %rdx # 0x178f0d
movb $0x0, %al
callq 0x3080
leaq 0x20(%rsp), %rdi
movq 0x240(%rsp), %rsi
callq 0x47840
leaq 0x961a2(%rip), %rax # 0x195d10
movq 0x30(%rax), %rcx
addq $0x1, %rcx
leaq 0x96193(%rip), %rax # 0x195d10
movq %rcx, 0x30(%rax)
movq 0x240(%rsp), %rsi
movq 0x238(%rsp), %rdx
movq 0x230(%rsp), %rcx
movq 0x228(%rsp), %r8
movq 0x220(%rsp), %r9
movl $0xffffff9e, %edi # imm = 0xFFFFFF9E
leaq 0x9609b(%rip), %rax # 0x195c50
movq %rax, %r10
addq $0x40, %r10
addq $0x48, %rax
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0xfd530
addq $0x248, %rsp # imm = 0x248
retq
nopw %cs:(%rax,%rax)
| /GlobalArrays[P]ga/global/src/onesided.c |
gai_ComputePatchIndexWithSkip | void gai_ComputePatchIndexWithSkip(Integer ndim, Integer *lo, Integer *plo,
Integer *skip, Integer *ld, Integer *idx_buf)
{
Integer i, delta, inc, factor;
delta = plo[0] - lo[0];
inc = delta%skip[0];
delta -= inc;
delta /= skip[0];
*idx_buf = delta;
for (i=0; i<ndim-1; i++) {
factor = ld[i];
delta = plo[i+1]-lo[i+1];
inc = delta%skip[i+1];
delta -= inc;
delta /= skip[i+1];
*idx_buf += factor*delta;
}
} | movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movq %r8, -0x28(%rsp)
movq %r9, -0x30(%rsp)
movq -0x18(%rsp), %rax
movq (%rax), %rax
movq -0x10(%rsp), %rcx
subq (%rcx), %rax
movq %rax, -0x40(%rsp)
movq -0x40(%rsp), %rax
movq -0x20(%rsp), %rcx
cqto
idivq (%rcx)
movq %rdx, -0x48(%rsp)
movq -0x48(%rsp), %rcx
movq -0x40(%rsp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rsp)
movq -0x20(%rsp), %rax
movq (%rax), %rcx
movq -0x40(%rsp), %rax
cqto
idivq %rcx
movq %rax, -0x40(%rsp)
movq -0x40(%rsp), %rcx
movq -0x30(%rsp), %rax
movq %rcx, (%rax)
movq $0x0, -0x38(%rsp)
movq -0x38(%rsp), %rax
movq -0x8(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0x1064f7
movq -0x28(%rsp), %rax
movq -0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rsp)
movq -0x18(%rsp), %rax
movq -0x38(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq -0x10(%rsp), %rcx
movq -0x38(%rsp), %rdx
subq 0x8(%rcx,%rdx,8), %rax
movq %rax, -0x40(%rsp)
movq -0x40(%rsp), %rax
movq -0x20(%rsp), %rcx
movq -0x38(%rsp), %rsi
cqto
idivq 0x8(%rcx,%rsi,8)
movq %rdx, -0x48(%rsp)
movq -0x48(%rsp), %rcx
movq -0x40(%rsp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rsp)
movq -0x20(%rsp), %rax
movq -0x38(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rcx
movq -0x40(%rsp), %rax
cqto
idivq %rcx
movq %rax, -0x40(%rsp)
movq -0x50(%rsp), %rcx
imulq -0x40(%rsp), %rcx
movq -0x30(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
jmp 0x106436
retq
nopl (%rax,%rax)
| /GlobalArrays[P]ga/global/src/onesided.c |
dd_ev | double dd_ev(long ndims,Integer ardims[], Integer pedims[])
{
double q, t;
long k;
q = 1.0;
t = 1.0;
for(k=0;k<ndims;k++){
q = (ardims[k]/pedims[k])*pedims[k];
t = t*(q/(double)ardims[k]);
}
return t;
} | movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movsd 0x1f541(%rip), %xmm0 # 0x16f108
movsd %xmm0, -0x20(%rsp)
movsd 0x1f533(%rip), %xmm0 # 0x16f108
movsd %xmm0, -0x28(%rsp)
movq $0x0, -0x30(%rsp)
movq -0x30(%rsp), %rax
cmpq -0x8(%rsp), %rax
jge 0x14fc62
movq -0x10(%rsp), %rax
movq -0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rsp), %rcx
movq -0x30(%rsp), %rsi
cqto
idivq (%rcx,%rsi,8)
movq -0x18(%rsp), %rcx
movq -0x30(%rsp), %rdx
imulq (%rcx,%rdx,8), %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x20(%rsp)
movsd -0x28(%rsp), %xmm0
movsd -0x20(%rsp), %xmm1
movq -0x10(%rsp), %rax
movq -0x30(%rsp), %rcx
cvtsi2sdq (%rax,%rcx,8), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rsp)
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x14fbe4
movsd -0x28(%rsp), %xmm0
retq
nopl (%rax)
| /GlobalArrays[P]ga/global/src/decomp.c |
trace_init_ | void trace_init_(long *n)
{
MA_AccessIndex index;
long err;
if(*n<=0){
printf("trace_init>> invalid max number of events: %ld\n",*n);
return;
}
current = 0;
err = 0;
/* MA_initialize(MT_INT,10000,10000); */
MAX_EVENTS = *n;
if(!MA_push_get(MT_LONGINT, *n*2, "timeLog", &thandle, &index)){
printf("trace_init>> failed to allocate memory 1\n");
err ++;
}
MA_get_pointer(thandle, &tlog);
if(!tlog){
printf("trace_init>> null pointer: 1\n");
err ++;
}
if(!MA_push_get(MT_LONGINT, *n*6, "indexLog", &ihandle, &index)){
printf("trace_init>> failed to allocate memory 2\n");
err ++;
}
MA_get_pointer(ihandle, &indlog);
if(!indlog) {
printf("trace_init>> null pointer: 2\n");
err ++;
}
if(!MA_push_get(MT_INT, MAX_GAS, "gaLog", &gahandle, &index)){
printf("trace_init>> failed to allocate memory 2\n");
err ++;
}
MA_get_pointer(gahandle, &galog);
if(!galog) {
printf("trace_init>> null pointer: 2\n");
err ++;
}
ganum = 0;
if(err) MAX_EVENTS = 0;
} | subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jg 0x152d6f
movq 0x10(%rsp), %rax
movq (%rax), %rsi
leaq 0x26bed(%rip), %rdi # 0x179950
movb $0x0, %al
callq 0x3040
jmp 0x152f22
movq $0x0, 0x450be(%rip) # 0x197e38
movq $0x0, (%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x450af(%rip) # 0x197e40
movq 0x10(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
movl $0x3ea, %edi # imm = 0x3EA
leaq 0x26bd9(%rip), %rdx # 0x179981
leaq 0x45099(%rip), %rcx # 0x197e48
leaq 0x8(%rsp), %r8
callq 0x80b0
cmpq $0x0, %rax
jne 0x152dd9
leaq 0x26bc3(%rip), %rdi # 0x179989
movb $0x0, %al
callq 0x3040
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x45068(%rip), %rdi # 0x197e48
leaq 0x45069(%rip), %rsi # 0x197e50
callq 0x6ef0
cmpq $0x0, 0x4505c(%rip) # 0x197e50
jne 0x152e10
leaq 0x26bb6(%rip), %rdi # 0x1799b3
movb $0x0, %al
callq 0x3040
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
imulq $0x6, (%rax), %rsi
movl $0x3ea, %edi # imm = 0x3EA
leaq 0x26bac(%rip), %rdx # 0x1799d1
leaq 0x4502c(%rip), %rcx # 0x197e58
leaq 0x8(%rsp), %r8
callq 0x80b0
cmpq $0x0, %rax
jne 0x152e56
leaq 0x26b97(%rip), %rdi # 0x1799da
movb $0x0, %al
callq 0x3040
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x44ffb(%rip), %rdi # 0x197e58
leaq 0x44ffc(%rip), %rsi # 0x197e60
callq 0x6ef0
cmpq $0x0, 0x44fef(%rip) # 0x197e60
jne 0x152e8d
leaq 0x26b8a(%rip), %rdi # 0x179a04
movb $0x0, %al
callq 0x3040
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movl $0x3e9, %edi # imm = 0x3E9
movl $0x64, %esi
leaq 0x26b84(%rip), %rdx # 0x179a22
leaq 0x44fc3(%rip), %rcx # 0x197e68
leaq 0x8(%rsp), %r8
callq 0x80b0
cmpq $0x0, %rax
jne 0x152ecf
leaq 0x26b1e(%rip), %rdi # 0x1799da
movb $0x0, %al
callq 0x3040
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x44f92(%rip), %rdi # 0x197e68
leaq 0x44f93(%rip), %rsi # 0x197e70
callq 0x6ef0
cmpq $0x0, 0x44f86(%rip) # 0x197e70
jne 0x152f06
leaq 0x26b11(%rip), %rdi # 0x179a04
movb $0x0, %al
callq 0x3040
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movl $0x0, 0x44f68(%rip) # 0x197e78
cmpq $0x0, (%rsp)
je 0x152f22
movq $0x0, 0x44f1e(%rip) # 0x197e40
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| /GlobalArrays[P]ga/global/src/ga_trace.c |
ga_sort_scat_dcpl_ | static void ga_sort_scat_dcpl_(pn, v, i, j, base)
Integer *pn;
DoubleComplex *v;
Integer *i;
Integer *j;
Integer *base;
{
if (*pn < 2) return;
# undef SWAP
# define SWAP(a,b) { \
Integer ltmp; \
DoubleComplex dtmp; \
long ia = a - base; \
long ib = b - base; \
ltmp=*a; *a=*b; *b=ltmp; \
dtmp=v[ia]; v[ia]=v[ib]; v[ib]=dtmp; \
ltmp=i[ia]; i[ia]=i[ib]; i[ib]=ltmp; \
ltmp=j[ia]; j[ia]=j[ib]; j[ib]=ltmp; \
}
INDEX_SORT(base,pn,SWAP);
} | subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x2, (%rax)
jge 0x15420d
jmp 0x1547f3
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
addq $-0x8, %rax
movq %rax, -0x8(%rsp)
movq (%rsp), %rax
sarq %rax
movq %rax, 0x28(%rsp)
movq -0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq (%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x154271
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x154273
cmpq $0x1, 0x28(%rsp)
je 0x15448e
movq -0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x20(%rsp)
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
cmpq 0x8(%rsp), %rax
ja 0x154479
movq 0x20(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x154305
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
cmpq (%rcx), %rax
jle 0x154305
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
cmpq (%rcx), %rax
jl 0x15431c
jmp 0x154479
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x28(%rsp)
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x30(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
movq -0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rsp)
movq 0x48(%rsp), %rax
movq -0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x48(%rsp), %rcx
movq -0x30(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rax
movq -0x30(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x20(%rsp), %rcx
movq %rcx, (%rax)
movq -0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
movq -0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rsp)
movq 0x40(%rsp), %rax
movq -0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x40(%rsp), %rax
movq -0x28(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rdx
movq 0x40(%rsp), %rax
movq -0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movq -0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rsp)
movq 0x38(%rsp), %rax
movq -0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x38(%rsp), %rax
movq -0x28(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rdx
movq 0x38(%rsp), %rax
movq -0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x15429a
jmp 0x15447b
movq 0x28(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x154273
jmp 0x154490
movq 0x8(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x1547f3
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x1, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
cmpq 0x8(%rsp), %rax
ja 0x154692
movq 0x20(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x15451e
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
cmpq (%rcx), %rax
jle 0x15451e
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
cmpq (%rcx), %rax
jl 0x154535
jmp 0x154692
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x50(%rsp)
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x58(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x38(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
movq -0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x48(%rsp)
movq 0x8(%rax), %rax
movq %rax, -0x40(%rsp)
movq 0x48(%rsp), %rax
movq -0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x48(%rsp), %rcx
movq -0x58(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rax
movq -0x58(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x48(%rsp), %rcx
movq %rcx, (%rax)
movq -0x40(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
movq -0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rsp)
movq 0x40(%rsp), %rax
movq -0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x40(%rsp), %rax
movq -0x50(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rsp), %rdx
movq 0x40(%rsp), %rax
movq -0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movq -0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rsp)
movq 0x38(%rsp), %rax
movq -0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x38(%rsp), %rax
movq -0x50(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rsp), %rdx
movq 0x38(%rsp), %rax
movq -0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x1544b3
movq 0x30(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x78(%rsp)
movq 0x8(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, -0x80(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq -0x60(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
movq -0x78(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x70(%rsp)
movq 0x8(%rax), %rax
movq %rax, -0x68(%rsp)
movq 0x48(%rsp), %rax
movq -0x78(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x48(%rsp), %rcx
movq -0x80(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rax
movq -0x80(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x70(%rsp), %rcx
movq %rcx, (%rax)
movq -0x68(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
movq -0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rsp)
movq 0x40(%rsp), %rax
movq -0x80(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x40(%rsp), %rax
movq -0x78(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rsp), %rdx
movq 0x40(%rsp), %rax
movq -0x80(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movq -0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rsp)
movq 0x38(%rsp), %rax
movq -0x80(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x38(%rsp), %rax
movq -0x78(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rsp), %rdx
movq 0x38(%rsp), %rax
movq -0x80(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x154490
addq $0x58, %rsp
retq
nopl (%rax,%rax)
| /GlobalArrays[P]ga/global/src/hsort.scat.c |
fp_abort_output | void fp_abort_output (fitsfile *infptr, fitsfile *outfptr, int stat)
{
int status = 0, hdunum;
char msg[SZ_STR];
if (infptr)
{
fits_file_name(infptr, tempfilename, &status);
fits_get_hdu_num(infptr, &hdunum);
fits_close_file (infptr, &status);
snprintf(msg, SZ_STR,"Error processing file: %s\n", tempfilename);
fp_msg (msg);
snprintf(msg, SZ_STR," in HDU number %d\n", hdunum);
fp_msg (msg);
}
else
{
snprintf(msg, SZ_STR,"Error: Unable to process input file\n");
fp_msg(msg);
}
fits_report_error (stderr, stat);
if (outfptr) {
fits_delete_file(outfptr, &status);
fp_msg ("Input file is unchanged.\n");
}
exit (stat);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movl %edx, %ebx
movq %rsi, %r14
movl $0x0, 0x8(%rsp)
testq %rdi, %rdi
jne 0x68af
movups 0xc2872(%rip), %xmm0 # 0xc90ff
movaps %xmm0, 0x20(%rsp)
movups 0xc2856(%rip), %xmm0 # 0xc90ef
movaps %xmm0, 0x10(%rsp)
movabsq $0xa656c69662074, %rax # imm = 0xA656C69662074
movq %rax, 0x2d(%rsp)
jmp 0x692c
movq %rdi, %r12
leaq 0xf8b47(%rip), %r13 # 0xff400
leaq 0x8(%rsp), %rbp
movq %r13, %rsi
movq %rbp, %rdx
callq 0x3653b
leaq 0xc(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x3becc
movq %r12, %rdi
movq %rbp, %rsi
callq 0xd6de
leaq 0xc27d5(%rip), %rdx # 0xc90c0
leaq 0x10(%rsp), %r12
movl $0x201, %esi # imm = 0x201
movq %r12, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x60b0
leaq 0xc2ecb(%rip), %rdi # 0xc97d4
movq %r12, %rsi
xorl %eax, %eax
callq 0x6050
movl (%r15), %ecx
leaq 0xc27be(%rip), %rdx # 0xc90db
movl $0x201, %esi # imm = 0x201
movq %r12, %rdi
xorl %eax, %eax
callq 0x60b0
leaq 0xc2ea1(%rip), %rdi # 0xc97d4
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x6050
movq 0xf8682(%rip), %rax # 0xfefc8
movq (%rax), %rdi
movl %ebx, %esi
callq 0x164d4
testq %r14, %r14
je 0x696e
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1617e
leaq 0xc320f(%rip), %rdi # 0xc9b78
callq 0x6120
movl %ebx, %edi
callq 0x6150
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/utilities/fpackutil.c |
fp_preflight | int fp_preflight (int argc, char *argv[], int unpack, fpstate *fpptr)
{
char infits[SZ_STR], outfits[SZ_STR];
int iarg, namelen, nfiles = 0;
if (fpptr->initialized != FP_INIT_MAGIC) {
fp_msg ("Error: internal initialization error\n"); exit (-1);
}
for (iarg=fpptr->firstfile; iarg < argc; iarg++) {
outfits[0] = '\0';
if (strlen(argv[iarg]) > SZ_STR - 4) { /* allow for .fz or .gz suffix */
fp_msg ("Error: input file name\n "); fp_msg (argv[iarg]);
fp_msg ("\n is too long\n"); fp_noop (); exit (-1);
}
strncpy (infits, argv[iarg], SZ_STR);
if (infits[0] == '-' && infits[1] != '\0') {
/* don't interpret this as intending to read input file from stdin */
fp_msg ("Error: invalid input file name\n "); fp_msg (argv[iarg]);
fp_msg ("\n"); fp_noop (); exit (-1);
}
if (strchr (infits, '[') || strchr (infits, ']')) {
fp_msg ("Error: section/extension notation not supported: ");
fp_msg (infits); fp_msg ("\n"); fp_noop (); exit (-1);
}
if (unpack) {
/* ********** This section applies to funpack ************ */
/* check that input file exists */
if (infits[0] != '-') { /* if not reading from stdin stream */
if (fp_access (infits) != 0) { /* if not, then check if */
strcat(infits, ".fz"); /* a .fz version exsits */
if (fp_access (infits) != 0) {
namelen = strlen(infits);
infits[namelen - 3] = '\0'; /* remove the .fz suffix */
fp_msg ("Error: can't find or read input file "); fp_msg (infits);
fp_msg ("\n"); fp_noop (); exit (-1);
}
} else { /* make sure a .fz version of the same file doesn't exist */
namelen = strlen(infits);
strcat(infits, ".fz");
if (fp_access (infits) == 0) {
infits[namelen] = '\0'; /* remove the .fz suffix */
fp_msg ("Error: ambiguous input file name. Which file should be unpacked?:\n ");
fp_msg (infits); fp_msg ("\n ");
fp_msg (infits); fp_msg (".fz\n");
fp_noop (); exit (-1);
} else {
infits[namelen] = '\0'; /* remove the .fz suffix */
}
}
}
/* if writing to stdout, then we are all done */
if (fpptr->to_stdout) {
continue;
}
if (fpptr->outfile[0]) { /* user specified output file name */
nfiles++;
if (nfiles > 1) {
fp_msg ("Error: cannot use same output file name for multiple files:\n ");
fp_msg (fpptr->outfile);
fp_msg ("\n"); fp_noop (); exit (-1);
}
/* check that output file doesn't exist */
if (fp_access (fpptr->outfile) == 0) {
fp_msg ("Error: output file already exists:\n ");
fp_msg (fpptr->outfile);
fp_msg ("\n "); fp_noop (); exit (-1);
}
continue;
}
/* construct output file name to test */
if (fpptr->prefix[0]) {
if (strlen(fpptr->prefix) + strlen(infits) > SZ_STR - 1) {
fp_msg ("Error: output file name for\n "); fp_msg (infits);
fp_msg ("\n is too long with the prefix\n"); fp_noop (); exit (-1);
}
strcpy(outfits,fpptr->prefix);
}
/* construct output file name */
if (infits[0] == '-') {
strcpy(outfits, "output.fits");
} else {
strcat(outfits, infits);
}
/* remove .gz or .bz2 suffix, if present (output is not gzipped) */
namelen = strlen(outfits);
if (namelen >= 3 && !strcmp(".gz", outfits + namelen - 3) ) {
outfits[namelen - 3] = '\0';
}
else if (namelen >= 4 && !strcmp(".bz2", outfits + namelen - 4)) {
outfits[namelen - 4] = '\0';
}
/* check for .fz suffix that is sometimes required */
/* and remove it if present */
if (infits[0] != '-') { /* if not reading from stdin stream */
namelen = strlen(outfits);
if (namelen>=3 && !strcmp(".fz", outfits + namelen - 3) ) { /* suffix is present */
outfits[namelen - 3] = '\0';
} else if (fpptr->delete_suffix) { /* required suffix is missing */
fp_msg ("Error: input compressed file "); fp_msg (infits);
fp_msg ("\n does not have the default .fz suffix.\n");
fp_noop (); exit (-1);
}
}
/* if infits != outfits, make sure outfits doesn't already exist */
if (strcmp(infits, outfits)) {
if (fp_access (outfits) == 0) {
fp_msg ("Error: output file already exists:\n "); fp_msg (outfits);
fp_msg ("\n "); fp_noop (); exit (-1);
}
}
/* if gzipping the output, make sure .gz file doesn't exist */
if (fpptr->do_gzip_file) {
if (strlen(outfits)+3 > SZ_STR-1)
{
fp_msg ("Error: output file name too long:\n "); fp_msg (outfits);
fp_msg ("\n "); fp_noop (); exit (-1);
}
strcat(outfits, ".gz");
if (fp_access (outfits) == 0) {
fp_msg ("Error: output file already exists:\n "); fp_msg (outfits);
fp_msg ("\n "); fp_noop (); exit (-1);
}
namelen = strlen(outfits);
outfits[namelen - 3] = '\0'; /* remove the .gz suffix again */
}
} else {
/* ********** This section applies to fpack ************ */
/* check that input file exists */
if (infits[0] != '-') { /* if not reading from stdin stream */
if (fp_access (infits) != 0) { /* if not, then check if */
if (strlen(infits)+3 > SZ_STR-1)
{
fp_msg ("Error: input file name too long:\n "); fp_msg (infits);
fp_msg ("\n "); fp_noop (); exit (-1);
}
strcat(infits, ".gz"); /* a gzipped version exsits */
if (fp_access (infits) != 0) {
namelen = strlen(infits);
infits[namelen - 3] = '\0'; /* remove the .gz suffix */
fp_msg ("Error: can't find or read input file "); fp_msg (infits);
fp_msg ("\n"); fp_noop (); exit (-1);
}
}
}
/* make sure the file to pack does not already have a .fz suffix */
namelen = strlen(infits);
if (namelen>=3 && !strcmp(".fz", infits + namelen - 3) ) {
fp_msg ("Error: fpack input file already has '.fz' suffix\n" ); fp_msg (infits);
fp_msg ("\n"); fp_noop (); exit (-1);
}
/* if writing to stdout, or just testing the files, then we are all done */
if (fpptr->to_stdout || fpptr->test_all) {
continue;
}
if (fpptr->outfile[0]) { /* user specified output file name */
nfiles++;
if (nfiles > 1) {
fp_msg("Error: cannot use same output file name for multiple files:\n ");
fp_msg(fpptr->outfile);
fp_msg ("\n"); fp_noop (); exit (-1);
}
/* check that output file doesn't exist */
if (fp_access (fpptr->outfile) == 0) {
fp_msg ("Error: output file already exists:\n ");
fp_msg (fpptr->outfile);
fp_msg ("\n "); fp_noop (); exit (-1);
}
continue;
}
/* construct output file name */
if (infits[0] == '-') {
strcpy(outfits, "input.fits");
} else {
strcpy(outfits, infits);
}
/* remove .gz suffix, if present (output is not gzipped) */
/* do the same if compression suffix is bz2 */
namelen = strlen(outfits);
if (namelen >=3 && !strcmp(".gz", outfits + namelen - 3) ) {
outfits[namelen - 3] = '\0';
}
else if (namelen >= 4 && !strcmp(".bz2", outfits + namelen - 4)) {
outfits[namelen - 4] = '\0';
}
/* remove .imh suffix (IRAF format image), and replace with .fits */
namelen = strlen(outfits);
if (namelen >=4 && !strcmp(".imh", outfits + namelen - 4) ) {
outfits[namelen - 4] = '\0';
if (strlen(outfits) == SZ_STR-5)
strcat(outfits, ".fit");
else
strcat(outfits, ".fits");
}
/* If not clobbering the input file, add .fz suffix to output name */
if (! fpptr->clobber)
{
if (strlen(outfits) > SZ_STR-4)
{
fp_msg ("Error: output file name too long:\n "); fp_msg (outfits);
fp_msg ("\n "); fp_noop (); exit (-1);
}
else
strcat(outfits, ".fz");
}
/* if infits != outfits, make sure outfits doesn't already exist */
if (strcmp(infits, outfits)) {
if (fp_access (outfits) == 0) {
fp_msg ("Error: output file already exists:\n "); fp_msg (outfits);
fp_msg ("\n "); fp_noop (); exit (-1);
}
}
} /* end of fpack section */
}
fpptr->preflight_checked++;
return(0);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp # imm = 0x448
cmpl $0x2a, 0x69c(%rcx)
jne 0x7a15
movq %rcx, %r14
movslq 0x698(%rcx), %rax
movq %rdi, 0x10(%rsp)
cmpl %eax, %edi
jle 0x78ce
movl %edx, %r12d
movl $0xfffffffc, %edx # imm = 0xFFFFFFFC
leaq 0x494(%r14), %r15
leaq 0x8c(%r14), %rcx
movq %rcx, 0x28(%rsp)
leaq (%rsi,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rcx
subl %eax, %ecx
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
leaq 0x240(%rsp), %r13
leaq 0x1(%rdx), %rax
movq %rax, 0x18(%rsp)
movl $0x0, (%rsp)
movl %r12d, 0x4(%rsp)
movq %r15, 0x20(%rsp)
movb $0x0, 0x30(%rsp)
movq 0x8(%rsp), %rax
movq (%rax,%rbp,8), %rbx
movq %rbx, %rdi
callq 0x6280
cmpq $0x1fe, %rax # imm = 0x1FE
jae 0x7902
movl $0x201, %edx # imm = 0x201
movq %r13, %rdi
movq %rbx, %rsi
callq 0x64e0
movb 0x240(%rsp), %bl
cmpb $0x2d, %bl
jne 0x73da
cmpb $0x0, 0x241(%rsp)
jne 0x7925
movq %r13, %rdi
movl $0x5b, %esi
callq 0x63c0
testq %rax, %rax
jne 0x78e9
movq %r13, %rdi
movl $0x5d, %esi
callq 0x63c0
testq %rax, %rax
jne 0x78e9
testl %r12d, %r12d
je 0x744c
cmpb $0x2d, %bl
je 0x7552
movq %r13, %rdi
callq 0x69e5
movq %r13, %rdi
testl %eax, %eax
je 0x751c
callq 0x6280
movl $0x7a662e, 0x240(%rsp,%rax) # imm = 0x7A662E
movq %r13, %rdi
callq 0x69e5
testl %eax, %eax
je 0x7552
jmp 0x794d
cmpb $0x2d, %bl
je 0x749a
movq %r13, %rdi
callq 0x69e5
testl %eax, %eax
je 0x749a
movq %r13, %rdi
callq 0x6280
addq $-0x1fe, %rax # imm = 0xFE02
cmpq $-0x202, %rax # imm = 0xFDFE
jbe 0x79ff
movq %r13, %rdi
callq 0x6280
movl $0x7a672e, 0x240(%rsp,%rax) # imm = 0x7A672E
movq %r13, %rdi
callq 0x69e5
testl %eax, %eax
jne 0x794d
movq %r13, %rdi
callq 0x6280
cmpl $0x3, %eax
jl 0x74ce
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
leaq 0x23d(%rsp), %rcx
addq %rcx, %rax
leaq 0xc1e4b(%rip), %rdi # 0xc9309
movq %rax, %rsi
callq 0x6420
testl %eax, %eax
je 0x79a9
cmpl $0x0, 0x60(%r14)
jne 0x774f
cmpl $0x0, 0x84(%r14)
jne 0x774f
cmpb $0x0, (%r15)
jne 0x7563
cmpb $0x2d, 0x240(%rsp)
jne 0x7761
movabsq $0x69662e7475706e69, %rax # imm = 0x69662E7475706E69
movq %rax, 0x30(%rsp)
movl $0x737469, 0x37(%rsp) # imm = 0x737469
leaq 0x30(%rsp), %rbx
jmp 0x7771
callq 0x6280
movq %rax, %rbx
movq %r13, %rdi
callq 0x6280
movl $0x7a662e, 0x240(%rsp,%rax) # imm = 0x7A662E
movq %r13, %rdi
callq 0x69e5
movslq %ebx, %rcx
movb $0x0, 0x240(%rsp,%rcx)
testl %eax, %eax
je 0x79c6
cmpl $0x0, 0x60(%r14)
jne 0x774f
cmpb $0x0, (%r15)
je 0x7589
cmpl $0x0, (%rsp)
jg 0x793c
movq %r15, %rdi
callq 0x69e5
movl $0x1, (%rsp)
testl %eax, %eax
jne 0x774f
jmp 0x79b5
movq 0x28(%rsp), %r12
cmpb $0x0, (%r12)
je 0x75c4
movq %r12, %rdi
callq 0x6280
movq %rax, %rbx
movq %r13, %rdi
callq 0x6280
addq %rbx, %rax
cmpq $0x201, %rax # imm = 0x201
jae 0x7a48
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x6460
movb 0x240(%rsp), %r15b
cmpb $0x2d, %r15b
jne 0x75f0
movabsq $0x662e74757074756f, %rax # imm = 0x662E74757074756F
movq %rax, 0x30(%rsp)
movl $0x737469, 0x38(%rsp) # imm = 0x737469
leaq 0x30(%rsp), %rbx
jmp 0x7600
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6330
movq %rbx, %rdi
callq 0x6280
movq %rax, %r12
cmpl $0x3, %r12d
jl 0x766d
movl %r12d, %ebx
andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
leaq 0x2d(%rsp), %rax
leaq (%rax,%rbx), %rsi
leaq 0xc645b(%rip), %rdi # 0xcda85
callq 0x6420
testl %eax, %eax
je 0x765b
cmpl $0x3, %r12d
je 0x766d
leaq 0x2c(%rsp), %rax
addq %rax, %rbx
leaq 0xc1dc2(%rip), %rdi # 0xc940a
movq %rbx, %rsi
callq 0x6420
movl $0xfffffffc, %ecx # imm = 0xFFFFFFFC
testl %eax, %eax
jne 0x766d
jmp 0x7664
movl $0xfffffffc, %eax # imm = 0xFFFFFFFC
leaq 0x1(%rax), %rcx
addl %ecx, %r12d
movb $0x0, 0x30(%rsp,%r12)
cmpb $0x2d, %r15b
movq 0x20(%rsp), %r15
je 0x76be
leaq 0x30(%rsp), %rdi
callq 0x6280
movq %rax, %r12
cmpl $0x3, %r12d
jl 0x76b0
movl %r12d, %esi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
leaq 0x2d(%rsp), %rax
addq %rax, %rsi
leaq 0xc1c66(%rip), %rdi # 0xc9309
callq 0x6420
testl %eax, %eax
je 0x7845
cmpl $0x0, 0x490(%r14)
jne 0x7a6d
movq %r13, %rdi
leaq 0x30(%rsp), %rbx
movq %rbx, %rsi
callq 0x6420
testl %eax, %eax
movl 0x4(%rsp), %r12d
je 0x76e7
movq %rbx, %rdi
callq 0x69e5
testl %eax, %eax
je 0x78c2
cmpl $0x0, 0x78(%r14)
je 0x774f
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x6280
addq $-0x1fe, %rax # imm = 0xFE02
cmpq $-0x202, %rax # imm = 0xFDFE
jbe 0x7a26
movq %rbx, %rdi
callq 0x6280
movl $0x7a672e, 0x30(%rsp,%rax) # imm = 0x7A672E
movq %rbx, %rdi
callq 0x69e5
testl %eax, %eax
je 0x78c2
movq %rbx, %rdi
callq 0x6280
shlq $0x20, %rax
movabsq $-0x300000000, %rcx # imm = 0xFFFFFFFD00000000
addq %rcx, %rax
sarq $0x20, %rax
movb $0x0, 0x30(%rsp,%rax)
incq %rbp
cmpl %ebp, 0x10(%rsp)
jne 0x738e
jmp 0x78ce
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6460
movq %rbx, %rdi
callq 0x6280
movq %rax, %rbx
cmpl $0x3, %ebx
jl 0x77d5
movl %ebx, %r12d
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
leaq 0x2d(%rsp), %rax
leaq (%rax,%r12), %rsi
leaq 0xc62ea(%rip), %rdi # 0xcda85
callq 0x6420
movq 0x18(%rsp), %rcx
testl %eax, %eax
je 0x77ce
cmpl $0x3, %ebx
je 0x77d5
leaq 0x2c(%rsp), %rax
addq %rax, %r12
leaq 0xc1c4d(%rip), %rdi # 0xc940a
movq %r12, %rsi
callq 0x6420
movl $0xfffffffc, %ecx # imm = 0xFFFFFFFC
testl %eax, %eax
jne 0x77d5
addl %ecx, %ebx
movb $0x0, 0x30(%rsp,%rbx)
leaq 0x30(%rsp), %rdi
callq 0x6280
movq %rax, %r12
cmpl $0x4, %r12d
jl 0x7865
movl %r12d, %esi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
leaq 0x2c(%rsp), %rax
addq %rax, %rsi
leaq 0xc1cda(%rip), %rdi # 0xc94da
callq 0x6420
testl %eax, %eax
jne 0x7865
movl $0xfffffffc, %eax # imm = 0xFFFFFFFC
addl %eax, %r12d
movb $0x0, 0x30(%rsp,%r12)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x6280
movq %rax, %rbx
movq %r12, %rdi
callq 0x6280
addq %rsp, %rax
addq $0x30, %rax
cmpq $0x1fc, %rbx # imm = 0x1FC
jne 0x7859
movb $0x0, 0x4(%rax)
jmp 0x785f
movl $0xfffffffc, %eax # imm = 0xFFFFFFFC
addl %r12d, %eax
incl %eax
movb $0x0, 0x30(%rsp,%rax)
jmp 0x76be
movw $0x73, 0x4(%rax)
movl $0x7469662e, (%rax) # imm = 0x7469662E
cmpl $0x0, 0x68(%r14)
movl 0x4(%rsp), %r12d
jne 0x789a
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x6280
cmpq $0x1fe, %rax # imm = 0x1FE
jae 0x7a26
movq %rbx, %rdi
callq 0x6280
movl $0x7a662e, 0x30(%rsp,%rax) # imm = 0x7A662E
movq %r13, %rdi
leaq 0x30(%rsp), %rbx
movq %rbx, %rsi
callq 0x6420
testl %eax, %eax
je 0x774f
movq %rbx, %rdi
callq 0x69e5
testl %eax, %eax
jne 0x774f
leaq 0xc1acf(%rip), %rdi # 0xc9398
jmp 0x7a2d
incl 0x6a0(%r14)
xorl %eax, %eax
addq $0x448, %rsp # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc18d0(%rip), %rdi # 0xc91c0
callq 0x683c
leaq 0x240(%rsp), %rdi
jmp 0x7989
leaq 0xc19b1(%rip), %rdi # 0xc92ba
callq 0x683c
movq 0x8(%rsp), %rax
movq (%rax,%rbp,8), %rdi
callq 0x683c
leaq 0xc19b2(%rip), %rdi # 0xc92d5
jmp 0x7995
leaq 0xc19ba(%rip), %rdi # 0xc92e6
callq 0x683c
movq 0x8(%rsp), %rax
movq (%rax,%rbp,8), %rdi
jmp 0x7989
leaq 0xc1a15(%rip), %rdi # 0xc9358
callq 0x683c
movq %r15, %rdi
jmp 0x7989
leaq 0x240(%rsp), %rbx
movq %rbx, %rdi
callq 0x6280
shlq $0x20, %rax
movabsq $-0x300000000, %rcx # imm = 0xFFFFFFFD00000000
addq %rcx, %rax
sarq $0x20, %rax
movb $0x0, 0x240(%rsp,%rax)
leaq 0xc1871(%rip), %rdi # 0xc91f2
callq 0x683c
movq %rbx, %rdi
callq 0x683c
leaq 0xc351f(%rip), %rdi # 0xcaeb4
callq 0x683c
callq 0x6852
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x6150
leaq 0xc1aed(%rip), %rdi # 0xc949d
jmp 0x78f0
leaq 0xc19dc(%rip), %rdi # 0xc9398
callq 0x683c
movq %r15, %rdi
jmp 0x7a37
leaq 0xc1940(%rip), %rdi # 0xc930d
callq 0x683c
leaq 0x240(%rsp), %rbx
movq %rbx, %rdi
callq 0x683c
leaq 0xc1966(%rip), %rdi # 0xc934f
callq 0x683c
movq %rbx, %rdi
callq 0x683c
leaq 0xc1956(%rip), %rdi # 0xc9353
jmp 0x7995
leaq 0xc1a74(%rip), %rdi # 0xc947a
callq 0x683c
leaq 0x240(%rsp), %rdi
jmp 0x7a37
leaq 0xc177e(%rip), %rdi # 0xc919a
callq 0x683c
jmp 0x799f
leaq 0xc1a29(%rip), %rdi # 0xc9456
callq 0x683c
leaq 0x30(%rsp), %rdi
callq 0x683c
leaq 0xc1a57(%rip), %rdi # 0xc949a
jmp 0x7995
leaq 0xc196e(%rip), %rdi # 0xc93bd
callq 0x683c
leaq 0x240(%rsp), %rdi
callq 0x683c
leaq 0xc1975(%rip), %rdi # 0xc93dd
jmp 0x7995
leaq 0xc199b(%rip), %rdi # 0xc940f
callq 0x683c
leaq 0x240(%rsp), %rdi
callq 0x683c
leaq 0xc19a0(%rip), %rdi # 0xc942d
jmp 0x7995
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/utilities/fpackutil.c |
fp_test | int fp_test (char *infits, char *outfits, char *outfits2, fpstate fpvar)
{
fitsfile *inputfptr, *infptr, *outfptr, *outfptr2, *tempfile;
long naxes[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
int stat=0, totpix=0, naxis=0, ii, hdutype, bitpix = 0, extnum = 0, len;
int tstatus = 0, hdunum, rescale_flag, bpix, ncols;
char dtype[8], dimen[100];
double bscale, rescale, noisemin;
long headstart, datastart, dataend;
float origdata = 0., whole_cpu, whole_elapse, row_elapse, row_cpu, xbits;
LONGLONG nrows;
/* structure to hold image statistics (defined in fpack.h) */
imgstats imagestats;
fits_open_file (&inputfptr, infits, READONLY, &stat);
fits_create_file (&outfptr, outfits, &stat);
fits_create_file (&outfptr2, outfits2, &stat);
if (stat) { fits_report_error (stderr, stat); exit (stat); }
while (! stat) {
/* LOOP OVER EACH HDU */
rescale_flag = 0;
fits_get_hdu_type (inputfptr, &hdutype, &stat);
if (hdutype == IMAGE_HDU) {
fits_get_img_param (inputfptr, 9, &bitpix, &naxis, naxes, &stat);
for (totpix=1, ii=0; ii < 9; ii++) totpix *= naxes[ii];
}
if (!fits_is_compressed_image (inputfptr, &stat) && hdutype == IMAGE_HDU &&
naxis != 0 && totpix != 0 && fpvar.do_images) {
/* rescale a scaled integer image to reduce noise? */
if (fpvar.rescale_noise != 0. && bitpix > 0 && bitpix < LONGLONG_IMG) {
tstatus = 0;
fits_read_key(inputfptr, TDOUBLE, "BSCALE", &bscale, 0, &tstatus);
if (tstatus == 0 && bscale != 1.0) { /* image must be scaled */
if (bitpix == LONG_IMG)
fp_i4stat(inputfptr, naxis, naxes, &imagestats, &stat);
else
fp_i2stat(inputfptr, naxis, naxes, &imagestats, &stat);
/* use the minimum of the MAD 2nd, 3rd, and 5th order noise estimates */
noisemin = imagestats.noise3;
if (imagestats.noise2 != 0. && imagestats.noise2 < noisemin) noisemin = imagestats.noise2;
if (imagestats.noise5 != 0. && imagestats.noise5 < noisemin) noisemin = imagestats.noise5;
rescale = noisemin / fpvar.rescale_noise;
if (rescale > 1.0) {
/* all the criteria are met, so create a temporary file that */
/* contains a rescaled version of the image, in CWD */
/* create temporary file name */
fp_tmpnam("Tmpfile3", "", tempfilename3);
fits_create_file(&tempfile, tempfilename3, &stat);
fits_get_hdu_num(inputfptr, &hdunum);
if (hdunum != 1) {
/* the input hdu is an image extension, so create dummy primary */
fits_create_img(tempfile, 8, 0, naxes, &stat);
}
fits_copy_header(inputfptr, tempfile, &stat); /* copy the header */
/* rescale the data, so that it will compress more efficiently */
if (bitpix == LONG_IMG)
fp_i4rescale(inputfptr, naxis, naxes, rescale, tempfile, &stat);
else
fp_i2rescale(inputfptr, naxis, naxes, rescale, tempfile, &stat);
/* scale the BSCALE keyword by the inverse factor */
bscale = bscale * rescale;
fits_update_key(tempfile, TDOUBLE, "BSCALE", &bscale, 0, &stat);
/* rescan the header, to reset the actual scaling parameters */
fits_set_hdustruc(tempfile, &stat);
infptr = tempfile;
rescale_flag = 1;
}
}
}
if (!rescale_flag) /* just compress the input file, without rescaling */
infptr = inputfptr;
/* compute basic statistics about the input image */
if (bitpix == BYTE_IMG) {
bpix = 8;
strcpy(dtype, "8 ");
fp_i2stat(infptr, naxis, naxes, &imagestats, &stat);
} else if (bitpix == SHORT_IMG) {
bpix = 16;
strcpy(dtype, "16 ");
fp_i2stat(infptr, naxis, naxes, &imagestats, &stat);
} else if (bitpix == LONG_IMG) {
bpix = 32;
strcpy(dtype, "32 ");
fp_i4stat(infptr, naxis, naxes, &imagestats, &stat);
} else if (bitpix == LONGLONG_IMG) {
bpix = 64;
strcpy(dtype, "64 ");
} else if (bitpix == FLOAT_IMG) {
bpix = 32;
strcpy(dtype, "-32");
fp_r4stat(infptr, naxis, naxes, &imagestats, &stat);
} else if (bitpix == DOUBLE_IMG) {
bpix = 64;
strcpy(dtype, "-64");
fp_r4stat(infptr, naxis, naxes, &imagestats, &stat);
}
/* use the minimum of the MAD 2nd, 3rd, and 5th order noise estimates */
noisemin = imagestats.noise3;
if (imagestats.noise2 != 0. && imagestats.noise2 < noisemin) noisemin = imagestats.noise2;
if (imagestats.noise5 != 0. && imagestats.noise5 < noisemin) noisemin = imagestats.noise5;
xbits = (float) (log10(noisemin)/.301 + 1.792);
printf("\n File: %s\n", infits);
printf(" Ext BITPIX Dimens. Nulls Min Max Mean Sigma Noise2 Noise3 Noise5 Nbits MaxR\n");
printf(" %3d %s", extnum, dtype);
snprintf(dimen,100," (%ld", naxes[0]);
len =strlen(dimen);
for (ii = 1; ii < naxis; ii++) {
if (len < 99)
snprintf(dimen+len,100-len,",%ld", naxes[ii]);
len =strlen(dimen);
}
if (strlen(dimen)<99)
strcat(dimen, ")");
printf("%-12s",dimen);
fits_get_hduaddr(inputfptr, &headstart, &datastart, &dataend, &stat);
origdata = (float) ((dataend - datastart)/1000000.);
/* get elapsed and cpu times need to read the uncompressed image */
fits_read_image_speed (infptr, &whole_elapse, &whole_cpu,
&row_elapse, &row_cpu, &stat);
printf(" %5d %6.0f %6.0f %8.1f %#8.2g %#7.3g %#7.3g %#7.3g %#5.1f %#6.2f\n",
imagestats.n_nulls, imagestats.minval, imagestats.maxval,
imagestats.mean, imagestats.sigma,
imagestats.noise2, imagestats.noise3, imagestats.noise5, xbits, bpix/xbits);
printf("\n Type Ratio Size (MB) Pk (Sec) UnPk Exact ElpN CPUN Elp1 CPU1\n");
printf(" Native %5.3f %5.3f %5.3f %5.3f\n",
whole_elapse, whole_cpu, row_elapse, row_cpu);
if (fpvar.outfile[0]) {
fprintf(outreport,
" %s %d %d %ld %ld %#10.4g %d %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g %#10.4g",
infits, extnum, bitpix, naxes[0], naxes[1], origdata, imagestats.n_nulls, imagestats.minval,
imagestats.maxval, imagestats.mean, imagestats.sigma,
imagestats.noise1, imagestats.noise2, imagestats.noise3, imagestats.noise5, whole_elapse, whole_cpu, row_elapse, row_cpu);
}
fits_set_lossy_int (outfptr, fpvar.int_to_float, &stat);
if ( (bitpix > 0) && (fpvar.int_to_float != 0) ) {
if ( (noisemin < (fpvar.n3ratio * fpvar.quantize_level) ) ||
(noisemin < fpvar.n3min)) {
/* image contains too little noise to quantize effectively */
fits_set_lossy_int (outfptr, 0, &stat);
fits_get_hdu_num(infptr, &hdunum);
printf(" HDU %d does not meet noise criteria to be quantized, so losslessly compressed.\n", hdunum);
}
}
/* test compression ratio and speed for each algorithm */
if (fpvar.quantize_level != 0) {
fits_set_compression_type (outfptr, RICE_1, &stat);
fits_set_tile_dim (outfptr, 6, fpvar.ntile, &stat);
if (fpvar.no_dither)
fits_set_quantize_method(outfptr, -1, &stat);
else
fits_set_quantize_method(outfptr, fpvar.dither_method, &stat);
fits_set_quantize_level (outfptr, fpvar.quantize_level, &stat);
fits_set_dither_offset(outfptr, fpvar.dither_offset, &stat);
fits_set_hcomp_scale (outfptr, fpvar.scale, &stat);
fits_set_hcomp_smooth (outfptr, fpvar.smooth, &stat);
fp_test_hdu(infptr, outfptr, outfptr2, fpvar, &stat);
}
if (fpvar.quantize_level != 0) {
\
fits_set_compression_type (outfptr, HCOMPRESS_1, &stat);
fits_set_tile_dim (outfptr, 6, fpvar.ntile, &stat);
if (fpvar.no_dither)
fits_set_quantize_method(outfptr, -1, &stat);
else
fits_set_quantize_method(outfptr, fpvar.dither_method, &stat);
fits_set_quantize_level (outfptr, fpvar.quantize_level, &stat);
fits_set_dither_offset(outfptr, fpvar.dither_offset, &stat);
fits_set_hcomp_scale (outfptr, fpvar.scale, &stat);
fits_set_hcomp_smooth (outfptr, fpvar.smooth, &stat);
fp_test_hdu(infptr, outfptr, outfptr2, fpvar, &stat);
}
if (fpvar.comptype == GZIP_2) {
fits_set_compression_type (outfptr, GZIP_2, &stat);
} else {
fits_set_compression_type (outfptr, GZIP_1, &stat);
}
fits_set_tile_dim (outfptr, 6, fpvar.ntile, &stat);
if (fpvar.no_dither)
fits_set_quantize_method(outfptr, -1, &stat);
else
fits_set_quantize_method(outfptr, fpvar.dither_method, &stat);
fits_set_quantize_level (outfptr, fpvar.quantize_level, &stat);
fits_set_dither_offset(outfptr, fpvar.dither_offset, &stat);
fits_set_hcomp_scale (outfptr, fpvar.scale, &stat);
fits_set_hcomp_smooth (outfptr, fpvar.smooth, &stat);
fp_test_hdu(infptr, outfptr, outfptr2, fpvar, &stat);
/*
fits_set_compression_type (outfptr, BZIP2_1, &stat);
fits_set_tile_dim (outfptr, 6, fpvar.ntile, &stat);
fp_test_hdu(infptr, outfptr, outfptr2, fpvar, &stat);
*/
/*
fits_set_compression_type (outfptr, PLIO_1, &stat);
fits_set_tile_dim (outfptr, 6, fpvar.ntile, &stat);
fp_test_hdu(infptr, outfptr, outfptr2, fpvar, &stat);
*/
/*
if (bitpix == SHORT_IMG || bitpix == LONG_IMG) {
fits_set_compression_type (outfptr, NOCOMPRESS, &stat);
fits_set_tile_dim (outfptr, 6, fpvar.ntile, &stat);
fp_test_hdu(infptr, outfptr, outfptr2, fpvar, &stat);
}
*/
if (fpvar.outfile[0])
fprintf(outreport,"\n");
/* delete the temporary file */
if (rescale_flag) {
fits_delete_file (infptr, &stat);
tempfilename3[0] = '\0'; /* clear the temp filename */
}
} else if ( (hdutype == BINARY_TBL) && fpvar.do_tables) {
fits_get_num_rowsll(inputfptr, &nrows, &stat);
fits_get_num_cols(inputfptr, &ncols, &stat);
#if defined(_MSC_VER)
/* Microsoft Visual C++ 6.0 uses '%I64d' syntax for 8-byte integers */
printf("\n File: %s, HDU %d, %d cols X %I64d rows\n", infits, extnum, ncols, nrows);
#elif (USE_LL_SUFFIX == 1)
printf("\n File: %s, HDU %d, %d cols X %lld rows\n", infits, extnum, ncols, nrows);
#else
printf("\n File: %s, HDU %d, %d cols X %ld rows\n", infits, extnum, ncols, nrows);
#endif
fp_test_table(inputfptr, outfptr, outfptr2, fpvar, &stat);
} else {
fits_copy_hdu (inputfptr, outfptr, 0, &stat);
fits_copy_hdu (inputfptr, outfptr2, 0, &stat);
}
fits_movrel_hdu (inputfptr, 1, NULL, &stat);
extnum++;
}
if (stat == END_OF_FILE) stat = 0;
fits_close_file (outfptr2, &stat);
fits_close_file (outfptr, &stat);
fits_close_file (inputfptr, &stat);
if (stat) {
fits_report_error (stderr, stat);
}
return(0);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8d8, %rsp # imm = 0x8D8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rdx
leaq 0xc169c(%rip), %rsi # 0xc9ce0
leaq 0x820(%rsp), %rdi
movl $0x9, %ecx
rep movsq (%rsi), %es:(%rdi)
xorl %eax, %eax
leaq 0x6cc(%rsp), %r15
movl %eax, (%r15)
movl %eax, 0x6b4(%rsp)
movl %eax, 0x6c4(%rsp)
movl %eax, 0x6d8(%rsp)
leaq 0x6b8(%rsp), %rsi
movl $0xa, %edi
movq %rdx, 0x730(%rsp)
xorl %ecx, %ecx
movq %r15, %r8
callq 0xf421
leaq 0x6a8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x10ed0
leaq 0x700(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10ed0
movl (%r15), %esi
testl %esi, %esi
jne 0x94eb
leaq 0x910(%rsp), %r15
leaq 0x30(%r15), %r12
leaq 0x6dc(%rsp), %r13
leaq 0x6cc(%rsp), %rbp
leaq 0x820(%rsp), %r14
xorl %eax, %eax
movl $0x0, 0x6d0(%rsp)
xorl %ebx, %ebx
movq %r12, 0x748(%rsp)
testl %eax, %eax
jne 0x947a
movq 0x6b8(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x3b4a1
cmpl $0x0, 0x6dc(%rsp)
jne 0x8766
movq 0x6b8(%rsp), %rdi
movl $0x9, %esi
leaq 0x6c4(%rsp), %rdx
leaq 0x6b4(%rsp), %rcx
movq %r14, %r8
movq %rbp, %r9
callq 0x41189
movl $0x1, %ebx
xorl %eax, %eax
imull 0x820(%rsp,%rax,8), %ebx
incq %rax
cmpq $0x9, %rax
jne 0x8755
movq 0x6b8(%rsp), %rdi
movq %rbp, %rsi
callq 0x41127
movl 0x6dc(%rsp), %ecx
testl %eax, %eax
jne 0x887e
testl %ecx, %ecx
jne 0x887e
cmpl $0x0, 0x6b4(%rsp)
je 0x887e
testl %ebx, %ebx
je 0x887e
cmpl $0x0, 0x7c(%r15)
je 0x887e
xorps %xmm0, %xmm0
ucomiss 0x18(%r15), %xmm0
setp %al
setne %cl
orb %al, %cl
movl 0x6c4(%rsp), %eax
leal -0x1(%rax), %edx
cmpl $0x3f, %edx
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x8953
movl $0x0, 0x6d8(%rsp)
movq 0x6b8(%rsp), %rdi
movl $0x52, %esi
leaq 0xc0fb9(%rip), %rdx # 0xc97b1
leaq 0x728(%rsp), %rcx
xorl %r8d, %r8d
leaq 0x6d8(%rsp), %r9
callq 0x6da65
cmpl $0x0, 0x6d8(%rsp)
leaq 0x870(%rsp), %r13
jne 0x8972
movsd 0x728(%rsp), %xmm0
ucomisd 0xc0849(%rip), %xmm0 # 0xc9080
jne 0x883f
jnp 0x8972
movb $0x1, %al
movq %rax, 0x6f8(%rsp)
cmpl $0x20, 0x6c4(%rsp)
movq 0x6b8(%rsp), %rdi
movl 0x6b4(%rsp), %esi
movq %r14, %rdx
leaq 0x750(%rsp), %rcx
movq %rbp, %r8
jne 0x8989
callq 0xa1ef
jmp 0x898e
movq 0x6b8(%rsp), %rdi
cmpl $0x2, %ecx
jne 0x8922
cmpl $0x0, 0x80(%r15)
je 0x8922
leaq 0x7c8(%rsp), %rsi
movq %rbp, %rdx
callq 0x3b996
movq 0x6b8(%rsp), %rdi
leaq 0x744(%rsp), %rsi
movq %rbp, %rdx
callq 0x3b8b1
movl 0x744(%rsp), %ecx
movq 0x7c8(%rsp), %r8
leaq 0xc1074(%rip), %rdi # 0xc994f
movq 0x730(%rsp), %rsi
movl 0x6d0(%rsp), %edx
xorl %eax, %eax
callq 0x6050
movq 0x6b8(%rsp), %rax
movq 0x6a8(%rsp), %rdx
movl $0xd5, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %rdx, %rsi
movq %rbp, %rcx
callq 0xb95b
jmp 0x9450
movq 0x6a8(%rsp), %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x1f218
movq 0x6b8(%rsp), %rdi
movq 0x700(%rsp), %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x1f218
jmp 0x9450
movb $0x1, %cl
movq %rcx, 0x6f8(%rsp)
leaq 0x6b8(%rsp), %rcx
leaq 0x870(%rsp), %r13
jmp 0x8b5d
movb $0x1, %al
movq %rax, 0x6f8(%rsp)
leaq 0x6b8(%rsp), %rcx
jmp 0x8b56
callq 0xa513
movsd 0x780(%rsp), %xmm0
movsd 0x788(%rsp), %xmm1
movapd %xmm0, %xmm2
cmpltpd %xmm1, %xmm2
movapd %xmm0, %xmm3
xorpd %xmm4, %xmm4
cmpneqpd %xmm4, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %eax
testb $0x1, %al
jne 0x89c6
movapd %xmm1, %xmm0
movsd 0x790(%rsp), %xmm4
movapd %xmm4, %xmm1
cmpltpd %xmm0, %xmm1
movapd %xmm4, %xmm2
xorpd %xmm3, %xmm3
cmpneqpd %xmm3, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %eax
testb $0x1, %al
jne 0x89f5
movapd %xmm0, %xmm4
xorps %xmm0, %xmm0
cvtss2sd 0x18(%r15), %xmm0
divsd %xmm0, %xmm4
ucomisd 0xc0676(%rip), %xmm4 # 0xc9080
leaq 0x6b8(%rsp), %rcx
jbe 0x8b56
movapd %xmm4, 0x710(%rsp)
leaq 0xc0d90(%rip), %rdi # 0xc97b8
leaq 0xc2486(%rip), %rsi # 0xcaeb5
leaq 0xf6dea(%rip), %r13 # 0xff820
movq %r13, %rdx
callq 0x6a0a
leaq 0x6e0(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x10ed0
movq 0x6b8(%rsp), %rdi
leaq 0x6d4(%rsp), %rsi
callq 0x3becc
cmpl $0x1, 0x6d4(%rsp)
je 0x8a8a
movq 0x6e0(%rsp), %rdi
movl $0x8, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rbp, %r8
callq 0xad1e8
movq 0x6b8(%rsp), %rdi
movq 0x6e0(%rsp), %rsi
movq %rbp, %rdx
callq 0x1f2c0
cmpl $0x20, 0x6c4(%rsp)
movq 0x6b8(%rsp), %rdi
movl 0x6b4(%rsp), %esi
movq 0x6e0(%rsp), %rcx
movq %r14, %rdx
jne 0x8ad8
movaps 0x710(%rsp), %xmm0
movq %rbp, %r8
callq 0xa839
jmp 0x8ae8
movaps 0x710(%rsp), %xmm0
movq %rbp, %r8
callq 0xaa2b
leaq 0x870(%rsp), %r13
movapd 0x710(%rsp), %xmm0
mulsd 0x728(%rsp), %xmm0
movsd %xmm0, 0x728(%rsp)
movq 0x6e0(%rsp), %rdi
movq $0x0, 0x6f8(%rsp)
movl $0x52, %esi
leaq 0xc0c86(%rip), %rdx # 0xc97b1
leaq 0x728(%rsp), %rcx
xorl %r8d, %r8d
movq %rbp, %r9
callq 0x943d8
movq 0x6e0(%rsp), %rdi
movq %rbp, %rsi
callq 0x3af49
leaq 0x6e0(%rsp), %rcx
movl 0x6c4(%rsp), %eax
movq (%rcx), %rdi
cmpl $0xf, %eax
movq %rdi, 0x710(%rsp)
jg 0x8bc1
cmpl $-0x40, %eax
je 0x8be5
cmpl $-0x20, %eax
je 0x8c4c
cmpl $0x8, %eax
jne 0x8ca3
movl $0x202038, 0x6e8(%rsp) # imm = 0x202038
movl 0x6b4(%rsp), %esi
movq 0x710(%rsp), %rdi
movq %r14, %rdx
leaq 0x750(%rsp), %rcx
movq %rbp, %r8
callq 0xa513
movl $0x8, 0x6c8(%rsp)
jmp 0x8ca3
cmpl $0x10, %eax
je 0x8c1a
cmpl $0x20, %eax
je 0x8c73
cmpl $0x40, %eax
jne 0x8ca3
movl $0x203436, 0x6e8(%rsp) # imm = 0x203436
jmp 0x8c0a
movl $0x34362d, 0x6e8(%rsp) # imm = 0x34362D
movl 0x6b4(%rsp), %esi
movq %r14, %rdx
leaq 0x750(%rsp), %rcx
movq %rbp, %r8
callq 0xac2e
movl $0x40, 0x6c8(%rsp)
jmp 0x8ca3
movl $0x203631, 0x6e8(%rsp) # imm = 0x203631
movl 0x6b4(%rsp), %esi
movq %r14, %rdx
leaq 0x750(%rsp), %rcx
movq %rbp, %r8
callq 0xa513
movl $0x10, 0x6c8(%rsp)
jmp 0x8ca3
movl $0x32332d, 0x6e8(%rsp) # imm = 0x32332D
movl 0x6b4(%rsp), %esi
movq %r14, %rdx
leaq 0x750(%rsp), %rcx
movq %rbp, %r8
callq 0xac2e
jmp 0x8c98
movl $0x203233, 0x6e8(%rsp) # imm = 0x203233
movl 0x6b4(%rsp), %esi
movq %r14, %rdx
leaq 0x750(%rsp), %rcx
movq %rbp, %r8
callq 0xa1ef
movl $0x20, 0x6c8(%rsp)
movsd 0x780(%rsp), %xmm4
movsd 0x788(%rsp), %xmm3
movapd %xmm4, %xmm0
cmpltpd %xmm3, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm2
cmpneqpd %xmm2, %xmm1
andpd %xmm0, %xmm1
movd %xmm1, %eax
movapd %xmm4, %xmm5
testb $0x1, %al
jne 0x8cdf
movapd %xmm3, %xmm5
movapd %xmm4, 0x7f0(%rsp)
movapd %xmm3, 0x800(%rsp)
movsd 0x790(%rsp), %xmm0
movapd %xmm0, %xmm1
cmpltpd %xmm5, %xmm1
movapd %xmm0, %xmm2
xorpd %xmm3, %xmm3
cmpneqpd %xmm3, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %eax
movapd %xmm0, 0x7e0(%rsp)
testb $0x1, %al
jne 0x8d29
movapd %xmm5, %xmm0
movsd %xmm0, 0x798(%rsp)
callq 0x6030
divsd 0xc0349(%rip), %xmm0 # 0xc9088
addsd 0xc0349(%rip), %xmm0 # 0xc9090
movsd %xmm0, 0x6f0(%rsp)
leaq 0xc0a6a(%rip), %rdi # 0xc97c1
movq 0x730(%rsp), %rsi
xorl %eax, %eax
callq 0x6050
leaq 0xc0d2f(%rip), %rdi # 0xc9a9c
callq 0x6120
leaq 0xc0a54(%rip), %rdi # 0xc97cd
movl 0x6d0(%rsp), %esi
leaq 0x6e8(%rsp), %rdx
xorl %eax, %eax
callq 0x6050
movq 0x820(%rsp), %rcx
movl $0x64, %esi
movq %r13, %rdi
leaq 0xc0a31(%rip), %rdx # 0xc97d7
xorl %eax, %eax
callq 0x60b0
movl 0x6b4(%rsp), %r12d
cmpl $0x2, %r12d
jl 0x8e13
movq %r13, %rdi
callq 0x6280
movl $0x1, %r14d
cmpl $0x62, %eax
jg 0x8e00
cltq
leaq (%rsp,%rax), %rdi
addq $0x870, %rdi # imm = 0x870
movl $0x64, %esi
subl %eax, %esi
movq 0x820(%rsp,%r14,8), %rcx
leaq 0xc09ec(%rip), %rdx # 0xc97dd
xorl %eax, %eax
callq 0x60b0
movl 0x6b4(%rsp), %r12d
movq %r13, %rdi
callq 0x6280
incq %r14
movslq %r12d, %rcx
cmpq %rcx, %r14
jl 0x8dc9
movq %r13, %rdi
callq 0x6280
cmpq $0x62, %rax
ja 0x8e33
movq %r13, %rdi
callq 0x6280
movw $0x29, 0x870(%rsp,%rax)
xorps %xmm0, %xmm0
cvtsd2ss 0x6f0(%rsp), %xmm0
movss %xmm0, 0x6f0(%rsp)
leaq 0xc0993(%rip), %rdi # 0xc97e2
movq %r13, %rsi
xorl %eax, %eax
callq 0x6050
movq 0x6b8(%rsp), %rdi
leaq 0x818(%rsp), %rsi
leaq 0x7d8(%rsp), %rdx
leaq 0x7d0(%rsp), %rcx
movq %rbp, %r8
callq 0x3c021
movq 0x7d0(%rsp), %r12
movq 0x7d8(%rsp), %r14
movq 0x710(%rsp), %rdi
leaq 0x73c(%rsp), %rsi
leaq 0x740(%rsp), %rdx
leaq 0x70c(%rsp), %rcx
leaq 0x708(%rsp), %r8
movq %rbp, %r9
callq 0xaee5
movl 0x750(%rsp), %r13d
movsd 0x758(%rsp), %xmm0
movsd 0x760(%rsp), %xmm1
movsd 0x768(%rsp), %xmm2
cvtsi2ssl 0x6c8(%rsp), %xmm4
movsd 0x770(%rsp), %xmm3
movss 0x6f0(%rsp), %xmm5
cvtss2sd %xmm5, %xmm7
divss %xmm5, %xmm4
cvtss2sd %xmm4, %xmm4
movsd %xmm4, (%rsp)
leaq 0xc08d1(%rip), %rdi # 0xc97e8
movl %r13d, %esi
movsd %xmm0, 0x6f0(%rsp)
movsd %xmm1, 0x7c0(%rsp)
movsd %xmm2, 0x7b8(%rsp)
movsd %xmm3, 0x7b0(%rsp)
movapd 0x7f0(%rsp), %xmm4
movapd 0x800(%rsp), %xmm5
movaps 0x7e0(%rsp), %xmm6
movb $0x8, %al
callq 0x6050
leaq 0xc0b99(%rip), %rdi # 0xc9aff
callq 0x6120
xorps %xmm0, %xmm0
cvtss2sd 0x73c(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x740(%rsp), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x70c(%rsp), %xmm2
xorps %xmm3, %xmm3
cvtss2sd 0x708(%rsp), %xmm3
leaq 0xc0888(%rip), %rdi # 0xc982a
movsd %xmm0, 0x7a8(%rsp)
movsd %xmm1, 0x7a0(%rsp)
movb $0x4, %al
callq 0x6050
cmpb $0x0, 0x494(%r15)
je 0x90b6
subq %r14, %r12
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
divsd 0xc00bc(%rip), %xmm0 # 0xc9098
cvtsd2ss %xmm0, %xmm0
movq 0xf6621(%rip), %rdi # 0xff608
movl 0x6c4(%rsp), %r8d
movq 0x820(%rsp), %r9
movq 0x828(%rsp), %rax
cvtss2sd %xmm0, %xmm0
movsd 0x778(%rsp), %xmm5
xorps %xmm1, %xmm1
cvtss2sd 0x70c(%rsp), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x708(%rsp), %xmm2
movsd %xmm2, 0x30(%rsp)
movsd %xmm1, 0x28(%rsp)
movsd 0x7a0(%rsp), %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x7a8(%rsp), %xmm1
movsd %xmm1, 0x18(%rsp)
movaps 0x7e0(%rsp), %xmm1
movsd %xmm1, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0xc0811(%rip), %rsi # 0xc987d
movq 0x730(%rsp), %rdx
movl 0x6d0(%rsp), %ecx
movsd 0x6f0(%rsp), %xmm1
movsd 0x7c0(%rsp), %xmm2
movsd 0x7b8(%rsp), %xmm3
movsd 0x7b0(%rsp), %xmm4
movaps 0x7f0(%rsp), %xmm6
movaps 0x800(%rsp), %xmm7
movb $0x8, %al
callq 0x6560
movq 0x6a8(%rsp), %rdi
movl 0x20(%r15), %esi
movq %rbp, %rdx
callq 0x812b8
cmpl $0x0, 0x6c4(%rsp)
movss 0x4(%r15), %xmm0
jle 0x9157
cmpl $0x0, 0x20(%r15)
movl $0x0, %r14d
je 0x915a
movss 0x24(%r15), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x798(%rsp), %xmm2
ucomisd %xmm2, %xmm1
ja 0x9113
xorps %xmm1, %xmm1
cvtss2sd 0x28(%r15), %xmm1
ucomisd %xmm2, %xmm1
jbe 0x915a
movq 0x6a8(%rsp), %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x812b8
movq 0x710(%rsp), %rdi
leaq 0x6d4(%rsp), %rsi
callq 0x3becc
movl 0x6d4(%rsp), %esi
leaq 0xc07b3(%rip), %rdi # 0xc98fb
xorl %eax, %eax
callq 0x6050
movss 0x4(%r15), %xmm0
jmp 0x915a
xorl %r14d, %r14d
ucomiss 0xbff57(%rip), %xmm0 # 0xc90b8
jne 0x9169
jnp 0x9245
movq 0x6a8(%rsp), %rdi
movl $0xb, %esi
movq %rbp, %rdx
callq 0x810b6
movq 0x6a8(%rsp), %rdi
movl $0x6, %esi
movq 0x748(%rsp), %rdx
movq %rbp, %rcx
callq 0x810f9
movq 0x6a8(%rsp), %rdi
cmpl 0x8(%r15), %r14d
movl $0x0, %esi
sbbl %esi, %esi
orl 0x10(%r15), %esi
movq %rbp, %rdx
callq 0x81162
movq 0x6a8(%rsp), %rdi
movss 0x4(%r15), %xmm0
movq %rbp, %rsi
callq 0x8113a
movq 0x6a8(%rsp), %rdi
movl 0xc(%r15), %esi
movq %rbp, %rdx
callq 0x81207
movq 0x6a8(%rsp), %rdi
movss 0x14(%r15), %xmm0
movq %rbp, %rsi
callq 0x8129c
movq 0x6a8(%rsp), %rdi
movl 0x1c(%r15), %esi
movq %rbp, %rdx
callq 0x812ab
movq 0x6a8(%rsp), %rax
movq 0x700(%rsp), %rdx
movl $0xd5, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep movsq (%rsi), %es:(%rdi)
movq 0x710(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rcx
callq 0xb53e
movss 0x4(%r15), %xmm0
ucomiss 0xbfe6c(%rip), %xmm0 # 0xc90b8
movq 0x710(%rsp), %r13
movq 0x748(%rsp), %r12
jne 0x9264
jnp 0x9330
movq 0x6a8(%rsp), %rdi
movl $0x29, %esi
movq %rbp, %rdx
callq 0x810b6
movq 0x6a8(%rsp), %rdi
movl $0x6, %esi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x810f9
movq 0x6a8(%rsp), %rdi
cmpl 0x8(%r15), %r14d
movl $0x0, %esi
sbbl %esi, %esi
orl 0x10(%r15), %esi
movq %rbp, %rdx
callq 0x81162
movq 0x6a8(%rsp), %rdi
movss 0x4(%r15), %xmm0
movq %rbp, %rsi
callq 0x8113a
movq 0x6a8(%rsp), %rdi
movl 0xc(%r15), %esi
movq %rbp, %rdx
callq 0x81207
movq 0x6a8(%rsp), %rdi
movss 0x14(%r15), %xmm0
movq %rbp, %rsi
callq 0x8129c
movq 0x6a8(%rsp), %rdi
movl 0x1c(%r15), %esi
movq %rbp, %rdx
callq 0x812ab
movq 0x6a8(%rsp), %rax
movq 0x700(%rsp), %rdx
movl $0xd5, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep movsq (%rsi), %es:(%rdi)
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rcx
callq 0xb53e
xorl %esi, %esi
cmpl $0x16, (%r15)
sete %sil
movq 0x6a8(%rsp), %rdi
addl $0x15, %esi
movq %rbp, %rdx
callq 0x810b6
movq 0x6a8(%rsp), %rdi
movl $0x6, %esi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x810f9
movq 0x6a8(%rsp), %rdi
cmpl 0x8(%r15), %r14d
movl $0x0, %esi
sbbl %esi, %esi
orl 0x10(%r15), %esi
movq %rbp, %rdx
callq 0x81162
movq 0x6a8(%rsp), %rdi
movss 0x4(%r15), %xmm0
movq %rbp, %rsi
callq 0x8113a
movq 0x6a8(%rsp), %rdi
movl 0xc(%r15), %esi
movq %rbp, %rdx
callq 0x81207
movq 0x6a8(%rsp), %rdi
movss 0x14(%r15), %xmm0
movq %rbp, %rsi
callq 0x8129c
movq 0x6a8(%rsp), %rdi
movl 0x1c(%r15), %esi
movq %rbp, %rdx
callq 0x812ab
movq 0x6a8(%rsp), %rax
movq 0x700(%rsp), %rdx
movl $0xd5, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep movsq (%rsi), %es:(%rdi)
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rcx
callq 0xb53e
cmpb $0x0, 0x494(%r15)
je 0x941f
movq 0xf61f3(%rip), %rsi # 0xff608
movl $0xa, %edi
callq 0x6240
cmpb $0x0, 0x6f8(%rsp)
leaq 0x820(%rsp), %r14
leaq 0x6dc(%rsp), %r13
jne 0x9450
movq 0x710(%rsp), %rdi
movq %rbp, %rsi
callq 0x1617e
movb $0x0, 0xf63d0(%rip) # 0xff820
movq 0x6b8(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x4110a
incl 0x6d0(%rsp)
movl 0x6cc(%rsp), %eax
jmp 0x8701
cmpl $0x6b, %eax
jne 0x948a
movl $0x0, 0x6cc(%rsp)
movq 0x700(%rsp), %rdi
leaq 0x6cc(%rsp), %rbx
movq %rbx, %rsi
callq 0xd6de
movq 0x6a8(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6de
movq 0x6b8(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6de
movl (%rbx), %esi
testl %esi, %esi
je 0x94d7
movq 0xf5af9(%rip), %rax # 0xfefc8
movq (%rax), %rdi
callq 0x164d4
xorl %eax, %eax
addq $0x8d8, %rsp # imm = 0x8D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xf5ad6(%rip), %rax # 0xfefc8
movq (%rax), %rdi
callq 0x164d4
movl 0x6cc(%rsp), %edi
callq 0x6150
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/utilities/fpackutil.c |
fp_unpack | int fp_unpack (char *infits, char *outfits, fpstate fpvar)
{
fitsfile *infptr, *outfptr;
int stat=0, hdutype, extnum, single = 0;
char *loc, *hduloc, hduname[SZ_STR];
fits_open_file (&infptr, infits, READONLY, &stat);
fits_create_file (&outfptr, outfits, &stat);
if (stat) {
fp_abort_output(infptr, outfptr, stat);
}
if (fpvar.extname[0]) { /* unpack a list of HDUs? */
/* move to the first HDU in the list */
hduloc = fpvar.extname;
loc = strchr(hduloc, ','); /* look for 'comma' delimiter between names */
if (loc)
*loc = '\0'; /* terminate the first name in the string */
strcpy(hduname, hduloc); /* copy the first name into temporary string */
if (loc)
hduloc = loc + 1; /* advance to the beginning of the next name, if any */
else {
hduloc += strlen(hduname); /* end of the list */
single = 1; /* only 1 HDU is being unpacked */
}
if (isdigit( (int) hduname[0]) ) {
extnum = strtol(hduname, &loc, 10); /* read the string as an integer */
/* check for junk following the integer */
if (*loc == '\0' ) /* no junk, so move to this HDU number (+1) */
{
fits_movabs_hdu(infptr, extnum + 1, &hdutype, &stat); /* move to HDU number */
if (hdutype != IMAGE_HDU)
stat = NOT_IMAGE;
} else { /* the string is not an integer, so must be the column name */
hdutype = IMAGE_HDU;
fits_movnam_hdu(infptr, hdutype, hduname, 0, &stat);
}
}
else
{
/* move to the named image extension */
hdutype = IMAGE_HDU;
fits_movnam_hdu(infptr, hdutype, hduname, 0, &stat);
}
}
if (stat) {
fp_msg ("Unable to find and move to extension '");
fp_msg(hduname);
fp_msg("'\n");
fp_abort_output(infptr, outfptr, stat);
}
while (! stat) {
if (single)
stat = -1; /* special status flag to force output primary array */
fp_unpack_hdu (infptr, outfptr, fpvar, &stat);
if (fpvar.do_checksums) {
fits_write_chksum (outfptr, &stat);
}
/* move to the next HDU */
if (fpvar.extname[0]) { /* unpack a list of HDUs? */
if (!(*hduloc)) {
stat = END_OF_FILE; /* we reached the end of the list */
} else {
/* parse the next HDU name and move to it */
loc = strchr(hduloc, ',');
if (loc) /* look for 'comma' delimiter between names */
*loc = '\0'; /* terminate the first name in the string */
strcpy(hduname, hduloc); /* copy the next name into temporary string */
if (loc)
hduloc = loc + 1; /* advance to the beginning of the next name, if any */
else
*hduloc = '\0'; /* end of the list */
if (isdigit( (int) hduname[0]) ) {
extnum = strtol(hduname, &loc, 10); /* read the string as an integer */
/* check for junk following the integer */
if (*loc == '\0' ) /* no junk, so move to this HDU number (+1) */
{
fits_movabs_hdu(infptr, extnum + 1, &hdutype, &stat); /* move to HDU number */
if (hdutype != IMAGE_HDU)
stat = NOT_IMAGE;
} else { /* the string is not an integer, so must be the column name */
hdutype = IMAGE_HDU;
fits_movnam_hdu(infptr, hdutype, hduname, 0, &stat);
}
} else {
/* move to the named image extension */
hdutype = IMAGE_HDU;
fits_movnam_hdu(infptr, hdutype, hduname, 0, &stat);
}
if (stat) {
fp_msg ("Unable to find and move to extension '");
fp_msg(hduname);
fp_msg("'\n");
}
}
} else {
/* increment to the next HDU */
fits_movrel_hdu (infptr, 1, NULL, &stat);
}
}
if (stat == END_OF_FILE) stat = 0;
/* set checksum for case of newly created primary HDU
*/
if (fpvar.do_checksums) {
fits_movabs_hdu (outfptr, 1, NULL, &stat);
fits_write_chksum (outfptr, &stat);
}
if (stat) {
fp_abort_output(infptr, outfptr, stat);
}
fits_close_file (outfptr, &stat);
fits_close_file (infptr, &stat);
return(0);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8d8, %rsp # imm = 0x8D8
movq %rsi, %rbx
movq %rdi, %rdx
leaq 0x6ac(%rsp), %r14
movl $0x0, (%r14)
leaq 0x6b0(%rsp), %rsi
xorl %r13d, %r13d
movl $0xa, %edi
xorl %ecx, %ecx
movq %r14, %r8
callq 0xf421
leaq 0x6c0(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10ed0
movl (%r14), %edx
testl %edx, %edx
jne 0x9940
leaq 0x910(%rsp), %rbx
leaq 0x28d(%rbx), %r14
cmpb $0x0, 0x28d(%rbx)
je 0x95b4
movq %r14, %rdi
movl $0x2c, %esi
callq 0x63c0
movq %rax, 0x6c8(%rsp)
testq %rax, %rax
je 0x95b9
movq %rax, %rbp
movb $0x0, (%rax)
leaq 0x6d0(%rsp), %rdi
movq %r14, %rsi
callq 0x6460
incq %rbp
xorl %r13d, %r13d
jmp 0x95e0
jmp 0x964d
leaq 0x6d0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6460
movq %r15, %rdi
callq 0x6280
movq %rax, %rbp
addq %r14, %rbp
movl $0x1, %r13d
callq 0x62c0
movq (%rax), %rax
movsbq 0x6d0(%rsp), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x9621
leaq 0x6d0(%rsp), %rdi
leaq 0x6c8(%rsp), %r15
movq %r15, %rsi
movl $0xa, %edx
callq 0x6350
movq (%r15), %rcx
cmpb $0x0, (%rcx)
je 0x98b5
movl $0x0, 0x6bc(%rsp)
movq 0x6b0(%rsp), %rdi
leaq 0x6d0(%rsp), %rdx
leaq 0x6ac(%rsp), %r8
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x41894
cmpl $0x0, 0x6ac(%rsp)
jne 0x98ee
leaq 0x6ac(%rsp), %r12
xorl %edx, %edx
testl %edx, %edx
jne 0x9828
testl %r13d, %r13d
je 0x967d
movl $0xffffffff, 0x6ac(%rsp) # imm = 0xFFFFFFFF
movq 0x6b0(%rsp), %rax
movq 0x6c0(%rsp), %rdx
movl $0xd5, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %rdx, %rsi
movq %r12, %rdx
callq 0xa13e
cmpl $0x0, 0x74(%rbx)
je 0x96bf
movq 0x6c0(%rsp), %rdi
movq %r12, %rsi
callq 0x1685f
cmpb $0x0, (%r14)
je 0x9703
cmpb $0x0, (%rbp)
je 0x971f
movq %rbp, %rdi
movl $0x2c, %esi
callq 0x63c0
movq %rax, 0x6c8(%rsp)
testq %rax, %rax
je 0x972f
movq %rax, %r15
movb $0x0, (%rax)
leaq 0x6d0(%rsp), %rdi
movq %rbp, %rsi
callq 0x6460
incq %r15
movq %r15, %rbp
jmp 0x9743
movq 0x6b0(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x4110a
jmp 0x97e9
movl $0x6b, 0x6ac(%rsp)
jmp 0x97e9
leaq 0x6d0(%rsp), %rdi
movq %rbp, %rsi
callq 0x6460
movb $0x0, (%rbp)
callq 0x62c0
movq (%rax), %rax
movsbq 0x6d0(%rsp), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x9782
leaq 0x6d0(%rsp), %rdi
leaq 0x6c8(%rsp), %rsi
movl $0xa, %edx
callq 0x6350
movq 0x6c8(%rsp), %rcx
cmpb $0x0, (%rcx)
je 0x97f5
movl $0x0, 0x6bc(%rsp)
movq 0x6b0(%rsp), %rdi
xorl %esi, %esi
leaq 0x6d0(%rsp), %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x41894
cmpl $0x0, 0x6ac(%rsp)
je 0x97e9
leaq 0xc001a(%rip), %r15 # 0xc97d4
movq %r15, %rdi
leaq 0xbffc6(%rip), %rsi # 0xc978a
xorl %eax, %eax
callq 0x6050
movq %r15, %rdi
leaq 0x6d0(%rsp), %rsi
xorl %eax, %eax
callq 0x6050
leaq 0xc77bc(%rip), %rdi # 0xd0fa0
callq 0x6120
movl 0x6ac(%rsp), %edx
jmp 0x9665
movq 0x6b0(%rsp), %rdi
incl %eax
movl %eax, %esi
leaq 0x6bc(%rsp), %rdx
movq %r12, %rcx
callq 0x37f5e
cmpl $0x0, 0x6bc(%rsp)
je 0x97a9
movl $0xe9, 0x6ac(%rsp)
jmp 0x97b3
cmpl $0x6b, %edx
jne 0x983a
movl $0x0, 0x6ac(%rsp)
xorl %edx, %edx
cmpl $0x0, 0x74(%rbx)
je 0x9871
movq 0x6c0(%rsp), %rdi
leaq 0x6ac(%rsp), %rbx
movl $0x1, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x6c0(%rsp), %rdi
movq %rbx, %rsi
callq 0x1685f
movl (%rbx), %edx
testl %edx, %edx
jne 0x9940
movq 0x6c0(%rsp), %rdi
leaq 0x6ac(%rsp), %rbx
movq %rbx, %rsi
callq 0xd6de
movq 0x6b0(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6de
xorl %eax, %eax
addq $0x8d8, %rsp # imm = 0x8D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6b0(%rsp), %rdi
incl %eax
leaq 0x6bc(%rsp), %r15
leaq 0x6ac(%rsp), %rcx
movl %eax, %esi
movq %r15, %rdx
callq 0x37f5e
cmpl $0x0, (%r15)
je 0x964d
movl $0xe9, 0x6ac(%rsp)
leaq 0xbfedf(%rip), %rbx # 0xc97d4
leaq 0xbfe8e(%rip), %rsi # 0xc978a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6050
leaq 0x6d0(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6050
leaq 0xc7681(%rip), %rdi # 0xd0fa0
callq 0x6120
movq 0x6b0(%rsp), %rdi
movq 0x6c0(%rsp), %rsi
movl 0x6ac(%rsp), %edx
callq 0x6863
movq 0x6b0(%rsp), %rdi
movq 0x6c0(%rsp), %rsi
callq 0x6863
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/utilities/fpackutil.c |
fp_i2rescale | int fp_i2rescale(fitsfile *infptr, int naxis, long *naxes, double rescale,
fitsfile *outfptr, int *status)
{
/*
divide the integer pixel values in the input file by rescale,
and write back out to the output file..
*/
long ii, jj, nelem = 1, nx, ny;
short *intarray, nullvalue;
int anynul, tstatus, checknull = 1;
nx = naxes[0];
ny = 1;
for (ii = 1; ii < naxis; ii++) {
ny = ny * naxes[ii];
}
intarray = calloc(nx, sizeof(short));
if (!intarray) {
*status = MEMORY_ALLOCATION;
return(*status);
}
/* read the null value keyword (BLANK) if present */
tstatus = 0;
fits_read_key(infptr, TSHORT, "BLANK", &nullvalue, 0, &tstatus);
if (tstatus) {
checknull = 0;
}
/* turn off any scaling of the integer pixel values */
fits_set_bscale(infptr, 1.0, 0.0, status);
fits_set_bscale(outfptr, 1.0, 0.0, status);
for (ii = 0; ii < ny; ii++) {
fits_read_img_sht(infptr, 1, nelem, nx,
0, intarray, &anynul, status);
if (checknull) {
for (jj = 0; jj < nx; jj++) {
if (intarray[jj] != nullvalue)
intarray[jj] = NSHRT( (intarray[jj] / rescale) );
}
} else {
for (jj = 0; jj < nx; jj++)
intarray[jj] = NSHRT( (intarray[jj] / rescale) );
}
fits_write_img_sht(outfptr, 1, nelem, nx, intarray, status);
nelem += nx;
}
free(intarray);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq (%rdx), %r12
movl $0x1, %r15d
cmpl $0x2, %esi
jl 0xaa6f
movslq %esi, %rax
movl $0x1, %ecx
imulq (%rdx,%rcx,8), %r15
incq %rcx
cmpq %rcx, %rax
jne 0xaa62
movl $0x2, %esi
movq %r12, %rdi
callq 0x64a0
testq %rax, %rax
je 0xac14
movq %rax, %r13
leaq 0x30(%rsp), %rbp
movl $0x0, (%rbp)
leaq 0xd0cfd(%rip), %rdx # 0xdb798
leaq 0x2(%rsp), %rcx
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x15, %esi
xorl %r8d, %r8d
movq %rbp, %r9
callq 0x6da65
movl (%rbp), %eax
movl %eax, 0x4(%rsp)
movsd 0xbe5b9(%rip), %xmm0 # 0xc9080
xorpd %xmm1, %xmm1
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbc17c
xorpd %xmm1, %xmm1
movq 0x18(%rsp), %rdi
movsd 0xbe599(%rip), %xmm0 # 0xc9080
movq %rbx, %rsi
callq 0xbc17c
movq %r15, 0x28(%rsp)
testq %r15, %r15
jle 0xac08
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0xbe564(%rip), %r14 # 0xc9070
movq %rbx, 0x20(%rsp)
movl $0x1, %esi
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %r13, %r9
pushq %rbx
leaq 0x3c(%rsp), %rax
pushq %rax
callq 0x4eac8
addq $0x10, %rsp
cmpl $0x0, 0x4(%rsp)
je 0xab87
testq %r12, %r12
movsd 0x8(%rsp), %xmm1
xorpd %xmm2, %xmm2
jle 0xabd7
xorl %eax, %eax
movswl (%r13,%rax,2), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd %xmm1, %xmm0
xorl %ecx, %ecx
ucomisd %xmm2, %xmm0
setb %cl
addsd (%r14,%rcx,8), %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, (%r13,%rax,2)
incq %rax
cmpq %rax, %r12
jne 0xab53
jmp 0xabd7
testq %r12, %r12
movsd 0x8(%rsp), %xmm1
xorpd %xmm2, %xmm2
jle 0xabd7
movzwl 0x2(%rsp), %eax
xorl %ecx, %ecx
movzwl (%r13,%rcx,2), %edx
cmpw %ax, %dx
je 0xabcf
movswl %dx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
divsd %xmm1, %xmm0
xorl %edx, %edx
ucomisd %xmm2, %xmm0
setb %dl
addsd (%r14,%rdx,8), %xmm0
cvttsd2si %xmm0, %edx
movw %dx, (%r13,%rcx,2)
incq %rcx
cmpq %rcx, %r12
jne 0xab9d
movl $0x1, %esi
movq 0x18(%rsp), %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r13, %r8
movq 0x20(%rsp), %rbx
movq %rbx, %r9
callq 0x9edc8
addq %r12, %rbp
incq %r15
cmpq 0x28(%rsp), %r15
jne 0xab11
movq %r13, %rdi
callq 0x6260
movl (%rbx), %eax
jmp 0xac1f
movl $0x71, (%rbx)
movl $0x71, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/utilities/fpackutil.c |
mem_iraf_open | int mem_iraf_open(char *filename, int rwmode, int *hdl)
/*
This routine creates an empty memory buffer, then calls iraf2mem to
open the IRAF disk file and convert it to a FITS file in memeory.
*/
{
int status;
size_t filesize = 0;
/* create a memory file with size = 0 for the FITS converted IRAF file */
status = mem_createmem(filesize, hdl);
if (status)
{
ffpmsg("failed to create empty memory file (mem_iraf_open)");
return(status);
}
/* convert the iraf file into a FITS file in memory */
status = iraf2mem(filename, memTable[*hdl].memaddrptr,
memTable[*hdl].memsizeptr, &filesize, &status);
if (status)
{
mem_close_free(*hdl); /* free up the memory */
ffpmsg("failed to convert IRAF file into memory (mem_iraf_open)");
return(status);
}
memTable[*hdl].currentpos = 0; /* save starting position */
memTable[*hdl].fitsfilesize=filesize; /* and initial file size */
return(0);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq $0x0, 0x8(%rsp)
movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF
leaq 0x1368b0(%rip), %rax # 0x14f308
xorl %ecx, %ecx
cmpq $0x0, -0x18(%rax)
je 0x18a87
incq %rcx
addq $0x48, %rax
cmpq $0x2710, %rcx # imm = 0x2710
jne 0x18a5a
leaq 0xb5489(%rip), %rdi # 0xcdf01
callq 0x37264
movl $0x67, %eax
jmp 0x18b33
movl %ecx, (%rbx)
leaq -0x10(%rax), %rcx
movq %rcx, -0x18(%rax)
movq %rax, -0x8(%rax)
movq $0x0, (%rax)
movq $0xb40, 0x8(%rax) # imm = 0xB40
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq 0xe651e(%rip), %rcx # 0xfefd0
movq %rcx, 0x10(%rax)
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
movslq (%rbx), %rax
leaq (%rax,%rax,8), %rax
leaq 0x136820(%rip), %r15 # 0x14f2f0
movq (%r15,%rax,8), %rsi
movq 0x10(%r15,%rax,8), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %r8
callq 0x920a9
movl %eax, (%r14)
movslq (%rbx), %rcx
testl %eax, %eax
je 0x18b1a
leaq (%rcx,%rcx,8), %rbx
movq (%r15,%rbx,8), %rax
movq (%rax), %rdi
callq 0x6260
xorps %xmm0, %xmm0
movups %xmm0, (%r15,%rbx,8)
leaq 0xb5425(%rip), %rdi # 0xcdf34
callq 0x37264
movl 0x4(%rsp), %eax
jmp 0x18b33
leaq (%rcx,%rcx,8), %rax
movq $0x0, 0x30(%r15,%rax,8)
movq 0x8(%rsp), %rcx
movq %rcx, 0x38(%r15,%rax,8)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/drvrmem.c |
ffshft | int ffshft(fitsfile *fptr, /* I - FITS file pointer */
LONGLONG firstbyte, /* I - position of first byte in block to shift */
LONGLONG nbytes, /* I - size of block of bytes to shift */
LONGLONG nshift, /* I - size of shift in bytes (+ or -) */
int *status) /* IO - error status */
/*
Shift block of bytes by nshift bytes (positive or negative).
A positive nshift value moves the block down further in the file, while a
negative value shifts the block towards the beginning of the file.
*/
{
#define shftbuffsize 100000
long ntomov;
LONGLONG ptr, ntodo;
char buffer[shftbuffsize];
if (*status > 0)
return(*status);
ntodo = nbytes; /* total number of bytes to shift */
if (nshift > 0)
/* start at the end of the block and work backwards */
ptr = firstbyte + nbytes;
else
/* start at the beginning of the block working forwards */
ptr = firstbyte;
while (ntodo)
{
/* number of bytes to move at one time */
ntomov = (long) (minvalue(ntodo, shftbuffsize));
if (nshift > 0) /* if moving block down ... */
ptr -= ntomov;
/* move to position and read the bytes to be moved */
ffmbyt(fptr, ptr, REPORT_EOF, status);
ffgbyt(fptr, ntomov, buffer, status);
/* move by shift amount and write the bytes */
ffmbyt(fptr, ptr + nshift, IGNORE_EOF, status);
if (ffpbyt(fptr, ntomov, buffer, status) > 0)
{
ffpmsg("Error while shifting block (ffshft)");
return(*status);
}
ntodo -= ntomov;
if (nshift < 0) /* if moving block up ... */
ptr += ntomov;
}
/* now overwrite the old data with fill */
if ((fptr->Fptr)->hdutype == ASCII_TBL)
memset(buffer, 32, shftbuffsize); /* fill ASCII tables with spaces */
else
memset(buffer, 0, shftbuffsize); /* fill other HDUs with zeros */
if (nshift < 0)
{
ntodo = -nshift;
/* point to the end of the shifted block */
ptr = firstbyte + nbytes + nshift;
}
else
{
ntodo = nshift;
/* point to original beginning of the block */
ptr = firstbyte;
}
ffmbyt(fptr, ptr, REPORT_EOF, status);
while (ntodo)
{
ntomov = (long) (minvalue(ntodo, shftbuffsize));
ffpbyt(fptr, ntomov, buffer, status);
ntodo -= ntomov;
}
return(*status);
} | movl (%r8), %eax
testl %eax, %eax
jle 0x19ce8
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x186c8, %rsp # imm = 0x186C8
movq %r8, %rbx
movq %rdx, %r13
movq %rdi, %r14
movq %rcx, (%rsp)
movq %rsi, 0x8(%rsp)
leaq (%rdx,%rsi), %rax
movq %rax, 0x10(%rsp)
testq %rdx, %rdx
je 0x19dc6
movq (%rsp), %rax
testq %rax, %rax
movq 0x8(%rsp), %rbp
cmovgq 0x10(%rsp), %rbp
sarq $0x3f, %rax
movq %rax, 0x18(%rsp)
movl $0x186a0, %eax # imm = 0x186A0
cmpq %rax, %r13
movl $0x186a0, %r12d # imm = 0x186A0
cmovlq %r13, %r12
cmpq $0x0, (%rsp)
movl $0x0, %eax
cmovgq %r12, %rax
subq %rax, %rbp
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq %r14, %rdi
movq %r12, %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc25e0
movq (%rsp), %rax
leaq (%rax,%rbp), %rsi
movq %r14, %rdi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc1d35
testl %eax, %eax
jg 0x19e55
movq 0x18(%rsp), %rax
andq %r12, %rax
addq %rax, %rbp
subq %r12, %r13
jne 0x19d38
movq 0x8(%r14), %rax
cmpl $0x1, 0x58(%rax)
jne 0x19de1
leaq 0x20(%rsp), %rdi
movl $0x186a0, %edx # imm = 0x186A0
movl $0x20, %esi
jmp 0x19ded
leaq 0x20(%rsp), %rdi
movl $0x186a0, %edx # imm = 0x186A0
xorl %esi, %esi
callq 0x6090
movq 0x8(%rsp), %rsi
movq (%rsp), %r15
movq 0x10(%rsp), %rax
addq %r15, %rax
testq %r15, %r15
cmovsq %rax, %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
testq %r15, %r15
je 0x19e61
movq %r15, %r13
negq %r13
cmovsq %r15, %r13
movl $0x186a0, %ebp # imm = 0x186A0
leaq 0x20(%rsp), %r15
cmpq %rbp, %r13
movl $0x186a0, %r12d # imm = 0x186A0
cmovlq %r13, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc1d35
subq %r12, %r13
jne 0x19e30
jmp 0x19e61
leaq 0xb5376(%rip), %rdi # 0xcf1d2
callq 0x37264
movl (%rbx), %eax
addq $0x186c8, %rsp # imm = 0x186C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/editcol.c |
ffdrrg | int ffdrrg(fitsfile *fptr, /* I - FITS file pointer to table */
char *ranges, /* I - ranges of rows to delete (1 = first) */
int *status) /* IO - error status */
/*
delete the ranges of rows from the table (1 = first row of table).
The 'ranges' parameter typically looks like:
'10-20, 30 - 40, 55' or '50-'
and gives a list of rows or row ranges separated by commas.
*/
{
char *cptr;
int nranges, nranges2, ii;
long *minrow, *maxrow, nrows, *rowarray, jj, kk;
LONGLONG naxis2;
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
{
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
}
/* rescan header if data structure is undefined */
else if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
if ( ffrdef(fptr, status) > 0)
return(*status);
if ((fptr->Fptr)->hdutype == IMAGE_HDU)
{
ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrrg)");
return(*status = NOT_TABLE);
}
/* the NAXIS2 keyword may not be up to date, so use the structure value */
naxis2 = (fptr->Fptr)->numrows;
/* find how many ranges were specified ( = no. of commas in string + 1) */
cptr = ranges;
for (nranges = 1; (cptr = strchr(cptr, ',')); nranges++)
cptr++;
minrow = calloc(nranges, sizeof(long));
maxrow = calloc(nranges, sizeof(long));
if (!minrow || !maxrow) {
*status = MEMORY_ALLOCATION;
ffpmsg("failed to allocate memory for row ranges (ffdrrg)");
if (maxrow) free(maxrow);
if (minrow) free(minrow);
return(*status);
}
/* parse range list into array of range min and max values */
ffrwrg(ranges, naxis2, nranges, &nranges2, minrow, maxrow, status);
if (*status > 0 || nranges2 == 0) {
free(maxrow);
free(minrow);
return(*status);
}
/* determine total number or rows to delete */
nrows = 0;
for (ii = 0; ii < nranges2; ii++) {
nrows = nrows + maxrow[ii] - minrow[ii] + 1;
}
rowarray = calloc(nrows, sizeof(long));
if (!rowarray) {
*status = MEMORY_ALLOCATION;
ffpmsg("failed to allocate memory for row array (ffdrrg)");
return(*status);
}
for (kk = 0, ii = 0; ii < nranges2; ii++) {
for (jj = minrow[ii]; jj <= maxrow[ii]; jj++) {
rowarray[kk] = jj;
kk++;
}
}
/* delete the rows */
ffdrws(fptr, rowarray, nrows, status);
free(rowarray);
free(maxrow);
free(minrow);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl (%rdx), %ebp
testl %ebp, %ebp
jg 0x1a35c
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
jne 0x1a0e6
cmpq $-0x1, 0x88(%rax)
jne 0x1a0f5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af49
testl %eax, %eax
jg 0x1a35a
jmp 0x1a0f5
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r14), %rax
cmpl $0x0, 0x58(%rax)
je 0x1a1ba
movq 0x3c0(%rax), %r15
movq %r13, %rdi
movl $0x2c, %esi
callq 0x63c0
testq %rax, %rax
movq %r15, 0x8(%rsp)
movl $0x1, %ebp
je 0x1a13d
incq %rax
incl %ebp
movq %rax, %rdi
movl $0x2c, %esi
callq 0x63c0
testq %rax, %rax
jne 0x1a126
movl %ebp, %r12d
movl $0x8, %esi
movq %r12, %rdi
callq 0x64a0
movq %rax, %r15
movl $0x8, %esi
movq %r12, %rdi
callq 0x64a0
movq %rax, %r12
testq %r15, %r15
setne %al
testq %r12, %r12
setne %cl
testb %cl, %al
je 0x1a1d6
movq %rbx, (%rsp)
leaq 0x14(%rsp), %rcx
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movl %ebp, %edx
movq %rcx, %r13
movq %r15, %r8
movq %r12, %r9
callq 0x1a381
movl (%rbx), %ebp
testl %ebp, %ebp
setg %cl
movl (%r13), %eax
testl %eax, %eax
sete %dl
orb %cl, %dl
je 0x1a203
movq %r12, %rdi
callq 0x6260
movq %r15, %rdi
callq 0x6260
jmp 0x1a35c
leaq 0xb4331(%rip), %rdi # 0xce4f2
callq 0x37264
movl $0xeb, (%rbx)
movl $0xeb, %ebp
jmp 0x1a35c
movl $0x71, (%rbx)
leaq 0xb434c(%rip), %rdi # 0xce52f
callq 0x37264
testq %r12, %r12
je 0x1a1f5
movq %r12, %rdi
callq 0x6260
testq %r15, %r15
jne 0x1a352
jmp 0x1a35a
movl %eax, %ebp
testl %ebp, %ebp
jle 0x1a31a
xorl %eax, %eax
xorl %r13d, %r13d
addq (%r12,%rax,8), %r13
subq (%r15,%rax,8), %r13
incq %r13
incq %rax
cmpq %rax, %rbp
jne 0x1a212
movl $0x8, %esi
movq %r13, %rdi
callq 0x64a0
testq %rax, %rax
je 0x1a36d
testl %ebp, %ebp
jle 0x1a32e
movq %rax, %r11
addq $0x8, %r11
xorl %ecx, %ecx
movdqa 0xaeddc(%rip), %xmm0 # 0xc9030
movdqa 0xaede4(%rip), %xmm1 # 0xc9040
pcmpeqd %xmm2, %xmm2
xorl %r8d, %r8d
movq (%r15,%rcx,8), %rdx
movq (%r12,%rcx,8), %r9
cmpq %r9, %rdx
jg 0x1a30c
leaq (%r8,%r9), %rsi
subq %rdx, %rsi
incq %rsi
subq %rdx, %r9
leaq 0x2(%r9), %rdi
andq $-0x2, %rdi
movq %r9, %xmm3
pshufd $0x44, %xmm3, %xmm3 # xmm3 = xmm3[0,1,0,1]
leaq (%r11,%r8,8), %r8
pxor %xmm1, %xmm3
xorl %r9d, %r9d
movq %r9, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm0, %xmm4
pxor %xmm1, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %r10d
notl %r10d
testb $0x1, %r10b
je 0x1a2e5
leaq (%rdx,%r9), %r10
movq %r10, -0x8(%r8,%r9,8)
pxor %xmm2, %xmm4
pextrw $0x4, %xmm4, %r10d
testb $0x1, %r10b
je 0x1a300
leaq (%rdx,%r9), %r10
incq %r10
movq %r10, (%r8,%r9,8)
addq $0x2, %r9
cmpq %r9, %rdi
jne 0x1a29e
movq %rsi, %r8
incq %rcx
cmpq %rbp, %rcx
jne 0x1a263
jmp 0x1a32e
xorl %r13d, %r13d
movl $0x8, %esi
xorl %edi, %edi
callq 0x64a0
testq %rax, %rax
je 0x1a36d
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movq %rax, %r14
callq 0x1a622
movq %r14, %rdi
callq 0x6260
movq %r12, %rdi
callq 0x6260
movq %r15, %rdi
callq 0x6260
movl (%rbx), %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x71, (%rbx)
leaq 0xb41e7(%rip), %rdi # 0xce561
callq 0x37264
jmp 0x1a35a
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/editcol.c |
ffdrws | int ffdrws(fitsfile *fptr, /* I - FITS file pointer */
long *rownum, /* I - list of rows to delete (1 = first) */
long nrows, /* I - number of rows to delete */
int *status) /* IO - error status */
/*
delete the list of rows from the table (1 = first row of table).
*/
{
LONGLONG naxis1, naxis2, insertpos, nextrowpos;
long ii, nextrow;
char comm[FLEN_COMMENT];
unsigned char *buffer;
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
/* rescan header if data structure is undefined */
if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
if ( ffrdef(fptr, status) > 0)
return(*status);
if ((fptr->Fptr)->hdutype == IMAGE_HDU)
{
ffpmsg("Can only delete rows in TABLE or BINTABLE extension (ffdrws)");
return(*status = NOT_TABLE);
}
if (nrows < 0 )
return(*status = NEG_BYTES);
else if (nrows == 0)
return(*status); /* no op, so just return */
ffgkyjj(fptr, "NAXIS1", &naxis1, comm, status); /* row width */
ffgkyjj(fptr, "NAXIS2", &naxis2, comm, status); /* number of rows */
/* check that input row list is in ascending order */
for (ii = 1; ii < nrows; ii++)
{
if (rownum[ii - 1] >= rownum[ii])
{
ffpmsg("row numbers are not in increasing order (ffdrws)");
return(*status = BAD_ROW_NUM);
}
}
if (rownum[0] < 1)
{
ffpmsg("first row to delete is less than 1 (ffdrws)");
return(*status = BAD_ROW_NUM);
}
else if (rownum[nrows - 1] > naxis2)
{
ffpmsg("last row to delete exceeds size of table (ffdrws)");
return(*status = BAD_ROW_NUM);
}
buffer = (unsigned char *) malloc( (size_t) naxis1); /* buffer for one row */
if (!buffer)
{
ffpmsg("malloc failed (ffdrws)");
return(*status = MEMORY_ALLOCATION);
}
/* byte location to start of first row to delete, and the next row */
insertpos = (fptr->Fptr)->datastart + ((rownum[0] - 1) * naxis1);
nextrowpos = insertpos + naxis1;
nextrow = rownum[0] + 1;
/* work through the list of rows to delete */
for (ii = 1; ii < nrows; nextrow++, nextrowpos += naxis1)
{
if (nextrow < rownum[ii])
{ /* keep this row, so copy it to the new position */
ffmbyt(fptr, nextrowpos, REPORT_EOF, status);
ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */
ffmbyt(fptr, insertpos, IGNORE_EOF, status);
ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */
if (*status > 0)
{
ffpmsg("error while copying good rows in table (ffdrws)");
free(buffer);
return(*status);
}
insertpos += naxis1;
}
else
{ /* skip over this row since it is in the list */
ii++;
}
}
/* finished with all the rows to delete; copy remaining rows */
while(nextrow <= naxis2)
{
ffmbyt(fptr, nextrowpos, REPORT_EOF, status);
ffgbyt(fptr, naxis1, buffer, status); /* read the bytes */
ffmbyt(fptr, insertpos, IGNORE_EOF, status);
ffpbyt(fptr, naxis1, buffer, status); /* write the bytes */
if (*status > 0)
{
ffpmsg("failed to copy remaining rows in table (ffdrws)");
free(buffer);
return(*status);
}
insertpos += naxis1;
nextrowpos += naxis1;
nextrow++;
}
free(buffer);
/* now delete the empty rows at the end of the table */
ffdrow(fptr, naxis2 - nrows + 1, nrows, status);
/* Update the heap data, if any. This will remove any orphaned data */
/* that was only pointed to by the rows that have been deleted */
ffcmph(fptr, status);
return(*status);
} | movl (%rcx), %eax
testl %eax, %eax
jle 0x1a629
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
je 0x1a664
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r14), %rax
cmpq $-0x1, 0x88(%rax)
je 0x1a700
cmpl $0x0, 0x58(%rax)
je 0x1a713
testq %r15, %r15
js 0x1a72c
je 0x1a70f
leaq 0xc1f8f(%rip), %rsi # 0xdc621
leaq 0x8(%rsp), %rdx
leaq 0x30(%rsp), %r13
movq %r14, %rdi
movq %r13, %rcx
movq %rbx, %r8
callq 0x6dd4a
leaq 0xc1f78(%rip), %rsi # 0xdc629
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
movq %r13, %rcx
movq %rbx, %r8
callq 0x6dd4a
cmpq $0x1, %r15
je 0x1a6e2
movl $0x1, %eax
movq -0x8(%r12,%rax,8), %rcx
cmpq (%r12,%rax,8), %rcx
jge 0x1a74b
incq %rax
cmpq %rax, %r15
jne 0x1a6cf
movq (%r12), %rbp
testq %rbp, %rbp
jle 0x1a742
movq 0x20(%rsp), %rax
cmpq %rax, -0x8(%r12,%r15,8)
jle 0x1a774
leaq 0xb3f2e(%rip), %rdi # 0xce62c
jmp 0x1a752
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af49
testl %eax, %eax
jle 0x1a739
movl (%rbx), %eax
jmp 0x1a762
leaq 0xb3e78(%rip), %rdi # 0xce592
callq 0x37264
movl $0xeb, (%rbx)
movl $0xeb, %eax
jmp 0x1a762
movl $0x132, (%rbx) # imm = 0x132
movl $0x132, %eax # imm = 0x132
jmp 0x1a762
movq 0x8(%r14), %rax
jmp 0x1a672
leaq 0xb3eb7(%rip), %rdi # 0xce600
jmp 0x1a752
leaq 0xb3e7d(%rip), %rdi # 0xce5cf
callq 0x37264
movl $0x133, (%rbx) # imm = 0x133
movl $0x133, %eax # imm = 0x133
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x61a0
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1a7c4
movq 0x8(%r14), %rax
movq %r15, %rcx
leaq -0x1(%rbp), %r15
imulq %r13, %r15
addq 0x88(%rax), %r15
movq %r13, %rax
addq %r15, %r13
incq %rbp
movq %rcx, 0x28(%rsp)
cmpq $0x1, %rcx
jne 0x1a7dd
movq 0x18(%rsp), %rax
jmp 0x1a86a
leaq 0xb3e93(%rip), %rdi # 0xce65e
callq 0x37264
movl $0x71, (%rbx)
movl $0x71, %eax
jmp 0x1a762
movq %rax, %rcx
movl $0x1, %eax
cmpq (%r12,%rax,8), %rbp
jge 0x1a855
movq %rax, 0x18(%rsp)
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0xc25e0
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0xc1d35
cmpl $0x0, (%rbx)
jg 0x1a922
movq 0x8(%rsp), %rcx
addq %rcx, %r15
movq 0x18(%rsp), %rax
jmp 0x1a858
incq %rax
addq %rcx, %r13
incq %rbp
cmpq 0x28(%rsp), %rax
jl 0x1a7e5
movq 0x20(%rsp), %rax
cmpq %rax, %rbp
jg 0x1a8e3
decq %rbp
movq %r14, %rdi
movq %r15, %r12
movq %r13, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq 0x10(%rsp), %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc25e0
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xc1d35
cmpl $0x0, (%rbx)
jg 0x1a919
movq 0x8(%rsp), %rax
addq %rax, %r12
addq %rax, %r13
movq 0x20(%rsp), %rax
incq %rbp
cmpq %rax, %rbp
movq %r12, %r15
jl 0x1a872
movq 0x10(%rsp), %rdi
movq %rax, %r15
callq 0x6260
movq 0x28(%rsp), %rdx
subq %rdx, %r15
incq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x19e75
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3fb32
jmp 0x1a70f
leaq 0xb3d85(%rip), %rdi # 0xce6a5
jmp 0x1a929
leaq 0xb3d4c(%rip), %rdi # 0xce675
callq 0x37264
movq 0x10(%rsp), %rdi
callq 0x6260
jmp 0x1a70f
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/editcol.c |
ffrwrgll | int ffrwrgll(
char *rowlist, /* I - list of rows and row ranges */
LONGLONG maxrows, /* I - number of rows in the list */
int maxranges, /* I - max number of ranges to be returned */
int *numranges, /* O - number ranges returned */
LONGLONG *minrow, /* O - first row in each range */
LONGLONG *maxrow, /* O - last row in each range */
int *status) /* IO - status value */
{
/*
parse the input list of row ranges, returning the number of ranges,
and the min and max row value in each range.
The only characters allowed in the input rowlist are
decimal digits, minus sign, and comma (and non-significant spaces)
Example:
list = "10-20, 30-35,50"
would return numranges = 3, minrow[] = {10, 30, 50}, maxrow[] = {20, 35, 50}
error is returned if min value of range is > max value of range or if the
ranges are not monotonically increasing.
*/
char *next;
LONGLONG minval, maxval;
double dvalue;
if (*status > 0)
return(*status);
if (maxrows <= 0 ) {
*status = RANGE_PARSE_ERROR;
ffpmsg("Input maximum range value is <= 0 (fits_parse_ranges)");
return(*status);
}
next = rowlist;
*numranges = 0;
while (*next == ' ')next++; /* skip spaces */
while (*next != '\0') {
/* find min value of next range; *next must be '-' or a digit */
if (*next == '-') {
minval = 1; /* implied minrow value = 1 */
} else if ( isdigit((int) *next) ) {
/* read as a double, because the string to LONGLONG function */
/* is platform dependent (strtoll, strtol, _atoI64) */
dvalue = strtod(next, &next);
minval = (LONGLONG) (dvalue + 0.1);
} else {
*status = RANGE_PARSE_ERROR;
ffpmsg("Syntax error in this row range list:");
ffpmsg(rowlist);
return(*status);
}
while (*next == ' ')next++; /* skip spaces */
/* find max value of next range; *next must be '-', or ',' */
if (*next == '-') {
next++;
while (*next == ' ')next++; /* skip spaces */
if ( isdigit((int) *next) ) {
/* read as a double, because the string to LONGLONG function */
/* is platform dependent (strtoll, strtol, _atoI64) */
dvalue = strtod(next, &next);
maxval = (LONGLONG) (dvalue + 0.1);
} else if (*next == ',' || *next == '\0') {
maxval = maxrows; /* implied max value */
} else {
*status = RANGE_PARSE_ERROR;
ffpmsg("Syntax error in this row range list:");
ffpmsg(rowlist);
return(*status);
}
} else if (*next == ',' || *next == '\0') {
maxval = minval; /* only a single integer in this range */
} else {
*status = RANGE_PARSE_ERROR;
ffpmsg("Syntax error in this row range list:");
ffpmsg(rowlist);
return(*status);
}
if (*numranges + 1 > maxranges) {
*status = RANGE_PARSE_ERROR;
ffpmsg("Overflowed maximum number of ranges (fits_parse_ranges)");
return(*status);
}
if (minval < 1 ) {
*status = RANGE_PARSE_ERROR;
ffpmsg("Syntax error in this row range list: row number < 1");
ffpmsg(rowlist);
return(*status);
}
if (maxval < minval) {
*status = RANGE_PARSE_ERROR;
ffpmsg("Syntax error in this row range list: min > max");
ffpmsg(rowlist);
return(*status);
}
if (*numranges > 0) {
if (minval <= maxrow[(*numranges) - 1]) {
*status = RANGE_PARSE_ERROR;
ffpmsg("Syntax error in this row range list. Range minimum is");
ffpmsg(" less than or equal to previous range maximum");
ffpmsg(rowlist);
return(*status);
}
}
if (minval <= maxrows) { /* ignore range if greater than maxrows */
if (maxval > maxrows)
maxval = maxrows;
minrow[*numranges] = minval;
maxrow[*numranges] = maxval;
(*numranges)++;
}
while (*next == ' ')next++; /* skip spaces */
if (*next == ',') {
next++;
while (*next == ' ')next++; /* skip more spaces */
}
}
if (*numranges == 0) { /* a null string was entered */
minrow[0] = 1;
maxrow[0] = maxrows;
*numranges = 1;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x60(%rsp), %rbx
movl (%rbx), %eax
testl %eax, %eax
jg 0x1ae80
movq %rsi, %r13
testq %rsi, %rsi
jle 0x1ae6c
movq %r8, %rbp
movq %rcx, %r15
movl $0x0, (%rcx)
movq %rdi, 0x18(%rsp)
leaq -0x1(%rdi), %r12
movb 0x1(%r12), %r14b
incq %r12
cmpb $0x20, %r14b
je 0x1ac96
leaq 0x8(%rsp), %rax
movq %r12, (%rax)
xorl %eax, %eax
movl %edx, 0x14(%rsp)
movl $0x1, %edi
cmpb $0x2d, %r14b
je 0x1ad20
movzbl %r14b, %ecx
testl %ecx, %ecx
je 0x1aecb
movq %r13, %rbx
movq %r15, %r13
movq %rbp, %r15
movq %r9, %rbp
callq 0x62c0
movq (%rax), %rax
movsbq %r14b, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x1ae4e
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6600
addsd 0xb3507(%rip), %xmm0 # 0xce208
cvttsd2si %xmm0, %rdi
movq 0x8(%rsp), %r12
movq %rbp, %r9
movq %r15, %rbp
movq %r13, %r15
movq %rbx, %r13
movl 0x14(%rsp), %edx
jmp 0x1ad20
incq %r12
movzbl (%r12), %eax
cmpl $0x20, %eax
je 0x1ad1d
testl %eax, %eax
je 0x1ad96
cmpl $0x2c, %eax
je 0x1ad96
cmpl $0x2d, %eax
jne 0x1ae4e
movq %rdi, %rbx
movq %r9, 0x20(%rsp)
movq %r12, 0x8(%rsp)
movsbq 0x1(%r12), %r14
incq %r12
cmpq $0x20, %r14
je 0x1ad49
movq %r12, 0x8(%rsp)
callq 0x62c0
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
jne 0x1ae23
movq %r13, %rcx
testb %r14b, %r14b
movq 0x20(%rsp), %r9
movl 0x14(%rsp), %edx
movq %rbx, %rdi
je 0x1ad9e
movzbl %r14b, %eax
movq %r13, %rcx
cmpl $0x2c, %eax
je 0x1ad9e
jmp 0x1ae4e
movq %r12, 0x8(%rsp)
movq %rdi, %rcx
movl (%r15), %eax
cmpl %edx, %eax
jge 0x1ae8f
testq %rdi, %rdi
jle 0x1aea3
cmpq %rdi, %rcx
movq 0x18(%rsp), %r14
jl 0x1aeb7
testl %eax, %eax
jle 0x1adcf
cmpq -0x8(%r9,%rax,8), %rdi
jle 0x1aee8
cmpq %r13, %rdi
jg 0x1adec
movslq %eax, %rsi
cmpq %r13, %rcx
cmovaeq %r13, %rcx
movq %rdi, (%rbp,%rsi,8)
movq %rcx, (%r9,%rsi,8)
incl %eax
movl %eax, (%r15)
movq 0x8(%rsp), %r12
movzbl (%r12), %ecx
cmpl $0x20, %ecx
jne 0x1ae00
incq %r12
jmp 0x1adf1
cmpl $0x2c, %ecx
jne 0x1ae15
movq %r12, %rcx
leaq 0x1(%rcx), %r12
cmpb $0x20, 0x1(%rcx)
movq %r12, %rcx
je 0x1ae08
movq %r12, 0x8(%rsp)
movb (%r12), %r14b
jmp 0x1acb2
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6600
addsd 0xb33d0(%rip), %xmm0 # 0xce208
cvttsd2si %xmm0, %rcx
movq 0x20(%rsp), %r9
movl 0x14(%rsp), %edx
movq %rbx, %rdi
jmp 0x1ad9e
movq 0x60(%rsp), %rbx
movl $0x7e, (%rbx)
leaq 0xb38c4(%rip), %rdi # 0xce724
callq 0x37264
movq 0x18(%rsp), %rdi
jmp 0x1ae79
movl $0x7e, (%rbx)
leaq 0xb3875(%rip), %rdi # 0xce6ee
callq 0x37264
movl (%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x60(%rsp), %rbx
movl $0x7e, (%rbx)
leaq 0xb38a8(%rip), %rdi # 0xce749
jmp 0x1ae79
movq 0x60(%rsp), %rbx
movl $0x7e, (%rbx)
leaq 0xb38cc(%rip), %rdi # 0xce781
jmp 0x1ae60
movq 0x60(%rsp), %rbx
movl $0x7e, (%rbx)
leaq 0xb38ec(%rip), %rdi # 0xce7b5
jmp 0x1af06
testl %eax, %eax
movq 0x60(%rsp), %rbx
jne 0x1ae7e
movq $0x1, (%rbp)
movq %r13, (%r9)
movl $0x1, (%r15)
jmp 0x1ae7e
movq 0x60(%rsp), %rbx
movl $0x7e, (%rbx)
leaq 0xb38ea(%rip), %rdi # 0xce7e4
callq 0x37264
leaq 0xb3915(%rip), %rdi # 0xce81b
callq 0x37264
movq %r14, %rdi
jmp 0x1ae79
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/editcol.c |
ffmvec | int ffmvec(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - position of col to be modified */
LONGLONG newveclen, /* I - new vector length of column (TFORM) */
int *status) /* IO - error status */
/*
Modify the vector length of a column in a binary table, larger or smaller.
E.g., change a column from TFORMn = '1E' to '20E'.
*/
{
int datacode, tfields, tstatus;
LONGLONG datasize, size, firstbyte, nbytes, nadd, ndelete;
LONGLONG naxis1, naxis2, firstcol, freespace;
LONGLONG width, delbyte, repeat;
long nblock;
char tfm[FLEN_VALUE], keyname[FLEN_KEYWORD], tcode[2];
tcolumn *colptr;
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
{
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
}
/* rescan header if data structure is undefined */
else if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
if ( ffrdef(fptr, status) > 0)
return(*status);
if ((fptr->Fptr)->hdutype != BINARY_TBL)
{
ffpmsg(
"Can only change vector length of a column in BINTABLE extension (ffmvec)");
return(*status = NOT_TABLE);
}
/* is the column number valid? */
tfields = (fptr->Fptr)->tfield;
if (colnum < 1 || colnum > tfields)
return(*status = BAD_COL_NUM);
/* look up the current vector length and element width */
colptr = (fptr->Fptr)->tableptr;
colptr += (colnum - 1);
datacode = colptr->tdatatype; /* datatype of the column */
repeat = colptr->trepeat; /* field repeat count */
width = colptr->twidth; /* width of a single element in chars */
if (datacode < 0)
{
ffpmsg(
"Can't modify vector length of variable length column (ffmvec)");
return(*status = BAD_TFORM);
}
if (repeat == newveclen)
return(*status); /* column already has the desired vector length */
if (datacode == TSTRING)
width = 1; /* width was equal to width of unit string */
naxis1 = (fptr->Fptr)->rowlength; /* current width of the table */
naxis2 = (fptr->Fptr)->numrows;
delbyte = (newveclen - repeat) * width; /* no. of bytes to insert */
if (datacode == TBIT) /* BIT column is a special case */
delbyte = ((newveclen + 7) / 8) - ((repeat + 7) / 8);
if (delbyte > 0) /* insert space for more elements */
{
/* current size of data */
datasize = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize;
freespace = ( ( (datasize + 2879) / 2880) * 2880) - datasize;
nadd = (LONGLONG)delbyte * naxis2; /* no. of bytes to add to table */
if ( (freespace - nadd) < 0) /* not enough existing space? */
{
nblock = (long) ((nadd - freespace + 2879) / 2880); /* number of blocks */
if (ffiblk(fptr, nblock, 1, status) > 0) /* insert the blocks */
return(*status);
}
/* shift heap down (if it exists) */
if ((fptr->Fptr)->heapsize > 0)
{
nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift down */
/* absolute heap pos */
firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart;
if (ffshft(fptr, firstbyte, nbytes, nadd, status) > 0) /* move heap */
return(*status);
}
/* update the heap starting address */
(fptr->Fptr)->heapstart += nadd;
/* update the THEAP keyword if it exists */
tstatus = 0;
ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus);
/* Must reset colptr before using it again. (fptr->Fptr)->tableptr
may have been reallocated down in ffbinit via the call to ffiblk above.*/
colptr = (fptr->Fptr)->tableptr;
colptr += (colnum - 1);
firstcol = colptr->tbcol + (repeat * width); /* insert position */
/* insert delbyte bytes in every row, at byte position firstcol */
ffcins(fptr, naxis1, naxis2, delbyte, firstcol, status);
}
else if (delbyte < 0)
{
/* current size of table */
size = (fptr->Fptr)->heapstart + (fptr->Fptr)->heapsize;
freespace = ((size + 2879) / 2880) * 2880 - size - ((LONGLONG)delbyte * naxis2);
nblock = (long) (freespace / 2880); /* number of empty blocks to delete */
firstcol = colptr->tbcol + (newveclen * width); /* delete position */
/* delete elements from the vector */
ffcdel(fptr, naxis1, naxis2, -delbyte, firstcol, status);
/* abs heap pos */
firstbyte = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart;
ndelete = (LONGLONG)delbyte * naxis2; /* size of shift (negative) */
/* shift heap up (if it exists) */
if ((fptr->Fptr)->heapsize > 0)
{
nbytes = (fptr->Fptr)->heapsize; /* no. of bytes to shift up */
if (ffshft(fptr, firstbyte, nbytes, ndelete, status) > 0)
return(*status);
}
/* delete the empty blocks at the end of the HDU */
if (nblock > 0)
ffdblk(fptr, nblock, status);
/* update the heap starting address */
(fptr->Fptr)->heapstart += ndelete; /* ndelete is negative */
/* update the THEAP keyword if it exists */
tstatus = 0;
ffmkyj(fptr, "THEAP", (fptr->Fptr)->heapstart, "&", &tstatus);
}
/* construct the new TFORM keyword for the column */
if (datacode == TBIT)
strcpy(tcode,"X");
else if (datacode == TBYTE)
strcpy(tcode,"B");
else if (datacode == TLOGICAL)
strcpy(tcode,"L");
else if (datacode == TSTRING)
strcpy(tcode,"A");
else if (datacode == TSHORT)
strcpy(tcode,"I");
else if (datacode == TLONG)
strcpy(tcode,"J");
else if (datacode == TLONGLONG)
strcpy(tcode,"K");
else if (datacode == TFLOAT)
strcpy(tcode,"E");
else if (datacode == TDOUBLE)
strcpy(tcode,"D");
else if (datacode == TCOMPLEX)
strcpy(tcode,"C");
else if (datacode == TDBLCOMPLEX)
strcpy(tcode,"M");
/* write as a double value because the LONGLONG conversion */
/* character in snprintf is platform dependent ( %lld, %ld, %I64d ) */
snprintf(tfm,FLEN_VALUE,"%.0f%s",(double) newveclen, tcode);
ffkeyn("TFORM", colnum, keyname, status); /* Keyword name */
ffmkys(fptr, keyname, tfm, "&", status); /* modify TFORM keyword */
ffmkyj(fptr, "NAXIS1", naxis1 + delbyte, "&", status); /* modify NAXIS1 */
ffrdef(fptr, status); /* reinitialize the new table structure */
return(*status);
} | movl (%rcx), %eax
testl %eax, %eax
jle 0x1c045
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movl %esi, %r15d
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
jne 0x1c08c
cmpq $-0x1, 0x88(%rax)
jne 0x1c09b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af49
testl %eax, %eax
jg 0x1c4c7
jmp 0x1c09b
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r14), %rdi
cmpl $0x2, 0x58(%rdi)
jne 0x1c0c3
testl %r15d, %r15d
jle 0x1c0b3
cmpl %r15d, 0x3b0(%rdi)
jge 0x1c0df
movl $0x12e, (%rbx) # imm = 0x12E
movl $0x12e, %eax # imm = 0x12E
jmp 0x1c4c9
leaq 0xb2890(%rip), %rdi # 0xce95a
callq 0x37264
movl $0xeb, (%rbx)
movl $0xeb, %eax
jmp 0x1c4c9
movq 0x3d0(%rdi), %rcx
leal -0x1(%r15), %eax
leaq (%rax,%rax,4), %rbp
shlq $0x5, %rbp
movl 0x50(%rcx,%rbp), %esi
testl %esi, %esi
js 0x1c14f
movq 0x58(%rcx,%rbp), %r9
movq %r12, %r13
subq %r9, %r13
je 0x1c4c7
cmpl $0x10, %esi
movl $0x1, %r8d
cmovneq 0x98(%rcx,%rbp), %r8
cmpl $0x1, %esi
jne 0x1c16b
leaq 0x7(%r12), %rax
leaq 0xe(%r12), %r13
testq %rax, %rax
cmovnsq %rax, %r13
sarq $0x3, %r13
leaq 0x7(%r9), %rax
leaq 0xe(%r9), %rdx
testq %rax, %rax
cmovnsq %rax, %rdx
sarq $0x3, %rdx
subq %rdx, %r13
jmp 0x1c16f
leaq 0xb284d(%rip), %rdi # 0xce9a3
callq 0x37264
movl $0x105, (%rbx) # imm = 0x105
movl $0x105, %eax # imm = 0x105
jmp 0x1c4c9
imulq %r8, %r13
addq %rbp, %rcx
movq 0x3c0(%rdi), %r10
movq 0x3c8(%rdi), %rax
movq %rax, 0x20(%rsp)
testq %r13, %r13
jle 0x1c2ce
movq %r9, 0x30(%rsp)
movq %r8, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x3e0(%rdi), %rcx
movq 0x3d8(%rdi), %rsi
addq %rcx, %rsi
movl $0xb3f, %r9d # imm = 0xB3F
addq %r9, %rsi
movabsq $0x2d82d82d82d82d83, %r8 # imm = 0x2D82D82D82D82D83
movq %rsi, %rax
imulq %r8
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x9, %rdx
addq %rax, %rdx
imulq $0xb40, %rdx, %rax # imm = 0xB40
subq %rax, %rsi
subq %rsi, %r9
movq %r13, 0x18(%rsp)
imulq %r10, %r13
cmpq %r13, %r9
movq %r10, 0x38(%rsp)
jge 0x1c22e
addq %r13, %rsi
movq %rsi, %rax
imulq %r8
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x9, %rdx
addq %rdx, %rsi
movq %r14, %rdi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3f455
testl %eax, %eax
jg 0x1c4c7
movq 0x8(%r14), %rdi
movq 0x3e0(%rdi), %rcx
testq %rcx, %rcx
jle 0x1c25e
movq 0x3d8(%rdi), %rsi
addq 0x88(%rdi), %rsi
movq %r14, %rdi
movq %rcx, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x19ce0
testl %eax, %eax
jg 0x1c4c7
movq 0x8(%r14), %rdi
addq 0x3d8(%rdi), %r13
movq %r13, 0x3d8(%rdi)
leaq 0x2c(%rsp), %r8
movl $0x0, (%r8)
leaq 0xb218d(%rip), %rsi # 0xce40c
leaq 0xc1e0c(%rip), %rcx # 0xde092
movq %r14, %rdi
movq %r13, %rdx
callq 0x94d73
movq 0x8(%r14), %rax
movq 0x3d0(%rax), %rax
movq 0x10(%rsp), %r8
imulq 0x30(%rsp), %r8
addq 0x48(%rax,%rbp), %r8
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x18(%rsp), %r13
movq %r13, %rcx
movq %rbx, %r9
callq 0x1b872
jmp 0x1c401
jns 0x1c405
movl %esi, 0xc(%rsp)
movq 0x3e0(%rdi), %rsi
addq 0x3d8(%rdi), %rsi
leaq 0xb3f(%rsi), %rax
movabsq $0x2d82d82d82d82d83, %rdi # imm = 0x2D82D82D82D82D83
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x9, %rdx
addq %rax, %rdx
imulq $0xb40, %rdx, %rax # imm = 0xB40
negq %rax
addq %rsi, %rax
addq $0xb3f, %rax # imm = 0xB3F
movq %r13, %rbp
imulq %r10, %rbp
addq %rsi, %rax
addq %rbp, %rax
negq %rax
movq %r13, %r9
leaq (%rsi,%rax), %r13
addq $0xb3f, %r13 # imm = 0xB3F
movq %r13, %rax
imulq %rdi
movq %rdx, 0x10(%rsp)
imulq %r12, %r8
addq 0x48(%rcx), %r8
movq %r9, 0x18(%rsp)
movq %r9, %rcx
negq %rcx
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq %r10, %rdx
movq %rbx, %r9
callq 0x1c56b
movq 0x8(%r14), %rax
movq 0x3e0(%rax), %rdx
testq %rdx, %rdx
jle 0x1c39e
movq 0x3d8(%rax), %rsi
addq 0x88(%rax), %rsi
movq %r14, %rdi
movq %rbp, %rcx
movq %rbx, %r8
callq 0x19ce0
testl %eax, %eax
jg 0x1c4c7
cmpq $0xb40, %r13 # imm = 0xB40
jl 0x1c3c5
movq 0x10(%rsp), %rsi
movq %rsi, %rax
shrq $0x3f, %rax
sarq $0x9, %rsi
addq %rax, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4006f
movq 0x8(%r14), %rax
addq 0x3d8(%rax), %rbp
movq %rbp, 0x3d8(%rax)
leaq 0x2c(%rsp), %r8
movl $0x0, (%r8)
leaq 0xb2022(%rip), %rsi # 0xce40c
leaq 0xc1ca1(%rip), %rcx # 0xde092
movq %r14, %rdi
movq %rbp, %rdx
callq 0x94d73
movq 0x18(%rsp), %r13
movl 0xc(%rsp), %esi
movq %r13, %rbp
cmpl $0x1, %esi
jne 0x1c416
movw $0x58, 0xa(%rsp)
jmp 0x1c442
cmpl $0xe, %esi
je 0x1c429
cmpl $0xb, %esi
jne 0x1c432
movw $0x42, 0xa(%rsp)
jmp 0x1c442
movw $0x4c, 0xa(%rsp)
jmp 0x1c442
cmpl $0x10, %esi
jne 0x1c4db
movw $0x41, 0xa(%rsp)
cvtsi2sd %r12, %xmm0
leaq 0xb2593(%rip), %rdx # 0xce9e1
leaq 0x40(%rsp), %r12
leaq 0xa(%rsp), %rcx
movl $0x47, %esi
movq %r12, %rdi
movb $0x1, %al
callq 0x60b0
leaq 0xb245e(%rip), %rdi # 0xce8cc
leaq 0x90(%rsp), %r13
movl %r15d, %esi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x380c3
leaq 0xc1c07(%rip), %r15 # 0xde092
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x94959
movq %rbp, %rdx
addq 0x20(%rsp), %rdx
leaq 0xc0173(%rip), %rsi # 0xdc621
movq %r14, %rdi
movq %r15, %rcx
movq %rbx, %r8
callq 0x94d73
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af49
movl (%rbx), %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x50, %esi
jle 0x1c4ff
cmpl $0x52, %esi
jg 0x1c51e
cmpl $0x51, %esi
je 0x1c547
cmpl $0x52, %esi
jne 0x1c442
movw $0x44, 0xa(%rsp)
jmp 0x1c442
cmpl $0x15, %esi
je 0x1c53b
cmpl $0x29, %esi
je 0x1c55f
cmpl $0x2a, %esi
jne 0x1c442
movw $0x45, 0xa(%rsp)
jmp 0x1c442
cmpl $0x53, %esi
je 0x1c553
cmpl $0xa3, %esi
jne 0x1c442
movw $0x4d, 0xa(%rsp)
jmp 0x1c442
movw $0x49, 0xa(%rsp)
jmp 0x1c442
movw $0x4b, 0xa(%rsp)
jmp 0x1c442
movw $0x43, 0xa(%rsp)
jmp 0x1c442
movw $0x4a, 0xa(%rsp)
jmp 0x1c442
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/editcol.c |
fits_parser_workfn | int fits_parser_workfn( long totalrows, /* I - Total rows to be processed */
long offset, /* I - Number of rows skipped at start*/
long firstrow, /* I - First row of this iteration */
long nrows, /* I - Number of rows in this iter */
int nCols, /* I - Number of columns in use */
iteratorCol *colData, /* IO- Column information/data */
void *userPtr ) /* I - Data handling instructions */
/* */
/* Iterator work function which calls the parser and copies the results */
/* into either an OutputCol or a data pointer supplied in the userPtr */
/* structure. */
/*---------------------------------------------------------------------------*/
{
int status, constant=0, anyNullThisTime=0;
long jj, kk, idx, remain, ntodo;
Node *result;
iteratorCol * outcol;
ParseData *lParse = ((parseInfo*)userPtr)->parseData;
struct ParseStatusVariables *pv = &( ((parseInfo*)userPtr)->parseVariables );
void *Data0 = 0;
/* declare variables static to preserve their values between calls */
long zeros[4] = {0,0,0,0};
if (DEBUG_PIXFILTER)
printf("fits_parser_workfn(total=%ld, offset=%ld, first=%ld, rows=%ld, cols=%d)\n",
totalrows, offset, firstrow, nrows, nCols);
/*--------------------------------------------------------*/
/* Initialization procedures: execute on the first call */
/*--------------------------------------------------------*/
outcol = colData + (nCols - 1);
if (firstrow == offset+1)
{
(pv->userInfo) = (parseInfo*)userPtr;
(pv->userInfo)->anyNull = 0;
/* Unfortunately there are two copies of the iterator columns,
one inside the parser and one outside maintained by the
higher level. (This could happen if the histogramming
routines are binning multiple columns, and so there are
multiple parsers being managed at one time.) Upon the first
call we make sure they match */
for (jj = 0; jj<nCols; jj++) {
lParse->colData[jj].repeat = colData[jj].repeat;
}
if( (pv->userInfo)->maxRows>0 )
(pv->userInfo)->maxRows = minvalue(totalrows,(pv->userInfo)->maxRows);
else if( (pv->userInfo)->maxRows<0 )
(pv->userInfo)->maxRows = totalrows;
else
(pv->userInfo)->maxRows = nrows;
(pv->lastRow) = firstrow + (pv->userInfo)->maxRows - 1;
/* dataPtr == NULL indicates an iterator-derived column, which
means that the first value will be a null value and the remaining
values will be the where the outputs are placed */
if( (pv->userInfo)->dataPtr==NULL ) {
if( outcol->iotype == InputCol ) {
ffpmsg("Output column for parser results not found!");
return( PARSE_NO_OUTPUT );
}
/* Data gets set later */
(pv->Null) = outcol->array;
(pv->userInfo)->datatype = outcol->datatype;
/* Check for a TNULL/BLANK keyword for output column/image */
status = 0;
(pv->jnull) = 0;
if (lParse->hdutype == IMAGE_HDU) {
if (lParse->pixFilter->blank)
(pv->jnull) = (LONGLONG) lParse->pixFilter->blank;
}
else {
if (outcol->iotype != TemporaryCol) {
ffgknjj( outcol->fptr, "TNULL", outcol->colnum,
1, &(pv->jnull), (int*)&jj, &status );
}
if( status==BAD_INTKEY || outcol->iotype == TemporaryCol) {
/* Probably ASCII table with text TNULL keyword */
switch( (pv->userInfo)->datatype ) {
case TSHORT: (pv->jnull) = (LONGLONG) SHRT_MIN; break;
case TINT: (pv->jnull) = (LONGLONG) INT_MIN; break;
case TLONG: (pv->jnull) = (LONGLONG) LONG_MIN; break;
}
}
}
(pv->repeat) = outcol->repeat;
/*
if (DEBUG_PIXFILTER)
printf("fits_parser_workfn: using null value %ld\n", (pv->jnull));
*/
} else {
/* This clause applies if the user is passing user-allocated
data arrays, which is where the data will be placed. This
means they should also be passing null values */
(pv->Data) = (pv->userInfo)->dataPtr;
(pv->Null) = ((pv->userInfo)->nullPtr ? (pv->userInfo)->nullPtr : zeros);
(pv->repeat) = lParse->Nodes[lParse->resultNode].value.nelem;
}
/* Determine the size of each element of the returned result */
switch( (pv->userInfo)->datatype ) {
case TBIT: /* Fall through to TBYTE */
case TLOGICAL: /* Fall through to TBYTE */
case TBYTE: (pv->datasize) = sizeof(char); break;
case TSHORT: (pv->datasize) = sizeof(short); break;
case TINT: (pv->datasize) = sizeof(int); break;
case TLONG: (pv->datasize) = sizeof(long); break;
case TLONGLONG: (pv->datasize) = sizeof(LONGLONG); break;
case TFLOAT: (pv->datasize) = sizeof(float); break;
case TDOUBLE: (pv->datasize) = sizeof(double); break;
case TSTRING: (pv->datasize) = sizeof(char*); break;
}
/* Determine the size of each element of the calculated result */
/* (only matters for numeric/logical data) */
switch( lParse->Nodes[lParse->resultNode].type ) {
case BOOLEAN: (pv->resDataSize) = sizeof(char); break;
case LONG: (pv->resDataSize) = sizeof(long); break;
case DOUBLE: (pv->resDataSize) = sizeof(double); break;
}
}
/*-------------------------------------------*/
/* Main loop: process all the rows of data */
/*-------------------------------------------*/
/* If writing to output column, set first element to appropriate */
/* null value. If no NULLs encounter, zero out before returning. */
/*
if (DEBUG_PIXFILTER)
printf("fits_parser_workfn: using null value %ld\n", (pv->jnull));
*/
if( (pv->userInfo)->dataPtr == NULL ) {
/* First, reset Data pointer to start of output array, plus 1
because the 0th element is the null value (cute undocumented
feature of the iterator!) */
(pv->Data) = (char*) outcol->array + (pv->datasize);
/* A TemporaryCol with null value specified explicitly */
if (outcol->iotype == TemporaryCol && (pv->userInfo)->nullPtr) {
pv->Null = (pv->userInfo)->nullPtr;
} else {
/* ... or an OutputCol or TemporaryCol with no explicit null */
switch( (pv->userInfo)->datatype ) {
case TLOGICAL: *(char *)(pv->Null) = 'U'; break;
case TBYTE: *(char *)(pv->Null) = (char )(pv->jnull); break;
case TSHORT: *(short *)(pv->Null) = (short)(pv->jnull); break;
case TINT: *(int *)(pv->Null) = (int )(pv->jnull); break;
case TLONG: *(long *)(pv->Null) = (long )(pv->jnull); break;
case TLONGLONG: *(LONGLONG *)(pv->Null) = (LONGLONG )(pv->jnull); break;
case TFLOAT: *(float *)(pv->Null) = FLOATNULLVALUE; break;
case TDOUBLE: *(double*)(pv->Null) = DOUBLENULLVALUE; break;
case TSTRING: (*(char **)(pv->Null))[0] = '\1';
(*(char **)(pv->Null))[1] = '\0'; break;
}
}
}
/* Alter nrows in case calling routine didn't want to do all rows */
Data0 = pv->Data; /* Record starting point */
nrows = minvalue(nrows,(pv->lastRow)-firstrow+1);
Setup_DataArrays( lParse, nCols, colData, firstrow, nrows );
/* Parser allocates arrays for each column and calculation it performs. */
/* Limit number of rows processed during each pass to reduce memory */
/* requirements... In most cases, iterator will limit rows to less */
/* than 10000 rows per iteration, so this is really only relevant for */
/* hk-compressed files which must be decompressed in memory and sent */
/* whole to fits_parser_workfn in a single iteration. */
remain = nrows;
while( remain ) {
ntodo = minvalue(remain,10000);
Evaluate_Parser ( lParse, firstrow, ntodo );
if( lParse->status ) break;
firstrow += ntodo;
remain -= ntodo;
/* Copy results into data array */
result = lParse->Nodes + lParse->resultNode;
if( result->operation==CONST_OP ) constant = 1;
switch( result->type ) {
case BOOLEAN:
case LONG:
case DOUBLE:
if( constant ) {
char undef=0;
for( kk=0; kk<ntodo; kk++ )
for( jj=0; jj<(pv->repeat); jj++ )
ffcvtn( lParse->datatype,
&(result->value.data),
&undef, result->value.nelem /* 1 */,
(pv->userInfo)->datatype, (pv->Null),
(char*)(pv->Data) + (kk*(pv->repeat)+jj)*(pv->datasize),
&anyNullThisTime, &lParse->status );
} else {
if ( (pv->repeat) == result->value.nelem ) {
ffcvtn( lParse->datatype,
result->value.data.ptr,
result->value.undef,
result->value.nelem*ntodo,
(pv->userInfo)->datatype, (pv->Null), (pv->Data),
&anyNullThisTime, &lParse->status );
} else if( result->value.nelem == 1 ) {
for( kk=0; kk<ntodo; kk++ )
for( jj=0; jj<(pv->repeat); jj++ ) {
ffcvtn( lParse->datatype,
(char*)result->value.data.ptr + kk*(pv->resDataSize),
(char*)result->value.undef + kk,
1, (pv->userInfo)->datatype, (pv->Null),
(char*)(pv->Data) + (kk*(pv->repeat)+jj)*(pv->datasize),
&anyNullThisTime, &lParse->status );
}
} else {
int nCopy;
nCopy = minvalue( (pv->repeat), result->value.nelem );
for( kk=0; kk<ntodo; kk++ ) {
ffcvtn( lParse->datatype,
(char*)result->value.data.ptr
+ kk*result->value.nelem*(pv->resDataSize),
(char*)result->value.undef
+ kk*result->value.nelem,
nCopy, (pv->userInfo)->datatype, (pv->Null),
(char*)(pv->Data) + (kk*(pv->repeat))*(pv->datasize),
&anyNullThisTime, &lParse->status );
if( nCopy < (pv->repeat) ) {
memset( (char*)(pv->Data) + (kk*(pv->repeat)+nCopy)*(pv->datasize),
0, ((pv->repeat)-nCopy)*(pv->datasize));
}
}
}
if( result->operation>0 ) {
FREE( result->value.data.ptr );
}
}
if( lParse->status==OVERFLOW_ERR ) {
lParse->status = NUM_OVERFLOW;
ffpmsg("Numerical overflow while converting expression to necessary datatype");
}
break;
case BITSTR:
switch( (pv->userInfo)->datatype ) {
case TBYTE:
idx = -1;
for( kk=0; kk<ntodo; kk++ ) {
for( jj=0; jj<result->value.nelem; jj++ ) {
if( jj%8 == 0 )
((char*)(pv->Data))[++idx] = 0;
if( constant ) {
if( result->value.data.str[jj]=='1' )
((char*)(pv->Data))[idx] |= 128>>(jj%8);
} else {
if( result->value.data.strptr[kk][jj]=='1' )
((char*)(pv->Data))[idx] |= 128>>(jj%8);
}
}
}
break;
case TBIT:
case TLOGICAL:
if( constant ) {
for( kk=0; kk<ntodo; kk++ )
for( jj=0; jj<result->value.nelem; jj++ ) {
((char*)(pv->Data))[ jj+kk*result->value.nelem ] =
( result->value.data.str[jj]=='1' );
}
} else {
for( kk=0; kk<ntodo; kk++ )
for( jj=0; jj<result->value.nelem; jj++ ) {
((char*)(pv->Data))[ jj+kk*result->value.nelem ] =
( result->value.data.strptr[kk][jj]=='1' );
}
}
break;
case TSTRING:
if( constant ) {
for( jj=0; jj<ntodo; jj++ ) {
strcpy( ((char**)(pv->Data))[jj], result->value.data.str );
}
} else {
for( jj=0; jj<ntodo; jj++ ) {
strcpy( ((char**)(pv->Data))[jj], result->value.data.strptr[jj] );
}
}
break;
default:
ffpmsg("Cannot convert bit expression to desired type.");
lParse->status = PARSE_BAD_TYPE;
break;
}
if( result->operation>0 ) {
FREE( result->value.data.strptr[0] );
FREE( result->value.data.strptr );
}
break;
case STRING:
if( (pv->userInfo)->datatype==TSTRING ) {
if( constant ) {
for( jj=0; jj<ntodo; jj++ )
strcpy( ((char**)(pv->Data))[jj], result->value.data.str );
} else {
for( jj=0; jj<ntodo; jj++ )
if( result->value.undef[jj] ) {
anyNullThisTime = 1;
strcpy( ((char**)(pv->Data))[jj],
*(char **)(pv->Null) );
} else {
strcpy( ((char**)(pv->Data))[jj],
result->value.data.strptr[jj] );
}
}
} else {
ffpmsg("Cannot convert string expression to desired type.");
lParse->status = PARSE_BAD_TYPE;
}
if( result->operation>0 ) {
FREE( result->value.data.strptr[0] );
FREE( result->value.data.strptr );
}
break;
}
if( lParse->status ) break;
/* Increment Data to point to where the next block should go */
if( result->type==BITSTR && (pv->userInfo)->datatype==TBYTE )
(pv->Data) = (char*)(pv->Data)
+ (pv->datasize) * ( (result->value.nelem+7)/8 ) * ntodo;
else if( result->type==STRING )
(pv->Data) = (char*)(pv->Data) + (pv->datasize) * ntodo;
else
(pv->Data) = (char*)(pv->Data) + (pv->datasize) * ntodo * (pv->repeat);
}
/* If a TemporaryCol output is used, we want to inform the caller
what the null value is expected to be */
if (pv->Null != outcol->array &&
(Data0) == (char*) outcol->array + (pv->datasize)) {
if( (pv->userInfo)->datatype == TSTRING )
memcpy( outcol->array, *(char **)(pv->Null), 2 );
else
memcpy( outcol->array, (pv->Null), (pv->datasize) );
}
/* If no NULLs encountered during this pass, set Null value to */
/* zero to make the writing of the output column data faster */
if( anyNullThisTime )
(pv->userInfo)->anyNull = 1;
else if( pv->Null == outcol->array ) {
if( (pv->userInfo)->datatype == TSTRING )
memcpy( *(char **)(pv->Null), zeros, 2 );
else
memcpy( (pv->Null), zeros, (pv->datasize) );
}
/*-------------------------------------------------------*/
/* Clean up procedures: after processing all the rows */
/*-------------------------------------------------------*/
/* if the calling routine specified that only a limited number */
/* of rows in the table should be processed, return a value of -1 */
/* once all the rows have been done, if no other error occurred. */
if (lParse->hdutype != IMAGE_HDU && firstrow - 1 == (pv->lastRow)) {
if (!lParse->status && (pv->userInfo)->maxRows<totalrows) {
return (-1);
}
}
return(lParse->status); /* return successful status */
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0x30(%rsp)
movl %r8d, %ebp
movq %rcx, %r9
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
movq 0x130(%rsp), %r15
movl $0x0, 0x1c(%rsp)
movq 0x28(%r15), %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
cmpl $0x0, 0x1de217(%rip) # 0x1ff374
je 0x21186
leaq 0xae68c(%rip), %rdi # 0xcf7f2
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r9, %r8
movq %r9, 0x10(%rsp)
movl %ebp, %r9d
xorl %eax, %eax
callq 0x6050
movq 0x10(%rsp), %r9
movq %r14, 0x68(%rsp)
movslq %ebp, %rax
imulq $0x110, %rax, %rcx # imm = 0x110
addq 0x30(%rsp), %rcx
movq %rcx, 0x58(%rsp)
incq %r12
cmpq %r13, %r12
movq %rbx, 0x38(%rsp)
jne 0x2120f
movq %r15, 0x68(%r15)
movl $0x0, 0x20(%r15)
movq $0x0, (%rsp)
testl %ebp, %ebp
movq 0x68(%rsp), %rdi
movq 0x30(%rsp), %r8
jle 0x211f8
movq 0xa0(%rbx), %rcx
xorl %edx, %edx
imulq $0x110, %rdx, %rdx # imm = 0x110
movq 0x68(%r8,%rdx), %rsi
movq %rsi, 0x68(%rcx,%rdx)
movq (%rsp), %rdx
incq %rdx
movq %rdx, (%rsp)
cmpq %rax, %rdx
jl 0x211d7
movq 0x18(%r15), %rax
testq %rax, %rax
movq 0x58(%rsp), %r14
jle 0x2121d
cmpq %rdi, %rax
cmovgeq %rdi, %rax
jmp 0x21224
movq 0x68(%r15), %rax
movq 0x58(%rsp), %r14
jmp 0x21423
movq %rdi, %rax
cmoveq %r9, %rax
movq %rax, 0x18(%r15)
addq %r13, %rax
decq %rax
movq %rax, 0x48(%r15)
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x21275
movq %rax, 0x30(%r15)
movq 0x10(%r15), %rax
testq %rax, %rax
leaq 0x80(%rsp), %rcx
cmovneq %rax, %rcx
movq %rcx, 0x38(%r15)
movq 0x38(%rbx), %rax
movslq 0x48(%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x7, %rcx
addq %rax, %rcx
addq $0x40, %rcx
movq %r15, %rax
jmp 0x2137b
movl -0xb8(%r14), %eax
testl %eax, %eax
je 0x2130a
movq -0xb0(%r14), %rcx
movq %rcx, 0x38(%r15)
movl -0xbc(%r14), %ecx
movl %ecx, (%r15)
movl $0x0, 0x64(%rsp)
movq $0x0, 0x60(%r15)
cmpl $0x0, 0xdc(%rbx)
je 0x21348
cmpl $0x3, %eax
je 0x21320
leaq 0x60(%r15), %r8
movq -0x110(%r14), %rdi
movl -0x108(%r14), %edx
subq $0x8, %rsp
leaq 0x6c(%rsp), %rbx
leaq 0xad8ab(%rip), %rsi # 0xceb88
movq %r9, %r12
leaq 0x8(%rsp), %r9
movl $0x1, %ecx
pushq %rbx
callq 0x6f632
movq %r12, %r9
addq $0x10, %rsp
cmpl $0x193, (%rbx) # imm = 0x193
movq 0x38(%rsp), %rbx
jne 0x21320
movq 0x68(%r15), %rax
jmp 0x2132e
leaq 0xae52a(%rip), %rdi # 0xcf83b
callq 0x37264
movl $0x1b2, %eax # imm = 0x1B2
jmp 0x22441
cmpl $0x3, -0xb8(%r14)
movq 0x68(%r15), %rax
jne 0x21374
movl (%rax), %ecx
cmpl $0x15, %ecx
je 0x21369
cmpl $0x29, %ecx
je 0x2135d
cmpl $0x1f, %ecx
jne 0x21374
movq $-0x80000000, %rcx # imm = 0x80000000
jmp 0x21370
movq 0xb0(%rbx), %rax
movq 0x30(%rax), %rcx
movq %r15, %rax
testq %rcx, %rcx
jne 0x21370
jmp 0x21374
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
jmp 0x21370
movq $-0x8000, %rcx # imm = 0x8000
movq %rcx, 0x60(%r15)
leaq -0xa8(%r14), %rcx
movq (%rcx), %rcx
movq %rcx, 0x50(%r15)
movl (%rax), %ecx
cmpl $0x1e, %ecx
jg 0x213a9
movl $0x1, %edx
cmpl $0xd, %ecx
jle 0x213bf
cmpl $0xe, %ecx
je 0x213e1
cmpl $0x10, %ecx
je 0x213d5
cmpl $0x15, %ecx
jne 0x213e5
movl $0x2, %edx
jmp 0x213e1
cmpl $0x29, %ecx
jle 0x213cb
cmpl $0x2a, %ecx
je 0x213dc
cmpl $0x51, %ecx
je 0x213d5
cmpl $0x52, %ecx
je 0x213d5
jmp 0x213e5
cmpl $0x1, %ecx
je 0x213e1
cmpl $0xb, %ecx
je 0x213e1
jmp 0x213e5
cmpl $0x1f, %ecx
je 0x213dc
cmpl $0x29, %ecx
jne 0x213e5
movl $0x8, %edx
jmp 0x213e1
movl $0x4, %edx
movl %edx, 0x40(%r15)
movq 0x38(%rbx), %rcx
movslq 0x48(%rbx), %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x7, %rdx
movl 0x3c(%rcx,%rdx), %ecx
cmpl $0x104, %ecx # imm = 0x104
je 0x2141b
cmpl $0x103, %ecx # imm = 0x103
je 0x2141b
cmpl $0x102, %ecx # imm = 0x102
jne 0x21423
movq $0x1, 0x58(%r15)
jmp 0x21423
movq $0x8, 0x58(%r15)
cmpq $0x0, 0x8(%rax)
je 0x2190b
movq 0x30(%r15), %rax
movq %rax, 0x78(%rsp)
movq 0x48(%r15), %rax
subq %r13, %rax
leaq 0x1(%rax), %r10
cmpq %r9, %rax
cmovgeq %r9, %r10
movq %r13, 0xb8(%rbx)
movq %r10, 0xc0(%rbx)
movq %r10, %r12
testl %ebp, %ebp
jle 0x21af0
movq 0xd0(%rbx), %rax
movq %rax, 0x40(%rsp)
leaq (,%r10,8), %rax
movq %rax, 0x70(%rsp)
movl %ebp, %ebp
xorpd %xmm1, %xmm1
xorl %r11d, %r11d
xorl %edx, %edx
movq %r10, 0x20(%rsp)
movq 0x30(%rsp), %r12
movq %r13, 0x48(%rsp)
movq %rbp, 0x50(%rsp)
imulq $0x110, %rdx, %r14 # imm = 0x110
movl 0x58(%r12,%r14), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
je 0x218f0
leaq (%rdx,%rdx,4), %r13
shlq $0x5, %r13
addq 0xa8(%rbx), %r13
movl 0x54(%r13), %ecx
leal -0x102(%rcx), %eax
cmpl $0x4, %eax
movq %r11, 0x28(%rsp)
movq %rdx, 0x8(%rsp)
ja 0x2177c
addq %r12, %r14
movq 0x58(%r13), %r12
movq %r12, %rbp
imulq %r10, %rbp
leaq 0xadf49(%rip), %rcx # 0xcf43c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x60(%r14), %rbx
cmpq %r10, 0x40(%rsp)
movq 0x30(%rsp), %r12
je 0x21548
movq 0x90(%r13), %rdi
testq %rdi, %rdi
je 0x2151d
callq 0x6260
movq %rbp, %rdi
callq 0x61a0
movq %rax, 0x90(%r13)
testq %rax, %rax
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r11
movq 0x8(%rsp), %rdx
xorpd %xmm1, %xmm1
je 0x21a30
testq %rbp, %rbp
je 0x2156d
movb (%rbx), %al
testb %al, %al
je 0x2155b
cmpb (%rbx,%rbp), %al
sete %al
jmp 0x2155d
xorl %eax, %eax
movq 0x90(%r13), %rcx
movb %al, -0x1(%rcx,%rbp)
decq %rbp
jne 0x2154d
incq %rbx
jmp 0x21766
leaq 0x1(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%r13), %rbp
cmpq %r10, 0x40(%rsp)
je 0x21822
testq %rbp, %rbp
je 0x217d4
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x217ba
callq 0x6260
jmp 0x217d4
movq 0x60(%r14), %rbx
cmpq %r10, 0x40(%rsp)
movq 0x30(%rsp), %r12
je 0x215fd
movq 0x90(%r13), %rdi
testq %rdi, %rdi
je 0x215d2
callq 0x6260
movq %rbp, %rdi
callq 0x61a0
movq %rax, 0x90(%r13)
testq %rax, %rax
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r11
movq 0x8(%rsp), %rdx
xorpd %xmm1, %xmm1
je 0x21a30
testq %rbp, %rbp
je 0x21762
movsd (%rbx), %xmm0
ucomisd %xmm1, %xmm0
jne 0x21612
jnp 0x21622
cmpeqsd (%rbx,%rbp,8), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x21624
xorl %eax, %eax
movq 0x90(%r13), %rcx
movb %al, -0x1(%rcx,%rbp)
decq %rbp
jne 0x21606
jmp 0x21762
movq 0x60(%r14), %r14
cmpq %r10, 0x40(%rsp)
movq 0x30(%rsp), %r12
je 0x2168a
movq 0x90(%r13), %rdi
testq %rdi, %rdi
je 0x2165f
callq 0x6260
movq 0x20(%rsp), %r10
movq %r10, %rdi
callq 0x61a0
movq 0x20(%rsp), %r10
movq %rax, 0x90(%r13)
testq %rax, %rax
movq 0x28(%rsp), %r11
movq 0x8(%rsp), %rdx
xorpd %xmm1, %xmm1
je 0x21a30
testq %r10, %r10
movq 0x50(%rsp), %rbp
je 0x216d9
movq %r10, %rbx
movq (%r14), %rdi
movb (%rdi), %al
testb %al, %al
je 0x216c7
movq (%r14,%rbx,8), %rsi
cmpb (%rsi), %al
jne 0x216c7
callq 0x6420
xorpd %xmm1, %xmm1
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r10
testl %eax, %eax
sete %al
jmp 0x216c9
xorl %eax, %eax
movq 0x90(%r13), %rcx
movb %al, -0x1(%rcx,%rbx)
decq %rbx
jne 0x21697
addq $0x8, %r14
movq %r14, 0x98(%r13)
movq 0x38(%rsp), %rbx
jmp 0x218de
movq 0x60(%r14), %rbx
cmpq %r10, 0x40(%rsp)
movq 0x30(%rsp), %r12
je 0x2173a
movq 0x90(%r13), %rdi
testq %rdi, %rdi
je 0x2170f
callq 0x6260
movq %rbp, %rdi
callq 0x61a0
movq %rax, 0x90(%r13)
testq %rax, %rax
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r11
movq 0x8(%rsp), %rdx
xorpd %xmm1, %xmm1
je 0x21a30
testq %rbp, %rbp
je 0x21762
movq (%rbx), %rax
testq %rax, %rax
je 0x21750
cmpq (%rbx,%rbp,8), %rax
sete %al
jmp 0x21752
xorl %eax, %eax
movq 0x90(%r13), %rcx
movb %al, -0x1(%rcx,%rbp)
decq %rbp
jne 0x2173f
addq $0x8, %rbx
movq %rbx, 0x98(%r13)
movq 0x38(%rsp), %rbx
movq 0x50(%rsp), %rbp
jmp 0x218de
movl $0x50, %esi
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
leaq 0xae5dd(%rip), %rdx # 0xcfd70
xorl %eax, %eax
callq 0x60b0
movq %r14, %rdi
callq 0x37264
xorpd %xmm1, %xmm1
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r10
jmp 0x218de
leaq 0xae58c(%rip), %rdi # 0xcfd4d
leaq 0xadd47(%rip), %rsi # 0xcf50f
movl $0x599, %edx # imm = 0x599
xorl %eax, %eax
callq 0x6050
movq %rbp, %rdi
callq 0x6260
movq 0x70(%rsp), %rdi
callq 0x61a0
testq %rax, %rax
je 0x21a14
movq %rax, %rbp
movq 0x10(%rsp), %rdi
imulq 0x20(%rsp), %rdi
callq 0x61a0
movq %rax, (%rbp)
testq %rax, %rax
je 0x21a0c
movq 0x38(%rsp), %rbx
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r11
xorpd %xmm1, %xmm1
testq %r10, %r10
jle 0x218c1
leaq 0x7(%r12), %rcx
leaq 0xe(%r12), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x3, %rax
xorl %ecx, %ecx
movq %rcx, %rdx
imulq 0x10(%rsp), %rdx
addq (%rbp), %rdx
movq %rdx, (%rbp,%rcx,8)
testq %r12, %r12
jle 0x218b3
movq %rcx, %rdx
imulq %rax, %rdx
incq %rdx
xorl %esi, %esi
movq 0x60(%r14), %rdi
movzbl (%rdi,%rdx), %edi
movl %esi, %r8d
andl $0x7, %r8d
movl %r8d, %r9d
xorb $0x7, %r9b
movzbl %r9b, %r9d
btl %r9d, %edi
setae %dil
movq (%rbp,%rcx,8), %r9
xorb $0x31, %dil
movb %dil, (%r9,%rsi)
xorl %edi, %edi
cmpq $0x7, %r8
sete %dil
addq %rdi, %rdx
incq %rsi
cmpq %rsi, %r12
jne 0x21865
movq (%rbp,%rcx,8), %rdx
movq %r12, %rsi
jmp 0x218b5
xorl %esi, %esi
movb $0x0, (%rdx,%rsi)
incq %rcx
cmpq %r10, %rcx
jne 0x21842
movq %rbp, 0x90(%r13)
movq %rbp, 0x98(%r13)
movq 0x30(%rsp), %r12
movq 0x50(%rsp), %rbp
movq 0x8(%rsp), %rdx
cmpl $0x0, 0xe0(%rbx)
movq 0x48(%rsp), %r13
jne 0x21a44
incq %rdx
addq $0xa0, %r11
cmpq %rbp, %rdx
jne 0x2149a
movq %r10, %r12
jmp 0x21af0
movslq 0x40(%r15), %rcx
addq -0xb0(%r14), %rcx
movq %rcx, 0x30(%r15)
cmpl $0x3, -0xb8(%r14)
jne 0x21936
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x21936
movq %rcx, 0x38(%r15)
jmp 0x2142e
movl (%rax), %eax
cmpl $0x1e, %eax
jle 0x21969
cmpl $0x29, %eax
jle 0x219a7
cmpl $0x2a, %eax
je 0x219ee
cmpl $0x51, %eax
je 0x219b5
cmpl $0x52, %eax
jne 0x2142e
movq 0x38(%r15), %rax
movabsq $-0x4757c1d7a1454b49, %rcx # imm = 0xB8A83E285EBAB4B7
jmp 0x219bd
cmpl $0xf, %eax
jg 0x21988
cmpl $0xb, %eax
je 0x219c5
cmpl $0xe, %eax
jne 0x2142e
movq 0x38(%r15), %rax
movb $0x55, (%rax)
jmp 0x2142e
cmpl $0x10, %eax
je 0x219d4
cmpl $0x15, %eax
jne 0x2142e
movzwl 0x60(%r15), %eax
movq 0x38(%r15), %rcx
movw %ax, (%rcx)
jmp 0x2142e
cmpl $0x1f, %eax
je 0x219fd
cmpl $0x29, %eax
jne 0x2142e
movq 0x38(%r15), %rax
movq 0x60(%r15), %rcx
movq %rcx, (%rax)
jmp 0x2142e
movb 0x60(%r15), %al
movq 0x38(%r15), %rcx
movb %al, (%rcx)
jmp 0x2142e
movq 0x38(%r15), %rax
movq (%rax), %rax
movb $0x1, (%rax)
movq 0x38(%r15), %rax
movq (%rax), %rax
movb $0x0, 0x1(%rax)
jmp 0x2142e
movq 0x38(%r15), %rax
movl $0x8541f136, (%rax) # imm = 0x8541F136
jmp 0x2142e
movl 0x60(%r15), %eax
movq 0x38(%r15), %rcx
movl %eax, (%rcx)
jmp 0x2142e
movq %rbp, %rdi
callq 0x6260
xorpd %xmm0, %xmm0
movupd %xmm0, 0x90(%r13)
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r11
movq 0x8(%rsp), %rdx
movq 0x38(%rsp), %rbx
movl $0x71, 0xe0(%rbx)
movq 0x48(%rsp), %r13
testq %rdx, %rdx
je 0x21aed
leaq 0xadabb(%rip), %r13 # 0xcf50f
xorl %r12d, %r12d
leaq 0xae369(%rip), %rbp # 0xcfdc7
movq 0xa8(%rbx), %rbx
cmpl $0x106, -0x4c(%rbx,%r11) # imm = 0x106
movq %r11, %r14
jne 0x21aa0
movq -0x8(%rbx,%r11), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x21a87
callq 0x6260
jmp 0x21a9d
leaq 0xae306(%rip), %rdi # 0xcfd94
movq %r13, %rsi
movl $0x60c, %edx # imm = 0x60C
xorl %eax, %eax
callq 0x6050
movq %r14, %r11
movq -0x10(%rbx,%r11), %rdi
testq %rdi, %rdi
je 0x21ab1
callq 0x6260
jmp 0x21ac3
movq %rbp, %rdi
movq %r13, %rsi
movl $0x60d, %edx # imm = 0x60D
xorl %eax, %eax
callq 0x6050
movq %r14, %r11
movq $0x0, -0x10(%rbx,%r14)
addq $-0xa0, %r11
movq 0x38(%rsp), %rbx
movq 0x20(%rsp), %r10
jne 0x21a5e
movq 0x48(%rsp), %r13
jmp 0x21af0
xorl %r12d, %r12d
movq %r12, 0xd0(%rbx)
testq %r10, %r10
je 0x22382
leaq 0xe0(%rbx), %rbp
leaq 0x1c(%rsp), %r14
xorl %r12d, %r12d
movq %rbp, 0x28(%rsp)
movl $0x2710, %eax # imm = 0x2710
cmpq %rax, %r10
movl $0x2710, %edx # imm = 0x2710
movq %r10, 0x20(%rsp)
cmovlq %r10, %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %rdx, 0x8(%rsp)
callq 0x2e6b6
cmpl $0x0, 0xe0(%rbx)
jne 0x22382
movq 0x38(%rbx), %rcx
movslq 0x48(%rbx), %rax
leaq (%rax,%rax,2), %rdx
shlq $0x7, %rdx
leaq (%rcx,%rdx), %r9
movl 0x3c(%rcx,%rdx), %eax
cmpl $0xfffffc18, (%rcx,%rdx) # imm = 0xFFFFFC18
movl $0x1, %ecx
cmovel %ecx, %r12d
leal -0x102(%rax), %ecx
cmpl $0x3, %ecx
movq %r9, 0x10(%rsp)
jae 0x21c7e
testl %r12d, %r12d
movq 0x8(%rsp), %r8
movl %r12d, 0x40(%rsp)
je 0x21d62
movq %r13, 0x48(%rsp)
movb $0x0, 0xa0(%rsp)
cmpq $0x0, 0x20(%rsp)
jle 0x21c5d
leaq 0x80(%r9), %r14
movq 0x130(%rsp), %rax
movq 0x50(%rax), %rax
xorl %ebx, %ebx
movq $0x0, (%rsp)
testq %rax, %rax
jle 0x21c4c
xorl %edx, %edx
movq 0x38(%rsp), %r13
movq 0x28(%rsp), %r15
movq 0x130(%rsp), %rbp
leaq 0xa0(%rsp), %r12
movl 0xd8(%r13), %edi
movq 0x40(%r9), %rcx
movq 0x38(%rbp), %r9
movq 0x68(%rbp), %rsi
movl (%rsi), %r8d
imulq %rbx, %rax
addq %rdx, %rax
movslq 0x40(%rbp), %r10
imulq %rax, %r10
addq 0x30(%rbp), %r10
subq $0x8, %rsp
movq %r14, %rsi
movq %r12, %rdx
pushq %r15
leaq 0x2c(%rsp), %rax
pushq %rax
pushq %r10
callq 0x24088
movq 0x30(%rsp), %r9
addq $0x20, %rsp
movq (%rsp), %rdx
incq %rdx
movq %rdx, (%rsp)
movq 0x50(%rbp), %rax
cmpq %rax, %rdx
jl 0x21bed
incq %rbx
movq 0x8(%rsp), %r8
cmpq %r8, %rbx
jne 0x21bc4
movq 0x38(%rsp), %rbx
movq 0x48(%rsp), %r13
movq 0x28(%rsp), %rbp
movq 0x130(%rsp), %r15
movl 0x40(%rsp), %r12d
jmp 0x220c8
cmpl $0x105, %eax # imm = 0x105
movq 0x8(%rsp), %r8
je 0x21db9
cmpl $0x106, %eax # imm = 0x106
jne 0x22302
movq 0x68(%r15), %rax
movl (%rax), %eax
cmpl $0xd, %eax
movq 0x20(%rsp), %rcx
jg 0x21f02
cmpl $0x1, %eax
je 0x21f62
cmpl $0xb, %eax
jne 0x220fb
testq %rcx, %rcx
jle 0x2228b
movq $-0x1, %rax
xorl %edx, %edx
movq $0x0, (%rsp)
cmpq $0x0, 0x40(%r9)
jle 0x21d51
xorl %ecx, %ecx
testb $0x7, %cl
jne 0x21cf3
movq 0x30(%r15), %rcx
movb $0x0, 0x1(%rcx,%rax)
incq %rax
testl %r12d, %r12d
je 0x21d3a
movq (%rsp), %rcx
cmpb $0x31, 0x80(%r9,%rcx)
jne 0x21d27
leal 0x7(%rcx), %esi
testq %rcx, %rcx
cmovnsl %ecx, %esi
andl $0xf8, %esi
subl %esi, %ecx
movl $0x80, %esi
shrl %cl, %esi
movq 0x30(%r15), %rcx
orb %sil, (%rcx,%rax)
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq 0x40(%r9), %rcx
jl 0x21ce2
jmp 0x21d51
movq 0x80(%r9), %rcx
movq (%rcx,%rdx,8), %rsi
movq (%rsp), %rcx
cmpb $0x31, (%rsi,%rcx)
je 0x21d07
jmp 0x21d27
incq %rdx
cmpq %r8, %rdx
jne 0x21cd1
jmp 0x2228b
movq 0x50(%r15), %rcx
movq 0x40(%r9), %rax
cmpq %rax, %rcx
jne 0x21e1d
movl 0xd8(%rbx), %edi
movq 0x78(%r9), %rdx
movq 0x80(%r9), %rsi
imulq %r8, %rcx
movq 0x68(%r15), %rax
movl (%rax), %r8d
movq 0x38(%r15), %r9
subq $0x8, %rsp
movq %rbp, %r12
pushq %rbp
pushq %r14
pushq 0x30(%r15)
callq 0x24088
movq 0x30(%rsp), %r9
movq 0x28(%rsp), %r8
addq $0x20, %rsp
jmp 0x22083
movq 0x68(%r15), %rax
cmpl $0x10, (%rax)
jne 0x21ee5
testl %r12d, %r12d
movq 0x20(%rsp), %rax
je 0x2211d
movq $0x0, (%rsp)
testq %rax, %rax
jle 0x22187
movq 0x10(%rsp), %rax
leaq 0x80(%rax), %r14
xorl %eax, %eax
movq 0x30(%r15), %rcx
movq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0x6460
movq 0x8(%rsp), %r8
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
cmpq %r8, %rax
jl 0x21df3
jmp 0x22187
movq %rbp, %r12
cmpq $0x1, %rax
movq 0x20(%rsp), %rdx
jne 0x21fc2
testq %rdx, %rdx
jle 0x22083
xorl %r14d, %r14d
movq %r13, 0x48(%rsp)
movq $0x0, (%rsp)
testq %rcx, %rcx
jle 0x21ec5
xorl %eax, %eax
leaq 0x1c(%rsp), %r13
movq 0x28(%rsp), %r12
movq 0x58(%r15), %rsi
imulq %r14, %rsi
addq 0x80(%r9), %rsi
movl 0xd8(%rbx), %edi
movq 0x78(%r9), %rdx
addq %r14, %rdx
movq 0x38(%r15), %r9
movq 0x68(%r15), %r8
movl (%r8), %r8d
imulq %r14, %rcx
addq %rax, %rcx
movslq 0x40(%r15), %rax
imulq %rcx, %rax
addq 0x30(%r15), %rax
subq $0x8, %rsp
movl $0x1, %ecx
pushq %r12
pushq %r13
pushq %rax
callq 0x24088
movq 0x30(%rsp), %r9
addq $0x20, %rsp
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
movq 0x50(%r15), %rcx
cmpq %rcx, %rax
jl 0x21e59
jmp 0x21eca
movq 0x28(%rsp), %r12
incq %r14
movq 0x8(%rsp), %r8
cmpq %r8, %r14
movq 0x48(%rsp), %r13
jne 0x21e40
jmp 0x22083
leaq 0xada85(%rip), %rdi # 0xcf971
callq 0x37264
movq 0x8(%rsp), %r8
movl $0x1b0, (%rbp) # imm = 0x1B0
jmp 0x22187
cmpl $0xe, %eax
je 0x21f62
cmpl $0x10, %eax
jne 0x220fb
movq $0x0, (%rsp)
testl %r12d, %r12d
je 0x22252
testq %rcx, %rcx
jle 0x2228b
leaq 0x80(%r9), %r14
xorl %eax, %eax
movq 0x30(%r15), %rcx
movq (%rcx,%rax,8), %rdi
movq %r14, %rsi
callq 0x6460
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r8
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
cmpq %r8, %rax
jl 0x21f33
jmp 0x2228b
testl %r12d, %r12d
je 0x221f8
testq %rcx, %rcx
jle 0x2228b
xorl %eax, %eax
movq $0x0, (%rsp)
movq 0x40(%r9), %rcx
testq %rcx, %rcx
jle 0x21fb5
xorl %edx, %edx
imulq %rax, %rcx
movq 0x30(%r15), %rsi
addq %rdx, %rsi
cmpb $0x31, 0x80(%r9,%rdx)
sete (%rcx,%rsi)
movq (%rsp), %rdx
incq %rdx
movq %rdx, (%rsp)
movq 0x40(%r9), %rcx
cmpq %rcx, %rdx
jl 0x21f89
incq %rax
cmpq %r8, %rax
jne 0x21f76
jmp 0x2228b
testq %rdx, %rdx
jle 0x22083
cmpq %rax, %rcx
cmovlq %rcx, %rax
cltq
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
movq %r13, %rbp
movq 0x40(%r9), %rdx
imulq %r14, %rdx
movq 0x58(%r15), %rsi
imulq %rdx, %rsi
addq 0x80(%r9), %rsi
movl 0xd8(%rbx), %edi
addq 0x78(%r9), %rdx
movq 0x38(%r15), %r9
movq 0x68(%r15), %rax
movl (%rax), %r8d
movq 0x50(%r15), %rax
imulq %r14, %rax
movslq 0x40(%r15), %r10
imulq %rax, %r10
addq 0x30(%r15), %r10
subq $0x8, %rsp
movq 0x38(%rsp), %r13
movq %r13, %rcx
pushq %r12
leaq 0x2c(%rsp), %rax
pushq %rax
pushq %r10
callq 0x24088
addq $0x20, %rsp
movq 0x50(%r15), %rdi
movq %rdi, %rdx
subq %r13, %rdx
jle 0x2206a
imulq %r14, %rdi
addq 0x30(%rsp), %rdi
movslq 0x40(%r15), %rax
imulq %rax, %rdi
addq 0x30(%r15), %rdi
imulq %rax, %rdx
xorl %esi, %esi
callq 0x6090
incq %r14
movq 0x8(%rsp), %r8
cmpq %r14, %r8
movq 0x10(%rsp), %r9
movq %rbp, %r13
jne 0x21fdc
cmpl $0x0, (%r9)
movq %r12, %rbp
movl 0x40(%rsp), %r12d
jle 0x220c8
movq 0x80(%r9), %rdi
testq %rdi, %rdi
je 0x220a4
callq 0x6260
jmp 0x220be
leaq 0xad7bc(%rip), %rdi # 0xcf867
leaq 0xad45d(%rip), %rsi # 0xcf50f
movl $0x4df, %edx # imm = 0x4DF
xorl %eax, %eax
callq 0x6050
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
movl (%rbp), %eax
cmpl $-0xb, %eax
leaq 0x1c(%rsp), %r14
jne 0x22305
movl $0x19c, (%rbp) # imm = 0x19C
leaq 0xad7af(%rip), %rdi # 0xcf896
callq 0x37264
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r8
jmp 0x22302
leaq 0xad7d9(%rip), %rdi # 0xcf8db
callq 0x37264
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r8
movl $0x1b0, (%rbp) # imm = 0x1B0
jmp 0x2228b
movl 0x1c(%rsp), %ebx
movq $0x0, (%rsp)
testq %rax, %rax
jle 0x2217e
xorl %eax, %eax
movq 0x10(%rsp), %rdx
movq 0x78(%rdx), %rcx
cmpb $0x0, (%rcx,%rax)
je 0x2214a
movq 0x38(%r15), %rcx
movl $0x1, %ebx
jmp 0x22159
leaq (,%rax,8), %rcx
addq 0x80(%rdx), %rcx
movq 0x30(%r15), %rdx
movq (%rdx,%rax,8), %rdi
movq (%rcx), %rsi
callq 0x6460
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %r8
cmpq %r8, %rax
jl 0x22130
movl %ebx, 0x1c(%rsp)
movq 0x38(%rsp), %rbx
movq 0x10(%rsp), %r9
cmpl $0x0, (%r9)
leaq 0x1c(%rsp), %r14
jle 0x22302
movq 0x80(%r9), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x221b1
callq 0x6260
jmp 0x221cb
leaq 0xad752(%rip), %rdi # 0xcf90a
leaq 0xad350(%rip), %rsi # 0xcf50f
movl $0x535, %edx # imm = 0x535
xorl %eax, %eax
callq 0x6050
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rdi
testq %rdi, %rdi
jne 0x222d7
leaq 0xad758(%rip), %rdi # 0xcf93f
leaq 0xad321(%rip), %rsi # 0xcf50f
movl $0x536, %edx # imm = 0x536
jmp 0x222f1
testq %rcx, %rcx
jle 0x2228b
xorl %eax, %eax
movq $0x0, (%rsp)
movq 0x40(%r9), %rcx
testq %rcx, %rcx
jle 0x22248
xorl %edx, %edx
movq 0x80(%r9), %rsi
movq (%rsi,%rax,8), %rsi
imulq %rax, %rcx
movq 0x30(%r15), %rdi
addq %rdx, %rdi
cmpb $0x31, (%rsi,%rdx)
sete (%rcx,%rdi)
movq (%rsp), %rdx
incq %rdx
movq %rdx, (%rsp)
movq 0x40(%r9), %rcx
cmpq %rcx, %rdx
jl 0x22216
incq %rax
cmpq %r8, %rax
jne 0x22203
jmp 0x2228b
testq %rcx, %rcx
jle 0x2228b
xorl %eax, %eax
movq 0x30(%r15), %rcx
movq (%rcx,%rax,8), %rdi
movq 0x80(%r9), %rcx
movq (%rcx,%rax,8), %rsi
callq 0x6460
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r8
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
cmpq %r8, %rax
jl 0x22259
cmpl $0x0, (%r9)
leaq 0x1c(%rsp), %r14
jle 0x22302
movq 0x80(%r9), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x222ac
callq 0x6260
jmp 0x222c6
leaq 0xad657(%rip), %rdi # 0xcf90a
leaq 0xad255(%rip), %rsi # 0xcf50f
movl $0x51b, %edx # imm = 0x51B
xorl %eax, %eax
callq 0x6050
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rdi
testq %rdi, %rdi
je 0x222de
callq 0x6260
jmp 0x222f8
leaq 0xad65a(%rip), %rdi # 0xcf93f
leaq 0xad223(%rip), %rsi # 0xcf50f
movl $0x51c, %edx # imm = 0x51C
xorl %eax, %eax
callq 0x6050
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
movl (%rbp), %eax
addq %r8, %r13
testl %eax, %eax
jne 0x22382
movl 0x3c(%r9), %eax
cmpl $0x105, %eax # imm = 0x105
je 0x22364
cmpl $0x106, %eax # imm = 0x106
movq 0x20(%rsp), %r10
jne 0x22351
movq 0x68(%r15), %rax
cmpl $0xb, (%rax)
jne 0x22351
movslq 0x40(%r15), %rax
movq 0x40(%r9), %rcx
leaq 0x7(%rcx), %rdx
addq $0xe, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x3, %rcx
imulq %r8, %rax
imulq %rcx, %rax
jmp 0x2235e
movslq 0x40(%r15), %rax
imulq %r8, %rax
imulq 0x50(%r15), %rax
addq 0x30(%r15), %rax
jmp 0x22375
movslq 0x40(%r15), %rax
imulq %r8, %rax
addq 0x30(%r15), %rax
movq 0x20(%rsp), %r10
movq %rax, 0x30(%r15)
subq %r8, %r10
jne 0x21b14
movq 0x38(%r15), %rsi
movq 0x58(%rsp), %r12
movq -0xb0(%r12), %rdi
cmpq %rdi, %rsi
movq 0x68(%rsp), %r14
je 0x223c5
movslq 0x40(%r15), %rdx
leaq (%rdi,%rdx), %rax
cmpq %rax, 0x78(%rsp)
jne 0x223c5
movq 0x68(%r15), %rax
cmpl $0x10, (%rax)
jne 0x223c0
movq (%rsi), %rax
movzwl (%rax), %eax
movw %ax, (%rdi)
jmp 0x223c5
callq 0x65c0
cmpl $0x0, 0x1c(%rsp)
je 0x223d9
movq 0x68(%r15), %rax
movl $0x1, 0x20(%rax)
jmp 0x22411
movq 0x38(%r15), %rdi
cmpq -0xb0(%r12), %rdi
jne 0x22411
movq 0x68(%r15), %rax
cmpl $0x10, (%rax)
jne 0x22400
movq (%rdi), %rax
movzwl 0x80(%rsp), %ecx
movw %cx, (%rax)
jmp 0x22411
movslq 0x40(%r15), %rdx
leaq 0x80(%rsp), %rsi
callq 0x65c0
cmpl $0x0, 0xdc(%rbx)
je 0x2243b
decq %r13
cmpq 0x48(%r15), %r13
jne 0x2243b
cmpl $0x0, 0xe0(%rbx)
jne 0x2243b
movq 0x68(%r15), %rcx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %r14, 0x18(%rcx)
jl 0x22441
movl 0xe0(%rbx), %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/eval_f.c |
ffbnfm | int ffbnfm(char *tform, /* I - format code from the TFORMn keyword */
int *dtcode, /* O - numerical datatype code */
long *trepeat, /* O - repeat count of the field */
long *twidth, /* O - width of the field, in chars */
int *status) /* IO - error status */
{
/*
parse the binary table TFORM column format to determine the data
type, repeat count, and the field width (if it is an ASCII (A) field)
*/
size_t ii, nchar;
int datacode, variable, iread;
long width, repeat;
char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG];
if (*status > 0)
return(*status);
if (dtcode)
*dtcode = 0;
if (trepeat)
*trepeat = 0;
if (twidth)
*twidth = 0;
nchar = strlen(tform);
for (ii = 0; ii < nchar; ii++)
{
if (tform[ii] != ' ') /* find first non-space char */
break;
}
if (ii == nchar)
{
ffpmsg("Error: binary table TFORM code is blank (ffbnfm).");
return(*status = BAD_TFORM);
}
if (nchar-ii > FLEN_VALUE-1)
{
ffpmsg("Error: binary table TFORM code is too long (ffbnfm).");
return (*status = BAD_TFORM);
}
strcpy(temp, &tform[ii]); /* copy format string */
ffupch(temp); /* make sure it is in upper case */
form = temp; /* point to start of format string */
/*-----------------------------------------------*/
/* get the repeat count */
/*-----------------------------------------------*/
ii = 0;
while(isdigit((int) form[ii]))
ii++; /* look for leading digits in the field */
if (ii == 0)
repeat = 1; /* no explicit repeat count */
else
{
if (sscanf(form,"%ld", &repeat) != 1) /* read repeat count */
{
ffpmsg("Error: Bad repeat format in TFORM (ffbnfm).");
return(*status = BAD_TFORM);
}
}
/*-----------------------------------------------*/
/* determine datatype code */
/*-----------------------------------------------*/
form = form + ii; /* skip over the repeat field */
if (form[0] == 'P' || form[0] == 'Q')
{
variable = 1; /* this is a variable length column */
/* repeat = 1; */ /* disregard any other repeat value */
form++; /* move to the next data type code char */
}
else
variable = 0;
if (form[0] == 'U') /* internal code to signify unsigned short integer */
{
datacode = TUSHORT;
width = 2;
}
else if (form[0] == 'I')
{
datacode = TSHORT;
width = 2;
}
else if (form[0] == 'V') /* internal code to signify unsigned integer */
{
datacode = TULONG;
width = 4;
}
else if (form[0] == 'W') /* internal code to signify unsigned long long integer */
{
datacode = TULONGLONG;
width = 8;
}
else if (form[0] == 'J')
{
datacode = TLONG;
width = 4;
}
else if (form[0] == 'K')
{
datacode = TLONGLONG;
width = 8;
}
else if (form[0] == 'E')
{
datacode = TFLOAT;
width = 4;
}
else if (form[0] == 'D')
{
datacode = TDOUBLE;
width = 8;
}
else if (form[0] == 'A')
{
datacode = TSTRING;
/*
the following code is used to support the non-standard
datatype of the form rAw where r = total width of the field
and w = width of fixed-length substrings within the field.
*/
iread = 0;
if (form[1] != 0)
{
if (form[1] == '(' ) /* skip parenthesis around */
form++; /* variable length column width */
iread = sscanf(&form[1],"%ld", &width);
}
if (iread != 1 || (!variable && (width > repeat)) )
width = repeat;
}
else if (form[0] == 'L')
{
datacode = TLOGICAL;
width = 1;
}
else if (form[0] == 'X')
{
datacode = TBIT;
width = 1;
}
else if (form[0] == 'B')
{
datacode = TBYTE;
width = 1;
}
else if (form[0] == 'S') /* internal code to signify signed byte */
{
datacode = TSBYTE;
width = 1;
}
else if (form[0] == 'C')
{
datacode = TCOMPLEX;
width = 8;
}
else if (form[0] == 'M')
{
datacode = TDBLCOMPLEX;
width = 16;
}
else
{
snprintf(message, FLEN_ERRMSG,
"Illegal binary table TFORMn datatype: \'%s\' ", tform);
ffpmsg(message);
return(*status = BAD_TFORM_DTYPE);
}
if (variable)
datacode = datacode * (-1); /* flag variable cols w/ neg type code */
if (dtcode)
*dtcode = datacode;
if (trepeat)
*trepeat = repeat;
if (twidth)
*twidth = width;
return(*status);
} | movl (%r8), %eax
testl %eax, %eax
jle 0x3a3fc
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
testq %rsi, %rsi
je 0x3a429
movl $0x0, (%r12)
testq %r15, %r15
je 0x3a435
movq $0x0, (%r15)
testq %r14, %r14
je 0x3a441
movq $0x0, (%r14)
movq %r13, %rdi
callq 0x6280
xorl %esi, %esi
testq %rax, %rax
je 0x3a462
cmpb $0x20, (%r13,%rsi)
jne 0x3a462
incq %rsi
cmpq %rsi, %rax
jne 0x3a450
jmp 0x3a467
subq %rsi, %rax
jne 0x3a473
leaq 0x9c1b3(%rip), %rsi # 0xd6621
jmp 0x3a599
cmpq $0x47, %rax
jb 0x3a485
leaq 0x9c1d3(%rip), %rsi # 0xd6653
jmp 0x3a599
movq %r14, (%rsp)
addq %r13, %rsi
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
callq 0x6460
movq %rbp, %rdi
callq 0x37871
callq 0x62c0
movq (%rax), %rcx
movl $0x1, %eax
movsbq (%rbp), %r14
incq %rbp
decq %rax
testb $0x8, 0x1(%rcx,%r14,2)
jne 0x3a4ae
testq %rax, %rax
je 0x3a4ed
leaq 0x9e6cd(%rip), %rsi # 0xd8b9a
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x6140
cmpl $0x1, %eax
jne 0x3a592
movb -0x1(%rbp), %r14b
jmp 0x3a4f6
movq $0x1, 0x8(%rsp)
leaq -0x1(%rbp), %rdi
andb $-0x2, %r14b
cmpb $0x50, %r14b
cmoveq %rbp, %rdi
movzbl (%rdi), %eax
addl $-0x41, %eax
cmpl $0x17, %eax
ja 0x3a632
leaq 0x9a868(%rip), %rcx # 0xd4d84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1(%rbp), %rax
cmpb $0x50, %r14b
cmovneq %rbp, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
movq (%rsp), %r13
je 0x3a57e
cmpl $0x28, %ecx
jne 0x3a544
movq %rax, %rdi
incq %rdi
leaq 0x9e64c(%rip), %rsi # 0xd8b9a
leaq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x6140
cmpl $0x1, %eax
jne 0x3a57e
movl $0x10, %eax
cmpb $0x50, %r14b
je 0x3a6ef
movq 0x10(%rsp), %rcx
cmpq 0x8(%rsp), %rcx
jle 0x3a6ef
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x10, %eax
jmp 0x3a6ef
leaq 0x9c0ef(%rip), %rsi # 0xd6688
movl $0x5, %edi
callq 0x37271
movl $0x105, (%rbx) # imm = 0x105
movl $0x105, %eax # imm = 0x105
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x8, 0x10(%rsp)
movl $0x50, %eax
jmp 0x3a6eb
movq $0x1, 0x10(%rsp)
movl $0xc, %eax
jmp 0x3a6eb
movq $0x4, 0x10(%rsp)
movl $0x28, %eax
jmp 0x3a6eb
movq $0x8, 0x10(%rsp)
movl $0x53, %eax
jmp 0x3a6eb
movq $0x2, 0x10(%rsp)
movl $0x15, %eax
jmp 0x3a6eb
movq $0x2, 0x10(%rsp)
movl $0x14, %eax
jmp 0x3a6eb
leaq 0x9c07b(%rip), %rdx # 0xd66b4
leaq 0x10(%rsp), %r14
movl $0x51, %esi
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x60b0
movl $0x5, %edi
movq %r14, %rsi
callq 0x37271
movl $0x106, (%rbx) # imm = 0x106
movl $0x106, %eax # imm = 0x106
jmp 0x3a5ae
movq $0x1, 0x10(%rsp)
movl $0xb, %eax
jmp 0x3a6eb
movq $0x4, 0x10(%rsp)
movl $0x29, %eax
jmp 0x3a6eb
movq $0x8, 0x10(%rsp)
movl $0x51, %eax
jmp 0x3a6eb
movq $0x1, 0x10(%rsp)
movl $0x1, %eax
jmp 0x3a6eb
movq $0x8, 0x10(%rsp)
movl $0x52, %eax
jmp 0x3a6eb
movq $0x4, 0x10(%rsp)
movl $0x2a, %eax
jmp 0x3a6eb
movq $0x10, 0x10(%rsp)
movl $0xa3, %eax
jmp 0x3a6eb
movq $0x1, 0x10(%rsp)
movl $0xe, %eax
movq (%rsp), %r13
testq %r12, %r12
je 0x3a703
movl %eax, %ecx
negl %ecx
cmpb $0x50, %r14b
cmovnel %eax, %ecx
movl %ecx, (%r12)
testq %r15, %r15
je 0x3a710
movq 0x8(%rsp), %rax
movq %rax, (%r15)
testq %r13, %r13
je 0x3a71e
movq 0x10(%rsp), %rax
movq %rax, (%r13)
movl (%rbx), %eax
jmp 0x3a5ae
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffbnfmll | int ffbnfmll(char *tform, /* I - format code from the TFORMn keyword */
int *dtcode, /* O - numerical datatype code */
LONGLONG *trepeat, /* O - repeat count of the field */
long *twidth, /* O - width of the field, in chars */
int *status) /* IO - error status */
{
/*
parse the binary table TFORM column format to determine the data
type, repeat count, and the field width (if it is an ASCII (A) field)
*/
size_t ii, nchar;
int datacode, variable, iread;
long width;
LONGLONG repeat;
char *form, temp[FLEN_VALUE], message[FLEN_ERRMSG];
double drepeat;
if (*status > 0)
return(*status);
if (dtcode)
*dtcode = 0;
if (trepeat)
*trepeat = 0;
if (twidth)
*twidth = 0;
nchar = strlen(tform);
for (ii = 0; ii < nchar; ii++)
{
if (tform[ii] != ' ') /* find first non-space char */
break;
}
if (ii == nchar)
{
ffpmsg("Error: binary table TFORM code is blank (ffbnfmll).");
return(*status = BAD_TFORM);
}
if (strlen(&tform[ii]) > FLEN_VALUE-1)
{
ffpmsg("Error: binary table TFORM code is too long (ffbnfmll).");
return(*status = BAD_TFORM);
}
strcpy(temp, &tform[ii]); /* copy format string */
ffupch(temp); /* make sure it is in upper case */
form = temp; /* point to start of format string */
/*-----------------------------------------------*/
/* get the repeat count */
/*-----------------------------------------------*/
ii = 0;
while(isdigit((int) form[ii]))
ii++; /* look for leading digits in the field */
if (ii == 0)
repeat = 1; /* no explicit repeat count */
else {
/* read repeat count */
/* print as double, because the string-to-64-bit int conversion */
/* character is platform dependent (%lld, %ld, %I64d) */
sscanf(form,"%lf", &drepeat);
repeat = (LONGLONG) (drepeat + 0.1);
}
/*-----------------------------------------------*/
/* determine datatype code */
/*-----------------------------------------------*/
form = form + ii; /* skip over the repeat field */
if (form[0] == 'P' || form[0] == 'Q')
{
variable = 1; /* this is a variable length column */
/* repeat = 1; */ /* disregard any other repeat value */
form++; /* move to the next data type code char */
}
else
variable = 0;
if (form[0] == 'U') /* internal code to signify unsigned integer */
{
datacode = TUSHORT;
width = 2;
}
else if (form[0] == 'I')
{
datacode = TSHORT;
width = 2;
}
else if (form[0] == 'V') /* internal code to signify unsigned integer */
{
datacode = TULONG;
width = 4;
}
else if (form[0] == 'W') /* internal code to signify unsigned long long integer */
{
datacode = TULONGLONG;
width = 8;
}
else if (form[0] == 'J')
{
datacode = TLONG;
width = 4;
}
else if (form[0] == 'K')
{
datacode = TLONGLONG;
width = 8;
}
else if (form[0] == 'E')
{
datacode = TFLOAT;
width = 4;
}
else if (form[0] == 'D')
{
datacode = TDOUBLE;
width = 8;
}
else if (form[0] == 'A')
{
datacode = TSTRING;
/*
the following code is used to support the non-standard
datatype of the form rAw where r = total width of the field
and w = width of fixed-length substrings within the field.
*/
iread = 0;
if (form[1] != 0)
{
if (form[1] == '(' ) /* skip parenthesis around */
form++; /* variable length column width */
iread = sscanf(&form[1],"%ld", &width);
}
if (iread != 1 || (!variable && (width > repeat)) )
width = (long) repeat;
}
else if (form[0] == 'L')
{
datacode = TLOGICAL;
width = 1;
}
else if (form[0] == 'X')
{
datacode = TBIT;
width = 1;
}
else if (form[0] == 'B')
{
datacode = TBYTE;
width = 1;
}
else if (form[0] == 'S') /* internal code to signify signed byte */
{
datacode = TSBYTE;
width = 1;
}
else if (form[0] == 'C')
{
datacode = TCOMPLEX;
width = 8;
}
else if (form[0] == 'M')
{
datacode = TDBLCOMPLEX;
width = 16;
}
else
{
snprintf(message, FLEN_ERRMSG,
"Illegal binary table TFORMn datatype: \'%s\' ", tform);
ffpmsg(message);
return(*status = BAD_TFORM_DTYPE);
}
if (variable)
datacode = datacode * (-1); /* flag variable cols w/ neg type code */
if (dtcode)
*dtcode = datacode;
if (trepeat)
*trepeat = repeat;
if (twidth)
*twidth = width;
return(*status);
} | movl (%r8), %eax
testl %eax, %eax
jle 0x3a72d
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r8, %rbx
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
testq %rsi, %rsi
je 0x3a75a
movl $0x0, (%r12)
testq %r15, %r15
je 0x3a766
movq $0x0, (%r15)
testq %rbp, %rbp
je 0x3a773
movq $0x0, (%rbp)
movq %r13, %rdi
callq 0x6280
xorl %r14d, %r14d
testq %rax, %rax
je 0x3a795
cmpb $0x20, (%r13,%r14)
jne 0x3a795
incq %r14
cmpq %r14, %rax
jne 0x3a783
jmp 0x3a79a
cmpq %rax, %r14
jne 0x3a7a3
leaq 0x9bf3f(%rip), %rsi # 0xd66e0
jmp 0x3a7bb
addq %r13, %r14
movq %r14, %rdi
callq 0x6280
cmpq $0x47, %rax
jb 0x3a7e2
leaq 0x9bf59(%rip), %rsi # 0xd6714
movl $0x5, %edi
callq 0x37271
movl $0x105, (%rbx) # imm = 0x105
movl $0x105, %eax # imm = 0x105
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, (%rsp)
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6460
movq %rbp, %rdi
callq 0x37871
callq 0x62c0
movq (%rax), %rcx
movl $0x1, %eax
movsbq (%rbp), %r14
incq %rbp
decq %rax
testb $0x8, 0x1(%rcx,%r14,2)
jne 0x3a80b
leaq -0x1(%rbp), %rdi
testq %rax, %rax
je 0x3a861
leaq 0x9bf1d(%rip), %rsi # 0xd674b
movq %rdi, %r14
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x6140
movq %r14, %rdi
leaq 0x8(%rsp), %rax
movsd (%rax), %xmm0
addsd 0x939b2(%rip), %xmm0 # 0xce208
cvttsd2si %xmm0, %rsi
movb -0x1(%rbp), %r14b
jmp 0x3a866
movl $0x1, %esi
andb $-0x2, %r14b
cmpb $0x50, %r14b
cmoveq %rbp, %rdi
movzbl (%rdi), %ecx
addl $-0x41, %ecx
cmpl $0x17, %ecx
ja 0x3a939
movl $0x2, %eax
leaq 0x9a557(%rip), %rdx # 0xd4de4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x1(%rbp), %rax
cmpb $0x50, %r14b
cmovneq %rbp, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
movq (%rsp), %r13
je 0x3a8f3
movq %rsi, %rbp
cmpl $0x28, %ecx
jne 0x3a8b8
movq %rax, %rdi
incq %rdi
leaq 0x9e2d8(%rip), %rsi # 0xd8b9a
leaq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x6140
cmpl $0x1, %eax
movq %rbp, %rsi
jne 0x3a8f3
movq 0x10(%rsp), %rax
movl $0x10, %ecx
cmpb $0x50, %r14b
je 0x3a9c2
cmpq %rsi, %rax
jle 0x3a9c2
movl $0x10, %ecx
movq %rsi, %rax
jmp 0x3a9c2
movl $0x50, %ecx
jmp 0x3a995
movl $0xc, %ecx
jmp 0x3a9b9
movl $0x28, %ecx
jmp 0x3a9a1
movl $0x53, %ecx
jmp 0x3a995
movl $0x15, %ecx
jmp 0x3a9be
movl $0x14, %ecx
jmp 0x3a9be
leaq 0x9bd74(%rip), %rdx # 0xd66b4
leaq 0x10(%rsp), %r14
movl $0x51, %esi
movq %r14, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x60b0
movl $0x5, %edi
movq %r14, %rsi
callq 0x37271
movl $0x106, (%rbx) # imm = 0x106
movl $0x106, %eax # imm = 0x106
jmp 0x3a7d0
movl $0xb, %ecx
jmp 0x3a9b9
movl $0x29, %ecx
jmp 0x3a9a1
movl $0x51, %ecx
jmp 0x3a995
movl $0x1, %ecx
jmp 0x3a9b9
movl $0x52, %ecx
movl $0x8, %eax
jmp 0x3a9be
movl $0x2a, %ecx
movl $0x4, %eax
jmp 0x3a9be
movl $0xa3, %ecx
movl $0x10, %eax
jmp 0x3a9be
movl $0xe, %ecx
movl $0x1, %eax
movq (%rsp), %r13
testq %r12, %r12
je 0x3a9d6
movl %ecx, %edx
negl %edx
cmpb $0x50, %r14b
cmovnel %ecx, %edx
movl %edx, (%r12)
testq %r15, %r15
je 0x3a9de
movq %rsi, (%r15)
testq %r13, %r13
je 0x3a9e7
movq %rax, (%r13)
movl (%rbx), %eax
jmp 0x3a7d0
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffrhdu | int ffrhdu(fitsfile *fptr, /* I - FITS file pointer */
int *hdutype, /* O - type of HDU */
int *status) /* IO - error status */
/*
read the required keywords of the CHDU and initialize the corresponding
structure elements that describe the format of the HDU
*/
{
int ii, tstatus;
char card[FLEN_CARD];
char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT];
char xname[FLEN_VALUE], *xtension, urltype[20];
if (*status > 0)
return(*status);
if (ffgrec(fptr, 1, card, status) > 0 ) /* get the 80-byte card */
{
ffpmsg("Cannot read first keyword in header (ffrhdu).");
return(*status);
}
strncpy(name,card,8); /* first 8 characters = the keyword name */
name[8] = '\0';
for (ii=7; ii >= 0; ii--) /* replace trailing blanks with nulls */
{
if (name[ii] == ' ')
name[ii] = '\0';
else
break;
}
if (ffpsvc(card, value, comm, status) > 0) /* parse value and comment */
{
ffpmsg("Cannot read value of first keyword in header (ffrhdu):");
ffpmsg(card);
return(*status);
}
if (!strcmp(name, "SIMPLE")) /* this is the primary array */
{
ffpinit(fptr, status); /* initialize the primary array */
if (hdutype != NULL)
*hdutype = 0;
}
else if (!strcmp(name, "XTENSION")) /* this is an XTENSION keyword */
{
if (ffc2s(value, xname, status) > 0) /* get the value string */
{
ffpmsg("Bad value string for XTENSION keyword:");
ffpmsg(value);
return(*status);
}
xtension = xname;
while (*xtension == ' ') /* ignore any leading spaces in name */
xtension++;
if (!strcmp(xtension, "TABLE"))
{
ffainit(fptr, status); /* initialize the ASCII table */
if (hdutype != NULL)
*hdutype = 1;
}
else if (!strcmp(xtension, "BINTABLE") ||
!strcmp(xtension, "A3DTABLE") ||
!strcmp(xtension, "3DTABLE") )
{
ffbinit(fptr, status); /* initialize the binary table */
if (hdutype != NULL)
*hdutype = 2;
}
else
{
tstatus = 0;
ffpinit(fptr, &tstatus); /* probably an IMAGE extension */
if (tstatus == UNKNOWN_EXT && hdutype != NULL)
*hdutype = -1; /* don't recognize this extension type */
else
{
*status = tstatus;
if (hdutype != NULL)
*hdutype = 0;
}
}
}
else /* not the start of a new extension */
{
if (card[0] == 0 ||
card[0] == 10) /* some editors append this character to EOF */
{
*status = END_OF_FILE;
}
else
{
*status = UNKNOWN_REC; /* found unknown type of record */
ffpmsg
("Extension doesn't start with SIMPLE or XTENSION keyword. (ffrhdu)");
ffpmsg(card);
}
}
/* compare the starting position of the next HDU (if any) with the size */
/* of the whole file to see if this is the last HDU in the file */
if ((fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] <
(fptr->Fptr)->logfilesize )
{
(fptr->Fptr)->lasthdu = 0; /* no, not the last HDU */
}
else
{
(fptr->Fptr)->lasthdu = 1; /* yes, this is the last HDU */
/* special code for mem:// type files (FITS file in memory) */
/* Allocate enough memory to hold the entire HDU. */
/* Without this code, CFITSIO would repeatedly realloc memory */
/* to incrementally increase the size of the file by 2880 bytes */
/* at a time, until it reached the final size */
ffurlt(fptr, urltype, status);
if (!strcmp(urltype,"mem://") || !strcmp(urltype,"memkeep://"))
{
fftrun(fptr, (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1],
status);
}
}
return(*status);
} | movl (%rdx), %eax
testl %eax, %eax
jle 0x3c08e
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1d8, %rsp # imm = 0x1D8
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x80(%rsp), %rdx
movl $0x1, %esi
movq %rbx, %rcx
callq 0x6e07a
testl %eax, %eax
jle 0x3c0c7
leaq 0x9a6ae(%rip), %rsi # 0xd6773
jmp 0x3c13c
leaq 0x30(%rsp), %r12
leaq 0x80(%rsp), %rsi
movl $0x8, %edx
movq %r12, %rdi
callq 0x64e0
movb $0x0, 0x8(%r12)
movl $0x7, %eax
movl %eax, %eax
cmpb $0x20, 0x30(%rsp,%rax)
jne 0x3c0ff
movb $0x0, 0x30(%rsp,%rax)
addl $-0x1, %eax
jb 0x3c0ec
leaq 0x80(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x180(%rsp), %rdx
movq %rbx, %rcx
callq 0x381ee
testl %eax, %eax
jle 0x3c157
leaq 0x9a677(%rip), %rsi # 0xd67a1
movl $0x5, %edi
callq 0x37271
leaq 0x80(%rsp), %rsi
movl $0x5, %edi
callq 0x37271
movl (%rbx), %eax
addq $0x1d8, %rsp # imm = 0x1D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x504d4953, %eax # imm = 0x504D4953
xorl 0x30(%rsp), %eax
movl $0x454c50, %ecx # imm = 0x454C50
xorl 0x33(%rsp), %ecx
orl %eax, %ecx
je 0x3c1a2
movabsq $0x4e4f49534e455458, %rax # imm = 0x4E4F49534E455458
xorq 0x30(%rsp), %rax
movzbl 0x38(%rsp), %ecx
orq %rax, %rcx
je 0x3c1bb
movzbl 0x80(%rsp), %eax
cmpl $0xa, %eax
je 0x3c197
testl %eax, %eax
jne 0x3c1f9
movl $0x6b, (%rbx)
jmp 0x3c222
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3c3a2
testq %r15, %r15
je 0x3c222
movl $0x0, (%r15)
jmp 0x3c222
leaq 0xe0(%rsp), %rdi
leaq 0x130(%rsp), %rsi
movq %rbx, %rdx
callq 0x3c9a1
testl %eax, %eax
jle 0x3c2bc
leaq 0x9a5f7(%rip), %rsi # 0xd67d9
movl $0x5, %edi
callq 0x37271
leaq 0xe0(%rsp), %rsi
jmp 0x3c13c
movl $0xfc, (%rbx)
leaq 0x9a603(%rip), %rsi # 0xd6809
movl $0x5, %edi
callq 0x37271
leaq 0x80(%rsp), %rsi
movl $0x5, %edi
callq 0x37271
movq 0x8(%r14), %rax
movq 0x68(%rax), %rcx
movslq 0x54(%rax), %rdx
movq 0x8(%rcx,%rdx,8), %rcx
cmpq 0x30(%rax), %rcx
jge 0x3c245
movl $0x0, 0x38(%rax)
jmp 0x3c146
movl $0x1, 0x38(%rax)
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x15fbc
movl $0x3a6d656d, %eax # imm = 0x3A6D656D
xorl (%r15), %eax
movl $0x2f2f3a, %ecx # imm = 0x2F2F3A
xorl 0x3(%r15), %ecx
orl %eax, %ecx
je 0x3c29b
movabsq $0x3a7065656b6d656d, %rax # imm = 0x3A7065656B6D656D
xorq 0x10(%rsp), %rax
movabsq $0x2f2f3a7065656b, %rcx # imm = 0x2F2F3A7065656B
xorq 0x13(%rsp), %rcx
orq %rax, %rcx
jne 0x3c146
movq 0x8(%r14), %rax
movq 0x68(%rax), %rcx
movslq 0x54(%rax), %rax
movq 0x8(%rcx,%rax,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x16373
jmp 0x3c146
leaq 0x12f(%rsp), %r12
cmpb $0x20, 0x1(%r12)
leaq 0x1(%r12), %r12
je 0x3c2c4
leaq 0x9a52b(%rip), %rsi # 0xd6803
movq %r12, %rdi
callq 0x6420
testl %eax, %eax
je 0x3c37b
leaq 0x8cf3d(%rip), %rsi # 0xc922c
movq %r12, %rdi
callq 0x6420
testl %eax, %eax
je 0x3c35b
leaq 0x9a4fe(%rip), %rsi # 0xd6800
movq %r12, %rdi
callq 0x6420
testl %eax, %eax
je 0x3c35b
leaq 0x9a4ec(%rip), %rsi # 0xd6801
movq %r12, %rdi
callq 0x6420
testl %eax, %eax
je 0x3c35b
leaq 0xc(%rsp), %r12
movl $0x0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3c3a2
movl (%r12), %eax
cmpl $0xfb, %eax
setne %cl
testq %r15, %r15
sete %dl
orb %cl, %dl
jne 0x3c39b
movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF
jmp 0x3c222
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3d0b5
testq %r15, %r15
je 0x3c222
movl $0x2, (%r15)
jmp 0x3c222
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3ca85
testq %r15, %r15
je 0x3c222
movl $0x1, (%r15)
jmp 0x3c222
movl %eax, (%rbx)
jmp 0x3c1ad
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffwend | int ffwend(fitsfile *fptr, /* I - FITS file pointer */
int *status) /* IO - error status */
/*
write the END card and following fill (space chars) in the current header
*/
{
int ii, tstatus;
LONGLONG endpos;
long nspace;
char blankkey[FLEN_CARD], endkey[FLEN_CARD], keyrec[FLEN_CARD] = "";
if (*status > 0)
return(*status);
endpos = (fptr->Fptr)->headend;
/* we assume that the HDUposition == curhdu in all cases */
/* calc the data starting position if not currently defined */
if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
(fptr->Fptr)->datastart = ( endpos / 2880 + 1 ) * 2880;
/* calculate the number of blank keyword slots in the header */
nspace = (long) (( (fptr->Fptr)->datastart - endpos ) / 80);
/* construct a blank and END keyword (80 spaces ) */
strcpy(blankkey, " ");
strcat(blankkey, " ");
strcpy(endkey, "END ");
strcat(endkey, " ");
/* check if header is already correctly terminated with END and fill */
tstatus=0;
ffmbyt(fptr, endpos, REPORT_EOF, &tstatus); /* move to header end */
for (ii=0; ii < nspace; ii++)
{
ffgbyt(fptr, 80, keyrec, &tstatus); /* get next keyword */
if (tstatus) break;
if (strncmp(keyrec, blankkey, 80) && strncmp(keyrec, endkey, 80))
break;
}
if (ii == nspace && !tstatus)
{
/* check if the END keyword exists at the correct position */
endpos=maxvalue( endpos, ( (fptr->Fptr)->datastart - 2880 ) );
ffmbyt(fptr, endpos, REPORT_EOF, &tstatus); /* move to END position */
ffgbyt(fptr, 80, keyrec, &tstatus); /* read the END keyword */
if ( !strncmp(keyrec, endkey, 80) && !tstatus) {
/* store this position, for later reference */
(fptr->Fptr)->ENDpos = endpos;
return(*status); /* END card was already correct */
}
}
/* header was not correctly terminated, so write the END and blank fill */
endpos = (fptr->Fptr)->headend;
ffmbyt(fptr, endpos, IGNORE_EOF, status); /* move to header end */
for (ii=0; ii < nspace; ii++)
ffpbyt(fptr, 80, blankkey, status); /* write the blank keywords */
/*
The END keyword must either be placed immediately after the last
keyword that was written (as indicated by the headend value), or
must be in the first 80 bytes of the 2880-byte FITS record immediately
preceeding the data unit, whichever is further in the file. The
latter will occur if space has been reserved for more header keywords
which have not yet been written.
*/
endpos=maxvalue( endpos, ( (fptr->Fptr)->datastart - 2880 ) );
ffmbyt(fptr, endpos, REPORT_EOF, status); /* move to END position */
ffpbyt(fptr, 80, endkey, status); /* write the END keyword to header */
/* store this position, for later reference */
(fptr->Fptr)->ENDpos = endpos;
if (*status > 0)
ffpmsg("Error while writing END card (ffwend).");
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movb $0x0, 0x70(%rsp)
movl (%rsi), %eax
testl %eax, %eax
jg 0x3f1bb
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rcx
movq 0x70(%rcx), %r13
movq 0x88(%rcx), %r15
cmpq $-0x1, %r15
jne 0x3ef1e
movabsq $0x2d82d82d82d82d83, %rdx # imm = 0x2D82D82D82D82D83
movq %r13, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x9, %rdx
addq %rax, %rdx
imulq $0xb40, %rdx, %r15 # imm = 0xB40
addq $0xb40, %r15 # imm = 0xB40
movq %r15, 0x88(%rcx)
subq %r13, %r15
movabsq $0x6666666666666667, %rcx # imm = 0x6666666666666667
movq %r15, %rax
imulq %rcx
movq %rdx, %r12
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x5, %r12
addq %rax, %r12
movups 0x982b0(%rip), %xmm0 # 0xd71f9
leaq 0xe0(%rsp), %rdi
movups %xmm0, 0x19(%rdi)
movups 0x98294(%rip), %xmm0 # 0xd71f0
movaps %xmm0, 0x10(%rdi)
movups 0x98279(%rip), %xmm0 # 0xd71e0
movaps %xmm0, (%rdi)
callq 0x6280
movups 0x9826a(%rip), %xmm0 # 0xd71e0
movups %xmm0, 0xe0(%rsp,%rax)
movups 0x9826b(%rip), %xmm0 # 0xd71f0
movups %xmm0, 0xf0(%rsp,%rax)
movups 0x98265(%rip), %xmm0 # 0xd71f9
movups %xmm0, 0xf9(%rsp,%rax)
movups 0x98198(%rip), %xmm0 # 0xd713b
leaq 0x80(%rsp), %rdi
movaps %xmm0, (%rdi)
movups 0x98196(%rip), %xmm0 # 0xd714b
movaps %xmm0, 0x10(%rdi)
movups 0x98194(%rip), %xmm0 # 0xd7154
movups %xmm0, 0x19(%rdi)
callq 0x6280
movups 0x98210(%rip), %xmm0 # 0xd71e0
movups %xmm0, 0x80(%rsp,%rax)
movups 0x98211(%rip), %xmm0 # 0xd71f0
movups %xmm0, 0x90(%rsp,%rax)
movups 0x9820b(%rip), %xmm0 # 0xd71f9
movups %xmm0, 0x99(%rsp,%rax)
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq %r14, %rdi
movq %r13, 0x10(%rsp)
movq %r13, %rsi
xorl %edx, %edx
callq 0xc1ad4
movq %r15, 0x18(%rsp)
cmpq $0x50, %r15
jl 0x3f08e
xorl %r15d, %r15d
leaq 0x20(%rsp), %rbp
leaq 0xc(%rsp), %r13
movl $0x50, %esi
movq %r14, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0xc25e0
cmpl $0x0, 0xc(%rsp)
jne 0x3f10c
movl $0x50, %edx
movq %rbp, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x6190
testl %eax, %eax
je 0x3f07f
movl $0x50, %edx
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x6190
testl %eax, %eax
jne 0x3f1cd
incq %r15
cmpq %r15, %r12
jne 0x3f02b
xorl %eax, %eax
movq %r12, %r15
jmp 0x3f099
cmpl $0x0, 0xc(%rsp)
setne %al
xorl %r15d, %r15d
cmpq %r15, %r12
jne 0x3f10c
testb %al, %al
jne 0x3f10c
movq 0x8(%r14), %rax
movq $-0xb40, %r15 # imm = 0xF4C0
addq 0x88(%rax), %r15
movq 0x10(%rsp), %rax
cmpq %r15, %rax
cmovgq %rax, %r15
leaq 0xc(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xc1ad4
leaq 0x20(%rsp), %rbp
movl $0x50, %esi
movq %r14, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0xc25e0
leaq 0x80(%rsp), %rsi
movl $0x50, %edx
movq %rbp, %rdi
callq 0x6190
orl (%r13), %eax
je 0x3f1b1
movq 0x8(%r14), %rax
movq 0x70(%rax), %rbp
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
cmpq $0x50, 0x18(%rsp)
jl 0x3f14f
leaq 0xe0(%rsp), %r13
movl $0x50, %esi
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xc1d35
decq %r12
jne 0x3f137
movq 0x8(%r14), %rax
movq $-0xb40, %r15 # imm = 0xF4C0
addq 0x88(%rax), %r15
cmpq %r15, %rbp
cmovgq %rbp, %r15
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
leaq 0x80(%rsp), %rdx
movl $0x50, %esi
movq %r14, %rdi
movq %rbx, %rcx
callq 0xc1d35
movq 0x8(%r14), %rax
movq %r15, 0x78(%rax)
movl (%rbx), %eax
testl %eax, %eax
jle 0x3f1bb
leaq 0x97fbf(%rip), %rsi # 0xd7164
movl $0x5, %edi
callq 0x37271
jmp 0x3f1b9
movq 0x8(%r14), %rax
movq %r15, 0x78(%rax)
movl (%rbx), %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x3f099
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffcmph | int ffcmph(fitsfile *fptr, /* I -FITS file pointer */
int *status) /* IO - error status */
/*
compress the binary table heap by reordering the contents heap and
recovering any unused space
*/
{
fitsfile *tptr;
int jj, typecode, pixsize, valid;
long ii, buffsize = 10000, nblock, nbytes;
LONGLONG unused, overlap;
LONGLONG repeat, offset;
char *buffer, *tbuff, comm[FLEN_COMMENT];
char message[FLEN_ERRMSG];
LONGLONG pcount;
LONGLONG readheapstart, writeheapstart, endpos, t1heapsize, t2heapsize;
if (*status > 0)
return(*status);
/* get information about the current heap */
fftheap(fptr, NULL, &unused, &overlap, &valid, status);
if (!valid)
return(*status = BAD_HEAP_PTR); /* bad heap pointers */
/* return if this is not a binary table HDU or if the heap is OK as is */
if ( (fptr->Fptr)->hdutype != BINARY_TBL || (fptr->Fptr)->heapsize == 0 ||
(unused == 0 && overlap == 0) || *status > 0 )
return(*status);
/* copy the current HDU to a temporary file in memory */
if (ffinit( &tptr, "mem://tempheapfile", status) )
{
snprintf(message,FLEN_ERRMSG,"Failed to create temporary file for the heap");
ffpmsg(message);
return(*status);
}
if ( ffcopy(fptr, tptr, 0, status) )
{
snprintf(message,FLEN_ERRMSG,"Failed to create copy of the heap");
ffpmsg(message);
ffclos(tptr, status);
return(*status);
}
buffer = (char *) malloc(buffsize); /* allocate initial buffer */
if (!buffer)
{
snprintf(message,FLEN_ERRMSG,"Failed to allocate buffer to copy the heap");
ffpmsg(message);
ffclos(tptr, status);
return(*status = MEMORY_ALLOCATION);
}
readheapstart = (tptr->Fptr)->datastart + (tptr->Fptr)->heapstart;
writeheapstart = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart;
t1heapsize = (fptr->Fptr)->heapsize; /* save original heap size */
(fptr->Fptr)->heapsize = 0; /* reset heap to zero */
/* loop over all cols */
for (jj = 1; jj <= (fptr->Fptr)->tfield && *status <= 0; jj++)
{
ffgtcl(tptr, jj, &typecode, NULL, NULL, status);
if (typecode > 0)
continue; /* ignore fixed length columns */
pixsize = -typecode / 10;
/* copy heap data, row by row */
for (ii = 1; ii <= (fptr->Fptr)->numrows; ii++)
{
ffgdesll(tptr, jj, ii, &repeat, &offset, status);
if (typecode == -TBIT)
nbytes = (long) (repeat + 7) / 8;
else
nbytes = (long) repeat * pixsize;
/* increase size of buffer if necessary to read whole array */
if (nbytes > buffsize)
{
tbuff = realloc(buffer, nbytes);
if (tbuff)
{
buffer = tbuff;
buffsize = nbytes;
}
else
*status = MEMORY_ALLOCATION;
}
/* If this is not the last HDU in the file, then check if */
/* extending the heap would overwrite the following header. */
/* If so, then have to insert more blocks. */
if ( !((fptr->Fptr)->lasthdu) )
{
endpos = writeheapstart + (fptr->Fptr)->heapsize + nbytes;
if (endpos > (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1])
{
/* calc the number of blocks that need to be added */
nblock = (long) (((endpos - 1 -
(fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] )
/ 2880) + 1);
if (ffiblk(fptr, nblock, 1, status) > 0) /* insert blocks */
{
snprintf(message,FLEN_ERRMSG,
"Failed to extend the size of the variable length heap by %ld blocks.",
nblock);
ffpmsg(message);
}
}
}
/* read arrray of bytes from temporary copy */
ffmbyt(tptr, readheapstart + offset, REPORT_EOF, status);
ffgbyt(tptr, nbytes, buffer, status);
/* write arrray of bytes back to original file */
ffmbyt(fptr, writeheapstart + (fptr->Fptr)->heapsize,
IGNORE_EOF, status);
ffpbyt(fptr, nbytes, buffer, status);
/* write descriptor */
ffpdes(fptr, jj, ii, repeat,
(fptr->Fptr)->heapsize, status);
(fptr->Fptr)->heapsize += nbytes; /* update heapsize */
if (*status > 0)
{
free(buffer);
ffclos(tptr, status);
return(*status);
}
}
}
free(buffer);
ffclos(tptr, status);
/* delete any empty blocks at the end of the HDU */
nblock = (long) (( (fptr->Fptr)->headstart[ (fptr->Fptr)->curhdu + 1] -
(writeheapstart + (fptr->Fptr)->heapsize) ) / 2880);
if (nblock > 0)
{
t2heapsize = (fptr->Fptr)->heapsize; /* save new heap size */
(fptr->Fptr)->heapsize = t1heapsize; /* restore original heap size */
ffdblk(fptr, nblock, status);
(fptr->Fptr)->heapsize = t2heapsize; /* reset correct heap size */
}
/* update the PCOUNT value (size of heap) */
ffmaky(fptr, 2, status); /* reset to beginning of header */
ffgkyjj(fptr, "PCOUNT", &pcount, comm, status);
if ((fptr->Fptr)->heapsize != pcount)
{
ffmkyj(fptr, "PCOUNT", (fptr->Fptr)->heapsize, comm, status);
}
ffrdef(fptr, status); /* rescan new HDU structure */
return(*status);
} | movl (%rsi), %eax
testl %eax, %eax
jle 0x3fb39
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0x7c(%rsp), %r15
xorl %esi, %esi
movq %r15, %r8
movq %rbx, %r9
callq 0x3f819
cmpl $0x0, (%r15)
je 0x3fbf7
movq 0x8(%r14), %rax
cmpl $0x2, 0x58(%rax)
jne 0x3fc54
cmpq $0x0, 0x3e0(%rax)
je 0x3fc54
movq 0x60(%rsp), %rax
orq 0x68(%rsp), %rax
je 0x3fc54
cmpl $0x0, (%rbx)
jg 0x3fc54
leaq 0x97428(%rip), %rsi # 0xd6fda
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x10ed0
testl %eax, %eax
je 0x3fc04
movups 0x97440(%rip), %xmm0 # 0xd700a
leaq 0x80(%rsp), %rsi
movups %xmm0, 0x1d(%rsi)
movups 0x97420(%rip), %xmm0 # 0xd6ffd
movaps %xmm0, 0x10(%rsi)
movups 0x97405(%rip), %xmm0 # 0xd6fed
movaps %xmm0, (%rsi)
movl $0x5, %edi
callq 0x37271
jmp 0x3fc54
movl $0x108, (%rbx) # imm = 0x108
movl $0x108, %eax # imm = 0x108
jmp 0x3fc56
movq 0x8(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x1f218
testl %eax, %eax
je 0x3fc68
movups 0x97409(%rip), %xmm0 # 0xd702a
leaq 0x80(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x973e6(%rip), %xmm0 # 0xd701a
movaps %xmm0, (%rsi)
movw $0x70, 0x20(%rsi)
movl $0x5, %edi
callq 0x37271
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6de
movl (%rbx), %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2710, %edi # imm = 0x2710
callq 0x61a0
testq %rax, %rax
je 0x3ff31
movq %rax, %r15
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x3d8(%rax), %rcx
addq 0x88(%rax), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%r14), %rax
movq 0x3d8(%rax), %rdx
movq 0x3e0(%rax), %rcx
movq %rcx, 0x30(%rsp)
addq 0x88(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq $0x0, 0x3e0(%rax)
cmpl $0x0, 0x3b0(%rax)
jle 0x3ff80
movl $0x2710, %ebp # imm = 0x2710
movl $0x1, %eax
movq %rax, 0x10(%rsp)
cmpl $0x0, (%rbx)
jg 0x3ff80
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
leaq 0x70(%rsp), %r8
movq %rbx, %r9
callq 0x3b38e
movl 0x1c(%rsp), %ecx
movq 0x8(%r14), %rax
testl %ecx, %ecx
jle 0x3fd45
movq %r15, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
leal 0x1(%rdx), %ecx
movq %rsi, %rbp
movq %rdi, %r15
cmpl 0x3b0(%rax), %edx
movl %ecx, %eax
movq %rax, 0x10(%rsp)
jl 0x3fce4
jmp 0x3ff83
cmpq $0x0, 0x3c0(%rax)
jle 0x3fd1d
negl %ecx
movl $0xcccccccd, %eax # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x23, %rcx
movq %rcx, 0x38(%rsp)
xorl %edx, %edx
incq %rdx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rdx, 0x50(%rsp)
leaq 0x28(%rsp), %rcx
leaq 0x58(%rsp), %r8
movq %rbx, %r9
callq 0x3f1d4
cmpl $-0x1, 0x1c(%rsp)
movq 0x28(%rsp), %r13
je 0x3fd9d
imulq 0x38(%rsp), %r13
jmp 0x3fdb0
leaq 0x7(%r13), %rax
addq $0xe, %r13
testq %rax, %rax
cmovnsq %rax, %r13
sarq $0x3, %r13
cmpq %rbp, %r13
jle 0x3fdd1
movq %r15, %rdi
movq %r13, %rsi
callq 0x6658
movq %r13, %rcx
movq %rax, %r12
testq %rax, %rax
jne 0x3fdd7
movl $0x71, (%rbx)
movq %r15, %r12
movq %rbp, %rcx
movq %rcx, 0x48(%rsp)
movq 0x8(%r14), %rcx
cmpl $0x0, 0x38(%rcx)
jne 0x3fe75
movq 0x20(%rsp), %rax
addq %r13, %rax
addq 0x3e0(%rcx), %rax
movq 0x68(%rcx), %rdx
movslq 0x54(%rcx), %rcx
movq 0x8(%rdx,%rcx,8), %rcx
cmpq %rcx, %rax
jle 0x3fe75
notq %rcx
addq %rcx, %rax
movabsq $0x2d82d82d82d82d83, %rcx # imm = 0x2D82D82D82D82D83
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x9, %rdx
leaq (%rdx,%rax), %r15
incq %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3f455
testl %eax, %eax
jle 0x3fe75
movl $0x51, %esi
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
leaq 0x97013(%rip), %rdx # 0xd6e71
movq %r15, %rcx
xorl %eax, %eax
callq 0x60b0
movl $0x5, %edi
movq %rbp, %rsi
callq 0x37271
movq 0x8(%rsp), %rdi
movq 0x58(%rsp), %rsi
addq 0x40(%rsp), %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %r15
movq %r12, %rdx
movq %rbx, %rcx
callq 0xc25e0
movq 0x8(%r14), %rax
movq 0x3e0(%rax), %rsi
addq 0x20(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xc1d35
movq 0x28(%rsp), %rcx
movq 0x8(%r14), %rax
movq 0x3e0(%rax), %r8
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x50(%rsp), %r12
movq %r12, %rdx
movq %rbx, %r9
callq 0x3f31e
movq 0x8(%r14), %rax
addq %r13, 0x3e0(%rax)
cmpl $0x0, (%rbx)
jg 0x40062
movq 0x48(%rsp), %rsi
movq %rsi, %rbp
movq %r15, %rdi
cmpq 0x3c0(%rax), %r12
movq %r12, %rdx
jl 0x3fd65
jmp 0x3fd23
movups 0x9711f(%rip), %xmm0 # 0xd7057
leaq 0x80(%rsp), %rsi
movups %xmm0, 0x1b(%rsi)
movups 0x97101(%rip), %xmm0 # 0xd704c
movaps %xmm0, 0x10(%rsi)
movups 0x970e6(%rip), %xmm0 # 0xd703c
movaps %xmm0, (%rsi)
movl $0x5, %edi
callq 0x37271
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6de
movl $0x71, (%rbx)
movl $0x71, %eax
jmp 0x3fc56
movq %r15, %rdi
callq 0x6260
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6de
movq 0x8(%r14), %rcx
movq 0x68(%rcx), %rax
movslq 0x54(%rcx), %rdx
movq 0x8(%rax,%rdx,8), %rax
movq 0x3e0(%rcx), %r15
movq 0x20(%rsp), %rdx
addq %r15, %rdx
subq %rdx, %rax
cmpq $0xb40, %rax # imm = 0xB40
jl 0x3fff6
movabsq $0x2d82d82d82d82d83, %rdx # imm = 0x2D82D82D82D82D83
mulq %rdx
shrq $0x9, %rdx
movq 0x30(%rsp), %rax
movq %rax, 0x3e0(%rcx)
movq %r14, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x4006f
movq 0x8(%r14), %rax
movq %r15, 0x3e0(%rax)
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x6d279
leaq 0x9c0e8(%rip), %rsi # 0xdc0f5
leaq 0x70(%rsp), %r15
leaq 0xe0(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %r8
callq 0x6dd4a
movq 0x8(%r14), %rax
movq 0x3e0(%rax), %rdx
cmpq (%r15), %rdx
je 0x40052
leaq 0x9c0b6(%rip), %rsi # 0xdc0f5
leaq 0xe0(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %r8
callq 0x94d73
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af49
jmp 0x3fc54
movq %r15, %rdi
callq 0x6260
jmp 0x3fc47
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffdblk | int ffdblk(fitsfile *fptr, /* I - FITS file pointer */
long nblocks, /* I - number of 2880-byte blocks to delete */
int *status) /* IO - error status */
/*
Delete the specified number of 2880-byte blocks from the end
of the CHDU by shifting all following extensions up this
number of blocks.
*/
{
char buffer[2880];
int tstatus, ii;
LONGLONG readpos, writepos;
if (*status > 0 || nblocks <= 0)
return(*status);
tstatus = 0;
/* pointers to the read and write positions */
readpos = (fptr->Fptr)->datastart +
(fptr->Fptr)->heapstart +
(fptr->Fptr)->heapsize;
readpos = ((readpos + 2879) / 2880) * 2880; /* start of block */
/* the following formula is wrong because the current data unit
may have been extended without updating the headstart value
of the following HDU.
readpos = (fptr->Fptr)->headstart[((fptr->Fptr)->curhdu) + 1];
*/
writepos = readpos - ((LONGLONG)nblocks * 2880);
while ( !ffmbyt(fptr, readpos, REPORT_EOF, &tstatus) &&
!ffgbyt(fptr, 2880L, buffer, &tstatus) )
{
ffmbyt(fptr, writepos, REPORT_EOF, status);
ffpbyt(fptr, 2880L, buffer, status);
if (*status > 0)
{
ffpmsg("Error deleting FITS blocks (ffdblk)");
return(*status);
}
readpos += 2880; /* increment to next block to transfer */
writepos += 2880;
}
/* now fill the last nblock blocks with zeros */
memset(buffer, 0, 2880);
ffmbyt(fptr, writepos, REPORT_EOF, status);
for (ii = 0; ii < nblocks; ii++)
ffpbyt(fptr, 2880L, buffer, status);
/* move back before the deleted blocks, since they may be deleted */
/* and we do not want to delete the current active buffer */
ffmbyt(fptr, writepos - 1, REPORT_EOF, status);
/* truncate the file to the new size, if supported on this device */
fftrun(fptr, writepos, status);
/* recalculate the starting location of all subsequent HDUs */
for (ii = (fptr->Fptr)->curhdu; ii <= (fptr->Fptr)->maxhdu; ii++)
(fptr->Fptr)->headstart[ii + 1] -= ((LONGLONG)nblocks * 2880);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb68, %rsp # imm = 0xB68
movq %rsi, %r15
movl (%rdx), %eax
testl %eax, %eax
setg %cl
testq %rsi, %rsi
setle %sil
orb %cl, %sil
jne 0x40267
movq %rdi, %r14
movq %rdx, (%rsp)
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x8(%rdi), %rax
movq 0x3d8(%rax), %rbx
addq 0x88(%rax), %rbx
addq 0x3e0(%rax), %rbx
leaq 0xb3f(%rbx), %r13
movabsq $0x2d82d82d82d82d83, %rdx # imm = 0x2D82D82D82D82D83
movq %r13, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x9, %rdx
addq %rax, %rdx
imulq $0xb40, %rdx, %rbp # imm = 0xB40
imulq $0xb40, %r15, %rax # imm = 0xB40
movq %rbp, %r12
movq %rax, 0x18(%rsp)
subq %rax, %r12
movq %rbp, %rsi
xorl %edx, %edx
callq 0xc1ad4
testl %eax, %eax
je 0x401af
leaq 0x20(%rsp), %r13
movl $0xb40, %edx # imm = 0xB40
movq %r13, %rdi
xorl %esi, %esi
callq 0x6090
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq (%rsp), %rbx
movq %rbx, %rcx
callq 0xc1ad4
movl $0xb40, %esi # imm = 0xB40
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xc1d35
decq %r15
jne 0x4013d
leaq -0x1(%r12), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x16373
movq 0x8(%r14), %rdx
movslq 0x54(%rdx), %rcx
movl 0x60(%rdx), %eax
cmpl %eax, %ecx
movq 0x18(%rsp), %rsi
jg 0x40265
movq 0x68(%rdx), %rdx
subl %ecx, %eax
incl %eax
leaq (%rdx,%rcx,8), %rcx
addq $0x8, %rcx
xorl %edx, %edx
subq %rsi, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x4019f
jmp 0x40265
subq %rbp, %r13
subq %r13, %rbx
addq $0x167f, %rbx # imm = 0x167F
movq %rbx, 0x10(%rsp)
leaq 0x20(%rsp), %rbp
leaq 0xc(%rsp), %rcx
movl $0xb40, %esi # imm = 0xB40
movq %r14, %rdi
movq %rbp, %rdx
movq %rcx, %rbx
callq 0xc25e0
testl %eax, %eax
jne 0x40115
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r12, %r13
movq (%rsp), %r12
movq %r12, %rcx
callq 0xc1ad4
movl $0xb40, %esi # imm = 0xB40
movq %r14, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0xc1d35
cmpl $0x0, (%r12)
jg 0x40250
movl $0xb40, %eax # imm = 0xB40
addq %rax, %r13
movq %r14, %rdi
movq 0x10(%rsp), %r12
movq %r12, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq %rbx, %rcx
movl $0xb40, %edx # imm = 0xB40
addq %rdx, %r12
movq %r12, 0x10(%rsp)
testl %eax, %eax
movq %r13, %r12
je 0x401cb
jmp 0x40115
leaq 0x9712c(%rip), %rsi # 0xd7383
movl $0x5, %edi
callq 0x37271
movq (%rsp), %rbx
movl (%rbx), %eax
addq $0xb68, %rsp # imm = 0xB68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffgdess | int ffgdess(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - column number (1 = 1st column of table) */
LONGLONG firstrow, /* I - first row (1 = 1st row of table) */
LONGLONG nrows, /* I - number or rows to read */
long *length, /* O - number of elements in the row */
long *heapaddr, /* O - heap pointer to the data */
int *status) /* IO - error status */
/*
get (read) a range of variable length vector descriptors from the table.
*/
{
LONGLONG rowsize, bytepos;
long ii;
INT32BIT descript4[2] = {0,0};
LONGLONG descript8[2] = {0,0};
tcolumn *colptr;
if (*status > 0)
return(*status);
/* reset position to the correct HDU if necessary */
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
else if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
if ( ffrdef(fptr, status) > 0) /* rescan header */
return(*status);
colptr = (fptr->Fptr)->tableptr; /* point to first column structure */
colptr += (colnum - 1); /* offset to the correct column */
if (colptr->tdatatype >= 0) {
*status = NOT_VARI_LEN;
return(*status);
}
rowsize = (fptr->Fptr)->rowlength;
bytepos = (fptr->Fptr)->datastart +
(rowsize * (firstrow - 1)) +
colptr->tbcol;
if (colptr->tform[0] == 'P' || colptr->tform[1] == 'P')
{
/* read 4-byte descriptors */
for (ii = 0; ii < nrows; ii++)
{
/* read descriptors */
if (ffgi4b(fptr, bytepos, 2, 4, descript4, status) <= 0)
{
if (length) {
*length = (long) descript4[0]; /* 1st word is the length */
length++;
}
if (heapaddr) {
*heapaddr = (long) descript4[1]; /* 2nd word is the address */
heapaddr++;
}
bytepos += rowsize;
}
else
return(*status);
}
}
else /* this is for 'Q' columns */
{
/* read 8-byte descriptors */
for (ii = 0; ii < nrows; ii++)
{
/* read descriptors */
if (ffgi8b(fptr, bytepos, 2, 8, (long *) descript8, status) <= 0)
{
if (length) {
if (descript8[0] > LONG_MAX)*status = NUM_OVERFLOW;
*length = (long) descript8[0]; /* 1st word is the length */
length++;
}
if (heapaddr) {
if (descript8[1] > LONG_MAX)*status = NUM_OVERFLOW;
*heapaddr = (long) descript8[1]; /* 2nd word is the address */
heapaddr++;
}
bytepos += rowsize;
}
else
return(*status);
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movq 0x60(%rsp), %r9
movq $0x0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movl (%r9), %eax
testl %eax, %eax
jg 0x4046a
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r13
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
jne 0x40330
cmpq $-0x1, 0x88(%rax)
jne 0x40344
movq %r13, %rdi
movq %r9, %rsi
callq 0x3af49
movq 0x60(%rsp), %r9
testl %eax, %eax
jg 0x4045e
jmp 0x40344
incl %esi
movq %r13, %rdi
xorl %edx, %edx
movq %r9, %rcx
callq 0x37f5e
movq 0x60(%rsp), %r9
movq 0x8(%r13), %rcx
movq 0x3d0(%rcx), %rax
movslq %ebx, %rdx
leaq (%rdx,%rdx,4), %rdx
shlq $0x5, %rdx
cmpl $0x0, -0x50(%rax,%rdx)
js 0x40372
movl $0x13d, (%r9) # imm = 0x13D
movl $0x13d, %eax # imm = 0x13D
jmp 0x4046a
addq %rdx, %rax
movq 0x3c8(%rcx), %rbx
decq %r15
imulq %rbx, %r15
addq 0x88(%rcx), %r15
addq -0x58(%rax), %r15
cmpb $0x50, -0x14(%rax)
je 0x4039a
cmpb $0x50, -0x13(%rax)
jne 0x40401
testq %r14, %r14
jle 0x4045e
movl $0x2, %edx
movl $0x4, %ecx
movq %r13, %rdi
movq %r15, %rsi
leaq 0x8(%rsp), %r8
callq 0xc2eee
testl %eax, %eax
jg 0x40463
testq %rbp, %rbp
je 0x403d9
movslq 0x8(%rsp), %rax
movq %rax, (%rbp)
addq $0x8, %rbp
jmp 0x403db
xorl %ebp, %ebp
movq 0x60(%rsp), %r9
testq %r12, %r12
je 0x403f4
movslq 0xc(%rsp), %rax
movq %rax, (%r12)
addq $0x8, %r12
jmp 0x403f7
xorl %r12d, %r12d
addq %rbx, %r15
decq %r14
jne 0x403a3
jmp 0x4045e
testq %r14, %r14
jle 0x4045e
movl $0x2, %edx
movl $0x8, %ecx
movq %r13, %rdi
movq %r15, %rsi
leaq 0x10(%rsp), %r8
callq 0xc2fae
testl %eax, %eax
jg 0x40463
testq %rbp, %rbp
je 0x40438
movq 0x10(%rsp), %rax
movq %rax, (%rbp)
addq $0x8, %rbp
jmp 0x4043a
xorl %ebp, %ebp
movq 0x60(%rsp), %r9
testq %r12, %r12
je 0x40453
movq 0x18(%rsp), %rax
movq %rax, (%r12)
addq $0x8, %r12
jmp 0x40456
xorl %r12d, %r12d
addq %rbx, %r15
decq %r14
jne 0x40406
movl (%r9), %eax
jmp 0x4046a
movq 0x60(%rsp), %rax
movl (%rax), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffchdu | int ffchdu(fitsfile *fptr, /* I - FITS file pointer */
int *status) /* IO - error status */
{
/*
close the current HDU. If we have write access to the file, then:
- write the END keyword and pad header with blanks if necessary
- check the data fill values, and rewrite them if not correct
*/
char message[FLEN_ERRMSG];
int ii, stdriver, ntilebins;
/* reset position to the correct HDU if necessary */
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
{
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
/* no need to do any further updating of the HDU */
}
else if ((fptr->Fptr)->writemode == 1)
{
urltype2driver("stream://", &stdriver);
/* don't rescan header in special case of writing to stdout */
if (((fptr->Fptr)->driver != stdriver))
ffrdef(fptr, status);
if ((fptr->Fptr)->heapsize > 0) {
ffuptf(fptr, status); /* update the variable length TFORM values */
}
ffpdfl(fptr, status); /* insure correct data fill values */
}
if ((fptr->Fptr)->open_count == 1)
{
/* free memory for the CHDU structure only if no other files are using it */
if ((fptr->Fptr)->tableptr)
{
free((fptr->Fptr)->tableptr);
(fptr->Fptr)->tableptr = NULL;
/* free the tile-compressed image cache, if it exists */
if ((fptr->Fptr)->tilerow) {
ntilebins =
(((fptr->Fptr)->znaxis[0] - 1) / ((fptr->Fptr)->tilesize[0])) + 1;
for (ii = 0; ii < ntilebins; ii++) {
if ((fptr->Fptr)->tiledata[ii]) {
free((fptr->Fptr)->tiledata[ii]);
}
if ((fptr->Fptr)->tilenullarray[ii]) {
free((fptr->Fptr)->tilenullarray[ii]);
}
}
free((fptr->Fptr)->tileanynull);
free((fptr->Fptr)->tiletype);
free((fptr->Fptr)->tiledatasize);
free((fptr->Fptr)->tilenullarray);
free((fptr->Fptr)->tiledata);
free((fptr->Fptr)->tilerow);
(fptr->Fptr)->tileanynull = 0;
(fptr->Fptr)->tiletype = 0;
(fptr->Fptr)->tiledatasize = 0;
(fptr->Fptr)->tilenullarray = 0;
(fptr->Fptr)->tiledata = 0;
(fptr->Fptr)->tilerow = 0;
}
}
}
if (*status > 0 && *status != NO_CLOSE_ERROR)
{
snprintf(message,FLEN_ERRMSG,
"Error while closing HDU number %d (ffchdu).", (fptr->Fptr)->curhdu);
ffpmsg(message);
}
return(*status);
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
jne 0x406a2
cmpl $0x1, 0x5c(%rax)
jne 0x406b1
leaq 0x8c937(%rip), %rdi # 0xccf8f
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0xd64f
movq 0x8(%r14), %rax
movl 0x4(%rax), %ecx
cmpl (%r15), %ecx
je 0x40680
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af49
movq 0x8(%r14), %rax
cmpq $0x0, 0x3e0(%rax)
jle 0x40695
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4081a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x40b1c
jmp 0x406b1
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r14), %rcx
cmpl $0x1, 0x8(%rcx)
jne 0x407cc
movq 0x3d0(%rcx), %rdi
testq %rdi, %rdi
je 0x407cc
callq 0x6260
movq 0x8(%r14), %rcx
movq $0x0, 0x3d0(%rcx)
cmpq $0x0, 0x530(%rcx)
je 0x407cc
movq 0x498(%rcx), %rax
decq %rax
cqto
idivq 0x440(%rcx)
movq %rax, %r15
cmpl $0x7ffffffe, %r15d # imm = 0x7FFFFFFE
ja 0x40754
incl %r15d
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movq 0x548(%rax), %rcx
movq (%rcx,%r12,8), %rdi
testq %rdi, %rdi
je 0x40733
callq 0x6260
movq 0x8(%r14), %rax
movq 0x550(%rax), %rax
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x40748
callq 0x6260
incq %r12
cmpq %r12, %r15
jne 0x40716
movq 0x8(%r14), %rcx
movq 0x558(%rcx), %rdi
callq 0x6260
movq 0x8(%r14), %rax
movq 0x540(%rax), %rdi
callq 0x6260
movq 0x8(%r14), %rax
movq 0x538(%rax), %rdi
callq 0x6260
movq 0x8(%r14), %rax
movq 0x550(%rax), %rdi
callq 0x6260
movq 0x8(%r14), %rax
movq 0x548(%rax), %rdi
callq 0x6260
movq 0x8(%r14), %rax
movq 0x530(%rax), %rdi
callq 0x6260
movq 0x8(%r14), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x550(%rcx)
movups %xmm0, 0x540(%rcx)
movups %xmm0, 0x530(%rcx)
movl (%rbx), %eax
testl %eax, %eax
setle %dl
cmpl $0x3e7, %eax # imm = 0x3E7
sete %sil
orb %dl, %sil
jne 0x4080e
movl 0x54(%rcx), %ecx
leaq 0x968b0(%rip), %rdx # 0xd709b
leaq 0x10(%rsp), %r14
movl $0x51, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x60b0
movl $0x5, %edi
movq %r14, %rsi
callq 0x37271
movl (%rbx), %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffpdfl | int ffpdfl(fitsfile *fptr, /* I - FITS file pointer */
int *status) /* IO - error status */
/*
Write the Data Unit Fill values if they are not already correct.
The fill values are used to fill out the last 2880 byte block of the HDU.
Fill the data unit with zeros or blanks depending on the type of HDU
from the end of the data to the end of the current FITS 2880 byte block
*/
{
char chfill, fill[2880];
LONGLONG fillstart;
int nfill, tstatus, ii;
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
return(*status); /* fill has already been correctly written */
if ((fptr->Fptr)->heapstart == 0)
return(*status); /* null data unit, so there is no fill */
fillstart = (fptr->Fptr)->datastart + (fptr->Fptr)->heapstart +
(fptr->Fptr)->heapsize;
nfill = (long) ((fillstart + 2879) / 2880 * 2880 - fillstart);
if (nfill >= 2880) /* can only happen if fillstart was negative */
{
*status = BAD_HEAP_PTR;
return (*status);
}
if ((fptr->Fptr)->hdutype == ASCII_TBL)
chfill = 32; /* ASCII tables are filled with spaces */
else
chfill = 0; /* all other extensions are filled with zeros */
tstatus = 0;
if (!nfill) /* no fill bytes; just check that entire table exists */
{
fillstart--;
nfill = 1;
ffmbyt(fptr, fillstart, REPORT_EOF, &tstatus); /* move to last byte */
ffgbyt(fptr, nfill, fill, &tstatus); /* get the last byte */
if (tstatus == 0)
return(*status); /* no EOF error, so everything is OK */
}
else
{
ffmbyt(fptr, fillstart, REPORT_EOF, &tstatus); /* move to fill area */
ffgbyt(fptr, nfill, fill, &tstatus); /* get the fill bytes */
if (tstatus == 0)
{
for (ii = 0; ii < nfill; ii++)
{
if (fill[ii] != chfill)
break;
}
if (ii == nfill)
return(*status); /* all the fill values were correct */
}
}
/* fill values are incorrect or have not been written, so write them */
memset(fill, chfill, nfill); /* fill the buffer with the fill value */
ffmbyt(fptr, fillstart, IGNORE_EOF, status); /* move to fill area */
ffpbyt(fptr, nfill, fill, status); /* write the fill bytes */
if (*status > 0)
ffpmsg("Error writing Data Unit fill bytes (ffpdfl).");
return(*status);
} | movl (%rsi), %eax
testl %eax, %eax
jle 0x40b23
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb58, %rsp # imm = 0xB58
movq %rdi, %r14
movl (%rdi), %edx
movq 0x8(%rdi), %rcx
cmpl 0x54(%rcx), %edx
jne 0x40c92
movq 0x3d8(%rcx), %r15
testq %r15, %r15
je 0x40c92
movq %rsi, %rbx
addq 0x88(%rcx), %r15
addq 0x3e0(%rcx), %r15
movl $0xb3f, %r12d # imm = 0xB3F
leaq (%r15,%r12), %rax
movabsq $0x2d82d82d82d82d83, %rdx # imm = 0x2D82D82D82D82D83
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x9, %rdx
addq %rax, %rdx
imulq $0xb40, %rdx, %rax # imm = 0xB40
negq %rax
addq %r15, %rax
addq $0xb3f, %rax # imm = 0xB3F
testq %rax, %rax
js 0x40bff
cmpl $0x1, 0x58(%rcx)
sete %bpl
shlb $0x5, %bpl
movl $0x0, 0xc(%rsp)
cmpq $0xb3f, %rax # imm = 0xB3F
jne 0x40c0f
decq %r15
leaq 0xc(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xc1ad4
movl $0x1, %r12d
leaq 0x10(%rsp), %rdx
movl $0x1, %esi
movq %r14, %rdi
movq %r13, %rcx
callq 0xc25e0
cmpl $0x0, (%r13)
jne 0x40c41
jmp 0x40c90
movl $0x108, (%rbx) # imm = 0x108
movl $0x108, %eax # imm = 0x108
jmp 0x40c92
subq %rax, %r12
leaq 0xc(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xc1ad4
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xc25e0
cmpl $0x0, (%r13)
je 0x40ca4
movzbl %bpl, %esi
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rdx
callq 0x6090
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xc1d35
movl (%rbx), %eax
testl %eax, %eax
jle 0x40c92
leaq 0x96505(%rip), %rsi # 0xd718b
movl $0x5, %edi
callq 0x37271
movl (%rbx), %eax
addq $0xb58, %rsp # imm = 0xB58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
cmpb %bpl, 0x10(%rsp,%rax)
jne 0x40cb7
incq %rax
cmpq %rax, %r12
jne 0x40ca6
jmp 0x40c90
cmpq %rax, %r12
jne 0x40c41
jmp 0x40c90
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffchfl | int ffchfl( fitsfile *fptr, int *status)
{
int nblank,i,gotend;
LONGLONG endpos;
char rec[FLEN_CARD];
char *blanks=" "; /* 80 spaces */
if( *status > 0 ) return (*status);
/* reset position to the correct HDU if necessary */
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
/* calculate the number of blank keyword slots in the header */
endpos=(fptr->Fptr)->headend;
nblank=(long) (((fptr->Fptr)->datastart-endpos)/80);
/* move the i/o pointer to the end of the header keywords */
ffmbyt(fptr,endpos,TRUE,status);
/* find the END card (there may be blank keywords perceeding it) */
gotend=FALSE;
for(i=0;i<nblank;i++) {
ffgbyt(fptr,80,rec,status);
if( !strncmp(rec, "END ", 8) ) {
if( gotend ) {
/* There is a duplicate END record */
*status=BAD_HEADER_FILL;
ffpmsg("Warning: Header fill area contains duplicate END card:");
}
gotend=TRUE;
if( strncmp( rec+8, blanks+8, 72) ) {
/* END keyword has extra characters */
*status=END_JUNK;
ffpmsg(
"Warning: END keyword contains extraneous non-blank characters:");
}
} else if( gotend ) {
if( strncmp( rec, blanks, 80 ) ) {
/* The fill area contains extraneous characters */
*status=BAD_HEADER_FILL;
ffpmsg(
"Warning: Header fill area contains extraneous non-blank characters:");
}
}
if( *status > 0 ) {
rec[FLEN_CARD - 1] = '\0'; /* make sure string is null terminated */
ffpmsg(rec);
return( *status );
}
}
return( *status );
} | movl (%rsi), %eax
testl %eax, %eax
jle 0x40d76
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
je 0x40da8
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r14), %rax
movq 0x70(%rax), %rsi
movq 0x88(%rax), %rax
subq %rsi, %rax
movabsq $0x6666666666666667, %rcx # imm = 0x6666666666666667
imulq %rcx
movq %rdx, %r15
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %r15
addl %eax, %r15d
movq %r14, %rdi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
testl %r15d, %r15d
jle 0x40eb3
xorl %ebp, %ebp
movq %rsp, %r13
movabsq $0x2020202020444e45, %r12 # imm = 0x2020202020444E45
movl $0x50, %esi
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xc25e0
cmpq %r12, (%rsp)
jne 0x40e54
testl %ebp, %ebp
je 0x40e30
movl $0xfe, (%rbx)
movl $0x5, %edi
leaq 0x963de(%rip), %rsi # 0xd7209
callq 0x37271
movl $0x48, %edx
leaq 0x8(%rsp), %rdi
leaq 0x9637f(%rip), %rsi # 0xd71c0
callq 0x6340
movl $0xfd, %ecx
leaq 0x963ee(%rip), %rsi # 0xd7240
jmp 0x40e78
testl %ebp, %ebp
je 0x40e9e
movl $0x50, %edx
movq %r13, %rdi
leaq 0x96351(%rip), %rsi # 0xd71b8
callq 0x6340
movl $0xfe, %ecx
leaq 0x96407(%rip), %rsi # 0xd727f
testl %eax, %eax
je 0x40e88
movl %ecx, (%rbx)
movl $0x5, %edi
callq 0x37271
movl $0x1, %ebp
movl (%rbx), %eax
testl %eax, %eax
jg 0x40ea2
decl %r15d
jne 0x40dfc
jmp 0x40eb5
xorl %ebp, %ebp
jmp 0x40e8d
movq %rsp, %rsi
movb $0x0, 0x50(%rsi)
movl $0x5, %edi
callq 0x37271
movl (%rbx), %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffcrhd | int ffcrhd(fitsfile *fptr, /* I - FITS file pointer */
int *status) /* IO - error status */
/*
CReate Header Data unit: Create, initialize, and move the i/o pointer
to a new extension appended to the end of the FITS file.
*/
{
int tstatus = 0;
LONGLONG bytepos, *ptr;
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
/* If the current header is empty, we don't have to do anything */
if ((fptr->Fptr)->headend == (fptr->Fptr)->headstart[(fptr->Fptr)->curhdu] )
return(*status);
while (ffmrhd(fptr, 1, 0, &tstatus) == 0); /* move to end of file */
if ((fptr->Fptr)->maxhdu == (fptr->Fptr)->MAXHDU)
{
/* allocate more space for the headstart array */
ptr = (LONGLONG*) realloc( (fptr->Fptr)->headstart,
((fptr->Fptr)->MAXHDU + 1001) * sizeof(LONGLONG) );
if (ptr == NULL)
return (*status = MEMORY_ALLOCATION);
else {
(fptr->Fptr)->MAXHDU = (fptr->Fptr)->MAXHDU + 1000;
(fptr->Fptr)->headstart = ptr;
}
}
if (ffchdu(fptr, status) <= 0) /* close the current HDU */
{
bytepos = (fptr->Fptr)->headstart[(fptr->Fptr)->maxhdu + 1]; /* last */
ffmbyt(fptr, bytepos, IGNORE_EOF, status); /* move file ptr to it */
(fptr->Fptr)->maxhdu++; /* increment the known number of HDUs */
(fptr->Fptr)->curhdu = (fptr->Fptr)->maxhdu; /* set current HDU loc */
fptr->HDUposition = (fptr->Fptr)->maxhdu; /* set current HDU loc */
(fptr->Fptr)->nextkey = bytepos; /* next keyword = start of header */
(fptr->Fptr)->headend = bytepos; /* end of header */
(fptr->Fptr)->datastart = DATA_UNDEFINED; /* start data unit undefined */
/* any other needed resets */
/* reset the dithering offset that may have been calculated for the */
/* previous HDU back to the requested default value */
(fptr->Fptr)->dither_seed = (fptr->Fptr)->request_dither_seed;
}
return(*status);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
movl (%rsi), %eax
testl %eax, %eax
jg 0x410f3
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
je 0x41020
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r14), %rax
movl 0x54(%rax), %esi
movq 0x68(%rax), %rcx
movq 0x70(%rax), %rax
movslq %esi, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x410f1
leaq 0xc(%rsp), %r15
movl (%r14), %esi
addl $0x2, %esi
movq %r14, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x37f5e
cmpl $0x0, 0xc(%rsp)
je 0x4103a
movq 0x8(%r14), %rax
movslq 0x64(%rax), %rcx
cmpl %ecx, 0x60(%rax)
jne 0x4108a
movq 0x68(%rax), %rdi
leaq 0x1f48(,%rcx,8), %rsi
callq 0x6658
testq %rax, %rax
je 0x410fd
movq 0x8(%r14), %rcx
addl $0x3e8, 0x64(%rcx) # imm = 0x3E8
movq %rax, 0x68(%rcx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4062f
testl %eax, %eax
jg 0x410f1
movq 0x8(%r14), %rax
movq 0x68(%rax), %rcx
movslq 0x60(%rax), %rax
movq 0x8(%rcx,%rax,8), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x8(%r14), %rax
movl 0x60(%rax), %ecx
incl %ecx
movl %ecx, 0x60(%rax)
movl %ecx, 0x54(%rax)
movl %ecx, (%r14)
movq %r15, 0x80(%rax)
movq %r15, 0x70(%rax)
movq $-0x1, 0x88(%rax)
movl 0x428(%rax), %ecx
movl %ecx, 0x478(%rax)
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x71, (%rbx)
movl $0x71, %eax
jmp 0x410f3
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffgipr | int ffgipr(fitsfile *infptr, /* I - FITS file pointer */
int maxaxis, /* I - max number of axes to return */
int *bitpix, /* O - image data type */
int *naxis, /* O - image dimension (NAXIS value) */
long *naxes, /* O - size of image dimensions */
int *status) /* IO - error status */
/*
get the datatype and size of the input image
*/
{
if (*status > 0)
return(*status);
/* don't return the parameter if a null pointer was given */
if (bitpix)
fits_get_img_type(infptr, bitpix, status); /* get BITPIX value */
if (naxis)
fits_get_img_dim(infptr, naxis, status); /* get NAXIS value */
if (naxes)
fits_get_img_size(infptr, maxaxis, naxes, status); /* get NAXISn values */
return(*status);
} | movl (%r9), %eax
testl %eax, %eax
jle 0x41191
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r12
movl %esi, %ebp
movq %rdi, %r15
testq %rdx, %rdx
je 0x411ba
movq %r15, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x411ed
testq %r12, %r12
je 0x411cd
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x41290
testq %r14, %r14
je 0x411e2
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4130e
movl (%rbx), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffgisz | int ffgisz( fitsfile *fptr, /* I - FITS file pointer */
int nlen, /* I - number of axes to return */
long *naxes, /* O - size of image dimensions */
int *status) /* IO - error status */
/*
Get the size of the image dimensions (= NAXISn keywords for normal image, or
ZNAXISn for a compressed image)
These values are cached for faster access.
*/
{
int ii, naxis;
if (*status > 0)
return(*status);
/* reset position to the correct HDU if necessary */
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
else if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
if ( ffrdef(fptr, status) > 0) /* rescan header */
return(*status);
if ((fptr->Fptr)->hdutype == IMAGE_HDU)
{
naxis = minvalue((fptr->Fptr)->imgdim, nlen);
for (ii = 0; ii < naxis; ii++)
{
naxes[ii] = (long) (fptr->Fptr)->imgnaxis[ii];
}
}
else if ((fptr->Fptr)->compressimg)
{
naxis = minvalue( (fptr->Fptr)->zndim, nlen);
for (ii = 0; ii < naxis; ii++)
{
naxes[ii] = (long) (fptr->Fptr)->znaxis[ii];
}
}
else
{
*status = NOT_IMAGE;
}
return(*status);
} | movl (%rcx), %eax
testl %eax, %eax
jle 0x41315
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
jne 0x4134d
cmpq $-0x1, 0x88(%rax)
jne 0x4135c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3af49
testl %eax, %eax
jg 0x413c7
jmp 0x4135c
incl %esi
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r15), %rax
cmpl $0x0, 0x58(%rax)
je 0x41398
cmpl $0x0, 0x47c(%rax)
je 0x413c1
movl 0x490(%rax), %ecx
cmpl %ebp, %ecx
cmovll %ecx, %ebp
testl %ebp, %ebp
jle 0x413c7
movl %ebp, %ecx
xorl %edx, %edx
movq 0x498(%rax,%rdx,8), %rsi
movq %rsi, (%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x41382
jmp 0x413c7
movl 0x90(%rax), %ecx
cmpl %ebp, %ecx
cmovll %ecx, %ebp
testl %ebp, %ebp
jle 0x413c7
movl %ebp, %ecx
xorl %edx, %edx
movq 0x98(%rax,%rdx,8), %rsi
movq %rsi, (%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x413ab
jmp 0x413c7
movl $0xe9, (%rbx)
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffgext | int ffgext(fitsfile *fptr, /* I - FITS file pointer */
int hdunum, /* I - no. of HDU to move get (0 based) */
int *exttype, /* O - type of extension, 0, 1, or 2 */
int *status) /* IO - error status */
/*
Get Extension. Move to the specified extension and initialize the
HDU structure.
*/
{
int xcurhdu, xmaxhdu;
LONGLONG xheadend;
if (*status > 0)
return(*status);
if (ffmbyt(fptr, (fptr->Fptr)->headstart[hdunum], REPORT_EOF, status) <= 0)
{
/* temporarily save current values, in case of error */
xcurhdu = (fptr->Fptr)->curhdu;
xmaxhdu = (fptr->Fptr)->maxhdu;
xheadend = (fptr->Fptr)->headend;
/* set new parameter values */
(fptr->Fptr)->curhdu = hdunum;
fptr->HDUposition = hdunum;
(fptr->Fptr)->maxhdu = maxvalue((fptr->Fptr)->maxhdu, hdunum);
(fptr->Fptr)->headend = (fptr->Fptr)->logfilesize; /* set max size */
if (ffrhdu(fptr, exttype, status) > 0)
{ /* failed to get the new HDU, so restore previous values */
(fptr->Fptr)->curhdu = xcurhdu;
fptr->HDUposition = xcurhdu;
(fptr->Fptr)->maxhdu = xmaxhdu;
(fptr->Fptr)->headend = xheadend;
}
}
return(*status);
} | movl (%rcx), %eax
testl %eax, %eax
jle 0x417fb
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x68(%rax), %rax
movslq %esi, %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
testl %eax, %eax
jg 0x41883
movq 0x8(%r14), %rax
movl 0x54(%rax), %r12d
movl 0x60(%rax), %r13d
movq 0x70(%rax), %rcx
movq %rcx, (%rsp)
movl %ebp, 0x54(%rax)
movl %ebp, (%r14)
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movl %ebp, 0x60(%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x70(%rax)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3c087
testl %eax, %eax
jle 0x41883
movq 0x8(%r14), %rax
movl %r12d, 0x54(%rax)
movl %r12d, (%r14)
movl %r13d, 0x60(%rax)
movq (%rsp), %rcx
movq %rcx, 0x70(%rax)
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffc2x | int ffc2x(const char *cval, /* I - formatted string representation of the value */
char *dtype, /* O - datatype code: C, L, F, I or X */
/* Only one of the following will be defined, depending on datatype */
long *ival, /* O - integer value */
int *lval, /* O - logical value */
char *sval, /* O - string value */
double *dval, /* O - double value */
int *status) /* IO - error status */
/*
high level routine to convert formatted character string to its
intrinsic data type
*/
{
ffdtyp(cval, dtype, status); /* determine the datatype */
if (*dtype == 'I')
ffc2ii(cval, ival, status);
else if (*dtype == 'F')
ffc2dd(cval, dval, status);
else if (*dtype == 'L')
ffc2ll(cval, lval, status);
else
ffc2s(cval, sval, status); /* C and X formats */
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movq %r8, %r12
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0x40(%rsp), %rbx
movq %rbx, %rdx
callq 0x429b8
movzbl (%r15), %eax
cmpl $0x46, %eax
je 0x42d82
cmpl $0x4c, %eax
je 0x42d6c
movq %r14, %rdi
cmpl $0x49, %eax
jne 0x42d92
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3a10c
jmp 0x42d9d
cmpl $0x0, (%rbx)
jg 0x42d9d
xorl %eax, %eax
cmpb $0x54, (%r14)
sete %al
movq (%rsp), %rcx
movl %eax, (%rcx)
jmp 0x42d9d
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x3de77
jmp 0x42d9d
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3c9a1
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffc2uxx | int ffc2uxx(const char *cval, /* I - formatted string representation of the value */
char *dtype, /* O - datatype code: C, L, F, I or X */
/* Only one of the following will be defined, depending on datatype */
ULONGLONG *ival, /* O - integer value */
int *lval, /* O - logical value */
char *sval, /* O - string value */
double *dval, /* O - double value */
int *status) /* IO - error status */
/*
high level routine to convert formatted character string to its
intrinsic data type
*/
{
ffdtyp(cval, dtype, status); /* determine the datatype */
if (*dtype == 'I')
ffc2ujj(cval, ival, status);
else if (*dtype == 'F')
ffc2dd(cval, dval, status);
else if (*dtype == 'L')
ffc2ll(cval, lval, status);
else
ffc2s(cval, sval, status); /* C and X formats */
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movq %r8, %r12
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0x40(%rsp), %rbx
movq %rbx, %rdx
callq 0x429b8
movzbl (%r15), %eax
cmpl $0x46, %eax
je 0x42eb6
cmpl $0x4c, %eax
je 0x42ea0
movq %r14, %rdi
cmpl $0x49, %eax
jne 0x42ec6
movq %r13, %rsi
movq %rbx, %rdx
callq 0x42ee2
jmp 0x42ed1
cmpl $0x0, (%rbx)
jg 0x42ed1
xorl %eax, %eax
cmpb $0x54, (%r14)
sete %al
movq (%rsp), %rcx
movl %eax, (%rcx)
jmp 0x42ed1
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x3de77
jmp 0x42ed1
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3c9a1
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffc2d | int ffc2d(const char *cval, /* I - string representation of the value */
double *dval, /* O - numerical value of the input string */
int *status) /* IO - error status */
/*
convert formatted string to a double value, doing implicit
datatype conversion if necessary
*/
{
char dtype, sval[81], msg[81];
int lval;
if (*status > 0) /* inherit input status value if > 0 */
return(*status);
if (cval[0] == '\0')
return(*status = VALUE_UNDEFINED); /* null value string */
ffdtyp(cval, &dtype, status); /* determine the datatype */
if (dtype == 'I' || dtype == 'F')
ffc2dd(cval, dval, status);
else if (dtype == 'L')
{
ffc2ll(cval, &lval, status);
*dval = (double) lval;
}
else if (dtype == 'C')
{
/* try reading the string as a number */
ffc2s(cval, sval, status);
ffc2dd(sval, dval, status);
}
else
*status = BAD_DOUBLEKEY;
if (*status > 0)
{
*dval = 0.;
strcpy(msg,"Error in ffc2d evaluating string as a double: ");
strncat(msg,cval,30);
ffpmsg(msg);
return(*status);
}
return(*status);
} | movl (%rdx), %eax
testl %eax, %eax
jle 0x4358a
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x435db
movq %rsi, %r15
leaq 0xf(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x429b8
movzbl (%r12), %eax
addl $-0x43, %eax
cmpl $0x9, %eax
ja 0x43631
leaq 0x91a97(%rip), %rcx # 0xd5064
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
jmp 0x43601
movl $0xcc, (%rbx)
movl $0xcc, %eax
jmp 0x43685
leaq 0x70(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3c9a1
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3de77
jmp 0x43629
xorps %xmm0, %xmm0
cmpl $0x0, (%rbx)
jg 0x43624
cmpb $0x54, (%r14)
jne 0x43624
movsd 0x85a5c(%rip), %xmm0 # 0xc9080
movsd %xmm0, (%r15)
movl (%rbx), %eax
testl %eax, %eax
jg 0x43637
jmp 0x43685
movl $0x196, (%rbx) # imm = 0x196
movq $0x0, (%r15)
movups 0x94155(%rip), %xmm0 # 0xd779a
leaq 0x10(%rsp), %r15
movups %xmm0, 0x1f(%r15)
movups 0x94135(%rip), %xmm0 # 0xd778b
movaps %xmm0, 0x10(%r15)
movups 0x94119(%rip), %xmm0 # 0xd777b
movaps %xmm0, (%r15)
movl $0x1e, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x60f0
movl $0x5, %edi
movq %r15, %rsi
callq 0x37271
movl (%rbx), %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
fits_strncasecmp | int fits_strncasecmp(const char *s1, const char *s2, size_t n)
{
char c1, c2;
for (; n-- ;) {
c1 = toupper( *s1 );
c2 = toupper( *s2 );
if (c1 < c2) return(-1);
if (c1 > c2) return(1);
if (c1 == 0) return(0);
s1++;
s2++;
}
return(0);
} | testq %rdx, %rdx
je 0x43759
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x6230
movq (%rax), %rcx
decq %rbx
xorl %edx, %edx
movsbq (%r15,%rdx), %rax
movl (%rcx,%rax,4), %esi
movsbq (%r14,%rdx), %rax
movsbl (%rcx,%rax,4), %eax
movsbl %sil, %edi
shll $0x18, %esi
cmpl %eax, %edi
jl 0x4375c
jg 0x43763
xorl %eax, %eax
testl %esi, %esi
je 0x43768
leaq 0x1(%rdx), %rsi
cmpq %rdx, %rbx
movq %rsi, %rdx
jne 0x43727
jmp 0x43768
xorl %eax, %eax
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x43768
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/fitscore.c |
ffgpxvll | int ffgpxvll( fitsfile *fptr, /* I - FITS file pointer */
int datatype, /* I - datatype of the value */
LONGLONG *firstpix, /* I - coord of first pixel to read (1s based) */
LONGLONG nelem, /* I - number of values to read */
void *nulval, /* I - value for undefined pixels */
void *array, /* O - array of values that are returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from the primary array. The datatype of the
input array is defined by the 2nd argument. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Undefined elements will be set equal to NULVAL, unless NULVAL=0
in which case no checking for undefined values will be performed.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
int naxis, ii;
char cdummy;
int nullcheck = 1;
LONGLONG naxes[9], trc[9]= {1,1,1,1,1,1,1,1,1};
long inc[9]= {1,1,1,1,1,1,1,1,1};
LONGLONG dimsize = 1, firstelem;
if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */
return(*status);
/* get the size of the image */
ffgidm(fptr, &naxis, status);
ffgiszll(fptr, 9, naxes, status);
if (naxis == 0 || naxes[0] == 0) {
*status = BAD_DIMEN;
return(*status);
}
/* calculate the position of the first element in the array */
firstelem = 0;
for (ii=0; ii < naxis; ii++)
{
firstelem += ((firstpix[ii] - 1) * dimsize);
dimsize *= naxes[ii];
trc[ii] = firstpix[ii];
}
firstelem++;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
/* test for special case of reading an integral number of */
/* rows in a 2D or 3D image (which includes reading the whole image */
if (naxis > 1 && naxis < 4 && firstpix[0] == 1 &&
(nelem / naxes[0]) * naxes[0] == nelem) {
/* calculate coordinate of last pixel */
trc[0] = naxes[0]; /* reading whole rows */
trc[1] = firstpix[1] + (nelem / naxes[0] - 1);
while (trc[1] > naxes[1]) {
trc[1] = trc[1] - naxes[1];
trc[2] = trc[2] + 1; /* increment to next plane of cube */
}
fits_read_compressed_img(fptr, datatype, firstpix, trc, inc,
1, nulval, array, NULL, anynul, status);
} else {
fits_read_compressed_pixels(fptr, datatype, firstelem,
nelem, nullcheck, nulval, array, NULL, anynul, status);
}
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
if (datatype == TBYTE)
{
if (nulval == 0)
ffgclb(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(unsigned char *) array, &cdummy, anynul, status);
else
ffgclb(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned char *) nulval,
(unsigned char *) array, &cdummy, anynul, status);
}
else if (datatype == TSBYTE)
{
if (nulval == 0)
ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(signed char *) array, &cdummy, anynul, status);
else
ffgclsb(fptr, 2, 1, firstelem, nelem, 1, 1, *(signed char *) nulval,
(signed char *) array, &cdummy, anynul, status);
}
else if (datatype == TUSHORT)
{
if (nulval == 0)
ffgclui(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(unsigned short *) array, &cdummy, anynul, status);
else
ffgclui(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned short *) nulval,
(unsigned short *) array, &cdummy, anynul, status);
}
else if (datatype == TSHORT)
{
if (nulval == 0)
ffgcli(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(short *) array, &cdummy, anynul, status);
else
ffgcli(fptr, 2, 1, firstelem, nelem, 1, 1, *(short *) nulval,
(short *) array, &cdummy, anynul, status);
}
else if (datatype == TUINT)
{
if (nulval == 0)
ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(unsigned int *) array, &cdummy, anynul, status);
else
ffgcluk(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned int *) nulval,
(unsigned int *) array, &cdummy, anynul, status);
}
else if (datatype == TINT)
{
if (nulval == 0)
ffgclk(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(int *) array, &cdummy, anynul, status);
else
ffgclk(fptr, 2, 1, firstelem, nelem, 1, 1, *(int *) nulval,
(int *) array, &cdummy, anynul, status);
}
else if (datatype == TULONG)
{
if (nulval == 0)
ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(unsigned long *) array, &cdummy, anynul, status);
else
ffgcluj(fptr, 2, 1, firstelem, nelem, 1, 1, *(unsigned long *) nulval,
(unsigned long *) array, &cdummy, anynul, status);
}
else if (datatype == TLONG)
{
if (nulval == 0)
ffgclj(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(long *) array, &cdummy, anynul, status);
else
ffgclj(fptr, 2, 1, firstelem, nelem, 1, 1, *(long *) nulval,
(long *) array, &cdummy, anynul, status);
}
else if (datatype == TULONGLONG)
{
if (nulval == 0)
ffgclujj(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(ULONGLONG *) array, &cdummy, anynul, status);
else
ffgclujj(fptr, 2, 1, firstelem, nelem, 1, 1, *(ULONGLONG *) nulval,
(ULONGLONG *) array, &cdummy, anynul, status);
}
else if (datatype == TLONGLONG)
{
if (nulval == 0)
ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(LONGLONG *) array, &cdummy, anynul, status);
else
ffgcljj(fptr, 2, 1, firstelem, nelem, 1, 1, *(LONGLONG *) nulval,
(LONGLONG *) array, &cdummy, anynul, status);
}
else if (datatype == TFLOAT)
{
if (nulval == 0)
ffgcle(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(float *) array, &cdummy, anynul, status);
else
ffgcle(fptr, 2, 1, firstelem, nelem, 1, 1, *(float *) nulval,
(float *) array, &cdummy, anynul, status);
}
else if (datatype == TDOUBLE)
{
if (nulval == 0)
ffgcld(fptr, 2, 1, firstelem, nelem, 1, 1, 0,
(double *) array, &cdummy, anynul, status);
else
ffgcld(fptr, 2, 1, firstelem, nelem, 1, 1, *(double *) nulval,
(double *) array, &cdummy, anynul, status);
}
else
*status = BAD_DATATYPE;
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rcx, %r12
movq %rdx, %rbx
movl %esi, %r10d
movq %rdi, %r15
movq 0x148(%rsp), %rbp
leaq 0x940e4(%rip), %rax # 0xd79c0
leaq 0x20(%rsp), %rdi
movl $0x9, %ecx
movq %rax, %rsi
rep movsq (%rsi), %es:(%rdi)
leaq 0xc0(%rsp), %rdi
movl $0x9, %ecx
movq %rax, %rsi
rep movsq (%rsi), %es:(%rdi)
movl (%rbp), %eax
testl %eax, %eax
setg %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
jne 0x44038
movl %r10d, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
leaq 0x1c(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x41290
leaq 0x70(%rsp), %rdx
movq %r15, %r14
movq %r15, %rdi
movl $0x9, %esi
movq %rbp, %rcx
callq 0x41438
movl (%r13), %ebp
testq %rbp, %rbp
je 0x439a4
cmpq $0x0, 0x70(%rsp)
je 0x439a4
testl %ebp, %ebp
jle 0x439bc
leaq (,%rbp,8), %rdx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x65c0
movl $0x1, %eax
xorl %ecx, %ecx
xorl %r13d, %r13d
movq (%rbx,%rcx,8), %rdx
decq %rdx
imulq %rax, %rdx
addq %rdx, %r13
imulq 0x70(%rsp,%rcx,8), %rax
incq %rcx
cmpq %rcx, %rbp
jne 0x43983
incq %r13
jmp 0x439c2
movq 0x148(%rsp), %rax
movl $0x140, (%rax) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x44038
movl $0x1, %r13d
movq %r14, %rdi
movq 0x148(%rsp), %rbp
movq %rbp, %rsi
callq 0x41127
testl %eax, %eax
je 0x43a35
movl 0x1c(%rsp), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
movl 0x18(%rsp), %esi
jne 0x43a05
cmpq $0x1, (%rbx)
jne 0x43a05
movq 0x70(%rsp), %rdi
movq %r12, %rax
cqto
idivq %rdi
testq %rdx, %rdx
je 0x43b99
movq %r14, %rdi
movq %r13, %rdx
movq %r12, %rcx
movl $0x1, %r8d
movq 0x10(%rsp), %r9
pushq %rbp
pushq 0x148(%rsp)
pushq $0x0
pushq 0x20(%rsp)
callq 0x8cb5a
addq $0x20, %rsp
jmp 0x44035
movl 0x18(%rsp), %ecx
cmpl $0x27, %ecx
jg 0x43aa5
cmpl $0x14, %ecx
jg 0x43af5
cmpl $0xb, %ecx
movq 0x10(%rsp), %rax
je 0x43c0e
cmpl $0xc, %ecx
je 0x43d02
cmpl $0x14, %ecx
jne 0x43df5
testq %rax, %rax
je 0x43e01
movzwl (%rax), %eax
leaq 0x7(%rsp), %r10
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %rax
jmp 0x43e2e
cmpl $0x4f, %ecx
jg 0x43b52
cmpl $0x28, %ecx
movq 0x10(%rsp), %r10
je 0x43c4c
cmpl $0x29, %ecx
je 0x43d40
cmpl $0x2a, %ecx
jne 0x43df5
testq %r10, %r10
je 0x43e3a
movss (%r10), %xmm0
subq $0x8, %rsp
leaq 0xf(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
jmp 0x43e51
cmpl $0x15, %ecx
movq 0x10(%rsp), %rax
je 0x43c88
cmpl $0x1e, %ecx
je 0x43d7c
cmpl $0x1f, %ecx
jne 0x43df5
testq %rax, %rax
je 0x43e78
movl (%rax), %eax
leaq 0x7(%rsp), %r10
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %rax
jmp 0x43ea5
cmpl $0x50, %ecx
movq 0x10(%rsp), %r10
je 0x43cc6
cmpl $0x51, %ecx
je 0x43db9
cmpl $0x52, %ecx
jne 0x43df5
testq %r10, %r10
je 0x43eb1
movsd (%r10), %xmm0
subq $0x8, %rsp
leaq 0xf(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
jmp 0x43ec8
movq %rdi, 0x20(%rsp)
movq 0x8(%rbx), %rcx
addq %rcx, %rax
decq %rax
movq 0x78(%rsp), %rcx
cmpq %rcx, %rax
jle 0x43bce
movq 0x30(%rsp), %rdx
movq 0x10(%rsp), %r10
subq %rcx, %rax
incq %rdx
cmpq %rcx, %rax
jg 0x43bbc
movq %rdx, 0x30(%rsp)
jmp 0x43bd3
movq 0x10(%rsp), %r10
leaq 0x20(%rsp), %rcx
movq %rax, 0x8(%rcx)
subq $0x8, %rsp
leaq 0xc8(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %r9d
pushq %rbp
pushq 0x150(%rsp)
pushq $0x0
pushq 0x28(%rsp)
pushq %r10
callq 0x8b0dd
jmp 0x44031
testq %rax, %rax
je 0x43eef
movzbl (%rax), %eax
leaq 0x7(%rsp), %r10
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %rax
jmp 0x43f1c
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
testq %r10, %r10
je 0x43f28
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq (%r10)
jmp 0x43f37
testq %rax, %rax
je 0x43f43
movswl (%rax), %eax
leaq 0x7(%rsp), %r10
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %rax
jmp 0x43f70
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
testq %r10, %r10
je 0x43f7c
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq (%r10)
jmp 0x43f8b
testq %rax, %rax
je 0x43f97
movsbl (%rax), %eax
leaq 0x7(%rsp), %r10
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %rax
jmp 0x43fc4
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
testq %r10, %r10
je 0x43fcd
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq (%r10)
jmp 0x43fdc
testq %rax, %rax
je 0x43fe5
movl (%rax), %eax
leaq 0x7(%rsp), %r10
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %r10
pushq 0x20(%rsp)
pushq %rax
jmp 0x44012
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
testq %r10, %r10
je 0x4401b
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq (%r10)
jmp 0x4402a
movl $0x19a, (%rbp) # imm = 0x19A
jmp 0x44035
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x60a99
jmp 0x44031
subq $0x8, %rsp
leaq 0xf(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
xorps %xmm0, %xmm0
movq %r14, %rdi
movq %r12, %r8
movl $0x2, %esi
movq %r13, %rcx
pushq %rbp
pushq 0x150(%rsp)
pushq %rax
pushq 0x28(%rsp)
pushq $0x1
callq 0x4bc91
jmp 0x44031
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x58048
jmp 0x44031
subq $0x8, %rsp
leaq 0xf(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
xorps %xmm0, %xmm0
movq %r14, %rdi
movq %r12, %r8
movl $0x2, %esi
movq %r13, %rcx
pushq %rbp
pushq 0x150(%rsp)
pushq %rax
pushq 0x28(%rsp)
pushq $0x1
callq 0x48ee5
jmp 0x44031
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x45d10
jmp 0x44031
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x63b53
jmp 0x44031
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x4eb81
jmp 0x44031
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x66dda
jmp 0x44031
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x5d8a4
jmp 0x44031
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x51d1b
jmp 0x44031
leaq 0x7(%rsp), %rax
movl $0x1, %edx
movl $0x1, %r9d
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rcx
movq %r12, %r8
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x6a060
jmp 0x44031
pushq %rbp
pushq 0x148(%rsp)
pushq %rax
pushq 0x20(%rsp)
pushq $0x0
pushq $0x1
callq 0x54e88
addq $0x30, %rsp
movl (%rbp), %eax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcol.c |
ffgsv | int ffgsv( fitsfile *fptr, /* I - FITS file pointer */
int datatype, /* I - datatype of the value */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc , /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dim. */
void *nulval, /* I - value for undefined pixels */
void *array, /* O - array of values that are returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an section of values from the primary array. The datatype of the
input array is defined by the 2nd argument. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Undefined elements will be set equal to NULVAL, unless NULVAL=0
in which case no checking for undefined values will be performed.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
int naxis, ii;
long naxes[9];
LONGLONG nelem = 1;
if (*status > 0) /* inherit input status value if > 0 */
return(*status);
/* get the size of the image */
ffgidm(fptr, &naxis, status);
ffgisz(fptr, 9, naxes, status);
/* test for the important special case where we are reading the whole image */
/* this is only useful for images that are not tile-compressed */
if (!fits_is_compressed_image(fptr, status)) {
for (ii = 0; ii < naxis; ii++) {
if (inc[ii] != 1 || blc[ii] !=1 || trc[ii] != naxes[ii])
break;
nelem = nelem * naxes[ii];
}
if (ii == naxis) {
/* read the whole image more efficiently */
ffgpxv(fptr, datatype, blc, nelem, nulval, array, anynul, status);
return(*status);
}
}
if (datatype == TBYTE)
{
if (nulval == 0)
ffgsvb(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(unsigned char *) array, anynul, status);
else
ffgsvb(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned char *) nulval,
(unsigned char *) array, anynul, status);
}
else if (datatype == TSBYTE)
{
if (nulval == 0)
ffgsvsb(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(signed char *) array, anynul, status);
else
ffgsvsb(fptr, 1, naxis, naxes, blc, trc, inc, *(signed char *) nulval,
(signed char *) array, anynul, status);
}
else if (datatype == TUSHORT)
{
if (nulval == 0)
ffgsvui(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(unsigned short *) array, anynul, status);
else
ffgsvui(fptr, 1, naxis, naxes,blc, trc, inc, *(unsigned short *) nulval,
(unsigned short *) array, anynul, status);
}
else if (datatype == TSHORT)
{
if (nulval == 0)
ffgsvi(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(short *) array, anynul, status);
else
ffgsvi(fptr, 1, naxis, naxes, blc, trc, inc, *(short *) nulval,
(short *) array, anynul, status);
}
else if (datatype == TUINT)
{
if (nulval == 0)
ffgsvuk(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(unsigned int *) array, anynul, status);
else
ffgsvuk(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned int *) nulval,
(unsigned int *) array, anynul, status);
}
else if (datatype == TINT)
{
if (nulval == 0)
ffgsvk(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(int *) array, anynul, status);
else
ffgsvk(fptr, 1, naxis, naxes, blc, trc, inc, *(int *) nulval,
(int *) array, anynul, status);
}
else if (datatype == TULONG)
{
if (nulval == 0)
ffgsvuj(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(unsigned long *) array, anynul, status);
else
ffgsvuj(fptr, 1, naxis, naxes, blc, trc, inc, *(unsigned long *) nulval,
(unsigned long *) array, anynul, status);
}
else if (datatype == TLONG)
{
if (nulval == 0)
ffgsvj(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(long *) array, anynul, status);
else
ffgsvj(fptr, 1, naxis, naxes, blc, trc, inc, *(long *) nulval,
(long *) array, anynul, status);
}
else if (datatype == TULONGLONG)
{
if (nulval == 0)
ffgsvujj(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(ULONGLONG *) array, anynul, status);
else
ffgsvujj(fptr, 1, naxis, naxes, blc, trc, inc, *(ULONGLONG *) nulval,
(ULONGLONG *) array, anynul, status);
}
else if (datatype == TLONGLONG)
{
if (nulval == 0)
ffgsvjj(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(LONGLONG *) array, anynul, status);
else
ffgsvjj(fptr, 1, naxis, naxes, blc, trc, inc, *(LONGLONG *) nulval,
(LONGLONG *) array, anynul, status);
}
else if (datatype == TFLOAT)
{
if (nulval == 0)
ffgsve(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(float *) array, anynul, status);
else
ffgsve(fptr, 1, naxis, naxes, blc, trc, inc, *(float *) nulval,
(float *) array, anynul, status);
}
else if (datatype == TDOUBLE)
{
if (nulval == 0)
ffgsvd(fptr, 1, naxis, naxes, blc, trc, inc, 0,
(double *) array, anynul, status);
else
ffgsvd(fptr, 1, naxis, naxes, blc, trc, inc, *(double *) nulval,
(double *) array, anynul, status);
}
else
*status = BAD_DATATYPE;
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0xb0(%rsp), %r14
movl (%r14), %eax
testl %eax, %eax
jg 0x44b9c
movq %rdx, %r15
movl %esi, 0x1c(%rsp)
leaq 0xc(%rsp), %rsi
movq %r14, %rdx
movq %r9, %rbp
movq %r8, %r12
movq %rcx, %r13
movq %rdi, %rbx
callq 0x41290
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x9, %esi
movq %r14, %rcx
callq 0x4130e
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %r14
callq 0x41127
testl %eax, %eax
jne 0x445c0
movslq 0xc(%rsp), %rax
testq %rax, %rax
jle 0x4457d
movl $0x1, %ecx
xorl %edx, %edx
cmpq $0x1, (%r12,%rdx,8)
jne 0x44584
cmpq $0x1, (%r14,%rdx,8)
jne 0x44584
movq (%r13,%rdx,8), %rsi
cmpq 0x20(%rsp,%rdx,8), %rsi
jne 0x44584
imulq %rsi, %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x44555
jmp 0x44588
xorl %edx, %edx
movl $0x1, %ecx
cmpl %eax, %edx
jne 0x445c0
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq %r14, %rdx
movq %rbp, %r8
movq 0xa0(%rsp), %r9
movq 0xb0(%rsp), %rbx
pushq %rbx
pushq 0xb0(%rsp)
callq 0x4380c
movq %rbx, %r10
addq $0x10, %rsp
jmp 0x44b99
movl 0x1c(%rsp), %eax
cmpl $0x27, %eax
jg 0x44635
cmpl $0x14, %eax
movq 0xb0(%rsp), %r10
jg 0x4467d
cmpl $0xb, %eax
je 0x4470e
cmpl $0xc, %eax
je 0x4480a
cmpl $0x14, %eax
jne 0x44905
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x44911
movzwl (%rbp), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rax
jmp 0x4493c
cmpl $0x4f, %eax
movq 0xb0(%rsp), %r10
jg 0x446d7
cmpl $0x28, %eax
je 0x4474e
cmpl $0x29, %eax
je 0x4484a
cmpl $0x2a, %eax
jne 0x44905
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x44948
movss (%rbp), %xmm0
leaq 0x20(%rsp), %rcx
jmp 0x44950
cmpl $0x15, %eax
je 0x4478c
cmpl $0x1e, %eax
je 0x44888
cmpl $0x1f, %eax
jne 0x44905
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x44979
movl (%rbp), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rax
jmp 0x449a4
cmpl $0x50, %eax
je 0x447cc
cmpl $0x51, %eax
je 0x448c7
cmpl $0x52, %eax
jne 0x44905
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x449b0
movsd (%rbp), %xmm0
leaq 0x20(%rsp), %rcx
jmp 0x449b8
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x449f0
movzbl (%rbp), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rax
jmp 0x44a1b
movl 0xc(%rsp), %edx
subq $0x8, %rsp
testq %rbp, %rbp
je 0x44a27
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq (%rbp)
jmp 0x44a4e
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x44a5a
movswl (%rbp), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rax
jmp 0x44a85
movl 0xc(%rsp), %edx
subq $0x8, %rsp
testq %rbp, %rbp
je 0x44a91
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq (%rbp)
jmp 0x44ab8
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x44ac4
movsbl (%rbp), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rax
jmp 0x44aef
movl 0xc(%rsp), %edx
subq $0x8, %rsp
testq %rbp, %rbp
je 0x44afb
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq (%rbp)
jmp 0x44b22
movl 0xc(%rsp), %edx
testq %rbp, %rbp
je 0x44b2b
movl (%rbp), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %rax
jmp 0x44b56
movl 0xc(%rsp), %edx
subq $0x8, %rsp
testq %rbp, %rbp
je 0x44b5f
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq (%rbp)
jmp 0x44b86
movl $0x19a, (%r10) # imm = 0x19A
jmp 0x44b99
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x615c2
jmp 0x44b8d
leaq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb0(%rsp)
pushq 0xb0(%rsp)
pushq %r12
callq 0x4c866
jmp 0x449df
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x58c06
jmp 0x44b8d
leaq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb0(%rsp)
pushq 0xb0(%rsp)
pushq %r12
callq 0x49ab2
movq 0xd0(%rsp), %r10
addq $0x20, %rsp
jmp 0x44b99
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x4695b
jmp 0x44b8d
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x6464e
jmp 0x44b8d
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x4f73c
jmp 0x44b8d
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x6792c
jmp 0x44b8d
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x5e4b2
jmp 0x44b8d
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x52872
jmp 0x44b8d
subq $0x8, %rsp
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x6ab77
jmp 0x44b8d
leaq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x1, %esi
movq %r14, %r8
movq %r13, %r9
pushq %r10
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq $0x0
pushq %r12
callq 0x55a4b
movq 0xe0(%rsp), %r10
addq $0x30, %rsp
movl (%r10), %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcol.c |
ffgcv | int ffgcv( fitsfile *fptr, /* I - FITS file pointer */
int datatype, /* I - datatype of the value */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
void *nulval, /* I - value for undefined pixels */
void *array, /* O - array of values that are returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a table column. The datatype of the
input array is defined by the 2nd argument. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Undefined elements will be set equal to NULVAL, unless NULVAL=0
in which case no checking for undefined values will be performed.
ANYNUL is returned with a value of true if any pixels are undefined.
*/
{
char cdummy[2];
if (*status > 0) /* inherit input status value if > 0 */
return(*status);
if (datatype == TBIT)
{
ffgcx(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status);
}
else if (datatype == TBYTE)
{
if (nulval == 0)
ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(unsigned char *) array, cdummy, anynul, status);
else
ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(unsigned char *)
nulval, (unsigned char *) array, cdummy, anynul, status);
}
else if (datatype == TSBYTE)
{
if (nulval == 0)
ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(signed char *) array, cdummy, anynul, status);
else
ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(signed char *)
nulval, (signed char *) array, cdummy, anynul, status);
}
else if (datatype == TUSHORT)
{
if (nulval == 0)
ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(unsigned short *) array, cdummy, anynul, status);
else
ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 1,
*(unsigned short *) nulval,
(unsigned short *) array, cdummy, anynul, status);
}
else if (datatype == TSHORT)
{
if (nulval == 0)
ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(short *) array, cdummy, anynul, status);
else
ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(short *)
nulval, (short *) array, cdummy, anynul, status);
}
else if (datatype == TUINT)
{
if (nulval == 0)
ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(unsigned int *) array, cdummy, anynul, status);
else
ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 1,
*(unsigned int *) nulval, (unsigned int *) array, cdummy, anynul,
status);
}
else if (datatype == TINT)
{
if (nulval == 0)
ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(int *) array, cdummy, anynul, status);
else
ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(int *)
nulval, (int *) array, cdummy, anynul, status);
}
else if (datatype == TULONG)
{
if (nulval == 0)
ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(unsigned long *) array, cdummy, anynul, status);
else
ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 1,
*(unsigned long *) nulval,
(unsigned long *) array, cdummy, anynul, status);
}
else if (datatype == TLONG)
{
if (nulval == 0)
ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(long *) array, cdummy, anynul, status);
else
ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(long *)
nulval, (long *) array, cdummy, anynul, status);
}
else if (datatype == TULONGLONG)
{
if (nulval == 0)
ffgclujj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(ULONGLONG *) array, cdummy, anynul, status);
else
ffgclujj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(ULONGLONG *)
nulval, (ULONGLONG *) array, cdummy, anynul, status);
}
else if (datatype == TLONGLONG)
{
if (nulval == 0)
ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0,
(LONGLONG *) array, cdummy, anynul, status);
else
ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(LONGLONG *)
nulval, (LONGLONG *) array, cdummy, anynul, status);
}
else if (datatype == TFLOAT)
{
if (nulval == 0)
ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0.,
(float *) array, cdummy, anynul, status);
else
ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(float *)
nulval,(float *) array, cdummy, anynul, status);
}
else if (datatype == TDOUBLE)
{
if (nulval == 0)
ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, 0.,
(double *) array, cdummy, anynul, status);
else
ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 1, *(double *)
nulval, (double *) array, cdummy, anynul, status);
}
else if (datatype == TCOMPLEX)
{
if (nulval == 0)
ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2,
1, 1, 0., (float *) array, cdummy, anynul, status);
else
ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2,
1, 1, *(float *) nulval, (float *) array, cdummy, anynul, status);
}
else if (datatype == TDBLCOMPLEX)
{
if (nulval == 0)
ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2,
1, 1, 0., (double *) array, cdummy, anynul, status);
else
ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2,
1, 1, *(double *) nulval, (double *) array, cdummy, anynul, status);
}
else if (datatype == TLOGICAL)
{
if (nulval == 0)
ffgcll(fptr, colnum, firstrow, firstelem, nelem, 1, 0,
(char *) array, cdummy, anynul, status);
else
ffgcll(fptr, colnum, firstrow, firstelem, nelem, 1, *(char *) nulval,
(char *) array, cdummy, anynul, status);
}
else if (datatype == TSTRING)
{
if (nulval == 0)
{
cdummy[0] = '\0';
ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1,
cdummy, (char **) array, cdummy, anynul, status);
}
else
ffgcls(fptr, colnum, firstrow, firstelem, nelem, 1, (char *)
nulval, (char **) array, cdummy, anynul, status);
}
else
*status = BAD_DATATYPE;
return(*status);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x48(%rsp), %rbx
movl (%rbx), %eax
testl %eax, %eax
jg 0x45565
movq %r9, %r10
movq 0x40(%rsp), %r11
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %r14
cmpl $0x1e, %esi
jle 0x45029
cmpl $0x29, %esi
jle 0x45078
leal -0x50(%rsi), %r9d
cmpl $0x3, %r9d
ja 0x45101
leaq 0x9297a(%rip), %rsi # 0xd796c
movslq (%rsi,%r9,4), %r9
addq %rsi, %r9
jmpq *%r9
testq %r14, %r14
je 0x4553a
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq (%r14)
jmp 0x45558
leal -0xb(%rsi), %r9d
cmpl $0xa, %r9d
ja 0x450c0
leaq 0x92902(%rip), %rsi # 0xd7940
movslq (%rsi,%r9,4), %r9
addq %rsi, %r9
jmpq *%r9
testq %r14, %r14
je 0x45447
movzbl (%r14), %r14d
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x45465
cmpl $0x1f, %esi
je 0x45143
cmpl $0x28, %esi
je 0x45172
cmpl $0x29, %esi
jne 0x4519f
testq %r14, %r14
je 0x453c1
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq (%r14)
jmp 0x453df
cmpl $0x1, %esi
je 0x4529b
cmpl $0x1e, %esi
jne 0x4519f
testq %r14, %r14
je 0x454ec
movl (%r14), %r14d
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x4550a
cmpl $0x2a, %esi
je 0x452f4
cmpl $0xa3, %esi
jne 0x4519f
addq %r10, %r10
leaq -0x1(,%r8,2), %r8
testq %r14, %r14
je 0x4533e
movsd (%r14), %xmm0
subq $0x8, %rsp
leaq 0x16(%rsp), %r14
movl $0x1, %r9d
jmp 0x45350
testq %r14, %r14
je 0x4536d
movl (%r14), %r14d
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x4538b
testq %r14, %r14
je 0x45397
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq (%r14)
jmp 0x453b5
movl $0x19a, (%rbx) # imm = 0x19A
jmp 0x45563
testq %r14, %r14
je 0x453eb
subq $0x8, %rsp
leaq 0x16(%rsp), %r15
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movl $0x1, %r9d
pushq %rbx
pushq %r11
pushq %r15
jmp 0x4540e
testq %r14, %r14
je 0x4541b
movsbl (%r14), %r14d
subq $0x8, %rsp
leaq 0x16(%rsp), %r15
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movl $0x1, %r9d
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x4543d
testq %r14, %r14
je 0x45471
movzwl (%r14), %r14d
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x4548f
testq %r14, %r14
je 0x4549b
movsbl (%r14), %r14d
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x454b9
testq %r14, %r14
je 0x454c5
movswl (%r14), %r14d
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq %r14
jmp 0x454e3
subq $0x8, %rsp
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movq %rax, %r9
pushq %rbx
callq 0x5b466
addq $0x10, %rsp
jmp 0x45563
testq %r14, %r14
je 0x45513
leaq 0xe(%rsp), %r15
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r15
pushq %rax
pushq (%r14)
jmp 0x45531
addq %r10, %r10
leaq -0x1(,%r8,2), %r8
testq %r14, %r14
je 0x4530f
movss (%r14), %xmm0
subq $0x8, %rsp
leaq 0x16(%rsp), %r14
movl $0x1, %r9d
jmp 0x45321
subq $0x8, %rsp
leaq 0x16(%rsp), %r14
movl $0x1, %r9d
xorps %xmm0, %xmm0
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x1
callq 0x4bc91
jmp 0x4555f
subq $0x8, %rsp
leaq 0x16(%rsp), %r14
movl $0x1, %r9d
xorps %xmm0, %xmm0
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x1
callq 0x48ee5
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x58048
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x63b53
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x51d1b
jmp 0x4555f
leaq 0xe(%rsp), %r14
movb $0x0, (%r14)
subq $0x8, %rsp
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movl $0x1, %r9d
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq %r14
callq 0x5bea1
jmp 0x4555f
subq $0x8, %rsp
leaq 0x16(%rsp), %r14
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movl $0x1, %r9d
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
callq 0x5b125
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x45d10
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x60a99
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x5d8a4
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x4eb81
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x6a060
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x54e88
jmp 0x4555f
leaq 0xe(%rsp), %r14
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x66dda
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcol.c |
ffgcf | int ffgcf( fitsfile *fptr, /* I - FITS file pointer */
int datatype, /* I - datatype of the value */
int colnum, /* I - number of column to write (1 = 1st col) */
LONGLONG firstrow, /* I - first row to write (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
void *array, /* O - array of values that are returned */
char *nullarray, /* O - array of null value flags */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a table column. The datatype of the
input array is defined by the 2nd argument. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
ANYNUL is returned with a value of true if any pixels are undefined.
*/
{
double nulval = 0.;
char cnulval[2];
if (*status > 0) /* inherit input status value if > 0 */
return(*status);
if (datatype == TBIT)
{
ffgcx(fptr, colnum, firstrow, firstelem, nelem, (char *) array, status);
}
else if (datatype == TBYTE)
{
ffgclb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (unsigned char )
nulval, (unsigned char *) array, nullarray, anynul, status);
}
else if (datatype == TSBYTE)
{
ffgclsb(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (signed char )
nulval, (signed char *) array, nullarray, anynul, status);
}
else if (datatype == TUSHORT)
{
ffgclui(fptr, colnum, firstrow, firstelem, nelem, 1, 2,
(unsigned short ) nulval,
(unsigned short *) array, nullarray, anynul, status);
}
else if (datatype == TSHORT)
{
ffgcli(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (short )
nulval, (short *) array, nullarray, anynul, status);
}
else if (datatype == TUINT)
{
ffgcluk(fptr, colnum, firstrow, firstelem, nelem, 1, 2,
(unsigned int ) nulval, (unsigned int *) array, nullarray, anynul,
status);
}
else if (datatype == TINT)
{
ffgclk(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (int )
nulval, (int *) array, nullarray, anynul, status);
}
else if (datatype == TULONG)
{
ffgcluj(fptr, colnum, firstrow, firstelem, nelem, 1, 2,
(unsigned long ) nulval,
(unsigned long *) array, nullarray, anynul, status);
}
else if (datatype == TLONG)
{
ffgclj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (long )
nulval, (long *) array, nullarray, anynul, status);
}
else if (datatype == TULONGLONG)
{
ffgclujj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (ULONGLONG )
nulval, (ULONGLONG *) array, nullarray, anynul, status);
}
else if (datatype == TLONGLONG)
{
ffgcljj(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (LONGLONG )
nulval, (LONGLONG *) array, nullarray, anynul, status);
}
else if (datatype == TFLOAT)
{
ffgcle(fptr, colnum, firstrow, firstelem, nelem, 1, 2, (float )
nulval,(float *) array, nullarray, anynul, status);
}
else if (datatype == TDOUBLE)
{
ffgcld(fptr, colnum, firstrow, firstelem, nelem, 1, 2,
nulval, (double *) array, nullarray, anynul, status);
}
else if (datatype == TCOMPLEX)
{
ffgcfc(fptr, colnum, firstrow, firstelem, nelem,
(float *) array, nullarray, anynul, status);
}
else if (datatype == TDBLCOMPLEX)
{
ffgcfm(fptr, colnum, firstrow, firstelem, nelem,
(double *) array, nullarray, anynul, status);
}
else if (datatype == TLOGICAL)
{
ffgcll(fptr, colnum, firstrow, firstelem, nelem, 2, (char ) nulval,
(char *) array, nullarray, anynul, status);
}
else if (datatype == TSTRING)
{
ffgcls(fptr, colnum, firstrow, firstelem, nelem, 2,
cnulval, (char **) array, nullarray, anynul, status);
}
else
*status = BAD_DATATYPE;
return(*status);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x48(%rsp), %rbx
movl (%rbx), %eax
testl %eax, %eax
jg 0x45c4b
movq %r9, %r10
movq 0x40(%rsp), %r14
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %rax
cmpl $0x1e, %esi
jle 0x45994
cmpl $0x29, %esi
jle 0x459d4
leal -0x50(%rsi), %r9d
cmpl $0x3, %r9d
ja 0x45a4b
leaq 0x92043(%rip), %rsi # 0xd79a8
movslq (%rsi,%r9,4), %r9
addq %rsi, %r9
jmpq *%r9
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x66dda
jmp 0x45c45
leal -0xb(%rsi), %r9d
cmpl $0xa, %r9d
ja 0x45a14
leaq 0x91fd7(%rip), %rsi # 0xd797c
movslq (%rsi,%r9,4), %r9
addq %rsi, %r9
jmpq *%r9
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x45d10
jmp 0x45c45
cmpl $0x1f, %esi
je 0x45a7d
cmpl $0x28, %esi
je 0x45aa2
cmpl $0x29, %esi
jne 0x45ac7
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x51d1b
jmp 0x45c45
cmpl $0x1, %esi
je 0x45b94
cmpl $0x1e, %esi
jne 0x45ac7
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x6a060
jmp 0x45c45
cmpl $0x2a, %esi
je 0x45bb5
cmpl $0xa3, %esi
jne 0x45ac7
subq $0x8, %rsp
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movq %rax, %r9
pushq %rbx
pushq %r14
pushq %r11
callq 0x4aef9
jmp 0x45c1f
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x58048
jmp 0x45c45
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x63b53
jmp 0x45c45
movl $0x19a, (%rbx) # imm = 0x19A
jmp 0x45c49
subq $0x8, %rsp
leaq 0x16(%rsp), %r15
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movl $0x2, %r9d
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq %r15
callq 0x5bea1
jmp 0x45c45
subq $0x8, %rsp
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movl $0x2, %r9d
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
callq 0x5b125
jmp 0x45c45
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x60a99
jmp 0x45c45
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x5d8a4
jmp 0x45c45
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x4eb81
jmp 0x45c45
subq $0x8, %rsp
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movq %rax, %r9
pushq %rbx
callq 0x5b466
addq $0x10, %rsp
jmp 0x45c49
subq $0x8, %rsp
movl $0x1, %r9d
xorps %xmm0, %xmm0
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x2
callq 0x4bc91
jmp 0x45c45
subq $0x8, %rsp
movl $0x1, %r9d
xorps %xmm0, %xmm0
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x2
callq 0x48ee5
jmp 0x45c45
subq $0x8, %rsp
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
movq %rax, %r9
pushq %rbx
pushq %r14
pushq %r11
callq 0x4dcad
addq $0x20, %rsp
jmp 0x45c49
movl $0x1, %r9d
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
movq %r10, %r8
pushq %rbx
pushq %r14
pushq %r11
pushq %rax
pushq $0x0
pushq $0x2
callq 0x54e88
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcol.c |
ffggpb | int ffggpb( fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
long firstelem, /* I - first vector element to read (1 = 1st) */
long nelem, /* I - number of values to read */
unsigned char *array, /* O - array of values that are returned */
int *status) /* IO - error status */
/*
Read an array of group parameters from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
*/
{
long row;
int idummy;
char cdummy;
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgclb(fptr, 1, row, firstelem, nelem, 1, 1, 0,
array, &cdummy, &idummy, status);
return(*status);
} | pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %rax
movq %rdx, %r10
movq %rsi, %rdx
cmpq $0x2, %rsi
movl $0x1, %esi
cmovlq %rsi, %rdx
leaq 0x4(%rsp), %r11
leaq 0x3(%rsp), %r14
movl $0x1, %r9d
movq %rcx, %r8
movl $0x1, %esi
movq %r10, %rcx
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x45d10
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolb.c |
fffi2i1 | int fffi2i1(short *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
short tnull, /* I - value of FITS TNULLn keyword if any */
unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned char *output,/* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > UCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > UCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r14
pushq %rbx
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x811e5(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x47f24
movq 0x20(%rsp), %r11
testb $0x1, %bl
je 0x47f71
testq %rsi, %rsi
jle 0x48052
xorl %ebx, %ebx
movzwl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x47ee0
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x47eff
movb %r8b, (%r10,%rbx)
jmp 0x47f17
testw %bp, %bp
js 0x47f06
movzwl %bp, %r14d
cmpl $0x100, %r14d # imm = 0x100
jb 0x47f13
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, (%r10,%rbx)
jmp 0x47f17
movb $0x1, (%r9,%rbx)
jmp 0x47f17
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x0, (%r10,%rbx)
jmp 0x47f17
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x47ec5
jmp 0x48052
testb $0x1, %bl
je 0x47ff8
testq %rsi, %rsi
jle 0x48052
xorl %ecx, %ecx
movzwl (%rdi,%rcx,2), %edx
testw %dx, %dx
js 0x47f58
movzwl %dx, %r8d
cmpl $0x100, %r8d # imm = 0x100
jb 0x47f60
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, %dl
jmp 0x47f60
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
movb %dl, (%r10,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x47f38
jmp 0x48052
testq %rsi, %rsi
jle 0x48052
xorl %ebx, %ebx
movsd 0x8d15c(%rip), %xmm2 # 0xd50e0
movsd 0x8fb24(%rip), %xmm3 # 0xd7ab0
movzwl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x47fa7
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x47fcc
movb %r8b, (%r10,%rbx)
jmp 0x47fee
movswl %bp, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x47fd3
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x0, (%r10,%rbx)
jmp 0x47fee
movb $0x1, (%r9,%rbx)
jmp 0x47fee
ucomisd %xmm3, %xmm4
jbe 0x47fe6
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, (%r10,%rbx)
jmp 0x47fee
cvttsd2si %xmm4, %ebp
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x47f8c
jmp 0x48052
testq %rsi, %rsi
jle 0x48052
xorl %ecx, %ecx
movsd 0x8d0d9(%rip), %xmm2 # 0xd50e0
movsd 0x8faa1(%rip), %xmm3 # 0xd7ab0
movswl (%rdi,%rcx,2), %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x48032
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x48046
ucomisd %xmm3, %xmm4
jbe 0x48042
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, %dl
jmp 0x48046
cvttsd2si %xmm4, %edx
movb %dl, (%r10,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x4800f
movl (%rax), %eax
popq %rbx
popq %r14
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolb.c |
fffi4i1 | int fffi4i1(INT32BIT *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */
unsigned char nullval,/* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned char *output,/* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > UCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > UCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %rbx
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x8100a(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x480f7
movq 0x18(%rsp), %r11
testb $0x1, %bl
je 0x4813d
testq %rsi, %rsi
jle 0x48216
xorl %ebx, %ebx
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x480b9
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x480d2
movb %r8b, (%r10,%rbx)
jmp 0x480ea
testl %ebp, %ebp
js 0x480d9
cmpl $0x100, %ebp # imm = 0x100
jb 0x480e6
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, (%r10,%rbx)
jmp 0x480ea
movb $0x1, (%r9,%rbx)
jmp 0x480ea
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x0, (%r10,%rbx)
jmp 0x480ea
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x480a0
jmp 0x48216
testb $0x1, %bl
je 0x481bf
testq %rsi, %rsi
jle 0x48216
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
testl %edx, %edx
js 0x48124
cmpl $0x100, %edx # imm = 0x100
jb 0x4812c
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, %dl
jmp 0x4812c
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
movb %dl, (%r10,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x4810b
jmp 0x48216
testq %rsi, %rsi
jle 0x48216
xorl %ebx, %ebx
movsd 0x8cf90(%rip), %xmm2 # 0xd50e0
movsd 0x8f958(%rip), %xmm3 # 0xd7ab0
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x48171
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x48193
movb %r8b, (%r10,%rbx)
jmp 0x481b5
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x4819a
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x0, (%r10,%rbx)
jmp 0x481b5
movb $0x1, (%r9,%rbx)
jmp 0x481b5
ucomisd %xmm3, %xmm4
jbe 0x481ad
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, (%r10,%rbx)
jmp 0x481b5
cvttsd2si %xmm4, %ebp
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x48158
jmp 0x48216
testq %rsi, %rsi
jle 0x48216
xorl %ecx, %ecx
movsd 0x8cf12(%rip), %xmm2 # 0xd50e0
movsd 0x8f8da(%rip), %xmm3 # 0xd7ab0
xorps %xmm4, %xmm4
cvtsi2sdl (%rdi,%rcx,4), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x481f6
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x4820a
ucomisd %xmm3, %xmm4
jbe 0x48206
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x1, %dl
jmp 0x4820a
cvttsd2si %xmm4, %edx
movb %dl, (%r10,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x481d6
movl (%rax), %eax
popq %rbx
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolb.c |
fffstri1 | int fffstri1(char *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
long twidth, /* I - width of each substring of chars */
double implipower, /* I - power of 10 of implied decimal */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
char *snull, /* I - value of FITS null string, if any */
unsigned char nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned char *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file. Check
for null values and do scaling if required. The nullcheck code value
determines how any null values in the input array are treated. A null
value is an input pixel that is equal to snull. If nullcheck= 0, then
no special checking for nulls is performed. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
int nullen;
long ii;
double dvalue;
char *cstring, message[FLEN_ERRMSG];
char *cptr, *tpos;
char tempstore, chrzero = '0';
double val, power;
int exponent, sign, esign, decpt;
nullen = strlen(snull);
cptr = input; /* pointer to start of input string */
for (ii = 0; ii < ntodo; ii++)
{
cstring = cptr;
/* temporarily insert a null terminator at end of the string */
tpos = cptr + twidth;
tempstore = *tpos;
*tpos = 0;
/* check if null value is defined, and if the */
/* column string is identical to the null string */
if (snull[0] != ASCII_NULL_UNDEFINED &&
!strncmp(snull, cptr, nullen) )
{
if (nullcheck)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
cptr += twidth;
}
else
{
/* value is not the null value, so decode it */
/* remove any embedded blank characters from the string */
decpt = 0;
sign = 1;
val = 0.;
power = 1.;
exponent = 0;
esign = 1;
while (*cptr == ' ') /* skip leading blanks */
cptr++;
if (*cptr == '-' || *cptr == '+') /* check for leading sign */
{
if (*cptr == '-')
sign = -1;
cptr++;
while (*cptr == ' ') /* skip blanks between sign and value */
cptr++;
}
while (*cptr >= '0' && *cptr <= '9')
{
val = val * 10. + *cptr - chrzero; /* accumulate the value */
cptr++;
while (*cptr == ' ') /* skip embedded blanks in the value */
cptr++;
}
if (*cptr == '.' || *cptr == ',') /* check for decimal point */
{
decpt = 1;
cptr++;
while (*cptr == ' ') /* skip any blanks */
cptr++;
while (*cptr >= '0' && *cptr <= '9')
{
val = val * 10. + *cptr - chrzero; /* accumulate the value */
power = power * 10.;
cptr++;
while (*cptr == ' ') /* skip embedded blanks in the value */
cptr++;
}
}
if (*cptr == 'E' || *cptr == 'D') /* check for exponent */
{
cptr++;
while (*cptr == ' ') /* skip blanks */
cptr++;
if (*cptr == '-' || *cptr == '+') /* check for exponent sign */
{
if (*cptr == '-')
esign = -1;
cptr++;
while (*cptr == ' ') /* skip blanks between sign and exp */
cptr++;
}
while (*cptr >= '0' && *cptr <= '9')
{
exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */
cptr++;
while (*cptr == ' ') /* skip embedded blanks */
cptr++;
}
}
if (*cptr != 0) /* should end up at the null terminator */
{
snprintf(message, FLEN_ERRMSG,"Cannot read number from ASCII table");
ffpmsg(message);
snprintf(message, FLEN_ERRMSG,"Column field = %s.", cstring);
ffpmsg(message);
/* restore the char that was overwritten by the null */
*tpos = tempstore;
return(*status = BAD_C2D);
}
if (!decpt) /* if no explicit decimal, use implied */
power = implipower;
dvalue = (sign * val / power) * pow(10., (double) (esign * exponent));
dvalue = dvalue * scale + zero; /* apply the scaling */
if (dvalue < DUCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UCHAR_MAX;
}
else
output[ii] = (unsigned char) dvalue;
}
/* restore the char that was overwritten by the null */
*tpos = tempstore;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq %rsi, 0x40(%rsp)
testq %rsi, %rsi
jle 0x48d09
movq %rdx, %r15
movq %rdi, %r14
movq 0x10(%rsp), %rdi
callq 0x6280
cltq
movq %rax, 0x28(%rsp)
xorl %r12d, %r12d
movsd 0x8f046(%rip), %xmm0 # 0xd7aa8
movsd 0x8f04e(%rip), %xmm4 # 0xd7ab8
movq %r14, %rbx
leaq (%r14,%r15), %rbp
movb (%r14,%r15), %r13b
movb $0x0, (%r14,%r15)
movq 0x10(%rsp), %rax
cmpb $0x1, (%rax)
je 0x48aec
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq 0x28(%rsp), %rdx
callq 0x6190
movsd 0x8f01a(%rip), %xmm4 # 0xd7ab8
movsd 0x8f002(%rip), %xmm0 # 0xd7aa8
movq %r14, %rbx
testl %eax, %eax
jne 0x48aec
movq %rbp, %rbx
cmpl $0x0, 0xc(%rsp)
je 0x48cf4
movq 0xe8(%rsp), %rax
movl $0x1, (%rax)
cmpl $0x1, 0xc(%rsp)
jne 0x48ce4
movl 0x1c(%rsp), %eax
movq 0xf0(%rsp), %rcx
movb %al, (%rcx,%r12)
jmp 0x48cf1
incq %rbx
movzbl (%rbx), %ecx
cmpl $0x20, %ecx
je 0x48ae9
cmpl $0x2b, %ecx
je 0x48afe
cmpl $0x2d, %ecx
jne 0x48b1e
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x48afe
xorl %edx, %edx
cmpb $0x2d, %cl
sete %dl
leaq 0x8efa9(%rip), %rcx # 0xd7ac0
movsd (%rcx,%rdx,8), %xmm3
jmp 0x48b28
movl %ecx, %eax
movsd 0x80558(%rip), %xmm3 # 0xc9080
leal -0x30(%rax), %ecx
xorpd %xmm5, %xmm5
cmpb $0x9, %cl
ja 0x48b59
movzbl %al, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x48b46
addsd %xmm4, %xmm5
leal -0x30(%rax), %ecx
jmp 0x48b2f
movzbl %al, %ecx
orl $0x2, %ecx
cmpl $0x2e, %ecx
jne 0x48ba7
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x48b64
leal -0x30(%rax), %ecx
movsd 0x80507(%rip), %xmm1 # 0xc9080
cmpb $0x9, %cl
ja 0x48bad
movzbl %al, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm5
addsd %xmm2, %xmm5
addsd %xmm4, %xmm5
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x48b94
mulsd %xmm0, %xmm1
leal -0x30(%rax), %ecx
jmp 0x48b79
movsd 0x20(%rsp), %xmm1
movl %eax, %esi
andb $-0x2, %sil
movl $0x1, %edx
xorl %ecx, %ecx
cmpb $0x44, %sil
jne 0x48c29
movzbl 0x1(%rbx), %esi
incq %rbx
cmpl $0x20, %esi
je 0x48bc0
cmpl $0x2d, %esi
je 0x48bd6
cmpl $0x2b, %esi
jne 0x48bf2
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x48bd6
xorl %edx, %edx
cmpb $0x2d, %sil
setne %dl
leal -0x1(,%rdx,2), %edx
jmp 0x48bf9
movl $0x1, %edx
movl %esi, %eax
leal -0x30(%rax), %esi
cmpb $0x9, %sil
ja 0x48c29
xorl %ecx, %ecx
movl %eax, %esi
leal (%rcx,%rcx,4), %eax
leal -0x30(,%rax,2), %ecx
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x48c10
movsbl %sil, %esi
addl %esi, %ecx
leal -0x30(%rax), %esi
cmpb $0x9, %sil
jbe 0x48c04
testb %al, %al
jne 0x48d15
mulsd %xmm3, %xmm5
divsd %xmm1, %xmm5
movsd %xmm5, 0x48(%rsp)
imull %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
callq 0x65a0
mulsd 0x48(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x8c478(%rip), %xmm1 # 0xd50e0
ucomisd %xmm0, %xmm1
jbe 0x48c9b
movq 0xf8(%rsp), %rax
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq 0xf0(%rsp), %rax
movb $0x0, (%rax,%r12)
movsd 0x8ee17(%rip), %xmm0 # 0xd7aa8
movsd 0x8ee1f(%rip), %xmm4 # 0xd7ab8
jmp 0x48cf4
ucomisd 0x8ee0d(%rip), %xmm0 # 0xd7ab0
movsd 0x8ee0d(%rip), %xmm4 # 0xd7ab8
jbe 0x48cca
movq 0xf8(%rsp), %rax
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq 0xf0(%rsp), %rax
movb $-0x1, (%rax,%r12)
jmp 0x48cda
cvttsd2si %xmm0, %eax
movq 0xf0(%rsp), %rcx
movb %al, (%rcx,%r12)
movsd 0x8edc6(%rip), %xmm0 # 0xd7aa8
jmp 0x48cf4
movq 0xe0(%rsp), %rax
movb $0x1, (%rax,%r12)
movq %rbp, %rbx
movb %r13b, (%rbp)
incq %r12
movq %rbx, %r14
cmpq 0x40(%rsp), %r12
jne 0x48a6d
movq 0xf8(%rsp), %rax
movl (%rax), %eax
jmp 0x48d78
movups 0x8ef28(%rip), %xmm0 # 0xd7c44
leaq 0x50(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movupd 0x8ef07(%rip), %xmm0 # 0xd7c34
movapd %xmm0, (%rbx)
movl $0x656c62, 0x20(%rbx) # imm = 0x656C62
movq %rbx, %rdi
callq 0x37264
leaq 0x8ef11(%rip), %rdx # 0xd7c58
movl $0x51, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movb %r13b, (%rbp)
movq 0xf8(%rsp), %rax
movl $0x199, (%rax) # imm = 0x199
movl $0x199, %eax # imm = 0x199
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolb.c |
ffgpvd | int ffgpvd( fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
double nulval, /* I - value for undefined pixels */
double *array, /* O - array of values that are returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Undefined elements will be set equal to NULVAL, unless NULVAL=0
in which case no checking for undefined values will be performed.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
long row;
char cdummy;
int nullcheck = 1;
double nullvalue;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
nullvalue = nulval; /* set local variable */
fits_read_compressed_pixels(fptr, TDOUBLE, firstelem, nelem,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgcld(fptr, 2, row, firstelem, nelem, 1, 1, nulval,
array, &cdummy, anynul, status);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, %r14
movsd %xmm0, 0x8(%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x50(%rsp), %rsi
callq 0x41127
testl %eax, %eax
je 0x48e8b
leaq 0x10(%rsp), %r9
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%r9)
movq %rbp, %rdi
movl $0x52, %esi
movq %r12, %rdx
movq %r13, %rcx
movl $0x1, %r8d
movq 0x50(%rsp), %rbx
pushq %rbx
pushq %r15
pushq $0x0
pushq %r14
callq 0x8cb5a
addq $0x20, %rsp
jmp 0x48ed4
cmpq $0x2, %rbx
movl $0x1, %eax
cmovlq %rax, %rbx
subq $0x8, %rsp
leaq 0xf(%rsp), %rax
movl $0x1, %r9d
movq %rbp, %rdi
movq %r13, %r8
movl $0x2, %esi
movq %rbx, %rdx
movq %r12, %rcx
movsd 0x10(%rsp), %xmm0
movq 0x58(%rsp), %rbx
pushq %rbx
pushq %r15
pushq %rax
pushq %r14
pushq $0x1
callq 0x48ee5
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcold.c |
ffg3dd | int ffg3dd(fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
double nulval, /* set undefined pixels equal to this */
LONGLONG ncols, /* I - number of pixels in each row of array */
LONGLONG nrows, /* I - number of rows in each plane of array */
LONGLONG naxis1, /* I - FITS image NAXIS1 value */
LONGLONG naxis2, /* I - FITS image NAXIS2 value */
LONGLONG naxis3, /* I - FITS image NAXIS3 value */
double *array, /* O - array to be filled and returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an entire 3-D array of values to the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of the
FITS array is not the same as the array being read). Any null
values in the array will be set equal to the value of nulval, unless
nulval = 0 in which case no null checking will be performed.
*/
{
LONGLONG nfits, narray;
long tablerow, ii, jj;
char cdummy;
int nullcheck = 1;
long inc[] = {1,1,1};
LONGLONG fpixel[] = {1,1,1};
LONGLONG lpixel[3];
double nullvalue;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
lpixel[0] = (long) ncols;
lpixel[1] = (long) nrows;
lpixel[2] = (long) naxis3;
nullvalue = nulval; /* set local variable */
fits_read_compressed_img(fptr, TDOUBLE, fpixel, lpixel, inc,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
tablerow=maxvalue(1,group);
if (ncols == naxis1 && nrows == naxis2) /* arrays have same size? */
{
/* all the image pixels are contiguous, so read all at once */
ffgcld(fptr, 2, tablerow, 1, naxis1 * naxis2 * naxis3, 1, 1, nulval,
array, &cdummy, anynul, status);
return(*status);
}
if (ncols < naxis1 || nrows < naxis2)
return(*status = BAD_DIMEN);
nfits = 1; /* next pixel in FITS image to read */
narray = 0; /* next pixel in output array to be filled */
/* loop over naxis3 planes in the data cube */
for (jj = 0; jj < naxis3; jj++)
{
/* loop over the naxis2 rows in the FITS image, */
/* reading naxis1 pixels to each row */
for (ii = 0; ii < naxis2; ii++)
{
if (ffgcld(fptr, 2, tablerow, nfits, naxis1, 1, 1, nulval,
&array[narray], &cdummy, anynul, status) > 0)
return(*status);
nfits += naxis1;
narray += ncols;
}
narray += (nrows - naxis2) * ncols;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x18(%rsp)
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r13
movsd %xmm0, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movq 0xf8(%rsp), %rsi
movaps 0x8e43e(%rip), %xmm0 # 0xd7ca0
movaps %xmm0, 0x80(%rsp)
movl $0x1, %r12d
movq %r12, 0x90(%rsp)
movaps %xmm0, 0x60(%rsp)
movq %r12, 0x70(%rsp)
callq 0x41127
testl %eax, %eax
je 0x498f8
leaq 0x40(%rsp), %rcx
movq %r13, (%rcx)
movq %r14, 0x8(%rcx)
movq 0xe0(%rsp), %rax
movq %rax, 0x10(%rcx)
leaq 0xa0(%rsp), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
subq $0x8, %rsp
leaq 0x68(%rsp), %rdx
leaq 0x88(%rsp), %r8
movq %r15, %rdi
movl $0x52, %esi
movl $0x1, %r9d
movq 0x100(%rsp), %rbx
pushq %rbx
pushq 0x100(%rsp)
pushq $0x0
pushq 0x108(%rsp)
pushq %rax
callq 0x8b0dd
jmp 0x49978
movq 0xf8(%rsp), %r11
movq %r15, 0x10(%rsp)
cmpq $0x2, %rbx
cmovgeq %rbx, %r12
movq %r13, %rax
xorq %rbp, %rax
movq %r14, %rcx
movq 0x18(%rsp), %r9
xorq %r9, %rcx
orq %rax, %rcx
movq %r13, %rbx
jne 0x49990
imulq %rbx, %r14
imulq 0xe0(%rsp), %r14
subq $0x8, %rsp
leaq 0x48(%rsp), %rax
movl $0x1, %ecx
movl $0x1, %r9d
movq 0x18(%rsp), %rdi
movq %r14, %r8
movl $0x2, %esi
movq %r12, %rdx
movsd 0x10(%rsp), %xmm0
movq %r11, %rbx
pushq %r11
pushq 0x100(%rsp)
pushq %rax
pushq 0x108(%rsp)
pushq $0x1
callq 0x48ee5
addq $0x30, %rsp
movl (%rbx), %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %r10
cmpq %rbp, %rbx
setl %al
subq %r9, %r14
setl %cl
orb %al, %cl
movsd 0x8(%rsp), %xmm0
je 0x499b7
movl $0x140, (%r11) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x4997e
cmpq $0x0, 0xe0(%rsp)
movq 0x10(%rsp), %rdi
movq 0xe8(%rsp), %r13
jle 0x49aa3
imulq %rbx, %r14
leaq (,%rbx,8), %rax
movq %rax, 0x30(%rsp)
movl $0x1, %ebp
xorl %eax, %eax
xorl %esi, %esi
movq %r14, 0x20(%rsp)
movq %rax, 0x28(%rsp)
testq %r9, %r9
jle 0x49a78
leaq (,%rsi,8), %r14
addq %r13, %r14
movq %r9, %r13
movq %rsi, 0x38(%rsp)
subq $0x8, %rsp
movl $0x1, %r9d
movl $0x2, %esi
movq %r12, %r15
movq %r12, %rdx
movq %rbp, %rcx
movq %r10, %r8
pushq 0x100(%rsp)
pushq 0x100(%rsp)
leaq 0x58(%rsp), %rax
pushq %rax
pushq %r14
pushq $0x1
movq %r10, %r12
callq 0x48ee5
addq $0x30, %rsp
testl %eax, %eax
jg 0x49aa3
addq %r12, %rbp
movq 0x38(%rsp), %rsi
addq %rbx, %rsi
addq 0x30(%rsp), %r14
decq %r13
movsd 0x8(%rsp), %xmm0
movq 0x10(%rsp), %rdi
movq %r12, %r10
movq %r15, %r12
jne 0x49a0a
movq 0x20(%rsp), %r14
addq %r14, %rsi
movq 0x28(%rsp), %rax
incq %rax
cmpq 0xe0(%rsp), %rax
movq 0xe8(%rsp), %r13
movq 0x18(%rsp), %r9
jne 0x499f2
movq 0xf8(%rsp), %rax
movl (%rax), %eax
jmp 0x4997e
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcold.c |
ffggpd | int ffggpd( fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
long firstelem, /* I - first vector element to read (1 = 1st) */
long nelem, /* I - number of values to read */
double *array, /* O - array of values that are returned */
int *status) /* IO - error status */
/*
Read an array of group parameters from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
*/
{
long row;
int idummy;
char cdummy;
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgcld(fptr, 1, row, firstelem, nelem, 1, 1, 0.,
array, &cdummy, &idummy, status);
return(*status);
} | pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %rax
movq %rdx, %r10
movq %rsi, %rdx
cmpq $0x2, %rsi
movl $0x1, %esi
cmovlq %rsi, %rdx
subq $0x8, %rsp
leaq 0xc(%rsp), %r11
leaq 0xb(%rsp), %r14
movl $0x1, %r9d
xorps %xmm0, %xmm0
movq %rcx, %r8
movl $0x1, %esi
movq %r10, %rcx
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x1
callq 0x48ee5
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcold.c |
ffgcvm | int ffgcvm(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
double nulval, /* I - value for null pixels */
double *array, /* O - array of values that are read */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU. Automatic
datatype conversion will be performed if the datatype of the column does not
match the datatype of the array parameter. The output values will be scaled
by the FITS TSCALn and TZEROn values if these values have been defined.
Any undefined pixels will be set equal to the value of 'nulval' unless
nulval = 0 in which case no checks for undefined pixels will be made.
TSCAL and ZERO should not be used with complex values.
*/
{
char cdummy;
/* a complex double value is interpreted as a pair of double values, */
/* thus need to multiply the first element and number of elements by 2 */
ffgcld(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem * 2,
1, 1, nulval, array, &cdummy, anynul, status);
return(*status);
} | pushq %rbx
subq $0x10, %rsp
movq %r9, %rax
movq 0x28(%rsp), %rbx
leaq -0x1(,%rcx,2), %rcx
addq %r8, %r8
subq $0x8, %rsp
leaq 0x17(%rsp), %r10
movl $0x1, %r9d
pushq %rbx
pushq 0x30(%rsp)
pushq %r10
pushq %rax
pushq $0x1
callq 0x48ee5
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcold.c |
ffgsve | int ffgsve(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
float nulval, /* I - value to set undefined pixels */
float *array, /* O - array to be filled and returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dir[9];
long nelem, nultyp, ninc, numcol;
LONGLONG felem, dsize[10], blcll[9], trcll[9];
int hdutype, anyf;
char ldummy, msg[FLEN_ERRMSG];
int nullcheck = 1;
float nullvalue;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsve is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
nullvalue = nulval; /* set local variable */
fits_read_compressed_img(fptr, TFLOAT, blcll, trcll, inc,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 1;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
dir[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
if (hdutype == IMAGE_HDU)
{
dir[ii] = -1;
}
else
{
snprintf(msg, FLEN_ERRMSG,"ffgsve: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
dsize[ii] = dsize[ii] * dir[ii];
}
dsize[naxis] = dsize[naxis] * dir[naxis];
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1;
ninc = incr[0] * dir[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8])
{
for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7])
{
for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6])
{
for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5])
{
for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4])
{
for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3])
{
for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2])
{
for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1])
{
felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] +
(i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] +
(i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] +
(i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8];
if ( ffgcle(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &ldummy, &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp # imm = 0x3A8
movss %xmm0, 0x14(%rsp)
movl %edx, %r13d
movl %esi, (%rsp)
movq 0x3f8(%rsp), %r14
leal -0xa(%r13), %eax
cmpl $-0xa, %eax
ja 0x4c8ce
leaq 0x8b55d(%rip), %rdx # 0xd7df8
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r14) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x4c981
movq %r9, %r15
movq %r8, %rbp
movq %rcx, %rbx
movq %r14, %rsi
movq %rdi, %r12
callq 0x41127
testl %eax, %eax
je 0x4c96a
shll $0x3, %r13d
leaq 0x350(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x1c0(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x260(%rsp), %rax
movss 0x14(%rsp), %xmm0
movss %xmm0, (%rax)
subq $0x8, %rsp
movq %r12, %rdi
movl $0x2a, %esi
movq %rbx, %rdx
movq %rbp, %rcx
movq 0x3e8(%rsp), %r8
movl $0x1, %r9d
pushq %r14
pushq 0x400(%rsp)
pushq $0x0
pushq 0x408(%rsp)
pushq %rax
callq 0x8b0dd
addq $0x30, %rsp
jmp 0x4c97e
leaq 0x3c(%rsp), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x4c993
movl (%r14), %eax
addq $0x3a8, %rsp # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0xd0(%rsp)
movl 0x3c(%rsp), %edx
movl %r13d, %eax
testl %edx, %edx
je 0x4c9cf
movq (%rbp,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq (%r15,%rax,8), %r10
movq 0x3e0(%rsp), %r11
movq (%r11,%rax,8), %rcx
movq %rcx, 0x18(%rsp)
movq 0x3f0(%rsp), %rcx
jmp 0x4ca01
movl (%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %r10
movl $0x2, (%rsp)
movl $0x1, %esi
movq %rsi, 0x18(%rsp)
movq %r10, 0x8(%rsp)
movq 0x3f0(%rsp), %rcx
movq 0x3e0(%rsp), %r11
movq 0x3f8(%rsp), %r12
testq %rcx, %rcx
je 0x4ca14
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %esi
movq %rsi, 0x260(%rsp,%rcx,8)
movq %rsi, 0x300(%rsp,%rcx,8)
movq %rsi, 0x2b0(%rsp,%rcx,8)
movq %rsi, 0x1c0(%rsp,%rcx,8)
movq %rsi, 0x210(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x4ca1b
testl %r13d, %r13d
je 0x4cb31
movq %rax, %rsi
negq %rsi
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdi
movq -0x8(%rbp,%rcx,8), %r8
cmpq %r8, %rdi
jge 0x4ca8c
testl %edx, %edx
jne 0x4d237
movq $-0x1, 0x208(%rsp,%rcx,8)
movq $-0x1, %r9
jmp 0x4ca94
movq 0x208(%rsp,%rcx,8), %r9
movq %r8, 0x258(%rsp,%rcx,8)
movq %rdi, 0x2f8(%rsp,%rcx,8)
movq -0x8(%r11,%rcx,8), %rdi
movq %rdi, 0x2a8(%rsp,%rcx,8)
movq 0x1b8(%rsp,%rcx,8), %rdi
movq -0x8(%rbx,%rcx,8), %r8
imulq %rdi, %r8
movq %r8, 0x1c0(%rsp,%rcx,8)
imulq %rdi, %r9
movq %r9, 0x1b8(%rsp,%rcx,8)
leaq (%rsi,%rcx), %rdi
incq %rdi
incq %rcx
cmpq $0x1, %rdi
jne 0x4ca60
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
cmpl $0x1, %r13d
jne 0x4cb4a
cmpq $0x1, (%rbx)
jne 0x4cb4a
movq 0x8(%rsp), %rcx
subq %rcx, %r10
movq %r10, %rax
cqto
movq 0x18(%rsp), %rsi
idivq %rsi
movq %rcx, %r10
movq %rsi, 0xc8(%rsp)
jmp 0x4cb7c
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
movq 0x300(%rsp), %rax
movq 0x210(%rsp), %rcx
subq 0x260(%rsp), %rax
imulq %rcx, %rax
cqto
idivq (%r11)
imulq 0x2b0(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %r10, 0x168(%rsp)
cmpq %r10, 0x8(%rsp)
jle 0x4cb9a
movq 0x3f8(%rsp), %rax
movl (%rax), %eax
jmp 0x4c981
movq 0x2a0(%rsp), %rcx
movq 0x250(%rsp), %r10
movq %r10, %rdx
imulq %rcx, %rdx
movq %rdx, 0x70(%rsp)
movq 0x340(%rsp), %rdx
imulq %r10, %rdx
movq %rdx, 0x80(%rsp)
movq 0x298(%rsp), %rdi
movq 0x248(%rsp), %r8
movq %r8, %rdx
imulq %rdi, %rdx
movq %rdx, 0xb8(%rsp)
movq 0x338(%rsp), %rdx
imulq %r8, %rdx
movq %rdx, 0x88(%rsp)
movq 0x290(%rsp), %rsi
movq 0x240(%rsp), %r9
movq %r9, %r12
imulq %rsi, %r12
movq 0x330(%rsp), %rdx
imulq %r9, %rdx
movq %rdx, 0x90(%rsp)
movq 0x288(%rsp), %rdx
movq 0x200(%rsp), %r14
imulq %r14, %r10
decq %rcx
imulq %r10, %rcx
movq 0x1f8(%rsp), %r10
movq %r10, 0x20(%rsp)
imulq %r10, %r8
decq %rdi
imulq %r8, %rdi
movq 0x1f0(%rsp), %rbx
imulq %rbx, %r9
decq %rsi
imulq %r9, %rsi
movq %r12, %r9
movq 0x238(%rsp), %r8
addq %rdi, %rsi
movq %r8, %rdi
imulq %rdx, %rdi
movq %rdi, 0xb0(%rsp)
movq 0x328(%rsp), %rdi
imulq %r8, %rdi
movq %rdi, 0x98(%rsp)
movq 0x1e8(%rsp), %r10
imulq %r10, %r8
decq %rdx
imulq %r8, %rdx
addq %rsi, %rdx
movq 0x280(%rsp), %rsi
movq 0x230(%rsp), %rdi
movq %rdi, %r8
imulq %rsi, %r8
movq %r8, 0x68(%rsp)
movq 0x320(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xa0(%rsp)
movq 0x1e0(%rsp), %r11
imulq %r11, %rdi
decq %rsi
imulq %rdi, %rsi
addq 0x260(%rsp), %rcx
addq %rdx, %rsi
addq %rcx, %rsi
movq 0x278(%rsp), %rcx
movq 0x228(%rsp), %rdx
movq %rdx, %rbp
imulq %rcx, %rbp
movq 0x318(%rsp), %rdi
imulq %rdx, %rdi
movq %rdi, 0xa8(%rsp)
movq 0x1d8(%rsp), %r13
imulq %r13, %rdx
decq %rcx
imulq %rdx, %rcx
movq 0x270(%rsp), %rdx
movq 0x220(%rsp), %rdi
movq %rdi, %r12
imulq %rdx, %r12
movq %r12, 0x170(%rsp)
movq 0x310(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xc0(%rsp)
movq 0x1d0(%rsp), %r15
imulq %r15, %rdi
decq %rdx
imulq %rdi, %rdx
addq %rcx, %rdx
movq 0x268(%rsp), %r12
movq 0x218(%rsp), %rcx
movq %rcx, %rdi
imulq %r12, %rdi
movq %rdi, 0x190(%rsp)
movq 0x308(%rsp), %rdi
imulq %rcx, %rdi
movq %rdi, 0xd8(%rsp)
movq %rax, %r8
movq 0x1c8(%rsp), %rax
imulq %rax, %rcx
decq %r12
imulq %rcx, %r12
movq 0xd0(%rsp), %rdi
addq %rdx, %r12
addq %rsi, %r12
movq %r12, 0xe0(%rsp)
leaq 0x1(%r8), %r12
leaq 0x4(,%r8,4), %rdx
movq %rdx, 0x1b0(%rsp)
movq 0x2f0(%rsp), %rdx
movq %rdx, 0xe8(%rsp)
imulq %rdx, %r14
movq %r14, 0xf0(%rsp)
movq 0x2e8(%rsp), %rdx
movq %rdx, 0xf8(%rsp)
movq 0x20(%rsp), %rcx
imulq %rdx, %rcx
movq %rcx, 0x20(%rsp)
movq 0x70(%rsp), %rdx
movq 0x2e0(%rsp), %rsi
movq %rsi, 0x100(%rsp)
imulq %rsi, %rbx
movq %rbx, 0x108(%rsp)
movq 0xb0(%rsp), %rbx
movq 0x2d8(%rsp), %rsi
movq %rsi, 0x110(%rsp)
imulq %rsi, %r10
movq %r10, 0x118(%rsp)
movq 0xb8(%rsp), %r10
movq %rbp, %rcx
movq 0x68(%rsp), %rsi
movq 0x2d0(%rsp), %rbp
movq %rbp, 0x128(%rsp)
imulq %rbp, %r11
movq %r11, 0x130(%rsp)
movq 0x3e8(%rsp), %r11
movq 0x2c8(%rsp), %r8
movq %r8, 0x138(%rsp)
imulq %r8, %r13
movq %r13, 0x140(%rsp)
movq 0x2c0(%rsp), %r8
movq %r8, 0x178(%rsp)
imulq %r8, %r15
movq %r15, 0x180(%rsp)
movq 0x2b8(%rsp), %r8
movq %r8, 0x1a8(%rsp)
imulq %r8, %rax
movq %rax, 0x1b8(%rsp)
xorl %ebp, %ebp
movq %r9, 0x188(%rsp)
movq %rcx, 0x148(%rsp)
cmpq 0x80(%rsp), %rdx
jle 0x4cf41
movq 0x8(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x168(%rsp), %rax
jle 0x4cf19
jmp 0x4cb8b
movq 0xe0(%rsp), %rax
movq %rdx, 0x40(%rsp)
cmpq 0x88(%rsp), %r10
jle 0x4cf7e
movq 0x40(%rsp), %r8
addq 0xe8(%rsp), %r8
addq 0xf0(%rsp), %rax
movq %r8, 0x40(%rsp)
cmpq 0x80(%rsp), %r8
jle 0x4cf4e
jmp 0x4cf23
movq %rax, %r8
movq %r10, 0x48(%rsp)
movq %rax, 0x120(%rsp)
cmpq 0x90(%rsp), %r9
jle 0x4cfbb
movq 0x48(%rsp), %r15
addq 0xf8(%rsp), %r15
addq 0x20(%rsp), %r8
movq %r15, 0x48(%rsp)
cmpq 0x88(%rsp), %r15
jle 0x4cf8e
jmp 0x4cf58
movq %r8, %r15
movq %r9, 0x50(%rsp)
movq %r8, 0x150(%rsp)
cmpq 0x98(%rsp), %rbx
jle 0x4cffb
movq 0x50(%rsp), %r13
addq 0x100(%rsp), %r13
addq 0x108(%rsp), %r15
movq %r13, 0x50(%rsp)
cmpq 0x90(%rsp), %r13
jle 0x4cfcb
jmp 0x4cf98
movq %r15, %r13
movq %rbx, 0x58(%rsp)
movq %r15, 0x158(%rsp)
cmpq 0xa0(%rsp), %rsi
jle 0x4d03b
movq 0x58(%rsp), %r14
addq 0x110(%rsp), %r14
addq 0x118(%rsp), %r13
movq %r14, 0x58(%rsp)
cmpq 0x98(%rsp), %r14
jle 0x4d00b
jmp 0x4cfd5
movq %r13, 0x28(%rsp)
movq %rsi, 0x60(%rsp)
movq %r13, 0x160(%rsp)
cmpq 0xa8(%rsp), %rcx
jle 0x4d08f
movq 0x60(%rsp), %r14
addq 0x128(%rsp), %r14
movq 0x28(%rsp), %rax
addq 0x130(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r14, 0x60(%rsp)
cmpq 0xa0(%rsp), %r14
movq 0x120(%rsp), %rax
jle 0x4d04d
jmp 0x4d015
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x170(%rsp), %rax
cmpq 0xc0(%rsp), %rax
jle 0x4d10d
movq 0x78(%rsp), %rcx
addq 0x138(%rsp), %rcx
movq 0x30(%rsp), %rax
addq 0x140(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x78(%rsp)
cmpq 0xa8(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rsi
movq 0x148(%rsp), %rcx
movq 0x150(%rsp), %r8
movq 0x158(%rsp), %r15
movq 0x160(%rsp), %r13
jle 0x4d09e
jmp 0x4d057
movq 0x30(%rsp), %rcx
movq 0x3f8(%rsp), %r15
movq %rax, 0x198(%rsp)
movq 0x190(%rsp), %r13
cmpq 0xd8(%rsp), %r13
movq %rcx, 0x1a0(%rsp)
jg 0x4d1dc
leaq (%r11,%rbp,4), %r14
movq %rcx, %rbx
subq $0x8, %rsp
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0xd0(%rsp), %r9
movss 0x1c(%rsp), %xmm0
pushq %r15
leaq 0x360(%rsp), %rax
pushq %rax
leaq 0x1f(%rsp), %rax
pushq %rax
pushq %r14
pushq $0x1
callq 0x4bc91
addq $0x30, %rsp
testl %eax, %eax
jg 0x4d22f
movq 0x3f0(%rsp), %rax
testq %rax, %rax
je 0x4d1ab
cmpl $0x0, 0x350(%rsp)
je 0x4d1ab
movl $0x1, (%rax)
addq %r12, %rbp
addq 0x1b0(%rsp), %r14
addq 0x1a8(%rsp), %r13
addq 0x1b8(%rsp), %rbx
cmpq 0xd8(%rsp), %r13
movq 0xd0(%rsp), %rdi
jle 0x4d147
movq 0x198(%rsp), %rax
addq 0x178(%rsp), %rax
movq 0x1a0(%rsp), %rcx
addq 0x180(%rsp), %rcx
cmpq 0xc0(%rsp), %rax
movq 0x3e8(%rsp), %r11
movq 0xb8(%rsp), %r10
movq 0x188(%rsp), %r9
movq 0xb0(%rsp), %rbx
jle 0x4d11a
jmp 0x4d0b0
movl (%r15), %eax
jmp 0x4c981
leaq 0x8abe7(%rip), %rdx # 0xd7e25
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r12) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x4c981
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcole.c |
ffgcvc | int ffgcvc(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
float nulval, /* I - value for null pixels */
float *array, /* O - array of values that are read */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU. Automatic
datatype conversion will be performed if the datatype of the column does not
match the datatype of the array parameter. The output values will be scaled
by the FITS TSCALn and TZEROn values if these values have been defined.
Any undefined pixels will be set equal to the value of 'nulval' unless
nulval = 0 in which case no checks for undefined pixels will be made.
TSCAL and ZERO should not be used with complex values.
*/
{
char cdummy;
/* a complex value is interpreted as a pair of float values, thus */
/* need to multiply the first element and number of elements by 2 */
ffgcle(fptr, colnum, firstrow, (firstelem - 1) * 2 + 1, nelem *2,
1, 1, nulval, array, &cdummy, anynul, status);
return(*status);
} | pushq %rbx
subq $0x10, %rsp
movq %r9, %rax
movq 0x28(%rsp), %rbx
leaq -0x1(,%rcx,2), %rcx
addq %r8, %r8
subq $0x8, %rsp
leaq 0x17(%rsp), %r10
movl $0x1, %r9d
pushq %rbx
pushq 0x30(%rsp)
pushq %r10
pushq %rax
pushq $0x1
callq 0x4bc91
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcole.c |
fffi4r4 | int fffi4r4(INT32BIT *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */
float nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
float *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
output[ii] = (float) input[ii]; /* copy input to output */
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
output[ii] = (float) (input[ii] * scale + zero);
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = (float) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
output[ii] = (float) (input[ii] * scale + zero);
}
}
}
}
return(*status);
} | pushq %rbx
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %r10
xorpd %xmm3, %xmm3
cmpeqpd %xmm1, %xmm3
movsd 0x7aefe(%rip), %xmm4 # 0xc9080
cmpeqpd %xmm0, %xmm4
andpd %xmm3, %xmm4
movd %xmm4, %r11d
testl %edx, %edx
je 0x4e1e3
testb $0x1, %r11b
je 0x4e20c
testq %rsi, %rsi
jle 0x4e283
xorl %r11d, %r11d
movl (%rdi,%r11,4), %ebx
cmpl %ecx, %ebx
jne 0x4e1c2
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x4e1d1
movss %xmm2, (%r10,%r11,4)
jmp 0x4e1d6
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
movss %xmm0, (%r10,%r11,4)
jmp 0x4e1d6
movb $0x1, (%r8,%r11)
incq %r11
cmpq %r11, %rsi
jne 0x4e1a6
jmp 0x4e283
testb $0x1, %r11b
je 0x4e25a
testq %rsi, %rsi
jle 0x4e283
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsi2ssl (%rdi,%rcx,4), %xmm0
movss %xmm0, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x4e1f4
jmp 0x4e283
testq %rsi, %rsi
jle 0x4e283
xorl %r11d, %r11d
movl (%rdi,%r11,4), %ebx
cmpl %ecx, %ebx
jne 0x4e230
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x4e24b
movss %xmm2, (%r10,%r11,4)
jmp 0x4e250
xorps %xmm3, %xmm3
cvtsi2sd %ebx, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
cvtsd2ss %xmm3, %xmm3
movss %xmm3, (%r10,%r11,4)
jmp 0x4e250
movb $0x1, (%r8,%r11)
incq %r11
cmpq %r11, %rsi
jne 0x4e214
jmp 0x4e283
testq %rsi, %rsi
jle 0x4e283
xorl %ecx, %ecx
xorps %xmm2, %xmm2
cvtsi2sdl (%rdi,%rcx,4), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x4e261
movl (%rax), %eax
popq %rbx
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcole.c |
ffgsvi | int ffgsvi(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
short nulval, /* I - value to set undefined pixels */
short *array, /* O - array to be filled and returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dir[9];
long nelem, nultyp, ninc, numcol;
LONGLONG felem, dsize[10], blcll[9], trcll[9];
int hdutype, anyf;
char ldummy, msg[FLEN_ERRMSG];
int nullcheck = 1;
short nullvalue;
if (naxis < 1 || naxis > 9)
{
snprintf(msg,FLEN_ERRMSG, "NAXIS = %d in call to ffgsvi is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
nullvalue = nulval; /* set local variable */
fits_read_compressed_img(fptr, TSHORT, blcll, trcll, inc,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 1;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
dir[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
if (hdutype == IMAGE_HDU)
{
dir[ii] = -1;
}
else
{
snprintf(msg, FLEN_ERRMSG,"ffgsvi: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
dsize[ii] = dsize[ii] * dir[ii];
}
dsize[naxis] = dsize[naxis] * dir[naxis];
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1;
ninc = incr[0] * dir[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8])
{
for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7])
{
for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6])
{
for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5])
{
for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4])
{
for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3])
{
for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2])
{
for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1])
{
felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] +
(i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] +
(i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] +
(i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8];
if ( ffgcli(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &ldummy, &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp # imm = 0x3A8
movl %edx, %r13d
movl %esi, 0x8(%rsp)
movq 0x400(%rsp), %r12
leal -0xa(%r13), %eax
cmpl $-0xa, %eax
ja 0x4f7a0
leaq 0x8878c(%rip), %rdx # 0xd7ef8
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r12) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x4f873
movq %r9, %r15
movq %r8, %rbp
movq %rcx, %rbx
movzwl 0x3e8(%rsp), %r14d
movq %r12, %rsi
movq %rdi, %r12
callq 0x41127
testl %eax, %eax
je 0x4f848
shll $0x3, %r13d
leaq 0x350(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x1c0(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x260(%rsp), %rax
movw %r14w, (%rax)
subq $0x8, %rsp
movq %r12, %rdi
movl $0x15, %esi
movq %rbx, %rdx
movq %rbp, %rcx
movq 0x3e8(%rsp), %r8
movl $0x1, %r9d
movq 0x408(%rsp), %rbx
pushq %rbx
pushq 0x408(%rsp)
pushq $0x0
pushq 0x410(%rsp)
pushq %rax
callq 0x8b0dd
addq $0x30, %rsp
movl (%rbx), %eax
jmp 0x4f873
movq 0x3e0(%rsp), %r14
leaq 0x44(%rsp), %rsi
movq %r12, %rdi
movq 0x400(%rsp), %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x4f885
movq 0x400(%rsp), %rax
movl (%rax), %eax
addq $0x3a8, %rsp # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0xd0(%rsp)
movl 0x44(%rsp), %edx
movl %r13d, %eax
testl %edx, %edx
je 0x4f8c4
movq (%rbp,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq (%r15,%rax,8), %r10
movq %r14, %r11
movq (%r14,%rax,8), %rcx
movq %rcx, 0x18(%rsp)
movq 0x3f8(%rsp), %rcx
movq 0x400(%rsp), %r12
jmp 0x4f8fb
movl 0x8(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %r10
movl $0x2, 0x8(%rsp)
movl $0x1, %esi
movq %rsi, 0x18(%rsp)
movq %r10, 0x10(%rsp)
movq 0x3f8(%rsp), %rcx
movq 0x400(%rsp), %r12
movq %r14, %r11
testq %rcx, %rcx
je 0x4f906
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %esi
movq %rsi, 0x260(%rsp,%rcx,8)
movq %rsi, 0x300(%rsp,%rcx,8)
movq %rsi, 0x2b0(%rsp,%rcx,8)
movq %rsi, 0x1c0(%rsp,%rcx,8)
movq %rsi, 0x210(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x4f90d
testl %r13d, %r13d
je 0x4fa23
movq %rax, %rsi
negq %rsi
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdi
movq -0x8(%rbp,%rcx,8), %r8
cmpq %r8, %rdi
jge 0x4f97e
testl %edx, %edx
jne 0x50133
movq $-0x1, 0x208(%rsp,%rcx,8)
movq $-0x1, %r9
jmp 0x4f986
movq 0x208(%rsp,%rcx,8), %r9
movq %r8, 0x258(%rsp,%rcx,8)
movq %rdi, 0x2f8(%rsp,%rcx,8)
movq -0x8(%r11,%rcx,8), %rdi
movq %rdi, 0x2a8(%rsp,%rcx,8)
movq 0x1b8(%rsp,%rcx,8), %rdi
movq -0x8(%rbx,%rcx,8), %r8
imulq %rdi, %r8
movq %r8, 0x1c0(%rsp,%rcx,8)
imulq %rdi, %r9
movq %r9, 0x1b8(%rsp,%rcx,8)
leaq (%rsi,%rcx), %rdi
incq %rdi
incq %rcx
cmpq $0x1, %rdi
jne 0x4f952
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
cmpl $0x1, %r13d
jne 0x4fa3c
cmpq $0x1, (%rbx)
jne 0x4fa3c
movq 0x10(%rsp), %rcx
subq %rcx, %r10
movq %r10, %rax
cqto
movq 0x18(%rsp), %rsi
idivq %rsi
movq %rcx, %r10
movq %rsi, 0xc8(%rsp)
jmp 0x4fa6e
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
movq 0x300(%rsp), %rax
movq 0x210(%rsp), %rcx
subq 0x260(%rsp), %rax
imulq %rcx, %rax
cqto
idivq (%r11)
imulq 0x2b0(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %r10, 0x160(%rsp)
cmpq %r10, 0x10(%rsp)
jg 0x4f869
movq 0x2a0(%rsp), %rcx
movq 0x250(%rsp), %r10
movq %r10, %rdx
imulq %rcx, %rdx
movq %rdx, 0x78(%rsp)
movq 0x340(%rsp), %rdx
imulq %r10, %rdx
movq %rdx, 0x80(%rsp)
movq 0x298(%rsp), %rdi
movq 0x248(%rsp), %r8
movq %r8, %rdx
imulq %rdi, %rdx
movq %rdx, 0xb8(%rsp)
movq 0x338(%rsp), %rdx
imulq %r8, %rdx
movq %rdx, 0x88(%rsp)
movq 0x290(%rsp), %rsi
movq 0x240(%rsp), %r9
movq %r9, %r12
imulq %rsi, %r12
movq 0x330(%rsp), %rdx
imulq %r9, %rdx
movq %rdx, 0x90(%rsp)
movq 0x288(%rsp), %rdx
movq 0x200(%rsp), %r11
movq %r11, 0x20(%rsp)
imulq %r11, %r10
decq %rcx
imulq %r10, %rcx
movq 0x1f8(%rsp), %r10
imulq %r10, %r8
decq %rdi
imulq %r8, %rdi
movq 0x1f0(%rsp), %rbp
imulq %rbp, %r9
decq %rsi
imulq %r9, %rsi
movq %r12, %r9
movq 0x238(%rsp), %r8
addq %rdi, %rsi
movq %r8, %rdi
imulq %rdx, %rdi
movq 0x328(%rsp), %r12
imulq %r8, %r12
movq %r12, 0x98(%rsp)
movq 0x1e8(%rsp), %rbx
imulq %rbx, %r8
decq %rdx
imulq %r8, %rdx
movq %rdi, %r8
addq %rsi, %rdx
movq 0x280(%rsp), %rsi
movq 0x230(%rsp), %rdi
movq %rdi, %r11
imulq %rsi, %r11
movq %r11, 0xb0(%rsp)
movq 0x320(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xa0(%rsp)
movq %rax, 0x38(%rsp)
movq 0x1e0(%rsp), %rax
imulq %rax, %rdi
decq %rsi
imulq %rdi, %rsi
addq 0x260(%rsp), %rcx
addq %rdx, %rsi
addq %rcx, %rsi
movq 0x278(%rsp), %rcx
movq 0x228(%rsp), %rdx
movq %rdx, %r15
imulq %rcx, %r15
movq 0x318(%rsp), %rdi
imulq %rdx, %rdi
movq %rdi, 0xa8(%rsp)
movq 0x1d8(%rsp), %r13
imulq %r13, %rdx
decq %rcx
imulq %rdx, %rcx
movq 0x270(%rsp), %rdx
movq 0x220(%rsp), %rdi
movq %rdi, %r12
imulq %rdx, %r12
movq %r12, 0x168(%rsp)
movq 0x310(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xc0(%rsp)
movq 0x1d0(%rsp), %r14
imulq %r14, %rdi
decq %rdx
imulq %rdi, %rdx
addq %rcx, %rdx
movq 0x268(%rsp), %r12
movq 0x218(%rsp), %rcx
movq %rcx, %rdi
imulq %r12, %rdi
movq %rdi, 0x198(%rsp)
movq 0x308(%rsp), %rdi
imulq %rcx, %rdi
movq %rdi, 0xd8(%rsp)
movq 0x1c8(%rsp), %r11
imulq %r11, %rcx
decq %r12
imulq %rcx, %r12
movq 0x3f0(%rsp), %rcx
movq 0xd0(%rsp), %rdi
addq %rdx, %r12
addq %rsi, %r12
movq %r12, 0xe0(%rsp)
movq 0x38(%rsp), %rdx
leaq 0x1(%rdx), %r12
leaq 0x2(,%rdx,2), %rdx
movq %rdx, 0x1b8(%rsp)
movq 0x2f0(%rsp), %rdx
movq %rdx, 0xe8(%rsp)
movq 0x20(%rsp), %rsi
imulq %rdx, %rsi
movq %rsi, 0x20(%rsp)
movq 0x2e8(%rsp), %rdx
movq %rdx, 0xf0(%rsp)
imulq %rdx, %r10
movq %r10, 0xf8(%rsp)
movq 0x2e0(%rsp), %rsi
movq %rsi, 0x100(%rsp)
imulq %rsi, %rbp
movq %rbp, 0x108(%rsp)
movq 0x2d8(%rsp), %rsi
movq %rsi, 0x110(%rsp)
imulq %rsi, %rbx
movq %rbx, 0x118(%rsp)
movq %r15, %rsi
movq 0xb0(%rsp), %rbx
movq 0x2d0(%rsp), %r15
movq %r15, 0x120(%rsp)
imulq %r15, %rax
movq %rax, 0x128(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x140(%rsp)
imulq %rax, %r13
movq %r13, 0x148(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x170(%rsp)
imulq %rax, %r14
movq %r14, 0x178(%rsp)
movq 0x2b8(%rsp), %rax
movq %rax, 0x1b0(%rsp)
imulq %rax, %r11
movq %r11, 0x38(%rsp)
movq 0xb8(%rsp), %r11
xorl %ebp, %ebp
movq %rsi, 0x180(%rsp)
movq %r9, 0x190(%rsp)
movq %r8, 0x188(%rsp)
movq 0x80(%rsp), %rax
cmpq %rax, 0x78(%rsp)
jle 0x4fe2d
movq 0x10(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq 0x160(%rsp), %rax
jle 0x4fe00
jmp 0x4f869
movq 0xe0(%rsp), %r14
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
movzwl 0x3e8(%rsp), %eax
cmpq 0x88(%rsp), %r11
jle 0x4fe74
movq 0x48(%rsp), %r15
addq 0xe8(%rsp), %r15
addq 0x20(%rsp), %r14
movq %r15, 0x48(%rsp)
cmpq 0x80(%rsp), %r15
jle 0x4fe47
jmp 0x4fe0f
movq %r14, %r15
movq %r11, 0x50(%rsp)
movq %r14, 0x138(%rsp)
cmpq 0x90(%rsp), %r9
jle 0x4feb4
movq 0x50(%rsp), %r13
addq 0xf0(%rsp), %r13
addq 0xf8(%rsp), %r15
movq %r13, 0x50(%rsp)
cmpq 0x88(%rsp), %r13
jle 0x4fe84
jmp 0x4fe51
movq %r15, %r13
movq %r9, 0x58(%rsp)
movq %r15, 0x150(%rsp)
cmpq 0x98(%rsp), %r8
jle 0x4fefa
movq %rcx, %rdx
movq 0x58(%rsp), %rcx
addq 0x100(%rsp), %rcx
addq 0x108(%rsp), %r13
movq %rcx, 0x58(%rsp)
cmpq 0x90(%rsp), %rcx
movq %rdx, %rcx
jle 0x4fec4
jmp 0x4fe8e
movq %r13, %rdx
movq %r8, 0x60(%rsp)
movq %r13, 0x158(%rsp)
cmpq 0xa0(%rsp), %rbx
jle 0x4ff3a
movq 0x60(%rsp), %r10
addq 0x110(%rsp), %r10
addq 0x118(%rsp), %rdx
movq %r10, 0x60(%rsp)
cmpq 0x98(%rsp), %r10
jle 0x4ff0a
jmp 0x4fece
movq %rdx, 0x28(%rsp)
movq %rbx, 0x68(%rsp)
movq %rdx, 0x130(%rsp)
cmpq 0xa8(%rsp), %rsi
jle 0x4ff8e
movq 0x68(%rsp), %r10
addq 0x120(%rsp), %r10
movq 0x28(%rsp), %rdx
addq 0x128(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq %r10, 0x68(%rsp)
cmpq 0xa0(%rsp), %r10
movq 0x130(%rsp), %rdx
jle 0x4ff4c
jmp 0x4ff14
movq 0x28(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x168(%rsp), %rdx
cmpq 0xc0(%rsp), %rdx
jle 0x4fffa
movq 0x70(%rsp), %r10
addq 0x140(%rsp), %r10
movq 0x30(%rsp), %rdx
addq 0x148(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %r10, 0x70(%rsp)
cmpq 0xa8(%rsp), %r10
movq 0x138(%rsp), %r14
movq 0x150(%rsp), %r15
movq 0x158(%rsp), %r13
jle 0x4ff9d
jmp 0x4ff56
movq 0x30(%rsp), %r10
movq 0x400(%rsp), %r15
movq %rdx, 0x1a0(%rsp)
movq 0x198(%rsp), %r13
cmpq 0xd8(%rsp), %r13
movq %r10, 0x1a8(%rsp)
jg 0x500c8
leaq (%rcx,%rbp,2), %r14
movq %r10, %rbx
cwtl
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0xc8(%rsp), %r9
pushq %r15
leaq 0x358(%rsp), %r10
pushq %r10
leaq 0x1f(%rsp), %r10
pushq %r10
pushq %r14
pushq %rax
pushq $0x1
callq 0x4eb81
addq $0x30, %rsp
testl %eax, %eax
jg 0x5012b
movq 0x3f8(%rsp), %rax
testq %rax, %rax
je 0x50092
cmpl $0x0, 0x350(%rsp)
je 0x50092
movl $0x1, (%rax)
addq %r12, %rbp
addq 0x1b8(%rsp), %r14
addq 0x1b0(%rsp), %r13
addq 0x38(%rsp), %rbx
cmpq 0xd8(%rsp), %r13
movq 0xd0(%rsp), %rdi
movzwl 0x3e8(%rsp), %eax
jle 0x50034
movq 0x1a0(%rsp), %rdx
addq 0x170(%rsp), %rdx
movq 0x1a8(%rsp), %r10
addq 0x178(%rsp), %r10
cmpq 0xc0(%rsp), %rdx
movq 0x3f0(%rsp), %rcx
movq 0xb8(%rsp), %r11
movq 0x190(%rsp), %r9
movq 0x188(%rsp), %r8
movq 0xb0(%rsp), %rbx
movq 0x180(%rsp), %rsi
jle 0x50007
jmp 0x4ffaf
movl (%r15), %eax
jmp 0x4f873
leaq 0x87deb(%rip), %rdx # 0xd7f25
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r12) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x4f873
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoli.c |
fffi2i2 | int fffi2i2(short *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
short tnull, /* I - value of FITS TNULLn keyword if any */
short nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
short *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
memmove(output, input, ntodo * sizeof(short) );
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (dvalue > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (dvalue > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rsi
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %rdi
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x784dd(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %r11d
testl %edx, %edx
je 0x50c02
movq 0x20(%rsp), %r10
testb $0x1, %r11b
je 0x50c1c
testq %rax, %rax
jle 0x50d09
xorl %r11d, %r11d
movzwl (%rsi,%r11,2), %ebp
cmpw %cx, %bp
jne 0x50be9
movl $0x1, (%r10)
cmpl $0x1, %edx
jne 0x50bf0
movw %r8w, (%rdi,%r11,2)
jmp 0x50bf5
movw %bp, (%rdi,%r11,2)
jmp 0x50bf5
movb $0x1, (%r9,%r11)
incq %r11
cmpq %r11, %rax
jne 0x50bcc
jmp 0x50d09
testb $0x1, %r11b
je 0x50cab
addq %rax, %rax
movq %rax, %rdx
callq 0x63b0
jmp 0x50d09
testq %rax, %rax
jle 0x50d09
xorl %r11d, %r11d
movsd 0x872a0(%rip), %xmm2 # 0xd7ed0
movsd 0x872a0(%rip), %xmm3 # 0xd7ed8
movzwl (%rsi,%r11,2), %ebp
cmpw %cx, %bp
jne 0x50c55
movl $0x1, (%r10)
cmpl $0x1, %edx
jne 0x50c7c
movw %r8w, (%rdi,%r11,2)
jmp 0x50ca1
movswl %bp, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x50c83
movl $0xfffffff5, (%rbx) # imm = 0xFFFFFFF5
movw $0x8000, (%rdi,%r11,2) # imm = 0x8000
jmp 0x50ca1
movb $0x1, (%r9,%r11)
jmp 0x50ca1
ucomisd %xmm3, %xmm4
jbe 0x50c98
movl $0xfffffff5, (%rbx) # imm = 0xFFFFFFF5
movw $0x7fff, (%rdi,%r11,2) # imm = 0x7FFF
jmp 0x50ca1
cvttsd2si %xmm4, %ebp
movw %bp, (%rdi,%r11,2)
incq %r11
cmpq %r11, %rax
jne 0x50c38
jmp 0x50d09
testq %rax, %rax
jle 0x50d09
xorl %ecx, %ecx
movsd 0x87216(%rip), %xmm2 # 0xd7ed0
movsd 0x87216(%rip), %xmm3 # 0xd7ed8
movswl (%rsi,%rcx,2), %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x50ce7
movl $0xfffffff5, (%rbx) # imm = 0xFFFFFFF5
movw $0x8000, %dx # imm = 0x8000
jmp 0x50cfd
ucomisd %xmm3, %xmm4
jbe 0x50cf9
movl $0xfffffff5, (%rbx) # imm = 0xFFFFFFF5
movw $0x7fff, %dx # imm = 0x7FFF
jmp 0x50cfd
cvttsd2si %xmm4, %edx
movw %dx, (%rdi,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x50cc2
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoli.c |
fffr4i2 | int fffr4i2(float *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
short nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
short *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to NaN. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
short *sptr, iret;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (input[ii] > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (dvalue > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) dvalue;
}
}
}
else /* must check for null values */
{
sptr = (short *) input;
#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS
sptr++; /* point to MSBs */
#endif
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++, sptr += 2)
{
if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
output[ii] = 0;
}
else
{
if (input[ii] < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (input[ii] > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++, sptr += 2)
{
if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
{
if (zero < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (zero > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) zero;
}
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MIN;
}
else if (dvalue > DSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = SHRT_MAX;
}
else
output[ii] = (short) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %r10
testl %edx, %edx
je 0x51469
ucomisd 0x77cf7(%rip), %xmm0 # 0xc9080
jne 0x514f2
jp 0x514f2
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x514f2
jp 0x514f2
testq %rsi, %rsi
jle 0x5161d
xorl %r11d, %r11d
movl $0x7f80, %ebx # imm = 0x7F80
movl $0x1, %ebp
movsd 0x86b09(%rip), %xmm0 # 0xd7ed0
movsd 0x86b09(%rip), %xmm1 # 0xd7ed8
movzwl 0x2(%rdi,%r11,4), %r15d
xorl %r14d, %r14d
andl %ebx, %r15d
sete %r14b
addl %r14d, %r14d
cmpl %ebx, %r15d
cmovel %ebp, %r14d
testl %r14d, %r14d
je 0x51407
cmpl $0x1, %r14d
jne 0x51429
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x51432
movw %cx, (%r10,%r11,2)
jmp 0x51458
movss (%rdi,%r11,4), %xmm2
xorps %xmm3, %xmm3
cvtss2sd %xmm2, %xmm3
ucomisd %xmm3, %xmm0
jbe 0x51439
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x8000, (%r10,%r11,2) # imm = 0x8000
jmp 0x51458
movw $0x0, (%r10,%r11,2)
jmp 0x51458
movb $0x1, (%r8,%r11)
jmp 0x51458
ucomisd %xmm1, %xmm3
jbe 0x5144e
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x7fff, (%r10,%r11,2) # imm = 0x7FFF
jmp 0x51458
cvttss2si %xmm2, %r14d
movw %r14w, (%r10,%r11,2)
incq %r11
cmpq %r11, %rsi
jne 0x513cf
jmp 0x5161d
ucomisd 0x77c0f(%rip), %xmm0 # 0xc9080
jne 0x515c1
jp 0x515c1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x515c1
jp 0x515c1
testq %rsi, %rsi
jle 0x5161d
xorl %ecx, %ecx
movsd 0x86a2c(%rip), %xmm0 # 0xd7ed0
movsd 0x86a2c(%rip), %xmm1 # 0xd7ed8
movss (%rdi,%rcx,4), %xmm2
xorps %xmm3, %xmm3
cvtss2sd %xmm2, %xmm3
ucomisd %xmm3, %xmm0
jbe 0x514ca
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x8000, %dx # imm = 0x8000
jmp 0x514e0
ucomisd %xmm1, %xmm3
jbe 0x514dc
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x7fff, %dx # imm = 0x7FFF
jmp 0x514e0
cvttss2si %xmm2, %edx
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x514ac
jmp 0x5161d
testq %rsi, %rsi
jle 0x5161d
cvttsd2si %xmm1, %r11d
xorl %ebx, %ebx
movl $0x7f80, %ebp # imm = 0x7F80
movl $0x1, %r14d
movsd 0x869bb(%rip), %xmm2 # 0xd7ed0
movsd 0x869bb(%rip), %xmm3 # 0xd7ed8
movzwl 0x2(%rdi,%rbx,4), %r12d
xorl %r15d, %r15d
andl %ebp, %r12d
sete %r15b
addl %r15d, %r15d
cmpl %ebp, %r12d
cmovel %r14d, %r15d
testl %r15d, %r15d
je 0x51555
cmpl $0x1, %r15d
jne 0x5157d
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x51592
movw %cx, (%r10,%rbx,2)
jmp 0x515b3
xorps %xmm4, %xmm4
cvtss2sd (%rdi,%rbx,4), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
ja 0x51583
ucomisd %xmm3, %xmm4
ja 0x5159f
cvttsd2si %xmm4, %r15d
movw %r15w, (%r10,%rbx,2)
jmp 0x515b3
ucomisd %xmm1, %xmm2
jbe 0x51599
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x8000, (%r10,%rbx,2) # imm = 0x8000
jmp 0x515b3
movb $0x1, (%r8,%rbx)
jmp 0x515b3
ucomisd %xmm3, %xmm1
jbe 0x515ae
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x7fff, (%r10,%rbx,2) # imm = 0x7FFF
jmp 0x515b3
movw %r11w, (%r10,%rbx,2)
incq %rbx
cmpq %rbx, %rsi
jne 0x5151d
jmp 0x5161d
testq %rsi, %rsi
jle 0x5161d
xorl %ecx, %ecx
movsd 0x86900(%rip), %xmm2 # 0xd7ed0
movsd 0x86900(%rip), %xmm3 # 0xd7ed8
xorps %xmm4, %xmm4
cvtss2sd (%rdi,%rcx,4), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x515fa
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x8000, %dx # imm = 0x8000
jmp 0x51610
ucomisd %xmm3, %xmm4
jbe 0x5160c
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x7fff, %dx # imm = 0x7FFF
jmp 0x51610
cvttsd2si %xmm4, %edx
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x515d8
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoli.c |
ffgclj | int ffgclj( fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
long elemincre, /* I - pixel increment; e.g., 2 = every other */
int nultyp, /* I - null value handling code: */
/* 1: set undefined pixels = nulval */
/* 2: set nularray=1 for undefined pixels */
long nulval, /* I - value for null pixels if nultyp = 1 */
long *array, /* O - array of values that are read */
char *nularray, /* O - array of flags = 1 if nultyp = 2 */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU.
The column number may refer to a real column in an ASCII or binary table,
or it may refer be a virtual column in a 1 or more grouped FITS primary
array or image extension. FITSIO treats a primary array as a binary table
with 2 vector columns: the first column contains the group parameters (often
with length = 0) and the second column contains the array of image pixels.
Each row of the table represents a group in the case of multigroup FITS
images.
The output array of values will be converted from the datatype of the column
and will be scaled by the FITS TSCALn and TZEROn values if necessary.
*/
{
double scale, zero, power = 1., dtemp;
int tcode, maxelem2, hdutype, xcode, decimals;
long twidth, incre;
long ii, xwidth, ntodo;
int convert, nulcheck, readcheck = 0;
LONGLONG repeat, startpos, elemnum, readptr, tnull;
LONGLONG rowlen, rownum, remain, next, rowincre, maxelem;
char tform[20];
char message[FLEN_ERRMSG];
char snull[20]; /* the FITS null value if reading from ASCII table */
double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */
void *buffer;
if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */
return(*status);
buffer = cbuff;
if (anynul)
*anynul = 0;
if (nultyp == 2)
memset(nularray, 0, (size_t) nelem); /* initialize nullarray */
/*---------------------------------------------------*/
/* Check input and get parameters about the column: */
/*---------------------------------------------------*/
if (elemincre < 0)
readcheck = -1; /* don't do range checking in this case */
if (ffgcprll(fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero,
tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre,
&repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 )
return(*status);
maxelem = maxelem2;
incre *= elemincre; /* multiply incre to just get every nth pixel */
if (tcode == TSTRING) /* setup for ASCII tables */
{
/* get the number of implied decimal places if no explicit decmal point */
ffasfm(tform, &xcode, &xwidth, &decimals, status);
for(ii = 0; ii < decimals; ii++)
power *= 10.;
}
/*------------------------------------------------------------------*/
/* Decide whether to check for null values in the input FITS file: */
/*------------------------------------------------------------------*/
nulcheck = nultyp; /* by default check for null values in the FITS file */
if (nultyp == 1 && nulval == 0)
nulcheck = 0; /* calling routine does not want to check for nulls */
else if (tcode%10 == 1 && /* if reading an integer column, and */
tnull == NULL_UNDEFINED) /* if a null value is not defined, */
nulcheck = 0; /* then do not check for null values. */
else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TBYTE && (tnull > 255 || tnull < 0) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED)
nulcheck = 0;
/*----------------------------------------------------------------------*/
/* If FITS column and output data array have same datatype, then we do */
/* not need to use a temporary buffer to store intermediate datatype. */
/*----------------------------------------------------------------------*/
convert = 1;
if ((tcode == TLONG) && (LONGSIZE == 32)) /* Special Case: */
{ /* no type convertion required, so read */
/* data directly into output buffer. */
if (nelem < (LONGLONG)INT32_MAX/4) {
maxelem = nelem;
} else {
maxelem = INT32_MAX/4;
}
if (nulcheck == 0 && scale == 1. && zero == 0. )
convert = 0; /* no need to scale data or find nulls */
}
/*---------------------------------------------------------------------*/
/* Now read the pixels from the FITS column. If the column does not */
/* have the same datatype as the output array, then we have to read */
/* the raw values into a temporary buffer (of limited size). In */
/* the case of a vector colum read only 1 vector of values at a time */
/* then skip to the next row if more values need to be read. */
/* After reading the raw values, then call the fffXXYY routine to (1) */
/* test for undefined values, (2) convert the datatype if necessary, */
/* and (3) scale the values by the FITS TSCALn and TZEROn linear */
/* scaling parameters. */
/*---------------------------------------------------------------------*/
remain = nelem; /* remaining number of values to read */
next = 0; /* next element in array to be read */
rownum = 0; /* row number, relative to firstrow */
while (remain)
{
/* limit the number of pixels to read at one time to the number that
will fit in the buffer or to the number of pixels that remain in
the current vector, which ever is smaller.
*/
ntodo = (long) minvalue(remain, maxelem);
if (elemincre >= 0)
{
ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1));
}
else
{
ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1));
}
readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre));
switch (tcode)
{
case (TLONG):
if (LONGSIZE == 32) {
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next],
status);
if (convert)
fffi4i4((INT32BIT *) &array[next], ntodo, scale, zero,
nulcheck, (INT32BIT) tnull, nulval, &nularray[next],
anynul, &array[next], status);
} else { /* case where sizeof(long) = 8 */
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer,
status);
if (convert)
fffi4i4((INT32BIT *) buffer, ntodo, scale, zero,
nulcheck, (INT32BIT) tnull, nulval, &nularray[next],
anynul, &array[next], status);
}
break;
case (TLONGLONG):
ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status);
fffi8i4((LONGLONG *) buffer, ntodo, scale, zero,
nulcheck, tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TBYTE):
ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer,
status);
fffi1i4((unsigned char *) buffer, ntodo, scale, zero, nulcheck,
(unsigned char) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSHORT):
ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status);
fffi2i4((short *) buffer, ntodo, scale, zero, nulcheck,
(short) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TFLOAT):
ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status);
fffr4i4((float *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TDOUBLE):
ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status);
fffr8i4((double *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSTRING):
ffmbyt(fptr, readptr, REPORT_EOF, status);
if (incre == twidth) /* contiguous bytes */
ffgbyt(fptr, ntodo * twidth, buffer, status);
else
ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer,
status);
fffstri4((char *) buffer, ntodo, scale, zero, twidth, power,
nulcheck, snull, nulval, &nularray[next], anynul,
&array[next], status);
break;
default: /* error trap for invalid column format */
snprintf(message, FLEN_ERRMSG,
"Cannot read numbers from column %d which has format %s",
colnum, tform);
ffpmsg(message);
if (hdutype == ASCII_TBL)
return(*status = BAD_ATABLE_FORMAT);
else
return(*status = BAD_BTABLE_FORMAT);
} /* End of switch block */
/*-------------------------*/
/* Check for fatal error */
/*-------------------------*/
if (*status > 0) /* test for error during previous read operation */
{
dtemp = (double) next;
if (hdutype > 0)
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from column %d (ffgclj).",
dtemp+1., dtemp+ntodo, colnum);
else
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from image (ffgclj).",
dtemp+1., dtemp+ntodo);
ffpmsg(message);
return(*status);
}
/*--------------------------------------------*/
/* increment the counters for the next loop */
/*--------------------------------------------*/
remain -= ntodo;
if (remain)
{
next += ntodo;
elemnum = elemnum + (ntodo * elemincre);
if (elemnum >= repeat) /* completed a row; start on later row */
{
rowincre = elemnum / repeat;
rownum += rowincre;
elemnum = elemnum - (rowincre * repeat);
}
else if (elemnum < 0) /* completed a row; start on a previous row */
{
rowincre = (-elemnum - 1) / repeat + 1;
rownum -= rowincre;
elemnum = (rowincre * repeat) + elemnum;
}
}
} /* End of main while Loop */
/*--------------------------------*/
/* check for numerical overflow */
/*--------------------------------*/
if (*status == OVERFLOW_ERR)
{
ffpmsg(
"Numerical overflow during type conversion while reading FITS data.");
*status = NUM_OVERFLOW;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x71c8, %rsp # imm = 0x71C8
movq %rcx, %r13
movq %rdx, %rbp
movq 0x7228(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
setg %cl
testq %r8, %r8
sete %dl
orb %cl, %dl
jne 0x524b6
movq %r9, %r14
movq %r8, %r15
movq %rdi, %r12
movq 0x7220(%rsp), %rax
testq %rax, %rax
je 0x51d6b
movl $0x0, (%rax)
cmpl $0x2, 0x7200(%rsp)
jne 0x51d8b
movq 0x7218(%rsp), %rdi
movl %esi, %ebx
xorl %esi, %esi
movq %r15, %rdx
callq 0x6090
movl %ebx, %esi
movq %r14, %r9
sarq $0x3f, %r9
subq $0x8, %rsp
leaq 0xa8(%rsp), %r10
leaq 0x38(%rsp), %r11
leaq 0x4c(%rsp), %rax
movq %r12, %rdi
movq %r12, %rbx
movl %esi, %r12d
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
movq 0x7230(%rsp), %r13
pushq %r13
pushq %r10
pushq %r11
pushq %rax
leaq 0xb0(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
leaq 0xd8(%rsp), %rax
pushq %rax
leaq 0xac(%rsp), %rax
pushq %rax
leaq 0x84(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0x128(%rsp), %rax
pushq %rax
leaq 0x88(%rsp), %rax
pushq %rax
leaq 0x98(%rsp), %rax
pushq %rax
callq 0x3e16b
addq $0x80, %rsp
testl %eax, %eax
jle 0x51e42
movl (%r13), %eax
jmp 0x524b6
movq %rbx, 0x10(%rsp)
movl %r12d, 0x40(%rsp)
movslq 0x5c(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rax
imulq %r14, %rax
movq %rax, 0x48(%rsp)
movsd 0x77211(%rip), %xmm1 # 0xc9080
cmpl $0x10, 0x2c(%rsp)
jne 0x51edc
leaq 0xc0(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
leaq 0x98(%rsp), %rbp
movq %rbp, %rcx
movq 0x7228(%rsp), %rbx
movq %rbx, %r8
callq 0x39e6d
movsd 0x771cf(%rip), %xmm1 # 0xc9080
movslq (%rbp), %rax
testq %rax, %rax
movl 0x7200(%rsp), %edi
jle 0x51eeb
movsd 0x771b7(%rip), %xmm1 # 0xc9080
movsd 0x85bd7(%rip), %xmm0 # 0xd7aa8
mulsd %xmm0, %xmm1
decq %rax
jne 0x51ed1
jmp 0x51eeb
movq 0x7228(%rsp), %rbx
movl 0x7200(%rsp), %edi
cmpl $0x1, %edi
sete %al
cmpq $0x0, 0x7208(%rsp)
sete %cl
movl $0x0, 0xc(%rsp)
testb %cl, %al
jne 0x51f87
movslq 0x2c(%rsp), %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x1, %edx
sete %dl
movq 0x30(%rsp), %rcx
cmpq $0x4995cdd1, %rcx # imm = 0x4995CDD1
sete %sil
testb %sil, %dl
jne 0x51f87
cmpl $0x15, %eax
sete %dl
movswq %cx, %rsi
cmpq %rcx, %rsi
setne %sil
testb %sil, %dl
jne 0x51f87
cmpl $0xb, %eax
sete %dl
cmpq $0x100, %rcx # imm = 0x100
setae %cl
testb %cl, %dl
jne 0x51f87
xorl %ecx, %ecx
cmpb $0x1, 0xa0(%rsp)
cmovnel %edi, %ecx
cmpl $0x10, %eax
cmovnel %edi, %ecx
movl %ecx, 0xc(%rsp)
movq %r14, %rax
negq %rax
movq %rax, 0x78(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x50(%rsp)
movsd %xmm1, 0x70(%rsp)
movq 0x80(%rsp), %rcx
cmpq %rcx, %r15
cmovlq %r15, %rcx
testq %r14, %r14
js 0x51fcf
movq 0x38(%rsp), %rsi
movq %rsi, %rax
notq %rax
addq 0x60(%rsp), %rax
cqto
idivq %r14
jmp 0x51fde
movq 0x38(%rsp), %rsi
movq %rsi, %rax
cqto
idivq 0x78(%rsp)
leaq 0x1(%rax), %rbp
cmpq %rax, %rcx
cmovleq %rcx, %rbp
movq 0x88(%rsp), %rdi
imulq 0x50(%rsp), %rdi
addq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r14
imulq %rsi, %rax
addq %rdi, %rax
movl 0x2c(%rsp), %edx
cmpl $0x28, %edx
jle 0x520a3
cmpl $0x50, %edx
jg 0x5212e
cmpl $0x29, %edx
je 0x521ac
cmpl $0x2a, %edx
jne 0x524c8
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc306e
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x7218(%rsp), %rax
leaq (%rax,%r12), %r8
movq 0x7210(%rsp), %rax
leaq (%rax,%r12,8), %rax
movq %r13, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq 0x7208(%rsp), %rcx
movq 0x7220(%rsp), %r9
pushq %rbx
pushq %rax
callq 0x54465
jmp 0x521a3
cmpl $0xb, %edx
je 0x522d5
cmpl $0x10, %edx
je 0x5228b
cmpl $0x15, %edx
jne 0x524c8
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2e32
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movswl 0x30(%rsp), %ecx
movq 0x7218(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7238(%rsp)
callq 0x542af
jmp 0x523b9
cmpl $0x51, %edx
je 0x5221b
cmpl $0x52, %edx
jne 0x524c8
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc312e
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x7218(%rsp), %rax
leaq (%rax,%r12), %r8
movq 0x7210(%rsp), %rax
leaq (%rax,%r12,8), %rax
movq %r13, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq 0x7208(%rsp), %rcx
movq 0x7220(%rsp), %r9
pushq %rbx
pushq %rax
callq 0x54755
addq $0x10, %rsp
jmp 0x523bd
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2eee
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movl 0x30(%rsp), %ecx
movq 0x7218(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7238(%rsp)
callq 0x53cb6
jmp 0x523b9
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2fae
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x30(%rsp), %rcx
movq 0x7218(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7238(%rsp)
callq 0x53e5f
jmp 0x523b9
movq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x48(%rsp), %rsi
movq 0x68(%rsp), %rax
movq %rsi, %rcx
subq %rax, %rcx
jne 0x52342
imulq %rbp, %rsi
movq %r13, %rdi
leaq 0x140(%rsp), %r13
movq %r13, %rdx
movq %rbx, %rcx
callq 0xc25e0
jmp 0x5235e
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2d8f
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movzbl 0x30(%rsp), %ecx
movq 0x7218(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7238(%rsp)
callq 0x540fb
jmp 0x523b9
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x140(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc27d1
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x68(%rsp), %rdx
movq 0x7218(%rsp), %rax
addq %r12, %rax
movq 0x7210(%rsp), %rcx
leaq (%rcx,%r12,8), %r10
movq %r13, %rdi
movq %rbp, %rsi
movsd 0x70(%rsp), %xmm2
movl 0xc(%rsp), %ecx
leaq 0xa0(%rsp), %r8
movq 0x7208(%rsp), %r9
pushq %rbx
pushq %r10
movq 0x7230(%rsp), %r13
pushq %r13
pushq %rax
callq 0x54a31
addq $0x20, %rsp
movl (%rbx), %eax
testl %eax, %eax
jg 0x52426
subq %rbp, %r15
je 0x5246e
addq %rbp, %r12
imulq %r14, %rbp
addq 0x38(%rsp), %rbp
movq %rbp, 0x38(%rsp)
movq 0x60(%rsp), %rcx
cmpq %rcx, %rbp
jge 0x5240f
testq %rbp, %rbp
jns 0x51fa4
movq %rbp, %rax
notq %rax
cqto
idivq %rcx
movq %rax, %rdx
incq %rdx
subq %rdx, 0x50(%rsp)
imulq %rcx, %rdx
addq %rbp, %rdx
jmp 0x5241c
movq %rbp, %rax
cqto
idivq %rcx
addq %rax, 0x50(%rsp)
movq %rdx, 0x38(%rsp)
jmp 0x51fa4
xorps %xmm2, %xmm2
cvtsi2sd %r12, %xmm2
cmpl $0x0, 0x44(%rsp)
movsd 0x76c45(%rip), %xmm0 # 0xc9080
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rbp, %xmm1
addsd %xmm2, %xmm1
jle 0x5248c
leaq 0x85bee(%rip), %rdx # 0xd8042
leaq 0xe0(%rsp), %rdi
movl $0x51, %esi
movl 0x40(%rsp), %ecx
movb $0x2, %al
callq 0x60b0
jmp 0x524a7
cmpl $-0xb, %eax
jne 0x524b6
leaq 0x85777(%rip), %rdi # 0xd7bf1
callq 0x37264
movl $0x19c, (%rbx) # imm = 0x19C
movl $0x19c, %eax # imm = 0x19C
jmp 0x524b6
leaq 0x85bee(%rip), %rdx # 0xd8081
leaq 0xe0(%rsp), %rdi
movl $0x51, %esi
movb $0x2, %al
callq 0x60b0
leaq 0xe0(%rsp), %rdi
callq 0x37264
movl (%rbx), %eax
addq $0x71c8, %rsp # imm = 0x71C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x85843(%rip), %rdx # 0xd7d12
leaq 0xe0(%rsp), %r14
leaq 0xc0(%rsp), %r8
movl $0x51, %esi
movq %r14, %rdi
movl 0x40(%rsp), %ecx
xorl %eax, %eax
callq 0x60b0
movq %r14, %rdi
callq 0x37264
cmpl $0x1, 0x44(%rsp)
jne 0x5250e
movl $0x137, (%rbx) # imm = 0x137
movl $0x137, %eax # imm = 0x137
jmp 0x524b6
movl $0x138, (%rbx) # imm = 0x138
movl $0x138, %eax # imm = 0x138
jmp 0x524b6
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
ffgpfj | int ffgpfj( fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
long *array, /* O - array of values that are returned */
char *nularray, /* O - array of null pixel flags */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Any undefined pixels in the returned array will be set = 0 and the
corresponding nularray value will be set = 1.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
long row;
int nullcheck = 2;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
fits_read_compressed_pixels(fptr, TLONG, firstelem, nelem,
nullcheck, NULL, array, nularray, anynul, status);
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgclj(fptr, 2, row, firstelem, nelem, 1, 2, 0L,
array, nularray, anynul, status);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x48(%rsp), %rsi
callq 0x41127
testl %eax, %eax
je 0x52576
movq %rbp, %rdi
movl $0x29, %esi
movq %r13, %rdx
movq %r12, %rcx
movl $0x2, %r8d
xorl %r9d, %r9d
movq 0x48(%rsp), %rbx
pushq %rbx
pushq 0x48(%rsp)
pushq %r15
pushq %r14
callq 0x8cb5a
addq $0x20, %rsp
jmp 0x525b5
cmpq $0x2, %rbx
movl $0x1, %eax
cmovlq %rax, %rbx
movl $0x1, %r9d
movq %rbp, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq %r13, %rcx
movq %r12, %r8
movq 0x48(%rsp), %rbx
pushq %rbx
pushq 0x48(%rsp)
pushq %r15
pushq %r14
pushq $0x0
pushq $0x2
callq 0x51d1b
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
ffgsfj | int ffgsfj(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
long *array, /* O - array to be filled and returned */
char *flagval, /* O - set to 1 if corresponding value is null */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dsize[10];
LONGLONG blcll[9], trcll[9];
long felem, nelem, nultyp, ninc, numcol;
long nulval = 0;
int hdutype, anyf;
char msg[FLEN_ERRMSG];
int nullcheck = 2;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsvj is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
fits_read_compressed_img(fptr, TLONG, blcll, trcll, inc,
nullcheck, NULL, array, flagval, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 2;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
snprintf(msg, FLEN_ERRMSG,"ffgsvj: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
}
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0] - str[0]) / inc[0] + 1;
ninc = incr[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8])
{
for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7])
{
for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6])
{
for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5])
{
for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4])
{
for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3])
{
for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2])
{
for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1])
{
felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] +
(i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] +
(i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] +
(i7 - 1) * dsize[7] + (i8 - 1) * dsize[8];
if ( ffgclj(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &flagval[i0], &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp # imm = 0x348
movl %edx, %r12d
movl %esi, 0x4(%rsp)
movq 0x3a0(%rsp), %r13
leal -0xa(%r12), %eax
cmpl $-0xa, %eax
ja 0x53303
leaq 0x84d19(%rip), %rdx # 0xd7fe8
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r13) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x533a7
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %rbp
movq %r13, %rsi
callq 0x41127
testl %eax, %eax
je 0x5338f
shll $0x3, %r12d
leaq 0x2f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x65c0
leaq 0x2a0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x65c0
subq $0x8, %rsp
movq %rbp, %rdi
movl $0x29, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x388(%rsp), %r8
movl $0x2, %r9d
pushq %r13
pushq 0x3a8(%rsp)
pushq 0x3a8(%rsp)
pushq 0x3a8(%rsp)
pushq $0x0
callq 0x8b0dd
addq $0x30, %rsp
jmp 0x533a3
leaq 0x74(%rsp), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x533b9
movl (%r13), %eax
addq $0x348, %rsp # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x74(%rsp)
movl %r12d, %eax
je 0x533fb
movq (%rbx,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq (%r15,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x380(%rsp), %r9
movq (%r9,%rax,8), %rdi
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
movq 0x398(%rsp), %rcx
jmp 0x5343f
movl 0x4(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %rcx
movl $0x2, 0x4(%rsp)
movl $0x1, %edi
movq %rcx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
movq 0x398(%rsp), %rcx
movq 0x380(%rsp), %r9
testq %rcx, %rcx
je 0x5344a
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %edx
movq %rdx, 0x1b0(%rsp,%rcx,8)
movq %rdx, 0x250(%rsp,%rcx,8)
movq %rdx, 0x200(%rsp,%rcx,8)
movq %rdx, 0x2a0(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x53451
testl %r12d, %r12d
je 0x53516
negq %rax
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdx
movq -0x8(%rbx,%rcx,8), %rsi
cmpq %rsi, %rdx
jl 0x53baf
movq %rsi, 0x1a8(%rsp,%rcx,8)
movq %rdx, 0x248(%rsp,%rcx,8)
movq -0x8(%r9,%rcx,8), %rdx
movq %rdx, 0x1f8(%rsp,%rcx,8)
movq -0x8(%r14,%rcx,8), %rdx
imulq 0x298(%rsp,%rcx,8), %rdx
movq %rdx, 0x2a0(%rsp,%rcx,8)
leaq (%rax,%rcx), %rdx
incq %rdx
incq %rcx
cmpq $0x1, %rdx
jne 0x5348b
cmpl $0x1, %r12d
jne 0x53516
cmpq $0x1, (%r14)
jne 0x53516
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
cqto
idivq %rdi
movq %rax, %rdx
movq %rcx, 0x10(%rsp)
movq %rdi, 0x78(%rsp)
movq %rdi, 0x108(%rsp)
jmp 0x53543
movq %rdi, 0x78(%rsp)
movq 0x250(%rsp), %rax
subq 0x1b0(%rsp), %rax
cqto
idivq (%r9)
movq %rax, %rdx
movq 0x200(%rsp), %rcx
movq %rcx, 0x108(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, 0x8(%rsp)
jle 0x53557
movl (%r10), %eax
jmp 0x533a7
movq %rbp, %r14
movq 0x1f0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x1e8(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x1e0(%rsp), %rbx
movq %rbx, 0xf0(%rsp)
movq 0x1d8(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
movq 0x1d0(%rsp), %r11
movq 0x1c8(%rsp), %r12
movq 0x2b8(%rsp), %rbp
movq %rbp, 0x58(%rsp)
movq 0x2c0(%rsp), %r13
movq %r13, 0x30(%rsp)
movq 0x2c8(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x2d8(%rsp), %r15
movq 0x2e0(%rsp), %r9
decq %rcx
imulq %r15, %rcx
leaq -0x1(%rbx), %rdx
imulq %rax, %rdx
addq %rcx, %rdx
leaq -0x1(%rdi), %rcx
imulq %rsi, %rcx
addq %rdx, %rcx
movq %r11, 0xe0(%rsp)
leaq -0x1(%r11), %rdx
imulq %r13, %rdx
addq %rcx, %rdx
movq 0x68(%rsp), %rax
leaq -0x1(%rax), %rcx
imulq %r9, %rcx
addq 0x1b0(%rsp), %rcx
addq %rcx, %rdx
leaq -0x1(%r12), %rcx
imulq %rbp, %rcx
movq 0x1c0(%rsp), %rdi
movq 0x2b0(%rsp), %r11
leaq -0x1(%rdi), %rsi
imulq %r11, %rsi
addq %rcx, %rsi
movq %r12, %rcx
movq 0x1b8(%rsp), %r12
movq 0x2a8(%rsp), %rbx
movq %r12, 0x180(%rsp)
decq %r12
imulq %rbx, %r12
addq %rsi, %r12
movq 0x388(%rsp), %rbp
addq %rdx, %r12
movq %r12, 0x110(%rsp)
movq %rdi, %rdx
movq 0x18(%rsp), %rax
leaq 0x1(%rax), %r12
leaq 0x8(,%rax,8), %rsi
movq %rsi, 0x1a0(%rsp)
movq 0x240(%rsp), %r13
movq %r13, 0x118(%rsp)
imulq %r13, %r9
movq %r9, 0x120(%rsp)
movq 0xf0(%rsp), %r9
movq 0x238(%rsp), %r13
movq %r13, 0x128(%rsp)
imulq %r13, %r15
movq %r15, 0x130(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x20(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x20(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x28(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x30(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x30(%rsp)
movq 0x218(%rsp), %rax
movq %rax, 0x150(%rsp)
movq 0x58(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x58(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0x168(%rsp)
imulq %rax, %r11
movq %r11, 0x170(%rsp)
movq 0xe8(%rsp), %r11
movq 0x208(%rsp), %rax
movq %rax, 0x198(%rsp)
imulq %rax, %rbx
movq %rbx, 0x1a8(%rsp)
movq 0x290(%rsp), %rbx
movq 0x288(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x280(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x278(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x268(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x100(%rsp)
xorl %r15d, %r15d
movq %rcx, 0xf8(%rsp)
movq %rdi, 0x178(%rsp)
movq %rbx, 0x160(%rsp)
cmpq %rbx, 0x68(%rsp)
jle 0x5385a
movq 0x8(%rsp), %rax
addq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rax
jle 0x53838
jmp 0x5354f
movq 0x110(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jle 0x538bd
movq %rbp, %rax
movq %rax, %rbp
movq 0x80(%rsp), %r13
addq 0x118(%rsp), %r13
movq 0x38(%rsp), %rax
addq 0x120(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %r13, 0x80(%rsp)
cmpq %rbx, %r13
jle 0x53874
jmp 0x5383f
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %rbp, %rax
movq 0xe0(%rsp), %r13
cmpq 0xc0(%rsp), %r9
jle 0x5392d
movq 0x88(%rsp), %rcx
addq 0x128(%rsp), %rcx
movq 0x40(%rsp), %rbp
addq 0x130(%rsp), %rbp
movq %rbp, 0x40(%rsp)
movq %rcx, 0x88(%rsp)
cmpq 0xb8(%rsp), %rcx
movq 0xf8(%rsp), %rcx
jle 0x538e2
jmp 0x53889
movq 0x40(%rsp), %rbp
movq %r9, 0x90(%rsp)
cmpq 0xc8(%rsp), %r11
jle 0x53970
movq 0x90(%rsp), %rdi
addq 0x138(%rsp), %rdi
addq 0x20(%rsp), %rbp
movq %rdi, 0x90(%rsp)
cmpq 0xc0(%rsp), %rdi
jle 0x5393a
jmp 0x538ec
movq %rbp, 0x48(%rsp)
movq %r11, 0x98(%rsp)
movq %rbp, 0x158(%rsp)
cmpq 0xd0(%rsp), %r13
jle 0x539c2
movq 0x98(%rsp), %rsi
addq 0x140(%rsp), %rsi
movq 0x48(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq %rdi, 0x48(%rsp)
movq %rsi, 0x98(%rsp)
cmpq 0xc8(%rsp), %rsi
jle 0x53985
jmp 0x53944
movq 0x48(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq %r13, 0xa0(%rsp)
cmpq 0xd8(%rsp), %rcx
jle 0x53a14
movq 0xa0(%rsp), %rdi
addq 0x148(%rsp), %rdi
movq 0x50(%rsp), %rsi
addq 0x30(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq %rdi, 0xa0(%rsp)
cmpq 0xd0(%rsp), %rdi
jle 0x539d4
jmp 0x5398f
movq 0x50(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rcx, 0xa8(%rsp)
cmpq 0x100(%rsp), %rdx
jle 0x53a6e
movq 0xa8(%rsp), %rdi
addq 0x150(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq 0x58(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rdi, 0xa8(%rsp)
cmpq 0xd8(%rsp), %rdi
movq 0x158(%rsp), %rbp
jle 0x53a26
jmp 0x539de
movq 0x60(%rsp), %rsi
movq %rdx, %rbp
movq %rbp, 0x188(%rsp)
movq 0x180(%rsp), %rbp
cmpq 0x18(%rsp), %rbp
movq %rsi, 0x190(%rsp)
jg 0x53b35
leaq (%rax,%r15,8), %r13
movq %rsi, %rbx
leaq (%r8,%r15), %rax
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x108(%rsp), %r9
pushq %r10
leaq 0x2f8(%rsp), %r10
pushq %r10
pushq %rax
pushq %r13
pushq $0x0
pushq $0x2
callq 0x51d1b
addq $0x30, %rsp
testl %eax, %eax
jg 0x53ba0
movq 0x398(%rsp), %rax
testq %rax, %rax
je 0x53aff
cmpl $0x0, 0x2f0(%rsp)
je 0x53aff
movl $0x1, (%rax)
addq %r12, %r15
addq 0x198(%rsp), %rbp
addq 0x1a0(%rsp), %r13
addq 0x1a8(%rsp), %rbx
cmpq 0x18(%rsp), %rbp
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
jle 0x53aa0
movq 0x188(%rsp), %rbp
addq 0x168(%rsp), %rbp
movq 0x190(%rsp), %rsi
addq 0x170(%rsp), %rsi
cmpq 0x100(%rsp), %rbp
movq 0x388(%rsp), %rax
movq 0xf0(%rsp), %r9
movq 0xe8(%rsp), %r11
movq 0xe0(%rsp), %r13
movq 0xf8(%rsp), %rcx
movq 0x178(%rsp), %rdx
movq 0x160(%rsp), %rbx
jle 0x53a76
jmp 0x53a30
movq 0x3a0(%rsp), %rax
movl (%rax), %eax
jmp 0x533a7
leaq 0x8445f(%rip), %rdx # 0xd8015
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
movq %r10, %r14
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r14) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x533a7
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
fffi1i4 | int fffi1i4(unsigned char *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
unsigned char tnull, /* I - value of FITS TNULLn keyword if any */
long nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
long *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
output[ii] = (long) input[ii]; /* copy input to output */
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DLONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = LONG_MIN;
}
else if (dvalue > DLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = LONG_MAX;
}
else
output[ii] = (long) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = (long) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DLONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = LONG_MIN;
}
else if (dvalue > DLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = LONG_MAX;
}
else
output[ii] = (long) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x74f62(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x54178
movq 0x30(%rsp), %r11
testb $0x1, %bl
je 0x541a1
testq %rsi, %rsi
jle 0x542a4
xorl %ebx, %ebx
movzbl (%rdi,%rbx), %r14d
cmpb %cl, %r14b
jne 0x54160
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x54166
movq %r8, (%r10,%rbx,8)
jmp 0x5416b
movq %r14, (%r10,%rbx,8)
jmp 0x5416b
movb $0x1, (%r9,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x54144
jmp 0x542a4
testb $0x1, %bl
je 0x54237
testq %rsi, %rsi
jle 0x542a4
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x5418c
jmp 0x542a4
testq %rsi, %rsi
jle 0x542a4
movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF
xorl %r14d, %r14d
movsd 0x83e11(%rip), %xmm2 # 0xd7fd0
leaq 0x1(%rbx), %r15
movsd 0x83e0d(%rip), %xmm3 # 0xd7fd8
movb (%rdi,%r14), %bpl
cmpb %cl, %bpl
jne 0x541e6
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x5420b
movq %r8, (%r10,%r14,8)
jmp 0x5422d
movzbl %bpl, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x54212
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %r15, (%r10,%r14,8)
jmp 0x5422d
movb $0x1, (%r9,%r14)
jmp 0x5422d
ucomisd %xmm3, %xmm4
jbe 0x54224
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %rbx, (%r10,%r14,8)
jmp 0x5422d
cvttsd2si %xmm4, %r12
movq %r12, (%r10,%r14,8)
incq %r14
cmpq %r14, %rsi
jne 0x541cb
jmp 0x542a4
testq %rsi, %rsi
jle 0x542a4
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
movsd 0x83d80(%rip), %xmm2 # 0xd7fd0
leaq 0x1(%rcx), %r8
movsd 0x83d7c(%rip), %xmm3 # 0xd7fd8
movzbl (%rdi,%rdx), %r9d
xorps %xmm4, %xmm4
cvtsi2sd %r9d, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x54282
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %r8, %r9
jmp 0x54298
ucomisd %xmm3, %xmm4
jbe 0x54293
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %rcx, %r9
jmp 0x54298
cvttsd2si %xmm4, %r9
movq %r9, (%r10,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x5425c
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
ffgpvjj | int ffgpvjj(fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
LONGLONG nulval, /* I - value for undefined pixels */
LONGLONG *array, /* O - array of values that are returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Undefined elements will be set equal to NULVAL, unless NULVAL=0
in which case no checking for undefined values will be performed.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
long row;
char cdummy;
int nullcheck = 1;
LONGLONG nullvalue;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
nullvalue = nulval; /* set local variable */
fits_read_compressed_pixels(fptr, TLONGLONG, firstelem, nelem,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgcljj(fptr, 2, row, firstelem, nelem, 1, 1, nulval,
array, &cdummy, anynul, status);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x58(%rsp), %rsi
callq 0x41127
testl %eax, %eax
je 0x54e34
leaq 0x10(%rsp), %r9
movq %r15, (%r9)
movq %rbp, %rdi
movl $0x51, %esi
movq %r13, %rdx
movq %r12, %rcx
movl $0x1, %r8d
movq 0x58(%rsp), %rbx
pushq %rbx
pushq 0x58(%rsp)
pushq $0x0
pushq %r14
callq 0x8cb5a
addq $0x20, %rsp
jmp 0x54e77
cmpq $0x2, %rbx
movl $0x1, %eax
cmovlq %rax, %rbx
leaq 0xf(%rsp), %rax
movl $0x1, %r9d
movq %rbp, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq %r13, %rcx
movq %r12, %r8
movq 0x58(%rsp), %rbx
pushq %rbx
pushq 0x58(%rsp)
pushq %rax
pushq %r14
pushq %r15
pushq $0x1
callq 0x54e88
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
ffgsfjj | int ffgsfjj(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
LONGLONG *array,/* O - array to be filled and returned */
char *flagval, /* O - set to 1 if corresponding value is null */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dsize[10];
LONGLONG blcll[9], trcll[9];
long felem, nelem, nultyp, ninc, numcol;
LONGLONG nulval = 0;
int hdutype, anyf;
char msg[FLEN_ERRMSG];
int nullcheck = 2;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsvj is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
fits_read_compressed_img(fptr, TLONGLONG, blcll, trcll, inc,
nullcheck, NULL, array, flagval, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 2;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
snprintf(msg, FLEN_ERRMSG,"ffgsvj: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
}
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0] - str[0]) / inc[0] + 1;
ninc = incr[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8])
{
for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7])
{
for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6])
{
for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5])
{
for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4])
{
for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3])
{
for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2])
{
for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1])
{
felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] +
(i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] +
(i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] +
(i7 - 1) * dsize[7] + (i8 - 1) * dsize[8];
if ( ffgcljj(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &flagval[i0], &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp # imm = 0x348
movl %edx, %r12d
movl %esi, 0x4(%rsp)
movq 0x3a0(%rsp), %r13
leal -0xa(%r12), %eax
cmpl $-0xa, %eax
ja 0x564dc
leaq 0x81b40(%rip), %rdx # 0xd7fe8
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r13) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x56580
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %rbp
movq %r13, %rsi
callq 0x41127
testl %eax, %eax
je 0x56568
shll $0x3, %r12d
leaq 0x2f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x65c0
leaq 0x2a0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x65c0
subq $0x8, %rsp
movq %rbp, %rdi
movl $0x51, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x388(%rsp), %r8
movl $0x2, %r9d
pushq %r13
pushq 0x3a8(%rsp)
pushq 0x3a8(%rsp)
pushq 0x3a8(%rsp)
pushq $0x0
callq 0x8b0dd
addq $0x30, %rsp
jmp 0x5657c
leaq 0x74(%rsp), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x56592
movl (%r13), %eax
addq $0x348, %rsp # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x74(%rsp)
movl %r12d, %eax
je 0x565d4
movq (%rbx,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq (%r15,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x380(%rsp), %r9
movq (%r9,%rax,8), %rdi
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
movq 0x398(%rsp), %rcx
jmp 0x56618
movl 0x4(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %rcx
movl $0x2, 0x4(%rsp)
movl $0x1, %edi
movq %rcx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
movq 0x398(%rsp), %rcx
movq 0x380(%rsp), %r9
testq %rcx, %rcx
je 0x56623
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %edx
movq %rdx, 0x1b0(%rsp,%rcx,8)
movq %rdx, 0x250(%rsp,%rcx,8)
movq %rdx, 0x200(%rsp,%rcx,8)
movq %rdx, 0x2a0(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x5662a
testl %r12d, %r12d
je 0x566ef
negq %rax
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdx
movq -0x8(%rbx,%rcx,8), %rsi
cmpq %rsi, %rdx
jl 0x56d88
movq %rsi, 0x1a8(%rsp,%rcx,8)
movq %rdx, 0x248(%rsp,%rcx,8)
movq -0x8(%r9,%rcx,8), %rdx
movq %rdx, 0x1f8(%rsp,%rcx,8)
movq -0x8(%r14,%rcx,8), %rdx
imulq 0x298(%rsp,%rcx,8), %rdx
movq %rdx, 0x2a0(%rsp,%rcx,8)
leaq (%rax,%rcx), %rdx
incq %rdx
incq %rcx
cmpq $0x1, %rdx
jne 0x56664
cmpl $0x1, %r12d
jne 0x566ef
cmpq $0x1, (%r14)
jne 0x566ef
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
cqto
idivq %rdi
movq %rax, %rdx
movq %rcx, 0x10(%rsp)
movq %rdi, 0x78(%rsp)
movq %rdi, 0x108(%rsp)
jmp 0x5671c
movq %rdi, 0x78(%rsp)
movq 0x250(%rsp), %rax
subq 0x1b0(%rsp), %rax
cqto
idivq (%r9)
movq %rax, %rdx
movq 0x200(%rsp), %rcx
movq %rcx, 0x108(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, 0x8(%rsp)
jle 0x56730
movl (%r10), %eax
jmp 0x56580
movq %rbp, %r14
movq 0x1f0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x1e8(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x1e0(%rsp), %rbx
movq %rbx, 0xf0(%rsp)
movq 0x1d8(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
movq 0x1d0(%rsp), %r11
movq 0x1c8(%rsp), %r12
movq 0x2b8(%rsp), %rbp
movq %rbp, 0x58(%rsp)
movq 0x2c0(%rsp), %r13
movq %r13, 0x30(%rsp)
movq 0x2c8(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x2d8(%rsp), %r15
movq 0x2e0(%rsp), %r9
decq %rcx
imulq %r15, %rcx
leaq -0x1(%rbx), %rdx
imulq %rax, %rdx
addq %rcx, %rdx
leaq -0x1(%rdi), %rcx
imulq %rsi, %rcx
addq %rdx, %rcx
movq %r11, 0xe0(%rsp)
leaq -0x1(%r11), %rdx
imulq %r13, %rdx
addq %rcx, %rdx
movq 0x68(%rsp), %rax
leaq -0x1(%rax), %rcx
imulq %r9, %rcx
addq 0x1b0(%rsp), %rcx
addq %rcx, %rdx
leaq -0x1(%r12), %rcx
imulq %rbp, %rcx
movq 0x1c0(%rsp), %rdi
movq 0x2b0(%rsp), %r11
leaq -0x1(%rdi), %rsi
imulq %r11, %rsi
addq %rcx, %rsi
movq %r12, %rcx
movq 0x1b8(%rsp), %r12
movq 0x2a8(%rsp), %rbx
movq %r12, 0x180(%rsp)
decq %r12
imulq %rbx, %r12
addq %rsi, %r12
movq 0x388(%rsp), %rbp
addq %rdx, %r12
movq %r12, 0x110(%rsp)
movq %rdi, %rdx
movq 0x18(%rsp), %rax
leaq 0x1(%rax), %r12
leaq 0x8(,%rax,8), %rsi
movq %rsi, 0x1a0(%rsp)
movq 0x240(%rsp), %r13
movq %r13, 0x118(%rsp)
imulq %r13, %r9
movq %r9, 0x120(%rsp)
movq 0xf0(%rsp), %r9
movq 0x238(%rsp), %r13
movq %r13, 0x128(%rsp)
imulq %r13, %r15
movq %r15, 0x130(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x20(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x20(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x28(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x30(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x30(%rsp)
movq 0x218(%rsp), %rax
movq %rax, 0x150(%rsp)
movq 0x58(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x58(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0x168(%rsp)
imulq %rax, %r11
movq %r11, 0x170(%rsp)
movq 0xe8(%rsp), %r11
movq 0x208(%rsp), %rax
movq %rax, 0x198(%rsp)
imulq %rax, %rbx
movq %rbx, 0x1a8(%rsp)
movq 0x290(%rsp), %rbx
movq 0x288(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x280(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x278(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x268(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x100(%rsp)
xorl %r15d, %r15d
movq %rcx, 0xf8(%rsp)
movq %rdi, 0x178(%rsp)
movq %rbx, 0x160(%rsp)
cmpq %rbx, 0x68(%rsp)
jle 0x56a33
movq 0x8(%rsp), %rax
addq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rax
jle 0x56a11
jmp 0x56728
movq 0x110(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jle 0x56a96
movq %rbp, %rax
movq %rax, %rbp
movq 0x80(%rsp), %r13
addq 0x118(%rsp), %r13
movq 0x38(%rsp), %rax
addq 0x120(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %r13, 0x80(%rsp)
cmpq %rbx, %r13
jle 0x56a4d
jmp 0x56a18
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %rbp, %rax
movq 0xe0(%rsp), %r13
cmpq 0xc0(%rsp), %r9
jle 0x56b06
movq 0x88(%rsp), %rcx
addq 0x128(%rsp), %rcx
movq 0x40(%rsp), %rbp
addq 0x130(%rsp), %rbp
movq %rbp, 0x40(%rsp)
movq %rcx, 0x88(%rsp)
cmpq 0xb8(%rsp), %rcx
movq 0xf8(%rsp), %rcx
jle 0x56abb
jmp 0x56a62
movq 0x40(%rsp), %rbp
movq %r9, 0x90(%rsp)
cmpq 0xc8(%rsp), %r11
jle 0x56b49
movq 0x90(%rsp), %rdi
addq 0x138(%rsp), %rdi
addq 0x20(%rsp), %rbp
movq %rdi, 0x90(%rsp)
cmpq 0xc0(%rsp), %rdi
jle 0x56b13
jmp 0x56ac5
movq %rbp, 0x48(%rsp)
movq %r11, 0x98(%rsp)
movq %rbp, 0x158(%rsp)
cmpq 0xd0(%rsp), %r13
jle 0x56b9b
movq 0x98(%rsp), %rsi
addq 0x140(%rsp), %rsi
movq 0x48(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq %rdi, 0x48(%rsp)
movq %rsi, 0x98(%rsp)
cmpq 0xc8(%rsp), %rsi
jle 0x56b5e
jmp 0x56b1d
movq 0x48(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq %r13, 0xa0(%rsp)
cmpq 0xd8(%rsp), %rcx
jle 0x56bed
movq 0xa0(%rsp), %rdi
addq 0x148(%rsp), %rdi
movq 0x50(%rsp), %rsi
addq 0x30(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq %rdi, 0xa0(%rsp)
cmpq 0xd0(%rsp), %rdi
jle 0x56bad
jmp 0x56b68
movq 0x50(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rcx, 0xa8(%rsp)
cmpq 0x100(%rsp), %rdx
jle 0x56c47
movq 0xa8(%rsp), %rdi
addq 0x150(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq 0x58(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rdi, 0xa8(%rsp)
cmpq 0xd8(%rsp), %rdi
movq 0x158(%rsp), %rbp
jle 0x56bff
jmp 0x56bb7
movq 0x60(%rsp), %rsi
movq %rdx, %rbp
movq %rbp, 0x188(%rsp)
movq 0x180(%rsp), %rbp
cmpq 0x18(%rsp), %rbp
movq %rsi, 0x190(%rsp)
jg 0x56d0e
leaq (%rax,%r15,8), %r13
movq %rsi, %rbx
leaq (%r8,%r15), %rax
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x108(%rsp), %r9
pushq %r10
leaq 0x2f8(%rsp), %r10
pushq %r10
pushq %rax
pushq %r13
pushq $0x0
pushq $0x2
callq 0x54e88
addq $0x30, %rsp
testl %eax, %eax
jg 0x56d79
movq 0x398(%rsp), %rax
testq %rax, %rax
je 0x56cd8
cmpl $0x0, 0x2f0(%rsp)
je 0x56cd8
movl $0x1, (%rax)
addq %r12, %r15
addq 0x198(%rsp), %rbp
addq 0x1a0(%rsp), %r13
addq 0x1a8(%rsp), %rbx
cmpq 0x18(%rsp), %rbp
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
jle 0x56c79
movq 0x188(%rsp), %rbp
addq 0x168(%rsp), %rbp
movq 0x190(%rsp), %rsi
addq 0x170(%rsp), %rsi
cmpq 0x100(%rsp), %rbp
movq 0x388(%rsp), %rax
movq 0xf0(%rsp), %r9
movq 0xe8(%rsp), %r11
movq 0xe0(%rsp), %r13
movq 0xf8(%rsp), %rcx
movq 0x178(%rsp), %rdx
movq 0x160(%rsp), %rbx
jle 0x56c4f
jmp 0x56c09
movq 0x3a0(%rsp), %rax
movl (%rax), %eax
jmp 0x56580
leaq 0x81286(%rip), %rdx # 0xd8015
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
movq %r10, %r14
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r14) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x56580
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
fffi4i8 | int fffi4i8(INT32BIT *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */
LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
LONGLONG *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
output[ii] = (LONGLONG) input[ii]; /* copy input to output */
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DLONGLONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MIN;
}
else if (dvalue > DLONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MAX;
}
else
output[ii] = (LONGLONG) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = (LONGLONG) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DLONGLONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MIN;
}
else if (dvalue > DLONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MAX;
}
else
output[ii] = (LONGLONG) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x71f32(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x571a7
movq 0x30(%rsp), %r11
testb $0x1, %bl
je 0x571d0
testq %rsi, %rsi
jle 0x572c9
xorl %ebx, %ebx
movslq (%rdi,%rbx,4), %r14
cmpl %ecx, %r14d
jne 0x5718f
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x57195
movq %r8, (%r10,%rbx,8)
jmp 0x5719a
movq %r14, (%r10,%rbx,8)
jmp 0x5719a
movb $0x1, (%r9,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x57174
jmp 0x572c9
testb $0x1, %bl
je 0x57261
testq %rsi, %rsi
jle 0x572c9
xorl %ecx, %ecx
movslq (%rdi,%rcx,4), %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x571bb
jmp 0x572c9
testq %rsi, %rsi
jle 0x572c9
movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF
xorl %r14d, %r14d
movsd 0x7deaa(%rip), %xmm2 # 0xd5098
leaq 0x1(%rbx), %r15
movsd 0x76536(%rip), %xmm3 # 0xcd730
movl (%rdi,%r14,4), %ebp
cmpl %ecx, %ebp
jne 0x57214
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x57235
movq %r8, (%r10,%r14,8)
jmp 0x57257
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x5723c
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %r15, (%r10,%r14,8)
jmp 0x57257
movb $0x1, (%r9,%r14)
jmp 0x57257
ucomisd %xmm3, %xmm4
jbe 0x5724e
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %rbx, (%r10,%r14,8)
jmp 0x57257
cvttsd2si %xmm4, %r12
movq %r12, (%r10,%r14,8)
incq %r14
cmpq %r14, %rsi
jne 0x571fa
jmp 0x572c9
testq %rsi, %rsi
jle 0x572c9
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
movsd 0x7de1e(%rip), %xmm2 # 0xd5098
leaq 0x1(%rcx), %r8
movsd 0x764aa(%rip), %xmm3 # 0xcd730
xorps %xmm4, %xmm4
cvtsi2sdl (%rdi,%rdx,4), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x572a7
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %r8, %r9
jmp 0x572bd
ucomisd %xmm3, %xmm4
jbe 0x572b8
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %rcx, %r9
jmp 0x572bd
cvttsd2si %xmm4, %r9
movq %r9, (%r10,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x57286
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
fffi2i8 | int fffi2i8(short *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
short tnull, /* I - value of FITS TNULLn keyword if any */
LONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
LONGLONG *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
output[ii] = (LONGLONG) input[ii]; /* copy input to output */
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DLONGLONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MIN;
}
else if (dvalue > DLONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MAX;
}
else
output[ii] = (LONGLONG) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = (LONGLONG) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DLONGLONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MIN;
}
else if (dvalue > DLONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = LONGLONG_MAX;
}
else
output[ii] = (LONGLONG) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x71bd5(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x57506
movq 0x30(%rsp), %r11
testb $0x1, %bl
je 0x57530
testq %rsi, %rsi
jle 0x57633
xorl %ebx, %ebx
movswq (%rdi,%rbx,2), %r14
cmpw %cx, %r14w
jne 0x574ee
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x574f4
movq %r8, (%r10,%rbx,8)
jmp 0x574f9
movq %r14, (%r10,%rbx,8)
jmp 0x574f9
movb $0x1, (%r9,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x574d1
jmp 0x57633
testb $0x1, %bl
je 0x575c6
testq %rsi, %rsi
jle 0x57633
xorl %ecx, %ecx
movswq (%rdi,%rcx,2), %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x5751a
jmp 0x57633
testq %rsi, %rsi
jle 0x57633
movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF
xorl %r14d, %r14d
movsd 0x7db4a(%rip), %xmm2 # 0xd5098
leaq 0x1(%rbx), %r15
movsd 0x761d6(%rip), %xmm3 # 0xcd730
movzwl (%rdi,%r14,2), %ebp
cmpw %cx, %bp
jne 0x57576
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x5759a
movq %r8, (%r10,%r14,8)
jmp 0x575bc
movswl %bp, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x575a1
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %r15, (%r10,%r14,8)
jmp 0x575bc
movb $0x1, (%r9,%r14)
jmp 0x575bc
ucomisd %xmm3, %xmm4
jbe 0x575b3
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %rbx, (%r10,%r14,8)
jmp 0x575bc
cvttsd2si %xmm4, %r12
movq %r12, (%r10,%r14,8)
incq %r14
cmpq %r14, %rsi
jne 0x5755a
jmp 0x57633
testq %rsi, %rsi
jle 0x57633
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
movsd 0x7dab9(%rip), %xmm2 # 0xd5098
leaq 0x1(%rcx), %r8
movsd 0x76145(%rip), %xmm3 # 0xcd730
movswl (%rdi,%rdx,2), %r9d
xorps %xmm4, %xmm4
cvtsi2sd %r9d, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x57611
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %r8, %r9
jmp 0x57627
ucomisd %xmm3, %xmm4
jbe 0x57622
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq %rcx, %r9
jmp 0x57627
cvttsd2si %xmm4, %r9
movq %r9, (%r10,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x575eb
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolj.c |
ffgpvk | int ffgpvk( fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
int nulval, /* I - value for undefined pixels */
int *array, /* O - array of values that are returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Undefined elements will be set equal to NULVAL, unless NULVAL=0
in which case no checking for undefined values will be performed.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
long row;
char cdummy;
int nullcheck = 1;
int nullvalue;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
nullvalue = nulval; /* set local variable */
fits_read_compressed_pixels(fptr, TINT, firstelem, nelem,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgclk(fptr, 2, row, firstelem, nelem, 1, 1, nulval,
array, &cdummy, anynul, status);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %r15d
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x48(%rsp), %rsi
callq 0x41127
testl %eax, %eax
je 0x57ff4
leaq 0x4(%rsp), %r9
movl %r15d, (%r9)
movq %rbp, %rdi
movl $0x1f, %esi
movq %r13, %rdx
movq %r12, %rcx
movl $0x1, %r8d
movq 0x48(%rsp), %rbx
pushq %rbx
pushq 0x48(%rsp)
pushq $0x0
pushq %r14
callq 0x8cb5a
addq $0x20, %rsp
jmp 0x58037
cmpq $0x2, %rbx
movl $0x1, %eax
cmovlq %rax, %rbx
leaq 0x3(%rsp), %rax
movl $0x1, %r9d
movq %rbp, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq %r13, %rcx
movq %r12, %r8
movq 0x48(%rsp), %rbx
pushq %rbx
pushq 0x48(%rsp)
pushq %rax
pushq %r14
pushq %r15
pushq $0x1
callq 0x58048
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolk.c |
ffgsvk | int ffgsvk(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
int nulval, /* I - value to set undefined pixels */
int *array, /* O - array to be filled and returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dir[9];
long nelem, nultyp, ninc, numcol;
LONGLONG felem, dsize[10], blcll[9], trcll[9];
int hdutype, anyf;
char ldummy, msg[FLEN_ERRMSG];
int nullcheck = 1;
int nullvalue;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsvj is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
nullvalue = nulval; /* set local variable */
fits_read_compressed_img(fptr, TINT, blcll, trcll, inc,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 1;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
dir[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
if (hdutype == IMAGE_HDU)
{
dir[ii] = -1;
}
else
{
snprintf(msg, FLEN_ERRMSG,"ffgsvk: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
dsize[ii] = dsize[ii] * dir[ii];
}
dsize[naxis] = dsize[naxis] * dir[naxis];
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1;
ninc = incr[0] * dir[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8])
{
for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7])
{
for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6])
{
for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5])
{
for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4])
{
for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3])
{
for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2])
{
for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1])
{
felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] +
(i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] +
(i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] +
(i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8];
if ( ffgclk(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &ldummy, &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp # imm = 0x3A8
movl %edx, %r13d
movl %esi, 0x8(%rsp)
movq 0x400(%rsp), %r12
leal -0xa(%r13), %eax
cmpl $-0xa, %eax
ja 0x58c6a
leaq 0x7f3b2(%rip), %rdx # 0xd7fe8
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r12) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x58d3b
movq %r9, %r15
movq %r8, %rbp
movq %rcx, %rbx
movl 0x3e8(%rsp), %r14d
movq %r12, %rsi
movq %rdi, %r12
callq 0x41127
testl %eax, %eax
je 0x58d10
shll $0x3, %r13d
leaq 0x350(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x1c0(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x260(%rsp), %rax
movl %r14d, (%rax)
subq $0x8, %rsp
movq %r12, %rdi
movl $0x1f, %esi
movq %rbx, %rdx
movq %rbp, %rcx
movq 0x3e8(%rsp), %r8
movl $0x1, %r9d
movq 0x408(%rsp), %rbx
pushq %rbx
pushq 0x408(%rsp)
pushq $0x0
pushq 0x410(%rsp)
pushq %rax
callq 0x8b0dd
addq $0x30, %rsp
movl (%rbx), %eax
jmp 0x58d3b
movq 0x3e0(%rsp), %r14
leaq 0x44(%rsp), %rsi
movq %r12, %rdi
movq 0x400(%rsp), %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x58d4d
movq 0x400(%rsp), %rax
movl (%rax), %eax
addq $0x3a8, %rsp # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0xd0(%rsp)
movl 0x44(%rsp), %edx
movl %r13d, %eax
testl %edx, %edx
je 0x58d8c
movq (%rbp,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq (%r15,%rax,8), %r10
movq %r14, %r11
movq (%r14,%rax,8), %rcx
movq %rcx, 0x18(%rsp)
movq 0x3f8(%rsp), %rcx
movq 0x400(%rsp), %r12
jmp 0x58dc3
movl 0x8(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %r10
movl $0x2, 0x8(%rsp)
movl $0x1, %esi
movq %rsi, 0x18(%rsp)
movq %r10, 0x10(%rsp)
movq 0x3f8(%rsp), %rcx
movq 0x400(%rsp), %r12
movq %r14, %r11
testq %rcx, %rcx
je 0x58dce
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %esi
movq %rsi, 0x260(%rsp,%rcx,8)
movq %rsi, 0x300(%rsp,%rcx,8)
movq %rsi, 0x2b0(%rsp,%rcx,8)
movq %rsi, 0x1c0(%rsp,%rcx,8)
movq %rsi, 0x210(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x58dd5
testl %r13d, %r13d
je 0x58eeb
movq %rax, %rsi
negq %rsi
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdi
movq -0x8(%rbp,%rcx,8), %r8
cmpq %r8, %rdi
jge 0x58e46
testl %edx, %edx
jne 0x595f8
movq $-0x1, 0x208(%rsp,%rcx,8)
movq $-0x1, %r9
jmp 0x58e4e
movq 0x208(%rsp,%rcx,8), %r9
movq %r8, 0x258(%rsp,%rcx,8)
movq %rdi, 0x2f8(%rsp,%rcx,8)
movq -0x8(%r11,%rcx,8), %rdi
movq %rdi, 0x2a8(%rsp,%rcx,8)
movq 0x1b8(%rsp,%rcx,8), %rdi
movq -0x8(%rbx,%rcx,8), %r8
imulq %rdi, %r8
movq %r8, 0x1c0(%rsp,%rcx,8)
imulq %rdi, %r9
movq %r9, 0x1b8(%rsp,%rcx,8)
leaq (%rsi,%rcx), %rdi
incq %rdi
incq %rcx
cmpq $0x1, %rdi
jne 0x58e1a
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
cmpl $0x1, %r13d
jne 0x58f04
cmpq $0x1, (%rbx)
jne 0x58f04
movq 0x10(%rsp), %rcx
subq %rcx, %r10
movq %r10, %rax
cqto
movq 0x18(%rsp), %rsi
idivq %rsi
movq %rcx, %r10
movq %rsi, 0xc8(%rsp)
jmp 0x58f36
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
movq 0x300(%rsp), %rax
movq 0x210(%rsp), %rcx
subq 0x260(%rsp), %rax
imulq %rcx, %rax
cqto
idivq (%r11)
imulq 0x2b0(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %r10, 0x160(%rsp)
cmpq %r10, 0x10(%rsp)
jg 0x58d31
movq 0x2a0(%rsp), %rcx
movq 0x250(%rsp), %r10
movq %r10, %rdx
imulq %rcx, %rdx
movq %rdx, 0x78(%rsp)
movq 0x340(%rsp), %rdx
imulq %r10, %rdx
movq %rdx, 0x80(%rsp)
movq 0x298(%rsp), %rdi
movq 0x248(%rsp), %r8
movq %r8, %rdx
imulq %rdi, %rdx
movq %rdx, 0xb8(%rsp)
movq 0x338(%rsp), %rdx
imulq %r8, %rdx
movq %rdx, 0x88(%rsp)
movq 0x290(%rsp), %rsi
movq 0x240(%rsp), %r9
movq %r9, %r12
imulq %rsi, %r12
movq 0x330(%rsp), %rdx
imulq %r9, %rdx
movq %rdx, 0x90(%rsp)
movq 0x288(%rsp), %rdx
movq 0x200(%rsp), %r11
movq %r11, 0x20(%rsp)
imulq %r11, %r10
decq %rcx
imulq %r10, %rcx
movq 0x1f8(%rsp), %r10
imulq %r10, %r8
decq %rdi
imulq %r8, %rdi
movq 0x1f0(%rsp), %rbp
imulq %rbp, %r9
decq %rsi
imulq %r9, %rsi
movq %r12, %r9
movq 0x238(%rsp), %r8
addq %rdi, %rsi
movq %r8, %rdi
imulq %rdx, %rdi
movq 0x328(%rsp), %r12
imulq %r8, %r12
movq %r12, 0x98(%rsp)
movq 0x1e8(%rsp), %rbx
imulq %rbx, %r8
decq %rdx
imulq %r8, %rdx
movq %rdi, %r8
addq %rsi, %rdx
movq 0x280(%rsp), %rsi
movq 0x230(%rsp), %rdi
movq %rdi, %r11
imulq %rsi, %r11
movq %r11, 0xb0(%rsp)
movq 0x320(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xa0(%rsp)
movq %rax, 0x38(%rsp)
movq 0x1e0(%rsp), %rax
imulq %rax, %rdi
decq %rsi
imulq %rdi, %rsi
addq 0x260(%rsp), %rcx
addq %rdx, %rsi
addq %rcx, %rsi
movq 0x278(%rsp), %rcx
movq 0x228(%rsp), %rdx
movq %rdx, %r15
imulq %rcx, %r15
movq 0x318(%rsp), %rdi
imulq %rdx, %rdi
movq %rdi, 0xa8(%rsp)
movq 0x1d8(%rsp), %r13
imulq %r13, %rdx
decq %rcx
imulq %rdx, %rcx
movq 0x270(%rsp), %rdx
movq 0x220(%rsp), %rdi
movq %rdi, %r12
imulq %rdx, %r12
movq %r12, 0x168(%rsp)
movq 0x310(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xc0(%rsp)
movq 0x1d0(%rsp), %r14
imulq %r14, %rdi
decq %rdx
imulq %rdi, %rdx
addq %rcx, %rdx
movq 0x268(%rsp), %r12
movq 0x218(%rsp), %rcx
movq %rcx, %rdi
imulq %r12, %rdi
movq %rdi, 0x198(%rsp)
movq 0x308(%rsp), %rdi
imulq %rcx, %rdi
movq %rdi, 0xd8(%rsp)
movq 0x1c8(%rsp), %r11
imulq %r11, %rcx
decq %r12
imulq %rcx, %r12
movq 0x3f0(%rsp), %rcx
movq 0xd0(%rsp), %rdi
addq %rdx, %r12
addq %rsi, %r12
movq %r12, 0xe0(%rsp)
movq 0x38(%rsp), %rdx
leaq 0x1(%rdx), %r12
leaq 0x4(,%rdx,4), %rdx
movq %rdx, 0x1b8(%rsp)
movq 0x2f0(%rsp), %rdx
movq %rdx, 0xe8(%rsp)
movq 0x20(%rsp), %rsi
imulq %rdx, %rsi
movq %rsi, 0x20(%rsp)
movq 0x2e8(%rsp), %rdx
movq %rdx, 0xf0(%rsp)
imulq %rdx, %r10
movq %r10, 0xf8(%rsp)
movq 0x2e0(%rsp), %rsi
movq %rsi, 0x100(%rsp)
imulq %rsi, %rbp
movq %rbp, 0x108(%rsp)
movq 0x2d8(%rsp), %rsi
movq %rsi, 0x110(%rsp)
imulq %rsi, %rbx
movq %rbx, 0x118(%rsp)
movq %r15, %rsi
movq 0xb0(%rsp), %rbx
movq 0x2d0(%rsp), %r15
movq %r15, 0x120(%rsp)
imulq %r15, %rax
movq %rax, 0x128(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x140(%rsp)
imulq %rax, %r13
movq %r13, 0x148(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x170(%rsp)
imulq %rax, %r14
movq %r14, 0x178(%rsp)
movq 0x2b8(%rsp), %rax
movq %rax, 0x1b0(%rsp)
imulq %rax, %r11
movq %r11, 0x38(%rsp)
movq 0xb8(%rsp), %r11
xorl %ebp, %ebp
movq %rsi, 0x180(%rsp)
movq %r9, 0x190(%rsp)
movq %r8, 0x188(%rsp)
movq 0x80(%rsp), %rax
cmpq %rax, 0x78(%rsp)
jle 0x592f5
movq 0x10(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq 0x160(%rsp), %rax
jle 0x592c8
jmp 0x58d31
movq 0xe0(%rsp), %r14
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x3e8(%rsp), %eax
cmpq 0x88(%rsp), %r11
jle 0x5933b
movq 0x48(%rsp), %r15
addq 0xe8(%rsp), %r15
addq 0x20(%rsp), %r14
movq %r15, 0x48(%rsp)
cmpq 0x80(%rsp), %r15
jle 0x5930e
jmp 0x592d7
movq %r14, %r15
movq %r11, 0x50(%rsp)
movq %r14, 0x138(%rsp)
cmpq 0x90(%rsp), %r9
jle 0x5937b
movq 0x50(%rsp), %r13
addq 0xf0(%rsp), %r13
addq 0xf8(%rsp), %r15
movq %r13, 0x50(%rsp)
cmpq 0x88(%rsp), %r13
jle 0x5934b
jmp 0x59318
movq %r15, %r13
movq %r9, 0x58(%rsp)
movq %r15, 0x150(%rsp)
cmpq 0x98(%rsp), %r8
jle 0x593c1
movq %rcx, %rdx
movq 0x58(%rsp), %rcx
addq 0x100(%rsp), %rcx
addq 0x108(%rsp), %r13
movq %rcx, 0x58(%rsp)
cmpq 0x90(%rsp), %rcx
movq %rdx, %rcx
jle 0x5938b
jmp 0x59355
movq %r13, %rdx
movq %r8, 0x60(%rsp)
movq %r13, 0x158(%rsp)
cmpq 0xa0(%rsp), %rbx
jle 0x59401
movq 0x60(%rsp), %r10
addq 0x110(%rsp), %r10
addq 0x118(%rsp), %rdx
movq %r10, 0x60(%rsp)
cmpq 0x98(%rsp), %r10
jle 0x593d1
jmp 0x59395
movq %rdx, 0x28(%rsp)
movq %rbx, 0x68(%rsp)
movq %rdx, 0x130(%rsp)
cmpq 0xa8(%rsp), %rsi
jle 0x59455
movq 0x68(%rsp), %r10
addq 0x120(%rsp), %r10
movq 0x28(%rsp), %rdx
addq 0x128(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq %r10, 0x68(%rsp)
cmpq 0xa0(%rsp), %r10
movq 0x130(%rsp), %rdx
jle 0x59413
jmp 0x593db
movq 0x28(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x168(%rsp), %rdx
cmpq 0xc0(%rsp), %rdx
jle 0x594c1
movq 0x70(%rsp), %r10
addq 0x140(%rsp), %r10
movq 0x30(%rsp), %rdx
addq 0x148(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %r10, 0x70(%rsp)
cmpq 0xa8(%rsp), %r10
movq 0x138(%rsp), %r14
movq 0x150(%rsp), %r15
movq 0x158(%rsp), %r13
jle 0x59464
jmp 0x5941d
movq 0x30(%rsp), %r10
movq 0x400(%rsp), %r15
movq %rdx, 0x1a0(%rsp)
movq 0x198(%rsp), %r13
cmpq 0xd8(%rsp), %r13
movq %r10, 0x1a8(%rsp)
jg 0x5958d
leaq (%rcx,%rbp,4), %r14
movq %r10, %rbx
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0xc8(%rsp), %r9
pushq %r15
leaq 0x358(%rsp), %r10
pushq %r10
leaq 0x1f(%rsp), %r10
pushq %r10
pushq %r14
pushq %rax
pushq $0x1
callq 0x58048
addq $0x30, %rsp
testl %eax, %eax
jg 0x595f0
movq 0x3f8(%rsp), %rax
testq %rax, %rax
je 0x59558
cmpl $0x0, 0x350(%rsp)
je 0x59558
movl $0x1, (%rax)
addq %r12, %rbp
addq 0x1b8(%rsp), %r14
addq 0x1b0(%rsp), %r13
addq 0x38(%rsp), %rbx
cmpq 0xd8(%rsp), %r13
movq 0xd0(%rsp), %rdi
movl 0x3e8(%rsp), %eax
jle 0x594fb
movq 0x1a0(%rsp), %rdx
addq 0x170(%rsp), %rdx
movq 0x1a8(%rsp), %r10
addq 0x178(%rsp), %r10
cmpq 0xc0(%rsp), %rdx
movq 0x3f0(%rsp), %rcx
movq 0xb8(%rsp), %r11
movq 0x190(%rsp), %r9
movq 0x188(%rsp), %r8
movq 0xb0(%rsp), %rbx
movq 0x180(%rsp), %rsi
jle 0x594ce
jmp 0x59476
movl (%r15), %eax
jmp 0x58d3b
leaq 0x7eb09(%rip), %rdx # 0xd8108
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r12) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x58d3b
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolk.c |
ffggpk | int ffggpk( fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
long firstelem, /* I - first vector element to read (1 = 1st) */
long nelem, /* I - number of values to read */
int *array, /* O - array of values that are returned */
int *status) /* IO - error status */
/*
Read an array of group parameters from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
*/
{
long row;
int idummy;
char cdummy;
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgclk(fptr, 1, row, firstelem, nelem, 1, 1, 0L,
array, &cdummy, &idummy, status);
return(*status);
} | pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %rax
movq %rdx, %r10
movq %rsi, %rdx
cmpq $0x2, %rsi
movl $0x1, %esi
cmovlq %rsi, %rdx
leaq 0x4(%rsp), %r11
leaq 0x3(%rsp), %r14
movl $0x1, %r9d
movq %rcx, %r8
movl $0x1, %esi
movq %r10, %rcx
pushq %rbx
pushq %r11
pushq %r14
pushq %rax
pushq $0x0
pushq $0x1
callq 0x58048
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolk.c |
fffi1int | int fffi1int(unsigned char *input,/* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
unsigned char tnull, /* I - value of FITS TNULLn keyword if any */
int nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
int *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
output[ii] = (int) input[ii]; /* copy input to output */
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = INT_MIN;
}
else if (dvalue > DINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = INT_MAX;
}
else
output[ii] = (int) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = (int) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = INT_MIN;
}
else if (dvalue > DINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = INT_MAX;
}
else
output[ii] = (int) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %rbx
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x6eb9e(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x5a53b
movq 0x18(%rsp), %r11
testb $0x1, %bl
je 0x5a564
testq %rsi, %rsi
jle 0x5a652
xorl %ebx, %ebx
movzbl (%rdi,%rbx), %ebp
cmpb %cl, %bpl
jne 0x5a523
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x5a529
movl %r8d, (%r10,%rbx,4)
jmp 0x5a52e
movl %ebp, (%r10,%rbx,4)
jmp 0x5a52e
movb $0x1, (%r9,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x5a508
jmp 0x5a652
testb $0x1, %bl
je 0x5a5f2
testq %rsi, %rsi
jle 0x5a652
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x5a54f
jmp 0x5a652
testq %rsi, %rsi
jle 0x5a652
xorl %ebx, %ebx
movsd 0x7db61(%rip), %xmm2 # 0xd80d8
movsd 0x7db61(%rip), %xmm3 # 0xd80e0
movb (%rdi,%rbx), %bpl
cmpb %cl, %bpl
jne 0x5a59a
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x5a5c3
movl %r8d, (%r10,%rbx,4)
jmp 0x5a5e8
movzbl %bpl, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x5a5ca
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x80000000, (%r10,%rbx,4) # imm = 0x80000000
jmp 0x5a5e8
movb $0x1, (%r9,%rbx)
jmp 0x5a5e8
ucomisd %xmm3, %xmm4
jbe 0x5a5e0
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x7fffffff, (%r10,%rbx,4) # imm = 0x7FFFFFFF
jmp 0x5a5e8
cvttsd2si %xmm4, %ebp
movl %ebp, (%r10,%rbx,4)
incq %rbx
cmpq %rbx, %rsi
jne 0x5a57f
jmp 0x5a652
testq %rsi, %rsi
jle 0x5a652
xorl %ecx, %ecx
movsd 0x7dad7(%rip), %xmm2 # 0xd80d8
movsd 0x7dad7(%rip), %xmm3 # 0xd80e0
movzbl (%rdi,%rcx), %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x5a62f
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x80000000, %edx # imm = 0x80000000
jmp 0x5a646
ucomisd %xmm3, %xmm4
jbe 0x5a642
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
jmp 0x5a646
cvttsd2si %xmm4, %edx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x5a609
movl (%rax), %eax
popq %rbx
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolk.c |
fffstrint | int fffstrint(char *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
long twidth, /* I - width of each substring of chars */
double implipower, /* I - power of 10 of implied decimal */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
char *snull, /* I - value of FITS null string, if any */
int nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
int *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file. Check
for null values and do scaling if required. The nullcheck code value
determines how any null values in the input array are treated. A null
value is an input pixel that is equal to snull. If nullcheck= 0, then
no special checking for nulls is performed. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
int nullen;
long ii;
double dvalue;
char *cstring, message[FLEN_ERRMSG];
char *cptr, *tpos;
char tempstore, chrzero = '0';
double val, power;
int exponent, sign, esign, decpt;
nullen = strlen(snull);
cptr = input; /* pointer to start of input string */
for (ii = 0; ii < ntodo; ii++)
{
cstring = cptr;
/* temporarily insert a null terminator at end of the string */
tpos = cptr + twidth;
tempstore = *tpos;
*tpos = 0;
/* check if null value is defined, and if the */
/* column string is identical to the null string */
if (snull[0] != ASCII_NULL_UNDEFINED &&
!strncmp(snull, cptr, nullen) )
{
if (nullcheck)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
cptr += twidth;
}
else
{
/* value is not the null value, so decode it */
/* remove any embedded blank characters from the string */
decpt = 0;
sign = 1;
val = 0.;
power = 1.;
exponent = 0;
esign = 1;
while (*cptr == ' ') /* skip leading blanks */
cptr++;
if (*cptr == '-' || *cptr == '+') /* check for leading sign */
{
if (*cptr == '-')
sign = -1;
cptr++;
while (*cptr == ' ') /* skip blanks between sign and value */
cptr++;
}
while (*cptr >= '0' && *cptr <= '9')
{
val = val * 10. + *cptr - chrzero; /* accumulate the value */
cptr++;
while (*cptr == ' ') /* skip embedded blanks in the value */
cptr++;
}
if (*cptr == '.' || *cptr == ',') /* check for decimal point */
{
decpt = 1; /* set flag to show there was a decimal point */
cptr++;
while (*cptr == ' ') /* skip any blanks */
cptr++;
while (*cptr >= '0' && *cptr <= '9')
{
val = val * 10. + *cptr - chrzero; /* accumulate the value */
power = power * 10.;
cptr++;
while (*cptr == ' ') /* skip embedded blanks in the value */
cptr++;
}
}
if (*cptr == 'E' || *cptr == 'D') /* check for exponent */
{
cptr++;
while (*cptr == ' ') /* skip blanks */
cptr++;
if (*cptr == '-' || *cptr == '+') /* check for exponent sign */
{
if (*cptr == '-')
esign = -1;
cptr++;
while (*cptr == ' ') /* skip blanks between sign and exp */
cptr++;
}
while (*cptr >= '0' && *cptr <= '9')
{
exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */
cptr++;
while (*cptr == ' ') /* skip embedded blanks */
cptr++;
}
}
if (*cptr != 0) /* should end up at the null terminator */
{
snprintf(message, FLEN_ERRMSG,"Cannot read number from ASCII table");
ffpmsg(message);
snprintf(message, FLEN_ERRMSG,"Column field = %s.", cstring);
ffpmsg(message);
/* restore the char that was overwritten by the null */
*tpos = tempstore;
return(*status = BAD_C2D);
}
if (!decpt) /* if no explicit decimal, use implied */
power = implipower;
dvalue = (sign * val / power) * pow(10., (double) (esign * exponent));
dvalue = dvalue * scale + zero; /* apply the scaling */
if (dvalue < DINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = INT_MIN;
}
else if (dvalue > DINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = INT_MAX;
}
else
output[ii] = (long) dvalue;
}
/* restore the char that was overwritten by the null */
*tpos = tempstore;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq %rsi, 0x40(%rsp)
testq %rsi, %rsi
jle 0x5b069
movq %rdx, %r15
movq %rdi, %r14
movq 0x10(%rsp), %rdi
callq 0x6280
cltq
movq %rax, 0x28(%rsp)
xorl %r12d, %r12d
movsd 0x7cced(%rip), %xmm0 # 0xd7aa8
movsd 0x7ccf5(%rip), %xmm4 # 0xd7ab8
movq %r14, %rbx
leaq (%r14,%r15), %rbp
movb (%r14,%r15), %r13b
movb $0x0, (%r14,%r15)
movq 0x10(%rsp), %rax
cmpb $0x1, (%rax)
je 0x5ae45
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq 0x28(%rsp), %rdx
callq 0x6190
movsd 0x7ccc1(%rip), %xmm4 # 0xd7ab8
movsd 0x7cca9(%rip), %xmm0 # 0xd7aa8
movq %r14, %rbx
testl %eax, %eax
jne 0x5ae45
movq %rbp, %rbx
cmpl $0x0, 0xc(%rsp)
je 0x5b054
movq 0xe8(%rsp), %rax
movl $0x1, (%rax)
cmpl $0x1, 0xc(%rsp)
jne 0x5b044
movl 0x1c(%rsp), %eax
movq 0xf0(%rsp), %rcx
movl %eax, (%rcx,%r12,4)
jmp 0x5b051
incq %rbx
movzbl (%rbx), %ecx
cmpl $0x20, %ecx
je 0x5ae42
cmpl $0x2b, %ecx
je 0x5ae57
cmpl $0x2d, %ecx
jne 0x5ae77
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x5ae57
xorl %edx, %edx
cmpb $0x2d, %cl
sete %dl
leaq 0x7cc50(%rip), %rcx # 0xd7ac0
movsd (%rcx,%rdx,8), %xmm3
jmp 0x5ae81
movl %ecx, %eax
movsd 0x6e1ff(%rip), %xmm3 # 0xc9080
leal -0x30(%rax), %ecx
xorpd %xmm5, %xmm5
cmpb $0x9, %cl
ja 0x5aeb2
movzbl %al, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x5ae9f
addsd %xmm4, %xmm5
leal -0x30(%rax), %ecx
jmp 0x5ae88
movzbl %al, %ecx
orl $0x2, %ecx
cmpl $0x2e, %ecx
jne 0x5af00
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x5aebd
leal -0x30(%rax), %ecx
movsd 0x6e1ae(%rip), %xmm1 # 0xc9080
cmpb $0x9, %cl
ja 0x5af06
movzbl %al, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm5
addsd %xmm2, %xmm5
addsd %xmm4, %xmm5
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x5aeed
mulsd %xmm0, %xmm1
leal -0x30(%rax), %ecx
jmp 0x5aed2
movsd 0x20(%rsp), %xmm1
movl %eax, %esi
andb $-0x2, %sil
movl $0x1, %edx
xorl %ecx, %ecx
cmpb $0x44, %sil
jne 0x5af82
movzbl 0x1(%rbx), %esi
incq %rbx
cmpl $0x20, %esi
je 0x5af19
cmpl $0x2d, %esi
je 0x5af2f
cmpl $0x2b, %esi
jne 0x5af4b
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x5af2f
xorl %edx, %edx
cmpb $0x2d, %sil
setne %dl
leal -0x1(,%rdx,2), %edx
jmp 0x5af52
movl $0x1, %edx
movl %esi, %eax
leal -0x30(%rax), %esi
cmpb $0x9, %sil
ja 0x5af82
xorl %ecx, %ecx
movl %eax, %esi
leal (%rcx,%rcx,4), %eax
leal -0x30(,%rax,2), %ecx
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x5af69
movsbl %sil, %esi
addl %esi, %ecx
leal -0x30(%rax), %esi
cmpb $0x9, %sil
jbe 0x5af5d
testb %al, %al
jne 0x5b075
mulsd %xmm3, %xmm5
divsd %xmm1, %xmm5
movsd %xmm5, 0x48(%rsp)
imull %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
callq 0x65a0
mulsd 0x48(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x7d117(%rip), %xmm1 # 0xd80d8
ucomisd %xmm0, %xmm1
jbe 0x5aff7
movq 0xf8(%rsp), %rax
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq 0xf0(%rsp), %rax
movl $0x80000000, (%rax,%r12,4) # imm = 0x80000000
movsd 0x7cabb(%rip), %xmm0 # 0xd7aa8
movsd 0x7cac3(%rip), %xmm4 # 0xd7ab8
jmp 0x5b054
ucomisd 0x7d0e1(%rip), %xmm0 # 0xd80e0
movsd 0x7cab1(%rip), %xmm4 # 0xd7ab8
jbe 0x5b029
movq 0xf8(%rsp), %rax
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq 0xf0(%rsp), %rax
movl $0x7fffffff, (%rax,%r12,4) # imm = 0x7FFFFFFF
jmp 0x5b03a
cvttsd2si %xmm0, %rax
movq 0xf0(%rsp), %rcx
movl %eax, (%rcx,%r12,4)
movsd 0x7ca66(%rip), %xmm0 # 0xd7aa8
jmp 0x5b054
movq 0xe0(%rsp), %rax
movb $0x1, (%rax,%r12)
movq %rbp, %rbx
movb %r13b, (%rbp)
incq %r12
movq %rbx, %r14
cmpq 0x40(%rsp), %r12
jne 0x5adc6
movq 0xf8(%rsp), %rax
movl (%rax), %eax
jmp 0x5b0d8
movups 0x7cbc8(%rip), %xmm0 # 0xd7c44
leaq 0x50(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movupd 0x7cba7(%rip), %xmm0 # 0xd7c34
movapd %xmm0, (%rbx)
movl $0x656c62, 0x20(%rbx) # imm = 0x656C62
movq %rbx, %rdi
callq 0x37264
leaq 0x7cbb1(%rip), %rdx # 0xd7c58
movl $0x51, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movb %r13b, (%rbp)
movq 0xf8(%rsp), %rax
movl $0x199, (%rax) # imm = 0x199
movl $0x199, %eax # imm = 0x199
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolk.c |
ffgcxui | int ffgcxui(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG nrows, /* I - no. of rows to read */
long input_first_bit, /* I - first bit to read (1 = 1st) */
int input_nbits, /* I - number of bits to read (<= 32) */
unsigned short *array, /* O - array of integer values */
int *status) /* IO - error status */
/*
Read a consecutive string of bits from an 'X' or 'B' column and
interprete them as an unsigned integer. The number of bits must be
less than or equal to 16 or the total number of bits in the column,
which ever is less.
*/
{
int ii, firstbit, nbits, bytenum, startbit, numbits, endbit;
int firstbyte, lastbyte, nbytes, rshift, lshift;
unsigned short colbyte[5];
tcolumn *colptr;
char message[FLEN_ERRMSG];
if (*status > 0 || nrows == 0)
return(*status);
/* check input parameters */
if (firstrow < 1)
{
snprintf(message,FLEN_ERRMSG, "Starting row number is less than 1: %ld (ffgcxui)",
(long) firstrow);
ffpmsg(message);
return(*status = BAD_ROW_NUM);
}
else if (input_first_bit < 1)
{
snprintf(message,FLEN_ERRMSG, "Starting bit number is less than 1: %ld (ffgcxui)",
input_first_bit);
ffpmsg(message);
return(*status = BAD_ELEM_NUM);
}
else if (input_nbits > 16)
{
snprintf(message, FLEN_ERRMSG,"Number of bits to read is > 16: %d (ffgcxui)",
input_nbits);
ffpmsg(message);
return(*status = BAD_ELEM_NUM);
}
/* position to the correct HDU */
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
/* rescan header if data structure is undefined */
else if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
if ( ffrdef(fptr, status) > 0)
return(*status);
if ((fptr->Fptr)->hdutype != BINARY_TBL)
{
ffpmsg("This is not a binary table extension (ffgcxui)");
return(*status = NOT_BTABLE);
}
if (colnum > (fptr->Fptr)->tfield)
{
snprintf(message, FLEN_ERRMSG,"Specified column number is out of range: %d (ffgcxui)",
colnum);
ffpmsg(message);
snprintf(message, FLEN_ERRMSG," There are %d columns in this table.",
(fptr->Fptr)->tfield );
ffpmsg(message);
return(*status = BAD_COL_NUM);
}
colptr = (fptr->Fptr)->tableptr; /* point to first column */
colptr += (colnum - 1); /* offset to correct column structure */
if (abs(colptr->tdatatype) > TBYTE)
{
ffpmsg("Can only read bits from X or B type columns. (ffgcxui)");
return(*status = NOT_LOGICAL_COL); /* not correct datatype column */
}
firstbyte = (input_first_bit - 1 ) / 8 + 1;
lastbyte = (input_first_bit + input_nbits - 2) / 8 + 1;
nbytes = lastbyte - firstbyte + 1;
if (colptr->tdatatype == TBIT &&
input_first_bit + input_nbits - 1 > (long) colptr->trepeat)
{
ffpmsg("Too many bits. Tried to read past width of column (ffgcxui)");
return(*status = BAD_ELEM_NUM);
}
else if (colptr->tdatatype == TBYTE && lastbyte > (long) colptr->trepeat)
{
ffpmsg("Too many bits. Tried to read past width of column (ffgcxui)");
return(*status = BAD_ELEM_NUM);
}
for (ii = 0; ii < nrows; ii++)
{
/* read the relevant bytes from the row */
if (ffgcvui(fptr, colnum, firstrow+ii, firstbyte, nbytes, 0,
colbyte, NULL, status) > 0)
{
ffpmsg("Error reading bytes from column (ffgcxui)");
return(*status);
}
firstbit = (input_first_bit - 1) % 8; /* modulus operator */
nbits = input_nbits;
array[ii] = 0;
/* select and shift the bits from each byte into the output word */
while(nbits)
{
bytenum = firstbit / 8;
startbit = firstbit % 8;
numbits = minvalue(nbits, 8 - startbit);
endbit = startbit + numbits - 1;
rshift = 7 - endbit;
lshift = nbits - numbits;
array[ii] = ((colbyte[bytenum] >> rshift) << lshift) | array[ii];
nbits -= numbits;
firstbit += numbits;
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r13
movq 0xb8(%rsp), %r12
movl (%r12), %eax
testl %eax, %eax
setg %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x5b871
testq %r13, %r13
jle 0x5b809
movq %r8, %r15
testq %r8, %r8
jle 0x5b83e
movl %r9d, %ebp
cmpl $0x11, %r9d
jl 0x5b880
leaq 0x7ca6f(%rip), %rdx # 0xd8260
leaq 0x20(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x60b0
jmp 0x5b85c
leaq 0x7c9ec(%rip), %rdx # 0xd81fc
leaq 0x20(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x133, (%r12) # imm = 0x133
movl $0x133, %eax # imm = 0x133
jmp 0x5b871
leaq 0x7c9e9(%rip), %rdx # 0xd822e
leaq 0x20(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x134, (%r12) # imm = 0x134
movl $0x134, %eax # imm = 0x134
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %r8d
movq %rdi, %r14
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
jne 0x5b8ba
cmpq $-0x1, 0x88(%rax)
jne 0x5b8d3
movq %r14, %rdi
movq %r12, %rsi
movl %r8d, 0xc(%rsp)
callq 0x3af49
movl 0xc(%rsp), %r8d
testl %eax, %eax
jle 0x5b8d3
movl (%r12), %eax
jmp 0x5b871
incl %esi
movq %r14, %rdi
xorl %edx, %edx
movq %r12, %rcx
movl %r8d, 0xc(%rsp)
callq 0x37f5e
movl 0xc(%rsp), %r8d
movq 0x8(%r14), %rax
cmpl $0x2, 0x58(%rax)
jne 0x5b946
cmpl %r8d, 0x3b0(%rax)
jge 0x5b964
leaq 0x7c9cf(%rip), %rdx # 0xd82bc
leaq 0x20(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r8d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movq 0x8(%r14), %rax
movl 0x3b0(%rax), %ecx
leaq 0x7b317(%rip), %rdx # 0xd6c34
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x12e, (%r12) # imm = 0x12E
movl $0x12e, %eax # imm = 0x12E
jmp 0x5b871
leaq 0x7c940(%rip), %rdi # 0xd828d
callq 0x37264
movl $0xe3, (%r12)
movl $0xe3, %eax
jmp 0x5b871
movq 0x3d0(%rax), %rcx
movslq %r8d, %rax
leaq (%rax,%rax,4), %rax
shlq $0x5, %rax
movl -0x50(%rcx,%rax), %edx
movl %edx, %esi
negl %esi
cmovsl %edx, %esi
cmpl $0xc, %esi
jb 0x5b9a4
leaq 0x7c965(%rip), %rdi # 0xd82f2
callq 0x37264
movl $0x136, (%r12) # imm = 0x136
movl $0x136, %eax # imm = 0x136
jmp 0x5b871
addq %rax, %rcx
movslq %ebp, %rsi
leaq (%rsi,%r15), %rdi
addq $-0x2, %rdi
leaq (%rsi,%r15), %rax
addq $0x5, %rax
testq %rdi, %rdi
cmovnsq %rdi, %rax
sarq $0x3, %rax
cmpl $0xb, %edx
je 0x5b9e7
cmpl $0x1, %edx
jne 0x5b9f3
addq %r15, %rsi
decq %rsi
cmpq -0x48(%rcx), %rsi
jle 0x5b9f3
leaq 0x7c947(%rip), %rdi # 0xd8329
jmp 0x5b85f
leal 0x1(%rax), %edx
movslq %edx, %rdx
cmpq -0x48(%rcx), %rdx
jg 0x5b9db
testq %rbx, %rbx
jle 0x5baf4
decq %r15
movq %r15, %rcx
shrq $0x3, %rcx
subq %rcx, %rax
incl %ecx
movslq %ecx, %rcx
movq %rcx, 0x18(%rsp)
incl %eax
cltq
movq %rax, 0x10(%rsp)
andl $0x7, %r15d
xorl %r12d, %r12d
movl %r8d, 0xc(%rsp)
leaq (%r12,%r13), %rdx
subq $0x8, %rsp
movq %r14, %rdi
movl %r8d, %esi
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r8
xorl %r9d, %r9d
pushq 0xc0(%rsp)
pushq $0x0
leaq 0x38(%rsp), %rax
pushq %rax
callq 0x62894
addq $0x20, %rsp
testl %eax, %eax
jg 0x5bae8
movq 0xb0(%rsp), %rax
movw $0x0, (%rax,%r12,2)
testl %ebp, %ebp
je 0x5bad5
xorl %edx, %edx
movl %r15d, %esi
movl %ebp, %eax
leal 0x7(%rsi), %ecx
testl %esi, %esi
cmovnsl %esi, %ecx
movl %ecx, %edi
sarl $0x3, %edi
andl $-0x8, %ecx
movl %esi, %r8d
subl %ecx, %r8d
movl $0x8, %r9d
subl %r8d, %r9d
cmpl %r9d, %eax
cmovll %eax, %r9d
addl %r9d, %r8d
subl %r9d, %eax
movslq %edi, %rcx
movzwl 0x20(%rsp,%rcx,2), %edi
movb $0x8, %cl
subb %r8b, %cl
shrl %cl, %edi
movl %eax, %ecx
shll %cl, %edi
orl %edi, %edx
addl %esi, %r9d
movl %r9d, %esi
testl %eax, %eax
jne 0x5ba7d
movq 0xb0(%rsp), %rax
movw %dx, (%rax,%r12,2)
incq %r12
cmpq %rbx, %r12
movl 0xc(%rsp), %r8d
jne 0x5ba28
jmp 0x5baf4
leaq 0x7c876(%rip), %rdi # 0xd8365
callq 0x37264
movq 0xb8(%rsp), %rax
movl (%rax), %eax
jmp 0x5b871
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoll.c |
ffgclsb | int ffgclsb(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
long elemincre, /* I - pixel increment; e.g., 2 = every other */
int nultyp, /* I - null value handling code: */
/* 1: set undefined pixels = nulval */
/* 2: set nularray=1 for undefined pixels */
signed char nulval, /* I - value for null pixels if nultyp = 1 */
signed char *array, /* O - array of values that are read */
char *nularray, /* O - array of flags = 1 if nultyp = 2 */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU.
The column number may refer to a real column in an ASCII or binary table,
or it may refer be a virtual column in a 1 or more grouped FITS primary
array or image extension. FITSIO treats a primary array as a binary table
with 2 vector columns: the first column contains the group parameters (often
with length = 0) and the second column contains the array of image pixels.
Each row of the table represents a group in the case of multigroup FITS
images.
The output array of values will be converted from the datatype of the column
and will be scaled by the FITS TSCALn and TZEROn values if necessary.
*/
{
double scale, zero, power = 1., dtemp;
int tcode, maxelem, hdutype, xcode, decimals;
long twidth, incre;
long ii, xwidth, ntodo;
int nulcheck, readcheck = 0;
LONGLONG repeat, startpos, elemnum, readptr, tnull;
LONGLONG rowlen, rownum, remain, next, rowincre;
char tform[20];
char message[FLEN_ERRMSG];
char snull[20]; /* the FITS null value if reading from ASCII table */
double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */
void *buffer;
union u_tag {
char charval;
signed char scharval;
} u;
if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */
return(*status);
buffer = cbuff;
if (anynul)
*anynul = 0;
if (nultyp == 2)
memset(nularray, 0, (size_t) nelem); /* initialize nullarray */
/*---------------------------------------------------*/
/* Check input and get parameters about the column: */
/*---------------------------------------------------*/
if (elemincre < 0)
readcheck = -1; /* don't do range checking in this case */
ffgcprll( fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero,
tform, &twidth, &tcode, &maxelem, &startpos, &elemnum, &incre,
&repeat, &rowlen, &hdutype, &tnull, snull, status);
/* special case: read column of T/F logicals */
if (tcode == TLOGICAL && elemincre == 1)
{
u.scharval = nulval;
ffgcll(fptr, colnum, firstrow, firstelem, nelem, nultyp,
u.charval, (char *) array, nularray, anynul, status);
return(*status);
}
if (strchr(tform,'A') != NULL)
{
if (*status == BAD_ELEM_NUM)
{
/* ignore this error message */
*status = 0;
ffcmsg(); /* clear error stack */
}
/* interpret a 'A' ASCII column as a 'B' byte column ('8A' == '8B') */
/* This is an undocumented 'feature' in CFITSIO */
/* we have to reset some of the values returned by ffgcpr */
tcode = TBYTE;
incre = 1; /* each element is 1 byte wide */
repeat = twidth; /* total no. of chars in the col */
twidth = 1; /* width of each element */
scale = 1.0; /* no scaling */
zero = 0.0;
tnull = NULL_UNDEFINED; /* don't test for nulls */
maxelem = DBUFFSIZE;
}
if (*status > 0)
return(*status);
incre *= elemincre; /* multiply incre to just get every nth pixel */
if (tcode == TSTRING && hdutype == ASCII_TBL) /* setup for ASCII tables */
{
/* get the number of implied decimal places if no explicit decmal point */
ffasfm(tform, &xcode, &xwidth, &decimals, status);
for(ii = 0; ii < decimals; ii++)
power *= 10.;
}
/*------------------------------------------------------------------*/
/* Decide whether to check for null values in the input FITS file: */
/*------------------------------------------------------------------*/
nulcheck = nultyp; /* by default, check for null values in the FITS file */
if (nultyp == 1 && nulval == 0)
nulcheck = 0; /* calling routine does not want to check for nulls */
else if (tcode%10 == 1 && /* if reading an integer column, and */
tnull == NULL_UNDEFINED) /* if a null value is not defined, */
nulcheck = 0; /* then do not check for null values. */
else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TBYTE && (tnull > 255 || tnull < 0) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED)
nulcheck = 0;
/*---------------------------------------------------------------------*/
/* Now read the pixels from the FITS column. If the column does not */
/* have the same datatype as the output array, then we have to read */
/* the raw values into a temporary buffer (of limited size). In */
/* the case of a vector colum read only 1 vector of values at a time */
/* then skip to the next row if more values need to be read. */
/* After reading the raw values, then call the fffXXYY routine to (1) */
/* test for undefined values, (2) convert the datatype if necessary, */
/* and (3) scale the values by the FITS TSCALn and TZEROn linear */
/* scaling parameters. */
/*---------------------------------------------------------------------*/
remain = nelem; /* remaining number of values to read */
next = 0; /* next element in array to be read */
rownum = 0; /* row number, relative to firstrow */
while (remain)
{
/* limit the number of pixels to read at one time to the number that
will fit in the buffer or to the number of pixels that remain in
the current vector, which ever is smaller.
*/
ntodo = (long) minvalue(remain, maxelem);
if (elemincre >= 0)
{
ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1));
}
else
{
ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1));
}
readptr = startpos + (rownum * rowlen) + (elemnum * (incre / elemincre));
switch (tcode)
{
case (TBYTE):
ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) &array[next], status);
fffi1s1((unsigned char *)&array[next], ntodo, scale, zero,
nulcheck, (unsigned char) tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TSHORT):
ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status);
fffi2s1((short *) buffer, ntodo, scale, zero, nulcheck,
(short) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TLONG):
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer,
status);
fffi4s1((INT32BIT *) buffer, ntodo, scale, zero, nulcheck,
(INT32BIT) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TLONGLONG):
ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status);
fffi8s1( (LONGLONG *) buffer, ntodo, scale, zero,
nulcheck, tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TFLOAT):
ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status);
fffr4s1((float *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TDOUBLE):
ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status);
fffr8s1((double *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSTRING):
ffmbyt(fptr, readptr, REPORT_EOF, status);
if (incre == twidth) /* contiguous bytes */
ffgbyt(fptr, ntodo * twidth, buffer, status);
else
ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer,
status);
/* interpret the string as an ASCII formated number */
fffstrs1((char *) buffer, ntodo, scale, zero, twidth, power,
nulcheck, snull, nulval, &nularray[next], anynul,
&array[next], status);
break;
default: /* error trap for invalid column format */
snprintf(message, FLEN_ERRMSG,
"Cannot read bytes from column %d which has format %s",
colnum, tform);
ffpmsg(message);
if (hdutype == ASCII_TBL)
return(*status = BAD_ATABLE_FORMAT);
else
return(*status = BAD_BTABLE_FORMAT);
} /* End of switch block */
/*-------------------------*/
/* Check for fatal error */
/*-------------------------*/
if (*status > 0) /* test for error during previous read operation */
{
dtemp = (double) next;
if (hdutype > 0)
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from column %d (ffgclsb).",
dtemp+1., dtemp+ntodo, colnum);
else
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from image (ffgclsb).",
dtemp+1., dtemp+ntodo);
ffpmsg(message);
return(*status);
}
/*--------------------------------------------*/
/* increment the counters for the next loop */
/*--------------------------------------------*/
remain -= ntodo;
if (remain)
{
next += ntodo;
elemnum = elemnum + (ntodo * elemincre);
if (elemnum >= repeat) /* completed a row; start on later row */
{
rowincre = elemnum / repeat;
rownum += rowincre;
elemnum = elemnum - (rowincre * repeat);
}
else if (elemnum < 0) /* completed a row; start on a previous row */
{
rowincre = (-elemnum - 1) / repeat + 1;
rownum -= rowincre;
elemnum = (rowincre * repeat) + elemnum;
}
}
} /* End of main while Loop */
/*--------------------------------*/
/* check for numerical overflow */
/*--------------------------------*/
if (*status == OVERFLOW_ERR)
{
ffpmsg(
"Numerical overflow during type conversion while reading FITS data.");
*status = NUM_OVERFLOW;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x71b8, %rsp # imm = 0x71B8
movq %r8, %r14
movq %rdx, %r8
movl %esi, 0x24(%rsp)
movq 0x7218(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
setg %sil
testq %r14, %r14
sete %dl
orb %sil, %dl
jne 0x5dade
movq %r9, %r15
movq %rdi, %rbp
movq 0x7210(%rsp), %rax
testq %rax, %rax
je 0x5d8f7
movl $0x0, (%rax)
cmpl $0x2, 0x71f0(%rsp)
jne 0x5d91f
movq 0x7208(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rcx, %rbx
movq %r8, %r12
callq 0x6090
movq %r12, %r8
movq %rbx, %rcx
movq %rcx, 0x38(%rsp)
movq %r15, %r9
sarq $0x3f, %r9
subq $0x8, %rsp
leaq 0xb8(%rsp), %r10
leaq 0x38(%rsp), %r11
leaq 0x34(%rsp), %r12
movq %rbp, %rdi
movl 0x2c(%rsp), %r13d
movl %r13d, %esi
movq %r8, %rdx
movq %r8, %rbx
movq %r14, %r8
movq 0x7220(%rsp), %rax
pushq %rax
pushq %r10
pushq %r11
leaq 0x48(%rsp), %rax
pushq %rax
leaq 0xa0(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xa4(%rsp), %rax
pushq %rax
pushq %r12
leaq 0xb8(%rsp), %rax
pushq %rax
leaq 0xf8(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
leaq 0x88(%rsp), %rax
pushq %rax
callq 0x3e16b
addq $0x80, %rsp
movl (%r12), %r12d
cmpl $0xe, %r12d
setne %al
movq %rbp, %rdi
cmpq $0x1, %r15
setne %cl
orb %al, %cl
jne 0x5da37
subq $0x8, %rsp
movsbl 0x7200(%rsp), %eax
movl %r13d, %esi
movq %rbx, %rdx
movq 0x40(%rsp), %rcx
movq %r14, %r8
movl 0x71f8(%rsp), %r9d
movq 0x7220(%rsp), %rbx
pushq %rbx
pushq 0x7220(%rsp)
pushq 0x7220(%rsp)
pushq 0x7220(%rsp)
pushq %rax
callq 0x5b125
addq $0x30, %rsp
movl (%rbx), %eax
jmp 0x5dade
movq %r15, %rbp
movb 0x71f8(%rsp), %r13b
movq %rdi, 0x18(%rsp)
leaq 0x90(%rsp), %rdi
movl $0x41, %esi
callq 0x63c0
movq %rax, %rcx
movq 0x7218(%rsp), %rbx
movl (%rbx), %eax
testq %rcx, %rcx
je 0x5dad4
cmpl $0x134, %eax # imm = 0x134
movq %rbp, %r15
jne 0x5da82
movl $0x0, (%rbx)
callq 0x37533
movl (%rbx), %eax
movl $0xb, 0x2c(%rsp)
movl $0x1, %ecx
movq %rcx, 0x48(%rsp)
movq 0x58(%rsp), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x4995cdd1, 0x30(%rsp) # imm = 0x4995CDD1
movl $0x7080, 0x54(%rsp) # imm = 0x7080
movl $0xb, %r12d
jmp 0x5dad7
movq %rbp, %r15
movl %r13d, %edi
testl %eax, %eax
jle 0x5daf0
addq $0x71b8, %rsp # imm = 0x71B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rsp), %rax
imulq %r15, %rax
movq %rax, 0x48(%rsp)
movsd 0x6b57a(%rip), %xmm1 # 0xc9080
cmpl $0x10, %r12d
jne 0x5db87
cmpl $0x1, 0x28(%rsp)
movl 0x71f0(%rsp), %r8d
jne 0x5db7d
leaq 0x90(%rsp), %rdi
leaq 0x8c(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r12, %rcx
movq %rbx, %r8
callq 0x39e6d
movl 0x71f0(%rsp), %r8d
movl %r13d, %edi
movslq (%r12), %rax
testq %rax, %rax
movsd 0x6b520(%rip), %xmm1 # 0xc9080
jle 0x5db8f
movsd 0x6b516(%rip), %xmm1 # 0xc9080
movsd 0x79f36(%rip), %xmm0 # 0xd7aa8
mulsd %xmm0, %xmm1
decq %rax
jne 0x5db72
jmp 0x5db8f
movsd 0x6b4fb(%rip), %xmm1 # 0xc9080
jmp 0x5db8f
movl 0x71f0(%rsp), %r8d
movsd %xmm1, 0x68(%rsp)
cmpl $0x1, %r8d
sete %al
testb %dil, %dil
sete %cl
movl $0x0, (%rsp)
testb %cl, %al
jne 0x5dc2c
movslq 0x2c(%rsp), %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x1, %edx
sete %dl
movq 0x30(%rsp), %rcx
cmpq $0x4995cdd1, %rcx # imm = 0x4995CDD1
sete %sil
testb %sil, %dl
jne 0x5dc2c
cmpl $0x15, %eax
sete %dl
movswq %cx, %rsi
cmpq %rcx, %rsi
setne %sil
testb %sil, %dl
jne 0x5dc2c
cmpl $0xb, %eax
sete %dl
cmpq $0x100, %rcx # imm = 0x100
setae %cl
testb %cl, %dl
jne 0x5dc2c
xorl %ecx, %ecx
cmpb $0x1, 0xb0(%rsp)
cmovnel %r8d, %ecx
cmpl $0x10, %eax
cmovnel %r8d, %ecx
movl %ecx, (%rsp)
movq %r15, %rax
negq %rax
movq %rax, 0x70(%rsp)
xorl %r12d, %r12d
movsbl %dil, %eax
movl %eax, 0x4(%rsp)
leaq 0x130(%rsp), %rbp
movq $0x0, 0x38(%rsp)
movslq 0x54(%rsp), %rcx
cmpq %rcx, %r14
cmovlq %r14, %rcx
testq %r15, %r15
js 0x5dc7b
movq 0x40(%rsp), %rsi
movq %rsi, %rax
notq %rax
addq 0x60(%rsp), %rax
cqto
idivq %r15
jmp 0x5dc8a
movq 0x40(%rsp), %rsi
movq %rsi, %rax
cqto
idivq 0x70(%rsp)
leaq 0x1(%rax), %r13
cmpq %rax, %rcx
cmovleq %rcx, %r13
movq 0x78(%rsp), %rdi
imulq 0x38(%rsp), %rdi
addq 0x80(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r15
imulq %rsi, %rax
addq %rdi, %rax
movl 0x2c(%rsp), %edx
cmpl $0x28, %edx
jle 0x5dd3a
cmpl $0x50, %edx
jg 0x5ddc1
cmpl $0x29, %edx
je 0x5de31
cmpl $0x2a, %edx
jne 0x5e11c
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0xc306e
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r8
movq 0x7200(%rsp), %rax
addq %r12, %rax
movq %rbp, %rdi
movq %r13, %rsi
movl (%rsp), %edx
movl 0x4(%rsp), %ecx
movq 0x7210(%rsp), %r9
pushq %rbx
pushq %rax
callq 0x6011b
jmp 0x5de28
cmpl $0xb, %edx
movq 0x7200(%rsp), %rsi
je 0x5df3b
cmpl $0x10, %edx
je 0x5def8
cmpl $0x15, %edx
jne 0x5e11c
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0xc2e32
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movswl 0x30(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
addq %r12, %rax
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x5faa9
jmp 0x5e005
cmpl $0x51, %edx
je 0x5de94
cmpl $0x52, %edx
jne 0x5e11c
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0xc312e
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r8
movq 0x7200(%rsp), %rax
addq %r12, %rax
movq %rbp, %rdi
movq %r13, %rsi
movl (%rsp), %edx
movl 0x4(%rsp), %ecx
movq 0x7210(%rsp), %r9
pushq %rbx
pushq %rax
callq 0x603c3
addq $0x10, %rsp
jmp 0x5e009
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0xc2eee
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movl 0x30(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
addq %r12, %rax
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x5fc8d
jmp 0x5e005
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0xc2fae
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x30(%rsp), %rcx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
addq %r12, %rax
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x5fe57
jmp 0x5e005
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rax
movq %rsi, %rcx
subq %rax, %rcx
jne 0x5df95
imulq %r13, %rsi
movq %rbp, %rdi
leaq 0x130(%rsp), %rbp
movq %rbp, %rdx
movq %rbx, %rcx
callq 0xc25e0
jmp 0x5dfb1
leaq (%rsi,%r12), %rbp
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0xc2d8f
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movzbl 0x30(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %rbx
pushq %rbp
pushq 0x7228(%rsp)
callq 0x5f847
jmp 0x5e005
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x130(%rsp), %rbp
movq %rbp, %r8
movq %rbx, %r9
callq 0xc27d1
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x58(%rsp), %rdx
movq 0x7208(%rsp), %rax
addq %r12, %rax
movq 0x7200(%rsp), %rcx
leaq (%rcx,%r12), %r10
movq %rbp, %rdi
movq %r13, %rsi
movsd 0x68(%rsp), %xmm2
movl (%rsp), %ecx
leaq 0xb0(%rsp), %r8
movl 0x4(%rsp), %r9d
pushq %rbx
pushq %r10
pushq 0x7220(%rsp)
pushq %rax
callq 0x60657
addq $0x20, %rsp
movl (%rbx), %eax
testl %eax, %eax
jg 0x5e082
subq %r13, %r14
je 0x5e0ca
addq %r13, %r12
imulq %r15, %r13
addq 0x40(%rsp), %r13
movq %r13, 0x40(%rsp)
movq 0x60(%rsp), %rcx
cmpq %rcx, %r13
jge 0x5e063
testq %r13, %r13
leaq 0x130(%rsp), %rbp
jns 0x5dc53
movq %r13, %rax
notq %rax
cqto
idivq %rcx
movq %rax, %rdx
incq %rdx
subq %rdx, 0x38(%rsp)
imulq %rcx, %rdx
addq %r13, %rdx
jmp 0x5e078
movq %r13, %rax
cqto
idivq %rcx
addq %rax, 0x38(%rsp)
leaq 0x130(%rsp), %rbp
movq %rdx, 0x40(%rsp)
jmp 0x5dc53
xorps %xmm2, %xmm2
cvtsi2sd %r12, %xmm2
cmpl $0x0, 0x28(%rsp)
movsd 0x6afe9(%rip), %xmm0 # 0xc9080
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
addsd %xmm2, %xmm1
movl 0x24(%rsp), %ecx
jle 0x5e0ef
leaq 0x7a560(%rip), %rdx # 0xd8614
leaq 0xd0(%rsp), %rdi
movl $0x51, %esi
movb $0x2, %al
callq 0x60b0
jmp 0x5e10a
cmpl $-0xb, %eax
jne 0x5dade
leaq 0x79b17(%rip), %rdi # 0xd7bf1
callq 0x37264
movl $0x19c, (%rbx) # imm = 0x19C
movl $0x19c, %eax # imm = 0x19C
jmp 0x5dade
leaq 0x7a55e(%rip), %rdx # 0xd8654
leaq 0xd0(%rsp), %rdi
movl $0x51, %esi
movb $0x2, %al
callq 0x60b0
leaq 0xd0(%rsp), %rdi
callq 0x37264
jmp 0x5da30
leaq 0x79a1f(%rip), %rdx # 0xd7b42
leaq 0xd0(%rsp), %r14
leaq 0x90(%rsp), %r8
movl $0x51, %esi
movq %r14, %rdi
movl 0x24(%rsp), %ecx
xorl %eax, %eax
callq 0x60b0
movq %r14, %rdi
callq 0x37264
cmpl $0x1, 0x28(%rsp)
jne 0x5e165
movl $0x137, (%rbx) # imm = 0x137
movl $0x137, %eax # imm = 0x137
jmp 0x5dade
movl $0x138, (%rbx) # imm = 0x138
movl $0x138, %eax # imm = 0x138
jmp 0x5dade
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolsb.c |
ffgsfsb | int ffgsfsb(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
signed char *array, /* O - array to be filled and returned */
char *flagval, /* O - set to 1 if corresponding value is null */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dsize[10];
LONGLONG blcll[9], trcll[9];
long felem, nelem, nultyp, ninc, numcol;
int hdutype, anyf;
signed char nulval = 0;
char msg[FLEN_ERRMSG];
int nullcheck = 2;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsvsb is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
fits_read_compressed_img(fptr, TSBYTE, blcll, trcll, inc,
nullcheck, NULL, array, flagval, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 2;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
snprintf(msg, FLEN_ERRMSG,"ffgsvsb: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
}
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0] - str[0]) / inc[0] + 1;
ninc = incr[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8])
{
for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7])
{
for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6])
{
for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5])
{
for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4])
{
for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3])
{
for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2])
{
for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1])
{
felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] +
(i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] +
(i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] +
(i7 - 1) * dsize[7] + (i8 - 1) * dsize[8];
if ( ffgclsb(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &flagval[i0], &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp # imm = 0x338
movl %edx, %r12d
movl %esi, 0x4(%rsp)
movq 0x390(%rsp), %r13
leal -0xa(%r12), %eax
cmpl $-0xa, %eax
ja 0x5ef02
leaq 0x796ea(%rip), %rdx # 0xd85b8
leaq 0x2e0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r13) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x5efa6
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %rbp
movq %r13, %rsi
callq 0x41127
testl %eax, %eax
je 0x5ef8e
shll $0x3, %r12d
leaq 0x2e0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x65c0
leaq 0x290(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x65c0
subq $0x8, %rsp
movq %rbp, %rdi
movl $0xc, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x378(%rsp), %r8
movl $0x2, %r9d
pushq %r13
pushq 0x398(%rsp)
pushq 0x398(%rsp)
pushq 0x398(%rsp)
pushq $0x0
callq 0x8b0dd
addq $0x30, %rsp
jmp 0x5efa2
leaq 0x64(%rsp), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x5efb8
movl (%r13), %eax
addq $0x338, %rsp # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x64(%rsp)
movl %r12d, %eax
je 0x5f007
movq (%rbx,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq (%r15,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x370(%rsp), %r9
movq (%r9,%rax,8), %rcx
movq %rcx, 0x40(%rsp)
movq 0x390(%rsp), %r11
movq 0x378(%rsp), %rdi
movq 0x380(%rsp), %r8
movq 0x388(%rsp), %rcx
jmp 0x5f058
movl 0x4(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %rcx
movl $0x2, 0x4(%rsp)
movl $0x1, %edx
movq %rdx, 0x40(%rsp)
movq %rcx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x390(%rsp), %r11
movq 0x378(%rsp), %rdi
movq 0x380(%rsp), %r8
movq 0x388(%rsp), %rcx
movq 0x370(%rsp), %r9
testq %rcx, %rcx
je 0x5f063
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %edx
movq %rdx, 0x1a0(%rsp,%rcx,8)
movq %rdx, 0x240(%rsp,%rcx,8)
movq %rdx, 0x1f0(%rsp,%rcx,8)
movq %rdx, 0x290(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x5f06a
testl %r12d, %r12d
je 0x5f12f
negq %rax
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdx
movq -0x8(%rbx,%rcx,8), %rsi
cmpq %rsi, %rdx
jl 0x5f741
movq %rsi, 0x198(%rsp,%rcx,8)
movq %rdx, 0x238(%rsp,%rcx,8)
movq -0x8(%r9,%rcx,8), %rdx
movq %rdx, 0x1e8(%rsp,%rcx,8)
movq -0x8(%r14,%rcx,8), %rdx
imulq 0x288(%rsp,%rcx,8), %rdx
movq %rdx, 0x290(%rsp,%rcx,8)
leaq (%rax,%rcx), %rdx
incq %rdx
incq %rcx
cmpq $0x1, %rdx
jne 0x5f0a4
cmpl $0x1, %r12d
jne 0x5f12f
cmpq $0x1, (%r14)
jne 0x5f12f
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
cqto
movq 0x40(%rsp), %rsi
idivq %rsi
movq %rax, %r9
movq %rcx, 0x10(%rsp)
movq %rsi, 0xc0(%rsp)
jmp 0x5f157
movq 0x240(%rsp), %rax
subq 0x1a0(%rsp), %rax
cqto
idivq (%r9)
movq %rax, %r9
movq 0x1f0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x8(%rsp)
jle 0x5f16b
movl (%r11), %eax
jmp 0x5efa6
movq %rbp, %r14
movq 0x1e0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x1d8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x1d0(%rsp), %rcx
movq 0x1c8(%rsp), %rsi
movq 0x1c0(%rsp), %r10
movq 0x1b8(%rsp), %rdx
movq %rdx, 0x58(%rsp)
movq 0x1b0(%rsp), %rdx
movq %rdx, 0xa8(%rsp)
movq 0x2a8(%rsp), %r13
movq %r13, 0x38(%rsp)
movq 0x2b0(%rsp), %rdx
movq %rdx, 0x18(%rsp)
movq 0x2b8(%rsp), %rbp
movq 0x2c0(%rsp), %rbx
movq 0x2c8(%rsp), %r15
movq 0x2d0(%rsp), %r12
decq %rax
imulq %r15, %rax
movq %rcx, 0x90(%rsp)
decq %rcx
imulq %rbx, %rcx
addq %rax, %rcx
movq %rsi, 0x160(%rsp)
leaq -0x1(%rsi), %rax
imulq %rbp, %rax
addq %rcx, %rax
leaq -0x1(%r10), %rcx
imulq %rdx, %rcx
addq %rax, %rcx
movq 0x50(%rsp), %rax
decq %rax
imulq %r12, %rax
addq 0x1a0(%rsp), %rax
addq %rax, %rcx
movq 0x58(%rsp), %rax
decq %rax
imulq %r13, %rax
movq 0x2a0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
decq %rdx
imulq %rsi, %rdx
addq %rax, %rdx
movq 0x1a8(%rsp), %rax
movq 0x298(%rsp), %r13
movq %rax, 0x180(%rsp)
decq %rax
imulq %r13, %rax
addq %rdx, %rax
addq %rcx, %rax
movq %r10, %rcx
movq %rax, 0xd0(%rsp)
incq %r9
movq 0x230(%rsp), %rax
movq %rax, 0xd8(%rsp)
imulq %rax, %r12
movq %r12, 0xe0(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0xe8(%rsp)
imulq %rax, %r15
movq %r15, 0xf0(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0xf8(%rsp)
imulq %rax, %rbx
movq %rbx, 0x100(%rsp)
movq 0x218(%rsp), %rax
movq %rax, 0x108(%rsp)
imulq %rax, %rbp
movq %rbp, 0x110(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x18(%rsp), %rdx
imulq %rax, %rdx
movq %rdx, 0x18(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x38(%rsp), %rdx
imulq %rax, %rdx
movq %rdx, 0x38(%rsp)
movq 0x200(%rsp), %rax
movq %rax, 0x170(%rsp)
imulq %rax, %rsi
movq %rsi, 0x178(%rsp)
movq 0x1f8(%rsp), %rax
movq %rax, 0x190(%rsp)
imulq %rax, %r13
movq %r13, 0x198(%rsp)
movq 0x280(%rsp), %r10
movq 0x278(%rsp), %r15
movq 0x270(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x268(%rsp), %r12
movq 0x260(%rsp), %rbx
movq 0x258(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x248(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0xb8(%rsp)
xorl %ebp, %ebp
movq %rcx, 0x150(%rsp)
movq %r10, 0x128(%rsp)
movq %r15, 0x120(%rsp)
movq %r12, 0x118(%rsp)
movq %rbx, 0x140(%rsp)
cmpq %r10, 0x50(%rsp)
jle 0x5f431
movq 0x8(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rax
jle 0x5f40f
jmp 0x5f163
movq 0xd0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x90(%rsp), %rax
cmpq %r15, 0x98(%rsp)
jle 0x5f485
movq 0x68(%rsp), %r13
addq 0xd8(%rsp), %r13
movq 0x20(%rsp), %rsi
addq 0xe0(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq %r13, 0x68(%rsp)
cmpq %r10, %r13
jle 0x5f450
jmp 0x5f416
movq 0x20(%rsp), %r13
movq 0x98(%rsp), %rsi
movq %rsi, 0x70(%rsp)
cmpq 0xa0(%rsp), %rax
jle 0x5f4c2
movq 0x70(%rsp), %rsi
addq 0xe8(%rsp), %rsi
addq 0xf0(%rsp), %r13
movq %rsi, 0x70(%rsp)
cmpq %r15, %rsi
jle 0x5f497
jmp 0x5f45a
movq %r13, 0x28(%rsp)
movq %rax, 0x78(%rsp)
movq %r13, 0x158(%rsp)
movq %rcx, %rsi
movq 0x160(%rsp), %rcx
cmpq %r12, %rcx
jle 0x5f517
movq %rsi, %rcx
movq 0x78(%rsp), %rdx
addq 0xf8(%rsp), %rdx
movq 0x28(%rsp), %rsi
addq 0x100(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq %rdx, 0x78(%rsp)
cmpq 0xa0(%rsp), %rdx
jle 0x5f4d4
jmp 0x5f4a1
movq 0x28(%rsp), %rdx
movq %rcx, 0x80(%rsp)
movq %rsi, %rcx
cmpq %rbx, %rcx
jle 0x5f553
movq 0x80(%rsp), %rsi
addq 0x108(%rsp), %rsi
addq 0x110(%rsp), %rdx
movq %rsi, 0x80(%rsp)
cmpq %r12, %rsi
jle 0x5f527
jmp 0x5f4e7
movq %rdx, 0x30(%rsp)
movq %rcx, 0x88(%rsp)
movq 0x58(%rsp), %rsi
movq %rdx, 0x138(%rsp)
cmpq 0xb0(%rsp), %rsi
jle 0x5f5c8
movq 0x88(%rsp), %r10
addq 0x130(%rsp), %r10
movq 0x30(%rsp), %rdx
addq 0x18(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %r10, 0x88(%rsp)
cmpq %rbx, %r10
movq 0x128(%rsp), %r10
movq 0x120(%rsp), %r15
movq 0x118(%rsp), %r12
movq 0x138(%rsp), %rdx
jle 0x5f56d
jmp 0x5f52c
movq 0x30(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movq %rsi, %r10
movq %r10, 0x168(%rsp)
movq 0xa8(%rsp), %r12
cmpq 0xb8(%rsp), %r12
jle 0x5f63d
movq 0x168(%rsp), %r10
addq 0x148(%rsp), %r10
movq 0x48(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq 0xb0(%rsp), %r10
movq 0x90(%rsp), %rax
movq 0x150(%rsp), %rcx
movq 0x140(%rsp), %rbx
movq 0x158(%rsp), %r13
jle 0x5f5d5
jmp 0x5f577
movq 0x48(%rsp), %rbx
movq 0x180(%rsp), %r13
cmpq 0xc8(%rsp), %r13
movq %rbx, 0x188(%rsp)
jg 0x5f702
leaq (%rdi,%rbp), %rax
leaq (%r8,%rbp), %r10
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r9, %r15
movq %r9, %r8
movq 0xc0(%rsp), %r9
pushq %r11
leaq 0x2e8(%rsp), %r11
pushq %r11
pushq %r10
pushq %rax
pushq $0x0
pushq $0x2
callq 0x5d8a4
addq $0x30, %rsp
testl %eax, %eax
jg 0x5f732
movq 0x388(%rsp), %rax
testq %rax, %rax
je 0x5f6c6
cmpl $0x0, 0x2e0(%rsp)
je 0x5f6c6
movl $0x1, (%rax)
movq %r15, %r9
addq %r15, %rbp
addq 0x190(%rsp), %r13
addq 0x198(%rsp), %rbx
cmpq 0xc8(%rsp), %r13
movq 0x390(%rsp), %r11
movq 0x378(%rsp), %rdi
movq 0x380(%rsp), %r8
jle 0x5f660
addq 0x170(%rsp), %r12
movq 0x188(%rsp), %rbx
addq 0x178(%rsp), %rbx
cmpq 0xb8(%rsp), %r12
movq 0x58(%rsp), %rsi
jle 0x5f642
jmp 0x5f5ef
movq 0x390(%rsp), %rax
movl (%rax), %eax
jmp 0x5efa6
leaq 0x78e9e(%rip), %rdx # 0xd85e6
leaq 0x2e0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
movq %r11, %r14
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r14) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x5efa6
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolsb.c |
fffi4s1 | int fffi4s1(INT32BIT *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */
signed char nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
signed char *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < -128)
{
*status = OVERFLOW_ERR;
output[ii] = -128;
}
else if (input[ii] > 127)
{
*status = OVERFLOW_ERR;
output[ii] = 127;
}
else
output[ii] = (signed char) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DSCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = -128;
}
else if (dvalue > DSCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = 127;
}
else
output[ii] = (signed char) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
if (input[ii] < -128)
{
*status = OVERFLOW_ERR;
output[ii] = -128;
}
else if (input[ii] > 127)
{
*status = OVERFLOW_ERR;
output[ii] = 127;
}
else
output[ii] = (signed char) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DSCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = -128;
}
else if (dvalue > DSCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = 127;
}
else
output[ii] = (signed char) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %rbx
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x693d6(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x5fd2f
movq 0x18(%rsp), %r11
testb $0x1, %bl
je 0x5fd79
testq %rsi, %rsi
jle 0x5fe52
xorl %ebx, %ebx
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x5fced
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x5fd02
movb %r8b, (%r10,%rbx)
jmp 0x5fd22
cmpl $0xffffff7f, %ebp # imm = 0xFFFFFF7F
jg 0x5fd09
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x80, (%r10,%rbx)
jmp 0x5fd22
movb $0x1, (%r9,%rbx)
jmp 0x5fd22
cmpl $0x80, %ebp
jl 0x5fd1e
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x7f, (%r10,%rbx)
jmp 0x5fd22
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x5fcd4
jmp 0x5fe52
testb $0x1, %bl
je 0x5fdfb
testq %rsi, %rsi
jle 0x5fe52
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
cmpl $0xffffff7f, %edx # imm = 0xFFFFFF7F
jg 0x5fd58
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x80, %dl
jmp 0x5fd68
cmpl $0x80, %edx
jl 0x5fd68
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x7f, %dl
movb %dl, (%r10,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x5fd43
jmp 0x5fe52
testq %rsi, %rsi
jle 0x5fe52
xorl %ebx, %ebx
movsd 0x78804(%rip), %xmm2 # 0xd8590
movsd 0x78804(%rip), %xmm3 # 0xd8598
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x5fdad
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x5fdcf
movb %r8b, (%r10,%rbx)
jmp 0x5fdf1
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x5fdd6
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x80, (%r10,%rbx)
jmp 0x5fdf1
movb $0x1, (%r9,%rbx)
jmp 0x5fdf1
ucomisd %xmm3, %xmm4
jbe 0x5fde9
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x7f, (%r10,%rbx)
jmp 0x5fdf1
cvttsd2si %xmm4, %ebp
movb %bpl, (%r10,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x5fd94
jmp 0x5fe52
testq %rsi, %rsi
jle 0x5fe52
xorl %ecx, %ecx
movsd 0x78786(%rip), %xmm2 # 0xd8590
movsd 0x78786(%rip), %xmm3 # 0xd8598
xorps %xmm4, %xmm4
cvtsi2sdl (%rdi,%rcx,4), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x5fe32
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $-0x80, %dl
jmp 0x5fe46
ucomisd %xmm3, %xmm4
jbe 0x5fe42
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movb $0x7f, %dl
jmp 0x5fe46
cvttsd2si %xmm4, %edx
movb %dl, (%r10,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x5fe12
movl (%rax), %eax
popq %rbx
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolsb.c |
fffstrs1 | int fffstrs1(char *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
long twidth, /* I - width of each substring of chars */
double implipower, /* I - power of 10 of implied decimal */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
char *snull, /* I - value of FITS null string, if any */
signed char nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
signed char *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file. Check
for null values and do scaling if required. The nullcheck code value
determines how any null values in the input array are treated. A null
value is an input pixel that is equal to snull. If nullcheck= 0, then
no special checking for nulls is performed. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
int nullen;
long ii;
double dvalue;
char *cstring, message[FLEN_ERRMSG];
char *cptr, *tpos;
char tempstore, chrzero = '0';
double val, power;
int exponent, sign, esign, decpt;
nullen = strlen(snull);
cptr = input; /* pointer to start of input string */
for (ii = 0; ii < ntodo; ii++)
{
cstring = cptr;
/* temporarily insert a null terminator at end of the string */
tpos = cptr + twidth;
tempstore = *tpos;
*tpos = 0;
/* check if null value is defined, and if the */
/* column string is identical to the null string */
if (snull[0] != ASCII_NULL_UNDEFINED &&
!strncmp(snull, cptr, nullen) )
{
if (nullcheck)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
cptr += twidth;
}
else
{
/* value is not the null value, so decode it */
/* remove any embedded blank characters from the string */
decpt = 0;
sign = 1;
val = 0.;
power = 1.;
exponent = 0;
esign = 1;
while (*cptr == ' ') /* skip leading blanks */
cptr++;
if (*cptr == '-' || *cptr == '+') /* check for leading sign */
{
if (*cptr == '-')
sign = -1;
cptr++;
while (*cptr == ' ') /* skip blanks between sign and value */
cptr++;
}
while (*cptr >= '0' && *cptr <= '9')
{
val = val * 10. + *cptr - chrzero; /* accumulate the value */
cptr++;
while (*cptr == ' ') /* skip embedded blanks in the value */
cptr++;
}
if (*cptr == '.' || *cptr == ',') /* check for decimal point */
{
decpt = 1;
cptr++;
while (*cptr == ' ') /* skip any blanks */
cptr++;
while (*cptr >= '0' && *cptr <= '9')
{
val = val * 10. + *cptr - chrzero; /* accumulate the value */
power = power * 10.;
cptr++;
while (*cptr == ' ') /* skip embedded blanks in the value */
cptr++;
}
}
if (*cptr == 'E' || *cptr == 'D') /* check for exponent */
{
cptr++;
while (*cptr == ' ') /* skip blanks */
cptr++;
if (*cptr == '-' || *cptr == '+') /* check for exponent sign */
{
if (*cptr == '-')
esign = -1;
cptr++;
while (*cptr == ' ') /* skip blanks between sign and exp */
cptr++;
}
while (*cptr >= '0' && *cptr <= '9')
{
exponent = exponent * 10 + *cptr - chrzero; /* accumulate exp */
cptr++;
while (*cptr == ' ') /* skip embedded blanks */
cptr++;
}
}
if (*cptr != 0) /* should end up at the null terminator */
{
snprintf(message, FLEN_ERRMSG,"Cannot read number from ASCII table");
ffpmsg(message);
snprintf(message, FLEN_ERRMSG,"Column field = %s.", cstring);
ffpmsg(message);
/* restore the char that was overwritten by the null */
*tpos = tempstore;
return(*status = BAD_C2D);
}
if (!decpt) /* if no explicit decimal, use implied */
power = implipower;
dvalue = (sign * val / power) * pow(10., (double) (esign * exponent));
dvalue = dvalue * scale + zero; /* apply the scaling */
if (dvalue < DSCHAR_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = -128;
}
else if (dvalue > DSCHAR_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = 127;
}
else
output[ii] = (signed char) dvalue;
}
/* restore the char that was overwritten by the null */
*tpos = tempstore;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq %rsi, 0x40(%rsp)
testq %rsi, %rsi
jle 0x6095f
movq %rdx, %r15
movq %rdi, %r14
movq 0x10(%rsp), %rdi
callq 0x6280
cltq
movq %rax, 0x28(%rsp)
xorl %r12d, %r12d
movsd 0x773f0(%rip), %xmm0 # 0xd7aa8
movsd 0x773f8(%rip), %xmm4 # 0xd7ab8
movq %r14, %rbx
leaq (%r14,%r15), %rbp
movb (%r14,%r15), %r13b
movb $0x0, (%r14,%r15)
movq 0x10(%rsp), %rax
cmpb $0x1, (%rax)
je 0x60742
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq 0x28(%rsp), %rdx
callq 0x6190
movsd 0x773c4(%rip), %xmm4 # 0xd7ab8
movsd 0x773ac(%rip), %xmm0 # 0xd7aa8
movq %r14, %rbx
testl %eax, %eax
jne 0x60742
movq %rbp, %rbx
cmpl $0x0, 0xc(%rsp)
je 0x6094a
movq 0xe8(%rsp), %rax
movl $0x1, (%rax)
cmpl $0x1, 0xc(%rsp)
jne 0x6093a
movl 0x1c(%rsp), %eax
movq 0xf0(%rsp), %rcx
movb %al, (%rcx,%r12)
jmp 0x60947
incq %rbx
movzbl (%rbx), %ecx
cmpl $0x20, %ecx
je 0x6073f
cmpl $0x2b, %ecx
je 0x60754
cmpl $0x2d, %ecx
jne 0x60774
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x60754
xorl %edx, %edx
cmpb $0x2d, %cl
sete %dl
leaq 0x77353(%rip), %rcx # 0xd7ac0
movsd (%rcx,%rdx,8), %xmm3
jmp 0x6077e
movl %ecx, %eax
movsd 0x68902(%rip), %xmm3 # 0xc9080
leal -0x30(%rax), %ecx
xorpd %xmm5, %xmm5
cmpb $0x9, %cl
ja 0x607af
movzbl %al, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x6079c
addsd %xmm4, %xmm5
leal -0x30(%rax), %ecx
jmp 0x60785
movzbl %al, %ecx
orl $0x2, %ecx
cmpl $0x2e, %ecx
jne 0x607fd
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x607ba
leal -0x30(%rax), %ecx
movsd 0x688b1(%rip), %xmm1 # 0xc9080
cmpb $0x9, %cl
ja 0x60803
movzbl %al, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm5
addsd %xmm2, %xmm5
addsd %xmm4, %xmm5
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x607ea
mulsd %xmm0, %xmm1
leal -0x30(%rax), %ecx
jmp 0x607cf
movsd 0x20(%rsp), %xmm1
movl %eax, %esi
andb $-0x2, %sil
movl $0x1, %edx
xorl %ecx, %ecx
cmpb $0x44, %sil
jne 0x6087f
movzbl 0x1(%rbx), %esi
incq %rbx
cmpl $0x20, %esi
je 0x60816
cmpl $0x2d, %esi
je 0x6082c
cmpl $0x2b, %esi
jne 0x60848
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x6082c
xorl %edx, %edx
cmpb $0x2d, %sil
setne %dl
leal -0x1(,%rdx,2), %edx
jmp 0x6084f
movl $0x1, %edx
movl %esi, %eax
leal -0x30(%rax), %esi
cmpb $0x9, %sil
ja 0x6087f
xorl %ecx, %ecx
movl %eax, %esi
leal (%rcx,%rcx,4), %eax
leal -0x30(,%rax,2), %ecx
movb 0x1(%rbx), %al
incq %rbx
cmpb $0x20, %al
je 0x60866
movsbl %sil, %esi
addl %esi, %ecx
leal -0x30(%rax), %esi
cmpb $0x9, %sil
jbe 0x6085a
testb %al, %al
jne 0x6096b
mulsd %xmm3, %xmm5
divsd %xmm1, %xmm5
movsd %xmm5, 0x48(%rsp)
imull %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
callq 0x65a0
mulsd 0x48(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x77cd2(%rip), %xmm1 # 0xd8590
ucomisd %xmm0, %xmm1
jbe 0x608f1
movq 0xf8(%rsp), %rax
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq 0xf0(%rsp), %rax
movb $-0x80, (%rax,%r12)
movsd 0x771c1(%rip), %xmm0 # 0xd7aa8
movsd 0x771c9(%rip), %xmm4 # 0xd7ab8
jmp 0x6094a
ucomisd 0x77c9f(%rip), %xmm0 # 0xd8598
movsd 0x771b7(%rip), %xmm4 # 0xd7ab8
jbe 0x60920
movq 0xf8(%rsp), %rax
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq 0xf0(%rsp), %rax
movb $0x7f, (%rax,%r12)
jmp 0x60930
cvttsd2si %xmm0, %eax
movq 0xf0(%rsp), %rcx
movb %al, (%rcx,%r12)
movsd 0x77170(%rip), %xmm0 # 0xd7aa8
jmp 0x6094a
movq 0xe0(%rsp), %rax
movb $0x1, (%rax,%r12)
movq %rbp, %rbx
movb %r13b, (%rbp)
incq %r12
movq %rbx, %r14
cmpq 0x40(%rsp), %r12
jne 0x606c3
movq 0xf8(%rsp), %rax
movl (%rax), %eax
jmp 0x609ce
movups 0x772d2(%rip), %xmm0 # 0xd7c44
leaq 0x50(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movupd 0x772b1(%rip), %xmm0 # 0xd7c34
movapd %xmm0, (%rbx)
movl $0x656c62, 0x20(%rbx) # imm = 0x656C62
movq %rbx, %rdi
callq 0x37264
leaq 0x772bb(%rip), %rdx # 0xd7c58
movl $0x51, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movb %r13b, (%rbp)
movq 0xf8(%rsp), %rax
movl $0x199, (%rax) # imm = 0x199
movl $0x199, %eax # imm = 0x199
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolsb.c |
ffgclui | int ffgclui( fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
long elemincre, /* I - pixel increment; e.g., 2 = every other */
int nultyp, /* I - null value handling code: */
/* 1: set undefined pixels = nulval */
/* 2: set nularray=1 for undefined pixels */
unsigned short nulval, /* I - value for null pixels if nultyp = 1 */
unsigned short *array, /* O - array of values that are read */
char *nularray, /* O - array of flags = 1 if nultyp = 2 */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU.
The column number may refer to a real column in an ASCII or binary table,
or it may refer be a virtual column in a 1 or more grouped FITS primary
array or image extension. FITSIO treats a primary array as a binary table
with 2 vector columns: the first column contains the group parameters (often
with length = 0) and the second column contains the array of image pixels.
Each row of the table represents a group in the case of multigroup FITS
images.
The output array of values will be converted from the datatype of the column
and will be scaled by the FITS TSCALn and TZEROn values if necessary.
*/
{
double scale, zero, power = 1., dtemp;
int tcode, maxelem2, hdutype, xcode, decimals;
long twidth, incre;
long ii, xwidth, ntodo;
int nulcheck;
LONGLONG repeat, startpos, elemnum, readptr, tnull;
LONGLONG rowlen, rownum, remain, next, rowincre, maxelem;
char tform[20];
char message[FLEN_ERRMSG];
char snull[20]; /* the FITS null value if reading from ASCII table */
double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */
void *buffer;
if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */
return(*status);
buffer = cbuff;
if (anynul)
*anynul = 0;
if (nultyp == 2)
memset(nularray, 0, (size_t) nelem); /* initialize nullarray */
/*---------------------------------------------------*/
/* Check input and get parameters about the column: */
/*---------------------------------------------------*/
if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero,
tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre,
&repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 )
return(*status);
maxelem = maxelem2;
incre *= elemincre; /* multiply incre to just get every nth pixel */
if (tcode == TSTRING) /* setup for ASCII tables */
{
/* get the number of implied decimal places if no explicit decmal point */
ffasfm(tform, &xcode, &xwidth, &decimals, status);
for(ii = 0; ii < decimals; ii++)
power *= 10.;
}
/*------------------------------------------------------------------*/
/* Decide whether to check for null values in the input FITS file: */
/*------------------------------------------------------------------*/
nulcheck = nultyp; /* by default check for null values in the FITS file */
if (nultyp == 1 && nulval == 0)
nulcheck = 0; /* calling routine does not want to check for nulls */
else if (tcode%10 == 1 && /* if reading an integer column, and */
tnull == NULL_UNDEFINED) /* if a null value is not defined, */
nulcheck = 0; /* then do not check for null values. */
else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TBYTE && (tnull > 255 || tnull < 0) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED)
nulcheck = 0;
/*----------------------------------------------------------------------*/
/* If FITS column and output data array have same datatype, then we do */
/* not need to use a temporary buffer to store intermediate datatype. */
/*----------------------------------------------------------------------*/
if (tcode == TSHORT) /* Special Case: */
{ /* no type convertion required, so read */
/* data directly into output buffer. */
if (nelem < (LONGLONG)INT32_MAX/2) {
maxelem = nelem;
} else {
maxelem = INT32_MAX/2;
}
}
/*---------------------------------------------------------------------*/
/* Now read the pixels from the FITS column. If the column does not */
/* have the same datatype as the output array, then we have to read */
/* the raw values into a temporary buffer (of limited size). In */
/* the case of a vector colum read only 1 vector of values at a time */
/* then skip to the next row if more values need to be read. */
/* After reading the raw values, then call the fffXXYY routine to (1) */
/* test for undefined values, (2) convert the datatype if necessary, */
/* and (3) scale the values by the FITS TSCALn and TZEROn linear */
/* scaling parameters. */
/*---------------------------------------------------------------------*/
remain = nelem; /* remaining number of values to read */
next = 0; /* next element in array to be read */
rownum = 0; /* row number, relative to firstrow */
while (remain)
{
/* limit the number of pixels to read at one time to the number that
will fit in the buffer or to the number of pixels that remain in
the current vector, which ever is smaller.
*/
ntodo = (long) minvalue(remain, maxelem);
ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1));
readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre));
switch (tcode)
{
case (TSHORT):
ffgi2b(fptr, readptr, ntodo, incre,
(short *) &array[next], status);
fffi2u2((short *) &array[next], ntodo, scale,
zero, nulcheck, (short) tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TLONGLONG):
ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status);
fffi8u2( (LONGLONG *) buffer, ntodo, scale, zero,
nulcheck, tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TBYTE):
ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer,
status);
fffi1u2((unsigned char *) buffer, ntodo, scale, zero, nulcheck,
(unsigned char) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TLONG):
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer,
status);
fffi4u2((INT32BIT *) buffer, ntodo, scale, zero, nulcheck,
(INT32BIT) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TFLOAT):
ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status);
fffr4u2((float *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TDOUBLE):
ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status);
fffr8u2((double *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSTRING):
ffmbyt(fptr, readptr, REPORT_EOF, status);
if (incre == twidth) /* contiguous bytes */
ffgbyt(fptr, ntodo * twidth, buffer, status);
else
ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer,
status);
fffstru2((char *) buffer, ntodo, scale, zero, twidth, power,
nulcheck, snull, nulval, &nularray[next], anynul,
&array[next], status);
break;
default: /* error trap for invalid column format */
snprintf(message, FLEN_ERRMSG,
"Cannot read numbers from column %d which has format %s",
colnum, tform);
ffpmsg(message);
if (hdutype == ASCII_TBL)
return(*status = BAD_ATABLE_FORMAT);
else
return(*status = BAD_BTABLE_FORMAT);
} /* End of switch block */
/*-------------------------*/
/* Check for fatal error */
/*-------------------------*/
if (*status > 0) /* test for error during previous read operation */
{
dtemp = (double) next;
if (hdutype > 0)
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from column %d (ffgclui).",
dtemp+1., dtemp+ntodo, colnum);
else
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from image (ffgclui).",
dtemp+1., dtemp+ntodo);
ffpmsg(message);
return(*status);
}
/*--------------------------------------------*/
/* increment the counters for the next loop */
/*--------------------------------------------*/
remain -= ntodo;
if (remain)
{
next += ntodo;
elemnum = elemnum + (ntodo * elemincre);
if (elemnum >= repeat) /* completed a row; start on later row */
{
rowincre = elemnum / repeat;
rownum += rowincre;
elemnum = elemnum - (rowincre * repeat);
}
}
} /* End of main while Loop */
/*--------------------------------*/
/* check for numerical overflow */
/*--------------------------------*/
if (*status == OVERFLOW_ERR)
{
ffpmsg(
"Numerical overflow during type conversion while reading FITS data.");
*status = NUM_OVERFLOW;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x71b8, %rsp # imm = 0x71B8
movq %rcx, %r13
movq %rdx, %rbp
movq 0x7218(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
setg %cl
testq %r8, %r8
sete %dl
orb %cl, %dl
jne 0x611f7
movq %r9, %r14
movq %r8, %r15
movq 0x7210(%rsp), %rax
testq %rax, %rax
je 0x60ae6
movl $0x0, (%rax)
cmpl $0x2, 0x71f0(%rsp)
movq %rdi, 0x8(%rsp)
jne 0x60b10
movq 0x7208(%rsp), %rdi
movl %esi, %ebx
xorl %esi, %esi
movq %r15, %rdx
callq 0x6090
movl %ebx, %esi
movq 0x8(%rsp), %rdi
subq $0x8, %rsp
leaq 0x98(%rsp), %rax
leaq 0x30(%rsp), %r10
leaq 0x3c(%rsp), %r11
leaq 0x80(%rsp), %r12
movl %esi, %ebx
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %r9d, %r9d
movq 0x7220(%rsp), %r13
pushq %r13
pushq %rax
pushq %r10
pushq %r11
pushq %r12
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0xa4(%rsp), %rax
pushq %rax
leaq 0x7c(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0x118(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x3e16b
addq $0x80, %rsp
testl %eax, %eax
jg 0x611f3
movl %ebx, 0x30(%rsp)
movzwl 0x71f8(%rsp), %ebp
movslq 0x54(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rax
imulq %r14, %rax
movq %rax, 0x48(%rsp)
movsd 0x6849c(%rip), %xmm1 # 0xc9080
cmpl $0x10, 0x24(%rsp)
jne 0x60c56
leaq 0xb0(%rsp), %rdi
leaq 0x8c(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x88(%rsp), %r13
movq %r13, %rcx
movq 0x7218(%rsp), %r8
callq 0x39e6d
movsd 0x6845d(%rip), %xmm1 # 0xc9080
movslq (%r13), %rax
movq 0x7218(%rsp), %r13
testq %rax, %rax
movl 0x71f0(%rsp), %edi
jle 0x60c5d
movsd 0x6843d(%rip), %xmm1 # 0xc9080
movsd 0x76e5d(%rip), %xmm0 # 0xd7aa8
mulsd %xmm0, %xmm1
decq %rax
jne 0x60c4b
jmp 0x60c5d
movl 0x71f0(%rsp), %edi
cmpl $0x1, %edi
sete %cl
testw %bp, %bp
sete %dl
movl $0x0, (%rsp)
movl 0x24(%rsp), %eax
testb %dl, %cl
jne 0x60cf1
movslq %eax, %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
cmpl $0x1, %ecx
sete %dl
movq 0x28(%rsp), %rcx
cmpq $0x4995cdd1, %rcx # imm = 0x4995CDD1
sete %sil
testb %sil, %dl
jne 0x60cf1
cmpl $0x15, %eax
sete %dl
movswq %cx, %rsi
cmpq %rcx, %rsi
setne %sil
testb %sil, %dl
jne 0x60cf1
cmpl $0xb, %eax
sete %dl
cmpq $0x100, %rcx # imm = 0x100
setae %cl
testb %cl, %dl
jne 0x60cf1
xorl %ecx, %ecx
cmpb $0x1, 0x90(%rsp)
cmovnel %edi, %ecx
cmpl $0x10, %eax
cmovnel %edi, %ecx
movl %ecx, (%rsp)
movl $0x3fffffff, %ecx # imm = 0x3FFFFFFF
cmpq %rcx, %r15
cmovlq %r15, %rcx
cmpl $0x15, %eax
movq 0x38(%rsp), %rax
cmoveq %rcx, %rax
movq %rax, 0x38(%rsp)
xorl %ebx, %ebx
movzwl %bp, %eax
movl %eax, 0x4(%rsp)
movq $0x0, 0x58(%rsp)
movsd %xmm1, 0x70(%rsp)
movq %r15, %rcx
cmpq 0x38(%rsp), %r15
jl 0x60d35
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rsi
movq %rsi, %rax
notq %rax
addq 0x60(%rsp), %rax
cqto
idivq %r14
leaq 0x1(%rax), %rbp
cmpq %rax, %rcx
cmovleq %rcx, %rbp
movq 0x78(%rsp), %rdi
imulq 0x58(%rsp), %rdi
addq 0x80(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r14
imulq %rsi, %rax
addq %rdi, %rax
movl 0x24(%rsp), %edx
cmpl $0x28, %edx
jle 0x60e04
cmpl $0x50, %edx
jg 0x60e98
cmpl $0x29, %edx
je 0x60f12
cmpl $0x2a, %edx
jne 0x61209
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0xc306e
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x7208(%rsp), %rax
leaq (%rax,%rbx), %r8
movq 0x7200(%rsp), %rax
leaq (%rax,%rbx,2), %rax
movq %r12, %rdi
movq %rbp, %rsi
movl (%rsp), %edx
movl 0x4(%rsp), %ecx
movq 0x7210(%rsp), %r9
pushq %r13
pushq %rax
callq 0x631b9
jmp 0x60f09
cmpl $0xb, %edx
je 0x61037
cmpl $0x10, %edx
je 0x60fed
cmpl $0x15, %edx
jne 0x61209
movq 0x7200(%rsp), %rdx
leaq (%rdx,%rbx,2), %r13
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
movq %r13, %r8
movq 0x7218(%rsp), %r9
callq 0xc2e32
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movswl 0x28(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%rbx), %r9
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq 0x7220(%rsp)
pushq %r13
movq 0x7230(%rsp), %r13
pushq 0x7228(%rsp)
callq 0x6290b
jmp 0x61116
cmpl $0x51, %edx
je 0x60f7f
cmpl $0x52, %edx
jne 0x61209
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0xc312e
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x7208(%rsp), %rax
leaq (%rax,%rbx), %r8
movq 0x7200(%rsp), %rax
leaq (%rax,%rbx,2), %rax
movq %r12, %rdi
movq %rbp, %rsi
movl (%rsp), %edx
movl 0x4(%rsp), %ecx
movq 0x7210(%rsp), %r9
pushq %r13
pushq %rax
callq 0x6346d
addq $0x10, %rsp
jmp 0x6111a
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0xc2eee
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl 0x28(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%rbx), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%rbx,2), %rax
subq $0x8, %rsp
movq %r12, %rdi
movq %rbp, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %r13
pushq %rax
pushq 0x7228(%rsp)
callq 0x62fe5
jmp 0x61116
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0xc2fae
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x28(%rsp), %rcx
movq 0x7208(%rsp), %rax
leaq (%rax,%rbx), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%rbx,2), %rax
subq $0x8, %rsp
movq %r12, %rdi
movq %rbp, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %r13
pushq %rax
pushq 0x7228(%rsp)
callq 0x62b7e
jmp 0x61116
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0xc1ad4
movq 0x48(%rsp), %rsi
movq 0x68(%rsp), %rax
movq %rsi, %rcx
subq %rax, %rcx
jne 0x610a2
imulq %rbp, %rsi
movq %r12, %rdi
leaq 0x130(%rsp), %r12
movq %r12, %rdx
movq %r13, %rcx
callq 0xc25e0
jmp 0x610be
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0xc2d8f
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movzbl 0x28(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%rbx), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%rbx,2), %rax
subq $0x8, %rsp
movq %r12, %rdi
movq %rbp, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %r8d
pushq %r13
pushq %rax
pushq 0x7228(%rsp)
callq 0x62e53
jmp 0x61116
movq %r12, %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0xc27d1
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x68(%rsp), %rdx
movq 0x7208(%rsp), %rax
addq %rbx, %rax
movq 0x7200(%rsp), %rcx
leaq (%rcx,%rbx,2), %r10
movq %r12, %rdi
movq %rbp, %rsi
movsd 0x70(%rsp), %xmm2
movl (%rsp), %ecx
leaq 0x90(%rsp), %r8
movl 0x4(%rsp), %r9d
pushq %r13
pushq %r10
movq 0x7220(%rsp), %r12
pushq %r12
pushq %rax
callq 0x6370d
addq $0x20, %rsp
movl (%r13), %eax
testl %eax, %eax
jg 0x6115d
subq %rbp, %r15
je 0x611a5
addq %rbp, %rbx
imulq %r14, %rbp
addq 0x40(%rsp), %rbp
movq %rbp, 0x40(%rsp)
movq 0x60(%rsp), %rcx
cmpq %rcx, %rbp
jl 0x60d26
movq %rbp, %rax
cqto
idivq %rcx
addq %rax, 0x58(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x60d26
xorps %xmm2, %xmm2
cvtsi2sd %rbx, %xmm2
cmpl $0x0, 0x34(%rsp)
movsd 0x67f0e(%rip), %xmm0 # 0xc9080
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rbp, %xmm1
addsd %xmm2, %xmm1
jle 0x611cb
leaq 0x77589(%rip), %rdx # 0xd8714
leaq 0xd0(%rsp), %rdi
movl $0x51, %esi
movl 0x30(%rsp), %ecx
movb $0x2, %al
callq 0x60b0
jmp 0x611e6
cmpl $-0xb, %eax
jne 0x611f7
leaq 0x76a40(%rip), %rdi # 0xd7bf1
callq 0x37264
movq 0x7218(%rsp), %rax
movl $0x19c, (%rax) # imm = 0x19C
movl $0x19c, %eax # imm = 0x19C
jmp 0x611f7
leaq 0x77582(%rip), %rdx # 0xd8754
leaq 0xd0(%rsp), %rdi
movl $0x51, %esi
movb $0x2, %al
callq 0x60b0
leaq 0xd0(%rsp), %rdi
callq 0x37264
movl (%r13), %eax
addq $0x71b8, %rsp # imm = 0x71B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x76b02(%rip), %rdx # 0xd7d12
leaq 0xd0(%rsp), %r14
leaq 0xb0(%rsp), %r8
movl $0x51, %esi
movq %r14, %rdi
movl 0x30(%rsp), %ecx
xorl %eax, %eax
callq 0x60b0
movq %r14, %rdi
callq 0x37264
cmpl $0x1, 0x34(%rsp)
jne 0x61251
movl $0x137, (%r13) # imm = 0x137
movl $0x137, %eax # imm = 0x137
jmp 0x611f7
movl $0x138, (%r13) # imm = 0x138
movl $0x138, %eax # imm = 0x138
jmp 0x611f7
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolui.c |
fffi2u2 | int fffi2u2(short *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
short tnull, /* I - value of FITS TNULLn keyword if any */
unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned short *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 32768.)
{
/* Instead of adding 32768, it is more efficient */
/* to just flip the sign bit with the XOR operator */
for (ii = 0; ii < ntodo; ii++)
output[ii] = ( *(unsigned short *) &input[ii] ) ^ 0x8000;
}
else if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else
output[ii] = (unsigned short) input[ii]; /* copy input */
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 32768.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = ( *(unsigned short *) &input[ii] ) ^ 0x8000;
}
}
else if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else
output[ii] = (unsigned short) input[ii]; /* copy input */
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %rbx
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %r10
movsd 0x6b8e1(%rip), %xmm2 # 0xce200
cmpeqpd %xmm1, %xmm2
movsd 0x66754(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x6298d
movq 0x18(%rsp), %r11
testb $0x1, %bl
je 0x629bd
testq %rsi, %rsi
jle 0x62b79
xorl %ebx, %ebx
movzwl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x6296e
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x6297b
movw %r8w, (%r10,%rbx,2)
jmp 0x62980
xorl $0x8000, %ebp # imm = 0x8000
movw %bp, (%r10,%rbx,2)
jmp 0x62980
movb $0x1, (%r9,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x62952
jmp 0x62b79
testb $0x1, %bl
je 0x62a39
testq %rsi, %rsi
jle 0x62b79
xorl %ecx, %ecx
movzwl (%rdi,%rcx,2), %edx
xorl $0x8000, %edx # imm = 0x8000
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x629a1
jmp 0x62b79
ucomisd 0x666bb(%rip), %xmm0 # 0xc9080
jne 0x62a8f
jp 0x62a8f
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x62a8f
jp 0x62a8f
testq %rsi, %rsi
jle 0x62b79
xorl %ebx, %ebx
movzwl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x62a0c
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x62a18
movw %r8w, (%r10,%rbx,2)
jmp 0x62a2c
testw %bp, %bp
js 0x62a1f
movw %bp, (%r10,%rbx,2)
jmp 0x62a2c
movb $0x1, (%r9,%rbx)
jmp 0x62a2c
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x0, (%r10,%rbx,2)
incq %rbx
cmpq %rbx, %rsi
jne 0x629f0
jmp 0x62b79
ucomisd 0x6663f(%rip), %xmm0 # 0xc9080
jne 0x62b1c
jp 0x62b1c
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x62b1c
jp 0x62b1c
testq %rsi, %rsi
jle 0x62b79
xorl %ecx, %ecx
movzwl (%rdi,%rcx,2), %edx
testw %dx, %dx
jns 0x62a7d
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x62a6c
jmp 0x62b79
testq %rsi, %rsi
jle 0x62b79
xorl %ebx, %ebx
movsd 0x7263e(%rip), %xmm2 # 0xd50e0
movsd 0x75be6(%rip), %xmm3 # 0xd8690
movzwl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x62ac6
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x62aed
movw %r8w, (%r10,%rbx,2)
jmp 0x62b12
movswl %bp, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x62af4
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x0, (%r10,%rbx,2)
jmp 0x62b12
movb $0x1, (%r9,%rbx)
jmp 0x62b12
ucomisd %xmm3, %xmm4
jbe 0x62b09
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0xffff, (%r10,%rbx,2) # imm = 0xFFFF
jmp 0x62b12
cvttsd2si %xmm4, %ebp
movw %bp, (%r10,%rbx,2)
incq %rbx
cmpq %rbx, %rsi
jne 0x62aaa
jmp 0x62b79
testq %rsi, %rsi
jle 0x62b79
xorl %ecx, %ecx
movsd 0x725b5(%rip), %xmm2 # 0xd50e0
movsd 0x75b5d(%rip), %xmm3 # 0xd8690
movswl (%rdi,%rcx,2), %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x62b56
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x62b6c
ucomisd %xmm3, %xmm4
jbe 0x62b68
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0xffff, %dx # imm = 0xFFFF
jmp 0x62b6c
cvttsd2si %xmm4, %edx
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x62b33
movl (%rax), %eax
popq %rbx
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolui.c |
fffr8u2 | int fffr8u2(double *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
unsigned short nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned short *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to NaN. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
short *sptr, iret;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) dvalue;
}
}
}
else /* must check for null values */
{
sptr = (short *) input;
#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS
sptr += 3; /* point to MSBs */
#endif
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++, sptr += 4)
{
if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
output[ii] = 0;
}
else
{
if (input[ii] < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++, sptr += 4)
{
if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
{
if (zero < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (zero > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) zero;
}
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUSHRT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUSHRT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = USHRT_MAX;
}
else
output[ii] = (unsigned short) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %r10
testl %edx, %edx
je 0x6355f
ucomisd 0x65bf1(%rip), %xmm0 # 0xc9080
jne 0x635df
jp 0x635df
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x635df
jp 0x635df
testq %rsi, %rsi
jle 0x63702
xorl %r11d, %r11d
movl $0x7ff0, %ebx # imm = 0x7FF0
movl $0x1, %ebp
movsd 0x71c13(%rip), %xmm0 # 0xd50e0
movsd 0x751bb(%rip), %xmm1 # 0xd8690
movzwl 0x6(%rdi,%r11,8), %r15d
xorl %r14d, %r14d
andl %ebx, %r15d
sete %r14b
addl %r14d, %r14d
cmpl %ebx, %r15d
cmovel %ebp, %r14d
testl %r14d, %r14d
je 0x6350d
cmpl $0x1, %r14d
jne 0x6351f
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x63528
movw %cx, (%r10,%r11,2)
jmp 0x6354e
movsd (%rdi,%r11,8), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x6352f
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x0, (%r10,%r11,2)
jmp 0x6354e
movb $0x1, (%r8,%r11)
jmp 0x6354e
ucomisd %xmm1, %xmm2
jbe 0x63544
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0xffff, (%r10,%r11,2) # imm = 0xFFFF
jmp 0x6354e
cvttsd2si %xmm2, %r14d
movw %r14w, (%r10,%r11,2)
incq %r11
cmpq %r11, %rsi
jne 0x634d5
jmp 0x63702
ucomisd 0x65b19(%rip), %xmm0 # 0xc9080
jne 0x636ab
jp 0x636ab
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x636ab
jp 0x636ab
testq %rsi, %rsi
jle 0x63702
xorl %ecx, %ecx
movsd 0x71b46(%rip), %xmm0 # 0xd50e0
movsd 0x750ee(%rip), %xmm1 # 0xd8690
movsd (%rdi,%rcx,8), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x635b7
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x635cd
ucomisd %xmm1, %xmm2
jbe 0x635c9
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0xffff, %dx # imm = 0xFFFF
jmp 0x635cd
cvttsd2si %xmm2, %edx
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x635a2
jmp 0x63702
testq %rsi, %rsi
jle 0x63702
cvttsd2si %xmm1, %r11d
xorl %ebx, %ebx
movl $0x7ff0, %ebp # imm = 0x7FF0
movl $0x1, %r14d
movsd 0x71ade(%rip), %xmm2 # 0xd50e0
movsd 0x75086(%rip), %xmm3 # 0xd8690
movzwl 0x6(%rdi,%rbx,8), %r12d
xorl %r15d, %r15d
andl %ebp, %r12d
sete %r15b
addl %r15d, %r15d
cmpl %ebp, %r12d
cmovel %r14d, %r15d
testl %r15d, %r15d
je 0x63642
cmpl $0x1, %r15d
jne 0x63667
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x6367c
movw %cx, (%r10,%rbx,2)
jmp 0x6369d
movsd (%rdi,%rbx,8), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
ja 0x6366d
ucomisd %xmm3, %xmm4
ja 0x63689
cvttsd2si %xmm4, %r15d
movw %r15w, (%r10,%rbx,2)
jmp 0x6369d
ucomisd %xmm1, %xmm2
jbe 0x63683
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0x0, (%r10,%rbx,2)
jmp 0x6369d
movb $0x1, (%r8,%rbx)
jmp 0x6369d
ucomisd %xmm3, %xmm1
jbe 0x63698
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0xffff, (%r10,%rbx,2) # imm = 0xFFFF
jmp 0x6369d
movw %r11w, (%r10,%rbx,2)
incq %rbx
cmpq %rbx, %rsi
jne 0x6360a
jmp 0x63702
testq %rsi, %rsi
jle 0x63702
xorl %ecx, %ecx
movsd 0x71a26(%rip), %xmm2 # 0xd50e0
movsd 0x74fce(%rip), %xmm3 # 0xd8690
movsd (%rdi,%rcx,8), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x636df
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x636f5
ucomisd %xmm3, %xmm4
jbe 0x636f1
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movw $0xffff, %dx # imm = 0xFFFF
jmp 0x636f5
cvttsd2si %xmm4, %edx
movw %dx, (%r10,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x636c2
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcolui.c |
ffgcluj | int ffgcluj(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
long elemincre, /* I - pixel increment; e.g., 2 = every other */
int nultyp, /* I - null value handling code: */
/* 1: set undefined pixels = nulval */
/* 2: set nularray=1 for undefined pixels */
unsigned long nulval, /* I - value for null pixels if nultyp = 1 */
unsigned long *array, /* O - array of values that are read */
char *nularray, /* O - array of flags = 1 if nultyp = 2 */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU.
The column number may refer to a real column in an ASCII or binary table,
or it may refer be a virtual column in a 1 or more grouped FITS primary
array or image extension. FITSIO treats a primary array as a binary table
with 2 vector columns: the first column contains the group parameters (often
with length = 0) and the second column contains the array of image pixels.
Each row of the table represents a group in the case of multigroup FITS
images.
The output array of values will be converted from the datatype of the column
and will be scaled by the FITS TSCALn and TZEROn values if necessary.
*/
{
double scale, zero, power = 1., dtemp;
int tcode, maxelem2, hdutype, xcode, decimals;
long twidth, incre;
long ii, xwidth, ntodo;
int nulcheck;
LONGLONG repeat, startpos, elemnum, readptr, tnull;
LONGLONG rowlen, rownum, remain, next, rowincre, maxelem;
char tform[20];
char message[FLEN_ERRMSG];
char snull[20]; /* the FITS null value if reading from ASCII table */
double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */
void *buffer;
if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */
return(*status);
buffer = cbuff;
if (anynul)
*anynul = 0;
if (nultyp == 2)
memset(nularray, 0, (size_t) nelem); /* initialize nullarray */
/*---------------------------------------------------*/
/* Check input and get parameters about the column: */
/*---------------------------------------------------*/
if ( ffgcprll( fptr, colnum, firstrow, firstelem, nelem, 0, &scale, &zero,
tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre,
&repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 )
return(*status);
maxelem = maxelem2;
incre *= elemincre; /* multiply incre to just get every nth pixel */
if (tcode == TSTRING) /* setup for ASCII tables */
{
/* get the number of implied decimal places if no explicit decmal point */
ffasfm(tform, &xcode, &xwidth, &decimals, status);
for(ii = 0; ii < decimals; ii++)
power *= 10.;
}
/*------------------------------------------------------------------*/
/* Decide whether to check for null values in the input FITS file: */
/*------------------------------------------------------------------*/
nulcheck = nultyp; /* by default check for null values in the FITS file */
if (nultyp == 1 && nulval == 0)
nulcheck = 0; /* calling routine does not want to check for nulls */
else if (tcode%10 == 1 && /* if reading an integer column, and */
tnull == NULL_UNDEFINED) /* if a null value is not defined, */
nulcheck = 0; /* then do not check for null values. */
else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TBYTE && (tnull > 255 || tnull < 0) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED)
nulcheck = 0;
/*----------------------------------------------------------------------*/
/* If FITS column and output data array have same datatype, then we do */
/* not need to use a temporary buffer to store intermediate datatype. */
/*----------------------------------------------------------------------*/
if ((tcode == TLONG) && (LONGSIZE == 32)) /* Special Case: */
{ /* no type convertion required, so read */
/* data directly into output buffer. */
if (nelem < (LONGLONG)INT32_MAX/4) {
maxelem = nelem;
} else {
maxelem = INT32_MAX/4;
}
}
/*---------------------------------------------------------------------*/
/* Now read the pixels from the FITS column. If the column does not */
/* have the same datatype as the output array, then we have to read */
/* the raw values into a temporary buffer (of limited size). In */
/* the case of a vector colum read only 1 vector of values at a time */
/* then skip to the next row if more values need to be read. */
/* After reading the raw values, then call the fffXXYY routine to (1) */
/* test for undefined values, (2) convert the datatype if necessary, */
/* and (3) scale the values by the FITS TSCALn and TZEROn linear */
/* scaling parameters. */
/*---------------------------------------------------------------------*/
remain = nelem; /* remaining number of values to read */
next = 0; /* next element in array to be read */
rownum = 0; /* row number, relative to firstrow */
while (remain)
{
/* limit the number of pixels to read at one time to the number that
will fit in the buffer or to the number of pixels that remain in
the current vector, which ever is smaller.
*/
ntodo = (long) minvalue(remain, maxelem);
ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1));
readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre));
switch (tcode)
{
case (TLONG):
if (LONGSIZE == 32) {
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) &array[next],
status);
fffi4u4((INT32BIT *) &array[next], ntodo, scale, zero,
nulcheck, (INT32BIT) tnull, nulval, &nularray[next],
anynul, &array[next], status);
} else { /* case where sizeof(long) = 8 */
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer,
status);
fffi4u4((INT32BIT *) buffer, ntodo, scale, zero,
nulcheck, (INT32BIT) tnull, nulval, &nularray[next],
anynul, &array[next], status);
}
break;
case (TLONGLONG):
ffgi8b(fptr, readptr, ntodo, incre, (long *) buffer, status);
fffi8u4( (LONGLONG *) buffer, ntodo, scale, zero,
nulcheck, tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TBYTE):
ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer,
status);
fffi1u4((unsigned char *) buffer, ntodo, scale, zero, nulcheck,
(unsigned char) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSHORT):
ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status);
fffi2u4((short *) buffer, ntodo, scale, zero, nulcheck,
(short) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TFLOAT):
ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status);
fffr4u4((float *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TDOUBLE):
ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status);
fffr8u4((double *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSTRING):
ffmbyt(fptr, readptr, REPORT_EOF, status);
if (incre == twidth) /* contiguous bytes */
ffgbyt(fptr, ntodo * twidth, buffer, status);
else
ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer,
status);
fffstru4((char *) buffer, ntodo, scale, zero, twidth, power,
nulcheck, snull, nulval, &nularray[next], anynul,
&array[next], status);
break;
default: /* error trap for invalid column format */
snprintf(message,FLEN_ERRMSG,
"Cannot read numbers from column %d which has format %s",
colnum, tform);
ffpmsg(message);
if (hdutype == ASCII_TBL)
return(*status = BAD_ATABLE_FORMAT);
else
return(*status = BAD_BTABLE_FORMAT);
} /* End of switch block */
/*-------------------------*/
/* Check for fatal error */
/*-------------------------*/
if (*status > 0) /* test for error during previous read operation */
{
dtemp = (double) next;
if (hdutype > 0)
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from column %d (ffgcluj).",
dtemp+1., dtemp+ntodo, colnum);
else
snprintf(message,FLEN_ERRMSG,
"Error reading elements %.0f thru %.0f from image (ffgcluj).",
dtemp+1., dtemp+ntodo);
ffpmsg(message);
return(*status);
}
/*--------------------------------------------*/
/* increment the counters for the next loop */
/*--------------------------------------------*/
remain -= ntodo;
if (remain)
{
next += ntodo;
elemnum = elemnum + (ntodo * elemincre);
if (elemnum >= repeat) /* completed a row; start on later row */
{
rowincre = elemnum / repeat;
rownum += rowincre;
elemnum = elemnum - (rowincre * repeat);
}
}
} /* End of main while Loop */
/*--------------------------------*/
/* check for numerical overflow */
/*--------------------------------*/
if (*status == OVERFLOW_ERR)
{
ffpmsg(
"Numerical overflow during type conversion while reading FITS data.");
*status = NUM_OVERFLOW;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x71b8, %rsp # imm = 0x71B8
movq %rcx, %r13
movq %rdx, %rbp
movq 0x7218(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
setg %cl
testq %r8, %r8
sete %dl
orb %cl, %dl
jne 0x64292
movq %r9, %r14
movq %r8, %r15
movq %rdi, %r12
movq 0x7210(%rsp), %rax
testq %rax, %rax
je 0x63ba3
movl $0x0, (%rax)
cmpl $0x2, 0x71f0(%rsp)
jne 0x63bc3
movq 0x7208(%rsp), %rdi
movl %esi, %ebx
xorl %esi, %esi
movq %r15, %rdx
callq 0x6090
movl %ebx, %esi
subq $0x8, %rsp
leaq 0x98(%rsp), %r10
leaq 0x30(%rsp), %rbx
leaq 0x3c(%rsp), %r11
leaq 0x80(%rsp), %rax
movq %r12, %rdi
movq %r12, 0x10(%rsp)
movl %esi, %r12d
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %r9d, %r9d
movq 0x7220(%rsp), %r13
pushq %r13
pushq %r10
pushq %rbx
pushq %r11
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0x9c(%rsp), %rax
pushq %rax
leaq 0x7c(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0x118(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
callq 0x3e16b
addq $0x80, %rsp
testl %eax, %eax
jle 0x63c72
movl (%r13), %eax
jmp 0x64292
movl %r12d, 0x30(%rsp)
movslq 0x4c(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x40(%rsp), %rax
imulq %r14, %rax
movq %rax, 0x40(%rsp)
movsd 0x653e9(%rip), %xmm1 # 0xc9080
cmpl $0x10, 0x24(%rsp)
jne 0x63d04
leaq 0xb0(%rsp), %rdi
leaq 0x8c(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x88(%rsp), %rbp
movq %rbp, %rcx
movq 0x7218(%rsp), %rbx
movq %rbx, %r8
callq 0x39e6d
movsd 0x653a7(%rip), %xmm1 # 0xc9080
movslq (%rbp), %rax
testq %rax, %rax
movl 0x71f0(%rsp), %edi
jle 0x63d13
movsd 0x6538f(%rip), %xmm1 # 0xc9080
movsd 0x73daf(%rip), %xmm0 # 0xd7aa8
mulsd %xmm0, %xmm1
decq %rax
jne 0x63cf9
jmp 0x63d13
movq 0x7218(%rsp), %rbx
movl 0x71f0(%rsp), %edi
cmpl $0x1, %edi
sete %al
cmpq $0x0, 0x71f8(%rsp)
sete %cl
movl $0x0, 0x4(%rsp)
testb %cl, %al
jne 0x63daf
movslq 0x24(%rsp), %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x1, %edx
sete %dl
movq 0x28(%rsp), %rcx
cmpq $0x4995cdd1, %rcx # imm = 0x4995CDD1
sete %sil
testb %sil, %dl
jne 0x63daf
cmpl $0x15, %eax
sete %dl
movswq %cx, %rsi
cmpq %rcx, %rsi
setne %sil
testb %sil, %dl
jne 0x63daf
cmpl $0xb, %eax
sete %dl
cmpq $0x100, %rcx # imm = 0x100
setae %cl
testb %cl, %dl
jne 0x63daf
xorl %ecx, %ecx
cmpb $0x1, 0x90(%rsp)
cmovnel %edi, %ecx
cmpl $0x10, %eax
cmovnel %edi, %ecx
movl %ecx, 0x4(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x50(%rsp)
movsd %xmm1, 0x70(%rsp)
movq %r15, %rcx
cmpq 0x58(%rsp), %r15
jl 0x63dd0
movq 0x58(%rsp), %rcx
movq 0x38(%rsp), %rsi
movq %rsi, %rax
notq %rax
addq 0x60(%rsp), %rax
cqto
idivq %r14
leaq 0x1(%rax), %rbp
cmpq %rax, %rcx
cmovleq %rcx, %rbp
movq 0x78(%rsp), %rdi
imulq 0x50(%rsp), %rdi
addq 0x80(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r14
imulq %rsi, %rax
addq %rdi, %rax
movl 0x24(%rsp), %edx
cmpl $0x28, %edx
jle 0x63ea7
cmpl $0x50, %edx
jg 0x63f32
cmpl $0x29, %edx
je 0x63fb0
cmpl $0x2a, %edx
jne 0x642a4
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc306e
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r8
movq 0x7200(%rsp), %rax
leaq (%rax,%r12,8), %rax
movq %r13, %rdi
movq %rbp, %rsi
movl 0x4(%rsp), %edx
movq 0x71f8(%rsp), %rcx
movq 0x7210(%rsp), %r9
pushq %rbx
pushq %rax
callq 0x662e6
jmp 0x63fa7
cmpl $0xb, %edx
je 0x640d9
cmpl $0x10, %edx
je 0x6408f
cmpl $0x15, %edx
jne 0x642a4
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2e32
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movswl 0x28(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq 0x7200(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x660de
jmp 0x641bd
cmpl $0x51, %edx
je 0x6401f
cmpl $0x52, %edx
jne 0x642a4
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc312e
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r8
movq 0x7200(%rsp), %rax
leaq (%rax,%r12,8), %rax
movq %r13, %rdi
movq %rbp, %rsi
movl 0x4(%rsp), %edx
movq 0x71f8(%rsp), %rcx
movq 0x7210(%rsp), %r9
pushq %rbx
pushq %rax
callq 0x66639
addq $0x10, %rsp
jmp 0x641c1
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2eee
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl 0x28(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq 0x7200(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x65980
jmp 0x641bd
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2fae
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x28(%rsp), %rcx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq 0x7200(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x65c33
jmp 0x641bd
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xc1ad4
movq 0x40(%rsp), %rsi
movq 0x68(%rsp), %rax
movq %rsi, %rcx
subq %rax, %rcx
jne 0x64146
imulq %rbp, %rsi
movq %r13, %rdi
leaq 0x130(%rsp), %r13
movq %r13, %rdx
movq %rbx, %rcx
callq 0xc25e0
jmp 0x64162
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc2d8f
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movzbl 0x28(%rsp), %ecx
movq 0x7208(%rsp), %rax
leaq (%rax,%r12), %r9
movq 0x7200(%rsp), %rax
leaq (%rax,%r12,8), %rax
subq $0x8, %rsp
movq %r13, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq 0x7200(%rsp), %r8
pushq %rbx
pushq %rax
pushq 0x7228(%rsp)
callq 0x65efe
jmp 0x641bd
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rdx
leaq 0x130(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
callq 0xc27d1
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x68(%rsp), %rdx
movq 0x7208(%rsp), %rax
addq %r12, %rax
movq 0x7200(%rsp), %rcx
leaq (%rcx,%r12,8), %r10
movq %r13, %rdi
movq %rbp, %rsi
movsd 0x70(%rsp), %xmm2
movl 0x4(%rsp), %ecx
leaq 0x90(%rsp), %r8
movq 0x71f8(%rsp), %r9
pushq %rbx
pushq %r10
movq 0x7220(%rsp), %r13
pushq %r13
pushq %rax
callq 0x66978
addq $0x20, %rsp
movl (%rbx), %eax
testl %eax, %eax
jg 0x64202
subq %rbp, %r15
je 0x6424a
addq %rbp, %r12
imulq %r14, %rbp
addq 0x38(%rsp), %rbp
movq %rbp, 0x38(%rsp)
movq 0x60(%rsp), %rcx
cmpq %rcx, %rbp
jl 0x63dc1
movq %rbp, %rax
cqto
idivq %rcx
addq %rax, 0x50(%rsp)
movq %rdx, 0x38(%rsp)
jmp 0x63dc1
xorps %xmm2, %xmm2
cvtsi2sd %r12, %xmm2
cmpl $0x0, 0x34(%rsp)
movsd 0x64e69(%rip), %xmm0 # 0xc9080
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rbp, %xmm1
addsd %xmm2, %xmm1
jle 0x64268
leaq 0x745c8(%rip), %rdx # 0xd87f8
leaq 0xd0(%rsp), %rdi
movl $0x51, %esi
movl 0x30(%rsp), %ecx
movb $0x2, %al
callq 0x60b0
jmp 0x64283
cmpl $-0xb, %eax
jne 0x64292
leaq 0x7399b(%rip), %rdi # 0xd7bf1
callq 0x37264
movl $0x19c, (%rbx) # imm = 0x19C
movl $0x19c, %eax # imm = 0x19C
jmp 0x64292
leaq 0x745c9(%rip), %rdx # 0xd8838
leaq 0xd0(%rsp), %rdi
movl $0x51, %esi
movb $0x2, %al
callq 0x60b0
leaq 0xd0(%rsp), %rdi
callq 0x37264
movl (%rbx), %eax
addq $0x71b8, %rsp # imm = 0x71B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x73a67(%rip), %rdx # 0xd7d12
leaq 0xd0(%rsp), %r14
leaq 0xb0(%rsp), %r8
movl $0x51, %esi
movq %r14, %rdi
movl 0x30(%rsp), %ecx
xorl %eax, %eax
callq 0x60b0
movq %r14, %rdi
callq 0x37264
cmpl $0x1, 0x34(%rsp)
jne 0x642ea
movl $0x137, (%rbx) # imm = 0x137
movl $0x137, %eax # imm = 0x137
jmp 0x64292
movl $0x138, (%rbx) # imm = 0x138
movl $0x138, %eax # imm = 0x138
jmp 0x64292
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
ffgsvuj | int ffgsvuj(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
unsigned long nulval, /* I - value to set undefined pixels */
unsigned long *array, /* O - array to be filled and returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9];
long nelem, nultyp, ninc, numcol;
LONGLONG felem, dsize[10], blcll[9], trcll[9];
int hdutype, anyf;
char ldummy, msg[FLEN_ERRMSG];
int nullcheck = 1;
unsigned long nullvalue;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsvuj is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
nullvalue = nulval; /* set local variable */
fits_read_compressed_img(fptr, TULONG, blcll, trcll, inc,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 1;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
snprintf(msg, FLEN_ERRMSG,"ffgsvuj: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
}
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0] - str[0]) / inc[0] + 1;
ninc = incr[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8])
{
for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7])
{
for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6])
{
for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5])
{
for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4])
{
for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3])
{
for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2])
{
for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1])
{
felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] +
(i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] +
(i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] +
(i7 - 1) * dsize[7] + (i8 - 1) * dsize[8];
if ( ffgcluj(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &ldummy, &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp # imm = 0x348
movl %edx, %r12d
movl %esi, (%rsp)
movq 0x3a0(%rsp), %r13
leal -0xa(%r12), %eax
cmpl $-0xa, %eax
ja 0x646b2
leaq 0x7411e(%rip), %rdx # 0xd879c
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r13) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x64767
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %rbp
movq %rdi, %r14
movq %r13, %rsi
callq 0x41127
testl %eax, %eax
je 0x6474f
shll $0x3, %r12d
leaq 0x2f0(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x65c0
leaq 0x2a0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x65c0
leaq 0x1b0(%rsp), %rax
movq 0x388(%rsp), %rcx
movq %rcx, (%rax)
subq $0x8, %rsp
movq %r14, %rdi
movl $0x28, %esi
movq %rbp, %rdx
movq %rbx, %rcx
movq 0x388(%rsp), %r8
movl $0x1, %r9d
pushq %r13
pushq 0x3a8(%rsp)
pushq $0x0
pushq 0x3b0(%rsp)
pushq %rax
callq 0x8b0dd
addq $0x30, %rsp
jmp 0x64763
leaq 0x54(%rsp), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x64779
movl (%r13), %eax
addq $0x348, %rsp # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r8
cmpl $0x0, 0x54(%rsp)
movl %r12d, %eax
je 0x647be
movq (%rbx,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq (%r15,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x380(%rsp), %r9
movq (%r9,%rax,8), %rdi
movq 0x3a0(%rsp), %r10
movq 0x398(%rsp), %rcx
movq 0x388(%rsp), %r11
jmp 0x64800
movl (%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %rcx
movl $0x2, (%rsp)
movl $0x1, %edi
movq %rcx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x3a0(%rsp), %r10
movq 0x398(%rsp), %rcx
movq 0x388(%rsp), %r11
movq 0x380(%rsp), %r9
testq %rcx, %rcx
je 0x6480b
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %edx
movq %rdx, 0x1b0(%rsp,%rcx,8)
movq %rdx, 0x250(%rsp,%rcx,8)
movq %rdx, 0x200(%rsp,%rcx,8)
movq %rdx, 0x2a0(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x64812
testl %r12d, %r12d
je 0x648d5
negq %rax
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdx
movq -0x8(%rbx,%rcx,8), %rsi
cmpq %rsi, %rdx
jl 0x64f2e
movq %rsi, 0x1a8(%rsp,%rcx,8)
movq %rdx, 0x248(%rsp,%rcx,8)
movq -0x8(%r9,%rcx,8), %rdx
movq %rdx, 0x1f8(%rsp,%rcx,8)
movq -0x8(%rbp,%rcx,8), %rdx
imulq 0x298(%rsp,%rcx,8), %rdx
movq %rdx, 0x2a0(%rsp,%rcx,8)
leaq (%rax,%rcx), %rdx
incq %rdx
incq %rcx
cmpq $0x1, %rdx
jne 0x6484c
cmpl $0x1, %r12d
jne 0x648d5
cmpq $0x1, (%rbp)
jne 0x648d5
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
cqto
idivq %rdi
movq %rcx, 0x10(%rsp)
movq %rdi, 0x58(%rsp)
movq %rdi, 0xf0(%rsp)
jmp 0x648ff
movq %rdi, 0x58(%rsp)
movq 0x250(%rsp), %rax
subq 0x1b0(%rsp), %rax
cqto
idivq (%r9)
movq 0x200(%rsp), %rcx
movq %rcx, 0xf0(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, 0x8(%rsp)
jle 0x64913
movl (%r10), %eax
jmp 0x64767
movq 0x1f0(%rsp), %rcx
movq %rcx, 0xd0(%rsp)
movq 0x1e8(%rsp), %rdx
movq %rdx, 0xc8(%rsp)
movq 0x1e0(%rsp), %rbx
movq %rbx, 0x90(%rsp)
movq 0x1d8(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
movq 0x1d0(%rsp), %r13
movq 0x1c8(%rsp), %r12
movq 0x2c0(%rsp), %r14
movq %r14, 0x28(%rsp)
movq 0x2c8(%rsp), %r15
movq %r15, 0x20(%rsp)
movq 0x2d0(%rsp), %rbp
movq %rax, 0x18(%rsp)
movq 0x2e0(%rsp), %rax
decq %rcx
imulq %rax, %rcx
addq 0x1b0(%rsp), %rcx
movq 0x2d8(%rsp), %r9
decq %rdx
imulq %r9, %rdx
leaq -0x1(%rbx), %rsi
imulq %rbp, %rsi
addq %rdx, %rsi
leaq -0x1(%rdi), %rdx
imulq %r15, %rdx
addq %rsi, %rdx
leaq -0x1(%r13), %rsi
imulq %r14, %rsi
addq %rdx, %rsi
movq 0x2b8(%rsp), %rdi
addq %rcx, %rsi
leaq -0x1(%r12), %rcx
imulq %rdi, %rcx
movq 0x1c0(%rsp), %rbx
movq 0x2b0(%rsp), %r14
leaq -0x1(%rbx), %rdx
imulq %r14, %rdx
addq %rcx, %rdx
movq %r12, %rcx
movq 0x1b8(%rsp), %r12
movq 0x2a8(%rsp), %r15
movq %r12, 0x180(%rsp)
decq %r12
imulq %r15, %r12
addq %rdx, %r12
movq %rbx, %rdx
addq %rsi, %r12
movq %r12, 0xf8(%rsp)
movq 0x18(%rsp), %rsi
leaq 0x1(%rsi), %r12
leaq 0x8(,%rsi,8), %rbx
movq %rbx, 0x1a0(%rsp)
movq 0x240(%rsp), %rbx
movq %rbx, 0x108(%rsp)
imulq %rbx, %rax
movq %rax, 0x110(%rsp)
movq 0x238(%rsp), %rax
movq %rax, 0x118(%rsp)
imulq %rax, %r9
movq %r9, 0x120(%rsp)
movq 0xc8(%rsp), %r9
movq 0x230(%rsp), %rax
movq %rax, 0x128(%rsp)
imulq %rax, %rbp
movq %rbp, 0x130(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x20(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x20(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x28(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq 0x218(%rsp), %rax
movq %rax, 0x148(%rsp)
imulq %rax, %rdi
movq %rdi, 0x150(%rsp)
movq 0xd0(%rsp), %rdi
movq 0x210(%rsp), %rax
movq %rax, 0x168(%rsp)
imulq %rax, %r14
movq %r14, 0x170(%rsp)
movq 0xc0(%rsp), %r14
movq 0x208(%rsp), %rax
movq %rax, 0x198(%rsp)
imulq %rax, %r15
movq %r15, 0x1a8(%rsp)
movq 0x290(%rsp), %r15
movq 0x288(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x280(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x278(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x268(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0xe8(%rsp)
xorl %ebp, %ebp
movq %r13, 0xd8(%rsp)
movq %rcx, 0xe0(%rsp)
movq %rdx, 0x178(%rsp)
movq %r15, 0x100(%rsp)
cmpq %r15, %rdi
jle 0x64bff
movq 0x8(%rsp), %rax
addq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rax
jle 0x64bdf
jmp 0x6490b
movq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x60(%rsp)
cmpq 0x98(%rsp), %r9
jle 0x64c51
movq 0x60(%rsp), %rsi
addq 0x108(%rsp), %rsi
movq 0x30(%rsp), %rax
addq 0x110(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x100(%rsp), %rax
cmpq %rax, %rsi
movq %rax, %r15
jle 0x64c11
jmp 0x64be4
movq 0x30(%rsp), %rax
movq %r9, 0x68(%rsp)
movq 0x90(%rsp), %rsi
cmpq 0xa0(%rsp), %rsi
jle 0x64c93
movq 0x68(%rsp), %r15
addq 0x118(%rsp), %r15
addq 0x120(%rsp), %rax
movq %r15, 0x68(%rsp)
cmpq 0x98(%rsp), %r15
jle 0x64c5b
jmp 0x64c1b
movq %rax, %r15
movq 0x90(%rsp), %rsi
movq %rsi, 0x70(%rsp)
movq %rax, 0x158(%rsp)
cmpq 0xa8(%rsp), %r14
jle 0x64ce3
movq 0x70(%rsp), %r13
addq 0x128(%rsp), %r13
addq 0x130(%rsp), %r15
movq %r13, 0x70(%rsp)
cmpq 0xa0(%rsp), %r13
movq 0xd8(%rsp), %r13
jle 0x64cab
jmp 0x64c6d
movq %r15, 0x38(%rsp)
movq %r14, 0x78(%rsp)
movq %r15, 0x160(%rsp)
cmpq 0xb0(%rsp), %r13
jle 0x64d34
movq 0x78(%rsp), %rcx
addq 0x138(%rsp), %rcx
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, 0x78(%rsp)
cmpq 0xa8(%rsp), %rcx
movq 0xe0(%rsp), %rcx
jle 0x64cf5
jmp 0x64cb5
movq 0x38(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq %r13, 0x80(%rsp)
cmpq 0xb8(%rsp), %rcx
jle 0x64d86
movq 0x80(%rsp), %rbx
addq 0x140(%rsp), %rbx
movq 0x40(%rsp), %rsi
addq 0x28(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq %rbx, 0x80(%rsp)
cmpq 0xb0(%rsp), %rbx
jle 0x64d46
jmp 0x64cff
movq 0x40(%rsp), %rsi
movq %rsi, 0x48(%rsp)
movq %rcx, 0x88(%rsp)
cmpq 0xe8(%rsp), %rdx
jle 0x64deb
movq 0x88(%rsp), %rsi
addq 0x148(%rsp), %rsi
movq 0x48(%rsp), %rax
addq 0x150(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %rsi, 0x88(%rsp)
cmpq 0xb8(%rsp), %rsi
movq 0x158(%rsp), %rax
movq 0x160(%rsp), %r15
jle 0x64d98
jmp 0x64d50
movq 0x48(%rsp), %rbx
movq %rdx, %rax
movq %rax, 0x188(%rsp)
movq 0x180(%rsp), %r15
cmpq 0x18(%rsp), %r15
movq %rbx, 0x190(%rsp)
jg 0x64ebc
movq 0x390(%rsp), %rax
leaq (%rax,%rbp,8), %r13
movq %r8, %r14
movq %r8, %rdi
movl (%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0xf0(%rsp), %r9
pushq %r10
leaq 0x2f8(%rsp), %rax
pushq %rax
leaq 0x17(%rsp), %rax
pushq %rax
pushq %r13
pushq %r11
pushq $0x1
callq 0x63b53
addq $0x30, %rsp
testl %eax, %eax
jg 0x64f1f
movq 0x398(%rsp), %rax
testq %rax, %rax
je 0x64e83
cmpl $0x0, 0x2f0(%rsp)
je 0x64e83
movl $0x1, (%rax)
addq %r12, %rbp
addq 0x198(%rsp), %r15
addq 0x1a0(%rsp), %r13
addq 0x1a8(%rsp), %rbx
cmpq 0x18(%rsp), %r15
movq 0x3a0(%rsp), %r10
movq 0x388(%rsp), %r11
movq %r14, %r8
jle 0x64e22
movq 0x188(%rsp), %rax
addq 0x168(%rsp), %rax
movq 0x190(%rsp), %rbx
addq 0x170(%rsp), %rbx
cmpq 0xe8(%rsp), %rax
movq 0xd0(%rsp), %rdi
movq 0xc8(%rsp), %r9
movq 0xc0(%rsp), %r14
movq 0xd8(%rsp), %r13
movq 0xe0(%rsp), %rcx
movq 0x178(%rsp), %rdx
jle 0x64df3
jmp 0x64da2
movq 0x3a0(%rsp), %rax
movl (%rax), %eax
jmp 0x64767
leaq 0x73895(%rip), %rdx # 0xd87ca
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
movq %r10, %r14
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r14) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x64767
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
fffi8u4 | int fffi8u4(LONGLONG *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
LONGLONG tnull, /* I - value of FITS TNULLn keyword if any */
unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned long *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
ULONGLONG ulltemp;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 9223372036854775808.)
{
/* The column we read contains unsigned long long values. */
/* Instead of adding 9223372036854775808, it is more efficient */
/* and more precise to just flip the sign bit with the XOR operator */
for (ii = 0; ii < ntodo; ii++) {
ulltemp = (ULONGLONG) (((LONGLONG) input[ii]) ^ 0x8000000000000000);
if (ulltemp > ULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) ulltemp;
}
}
else if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > ULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 9223372036854775808.)
{
/* The column we read contains unsigned long long values. */
/* Instead of adding 9223372036854775808, it is more efficient */
/* and more precise to just flip the sign bit with the XOR operator */
for (ii = 0; ii < ntodo; ii++) {
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
ulltemp = (ULONGLONG) (((LONGLONG) input[ii]) ^ 0x8000000000000000);
if (ulltemp > ULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
{
output[ii] = (unsigned long) ulltemp;
}
}
}
}
else if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > ULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) dvalue;
}
}
}
}
return(*status);
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %r10
movsd 0x67ae4(%rip), %xmm2 # 0xcd730
cmpeqpd %xmm1, %xmm2
movsd 0x63427(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x65cc4
movq 0x28(%rsp), %r11
testb $0x1, %bl
je 0x65cfa
testq %rsi, %rsi
jle 0x65ef4
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
xorl %r14d, %r14d
movq (%rdi,%r14,8), %r15
cmpq %rcx, %r15
jne 0x65ca9
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x65cb2
movq %r8, (%r10,%r14,8)
jmp 0x65cb7
xorq %rbx, %r15
movq %r15, (%r10,%r14,8)
jmp 0x65cb7
movb $0x1, (%r9,%r14)
incq %r14
cmpq %r14, %rsi
jne 0x65c8e
jmp 0x65ef4
testb $0x1, %bl
je 0x65d75
testq %rsi, %rsi
jle 0x65ef4
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorl %edx, %edx
movq (%rdi,%rdx,8), %r8
xorq %rcx, %r8
movq %r8, (%r10,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x65ce2
jmp 0x65ef4
ucomisd 0x6337e(%rip), %xmm0 # 0xc9080
jne 0x65dca
jp 0x65dca
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x65dca
jp 0x65dca
testq %rsi, %rsi
jle 0x65ef4
xorl %ebx, %ebx
movq (%rdi,%rbx,8), %r14
cmpq %rcx, %r14
jne 0x65d48
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x65d53
movq %r8, (%r10,%rbx,8)
jmp 0x65d68
testq %r14, %r14
js 0x65d5a
movq %r14, (%r10,%rbx,8)
jmp 0x65d68
movb $0x1, (%r9,%rbx)
jmp 0x65d68
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $0x0, (%r10,%rbx,8)
incq %rbx
cmpq %rbx, %rsi
jne 0x65d2d
jmp 0x65ef4
ucomisd 0x63303(%rip), %xmm0 # 0xc9080
jne 0x65e78
jp 0x65e78
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x65e78
jp 0x65e78
testq %rsi, %rsi
jle 0x65ef4
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
testq %rdx, %rdx
jns 0x65db9
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x65da8
jmp 0x65ef4
testq %rsi, %rsi
jle 0x65ef4
xorl %ebx, %ebx
movsd 0x6f303(%rip), %xmm2 # 0xd50e0
movsd 0x729ab(%rip), %xmm3 # 0xd8790
movsd 0x67943(%rip), %xmm4 # 0xcd730
movq (%rdi,%rbx,8), %r14
cmpq %rcx, %r14
jne 0x65e08
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x65e2e
movq %r8, (%r10,%rbx,8)
jmp 0x65e6a
xorps %xmm5, %xmm5
cvtsi2sd %r14, %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
ucomisd %xmm5, %xmm2
jbe 0x65e35
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $0x0, (%r10,%rbx,8)
jmp 0x65e6a
movb $0x1, (%r9,%rbx)
jmp 0x65e6a
ucomisd %xmm3, %xmm5
jbe 0x65e4b
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, (%r10,%rbx,8)
jmp 0x65e6a
cvttsd2si %xmm5, %r14
movq %r14, %r15
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %r12
sarq $0x3f, %r15
andq %r15, %r12
orq %r14, %r12
movq %r12, (%r10,%rbx,8)
incq %rbx
cmpq %rbx, %rsi
jne 0x65ded
jmp 0x65ef4
testq %rsi, %rsi
jle 0x65ef4
xorl %ecx, %ecx
movsd 0x6f259(%rip), %xmm2 # 0xd50e0
movsd 0x72901(%rip), %xmm3 # 0xd8790
movsd 0x67899(%rip), %xmm4 # 0xcd730
xorps %xmm5, %xmm5
cvtsi2sdq (%rdi,%rcx,8), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
ucomisd %xmm5, %xmm2
jbe 0x65eb8
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x65ee8
ucomisd %xmm3, %xmm5
jbe 0x65ecd
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, %rdx
jmp 0x65ee8
cvttsd2si %xmm5, %r8
movq %r8, %r9
sarq $0x3f, %r9
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %rdx
andq %r9, %rdx
orq %r8, %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x65e97
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
fffr4u4 | int fffr4u4(float *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
unsigned long nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned long *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to NaN. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
short *sptr, iret;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) dvalue;
}
}
}
else /* must check for null values */
{
sptr = (short *) input;
#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS
sptr++; /* point to MSBs */
#endif
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++, sptr += 2)
{
if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
output[ii] = 0;
}
else
{
if (input[ii] < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++, sptr += 2)
{
if (0 != (iret = fnan(*sptr) ) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
{
if (zero < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (zero > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) zero;
}
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DULONG_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DULONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = ULONG_MAX;
}
else
output[ii] = (unsigned long) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %r10
testl %edx, %edx
je 0x663ff
ucomisd 0x62d76(%rip), %xmm0 # 0xc9080
jne 0x664a7
jp 0x664a7
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x664a7
jp 0x664a7
testq %rsi, %rsi
jle 0x6662c
xorl %r11d, %r11d
movl $0x7f80, %ebx # imm = 0x7F80
movl $0x1, %ebp
movsd 0x6ed98(%rip), %xmm0 # 0xd50e0
movsd 0x72440(%rip), %xmm1 # 0xd8790
movss 0x71c8c(%rip), %xmm2 # 0xd7fe4
movzwl 0x2(%rdi,%r11,4), %r15d
xorl %r14d, %r14d
andl %ebx, %r15d
sete %r14b
addl %r14d, %r14d
cmpl %ebx, %r15d
cmovel %ebp, %r14d
testl %r14d, %r14d
je 0x6638f
cmpl $0x1, %r14d
jne 0x663a8
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x663b2
movq %rcx, (%r10,%r11,8)
jmp 0x663ee
movss (%rdi,%r11,4), %xmm3
xorps %xmm4, %xmm4
cvtss2sd %xmm3, %xmm4
ucomisd %xmm4, %xmm0
jbe 0x663b9
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $0x0, (%r10,%r11,8)
jmp 0x663ee
movb $0x1, (%r8,%r11)
jmp 0x663ee
ucomisd %xmm1, %xmm4
jbe 0x663cf
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, (%r10,%r11,8)
jmp 0x663ee
cvttss2si %xmm3, %r14
movq %r14, %r15
subss %xmm2, %xmm3
cvttss2si %xmm3, %r12
sarq $0x3f, %r15
andq %r15, %r12
orq %r14, %r12
movq %r12, (%r10,%r11,8)
incq %r11
cmpq %r11, %rsi
jne 0x66358
jmp 0x6662c
ucomisd 0x62c79(%rip), %xmm0 # 0xc9080
jne 0x665b1
jp 0x665b1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x665b1
jp 0x665b1
testq %rsi, %rsi
jle 0x6662c
xorl %ecx, %ecx
movsd 0x6eca6(%rip), %xmm0 # 0xd50e0
movsd 0x7234e(%rip), %xmm1 # 0xd8790
movss 0x71b9a(%rip), %xmm2 # 0xd7fe4
movss (%rdi,%rcx,4), %xmm3
xorps %xmm4, %xmm4
cvtss2sd %xmm3, %xmm4
ucomisd %xmm4, %xmm0
jbe 0x66466
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x66496
ucomisd %xmm1, %xmm4
jbe 0x6647b
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, %rdx
jmp 0x66496
cvttss2si %xmm3, %r8
movq %r8, %r9
sarq $0x3f, %r9
subss %xmm2, %xmm3
cvttss2si %xmm3, %rdx
andq %r9, %rdx
orq %r8, %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x6644a
jmp 0x6662c
testq %rsi, %rsi
jle 0x6662c
cvttsd2si %xmm1, %rbx
movq %rbx, %r14
sarq $0x3f, %r14
movapd %xmm1, %xmm2
subsd 0x67268(%rip), %xmm2 # 0xcd730
cvttsd2si %xmm2, %r11
andq %r14, %r11
orq %rbx, %r11
xorl %ebx, %ebx
movl $0x7f80, %ebp # imm = 0x7F80
movl $0x1, %r14d
movsd 0x6ebf8(%rip), %xmm2 # 0xd50e0
movsd 0x722a0(%rip), %xmm3 # 0xd8790
movsd 0x67238(%rip), %xmm4 # 0xcd730
movzwl 0x2(%rdi,%rbx,4), %r12d
xorl %r15d, %r15d
andl %ebp, %r12d
sete %r15b
addl %r15d, %r15d
cmpl %ebp, %r12d
cmovel %r14d, %r15d
testl %r15d, %r15d
je 0x6652f
cmpl $0x1, %r15d
jne 0x6656c
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x66582
movq %rcx, (%r10,%rbx,8)
jmp 0x665a3
xorps %xmm5, %xmm5
cvtss2sd (%rdi,%rbx,4), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
ucomisd %xmm5, %xmm2
ja 0x66572
ucomisd %xmm3, %xmm5
ja 0x6658f
cvttsd2si %xmm5, %r15
movq %r15, %r12
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %r13
sarq $0x3f, %r12
andq %r12, %r13
orq %r15, %r13
movq %r13, (%r10,%rbx,8)
jmp 0x665a3
ucomisd %xmm1, %xmm2
jbe 0x66589
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $0x0, (%r10,%rbx,8)
jmp 0x665a3
movb $0x1, (%r8,%rbx)
jmp 0x665a3
ucomisd %xmm3, %xmm1
jbe 0x6659f
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, (%r10,%rbx,8)
jmp 0x665a3
movq %r11, (%r10,%rbx,8)
incq %rbx
cmpq %rbx, %rsi
jne 0x664f8
jmp 0x6662c
testq %rsi, %rsi
jle 0x6662c
xorl %ecx, %ecx
movsd 0x6eb20(%rip), %xmm2 # 0xd50e0
movsd 0x721c8(%rip), %xmm3 # 0xd8790
movsd 0x67160(%rip), %xmm4 # 0xcd730
xorps %xmm5, %xmm5
cvtss2sd (%rdi,%rcx,4), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
ucomisd %xmm5, %xmm2
jbe 0x665f0
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x66620
ucomisd %xmm3, %xmm5
jbe 0x66605
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, %rdx
jmp 0x66620
cvttsd2si %xmm5, %r8
movq %r8, %r9
sarq $0x3f, %r9
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %rdx
andq %r9, %rdx
orq %r8, %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x665d0
movl (%rax), %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
ffgclujj | int ffgclujj( fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of column to read (1 = 1st col) */
LONGLONG firstrow, /* I - first row to read (1 = 1st row) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
long elemincre, /* I - pixel increment; e.g., 2 = every other */
int nultyp, /* I - null value handling code: */
/* 1: set undefined pixels = nulval */
/* 2: set nularray=1 for undefined pixels */
ULONGLONG nulval, /* I - value for null pixels if nultyp = 1 */
ULONGLONG *array, /* O - array of values that are read */
char *nularray, /* O - array of flags = 1 if nultyp = 2 */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from a column in the current FITS HDU.
The column number may refer to a real column in an ASCII or binary table,
or it may refer be a virtual column in a 1 or more grouped FITS primary
array or image extension. FITSIO treats a primary array as a binary table
with 2 vector columns: the first column contains the group parameters (often
with length = 0) and the second column contains the array of image pixels.
Each row of the table represents a group in the case of multigroup FITS
images.
The output array of values will be converted from the datatype of the column
and will be scaled by the FITS TSCALn and TZEROn values if necessary.
*/
{
double scale, zero, power = 1., dtemp;
int tcode, maxelem2, hdutype, xcode, decimals;
long twidth, incre;
long ii, xwidth, ntodo;
int convert, nulcheck, readcheck = 0;
LONGLONG repeat, startpos, elemnum, readptr, tnull;
LONGLONG rowlen, rownum, remain, next, rowincre, maxelem;
char tform[20];
char message[81];
char snull[20]; /* the FITS null value if reading from ASCII table */
double cbuff[DBUFFSIZE / sizeof(double)]; /* align cbuff on word boundary */
void *buffer;
if (*status > 0 || nelem == 0) /* inherit input status value if > 0 */
return(*status);
buffer = cbuff;
if (anynul)
*anynul = 0;
if (nultyp == 2)
memset(nularray, 0, (size_t) nelem); /* initialize nullarray */
/*---------------------------------------------------*/
/* Check input and get parameters about the column: */
/*---------------------------------------------------*/
if (elemincre < 0)
readcheck = -1; /* don't do range checking in this case */
if (ffgcprll(fptr, colnum, firstrow, firstelem, nelem, readcheck, &scale, &zero,
tform, &twidth, &tcode, &maxelem2, &startpos, &elemnum, &incre,
&repeat, &rowlen, &hdutype, &tnull, snull, status) > 0 )
return(*status);
maxelem = maxelem2;
incre *= elemincre; /* multiply incre to just get every nth pixel */
if (tcode == TSTRING) /* setup for ASCII tables */
{
/* get the number of implied decimal places if no explicit decmal point */
ffasfm(tform, &xcode, &xwidth, &decimals, status);
for(ii = 0; ii < decimals; ii++)
power *= 10.;
}
/*------------------------------------------------------------------*/
/* Decide whether to check for null values in the input FITS file: */
/*------------------------------------------------------------------*/
nulcheck = nultyp; /* by default check for null values in the FITS file */
if (nultyp == 1 && nulval == 0)
nulcheck = 0; /* calling routine does not want to check for nulls */
else if (tcode%10 == 1 && /* if reading an integer column, and */
tnull == NULL_UNDEFINED) /* if a null value is not defined, */
nulcheck = 0; /* then do not check for null values. */
else if (tcode == TSHORT && (tnull > SHRT_MAX || tnull < SHRT_MIN) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TBYTE && (tnull > 255 || tnull < 0) )
nulcheck = 0; /* Impossible null value */
else if (tcode == TSTRING && snull[0] == ASCII_NULL_UNDEFINED)
nulcheck = 0;
convert = 1;
/*---------------------------------------------------------------------*/
/* Now read the pixels from the FITS column. If the column does not */
/* have the same datatype as the output array, then we have to read */
/* the raw values into a temporary buffer (of limited size). In */
/* the case of a vector colum read only 1 vector of values at a time */
/* then skip to the next row if more values need to be read. */
/* After reading the raw values, then call the fffXXYY routine to (1) */
/* test for undefined values, (2) convert the datatype if necessary, */
/* and (3) scale the values by the FITS TSCALn and TZEROn linear */
/* scaling parameters. */
/*---------------------------------------------------------------------*/
remain = nelem; /* remaining number of values to read */
next = 0; /* next element in array to be read */
rownum = 0; /* row number, relative to firstrow */
while (remain)
{
/* limit the number of pixels to read at one time to the number that
will fit in the buffer or to the number of pixels that remain in
the current vector, which ever is smaller.
*/
ntodo = (long) minvalue(remain, maxelem);
if (elemincre >= 0)
{
ntodo = (long) minvalue(ntodo, ((repeat - elemnum - 1)/elemincre +1));
}
else
{
ntodo = (long) minvalue(ntodo, (elemnum/(-elemincre) +1));
}
readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * (incre / elemincre));
switch (tcode)
{
case (TLONGLONG):
ffgi8b(fptr, readptr, ntodo, incre, (long *) &array[next],
status);
fffi8u8((LONGLONG *) &array[next], ntodo, scale, zero,
nulcheck, tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TLONG):
ffgi4b(fptr, readptr, ntodo, incre, (INT32BIT *) buffer,
status);
fffi4u8((INT32BIT *) buffer, ntodo, scale, zero,
nulcheck, (INT32BIT) tnull, nulval, &nularray[next],
anynul, &array[next], status);
break;
case (TBYTE):
ffgi1b(fptr, readptr, ntodo, incre, (unsigned char *) buffer,
status);
fffi1u8((unsigned char *) buffer, ntodo, scale, zero, nulcheck,
(unsigned char) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSHORT):
ffgi2b(fptr, readptr, ntodo, incre, (short *) buffer, status);
fffi2u8((short *) buffer, ntodo, scale, zero, nulcheck,
(short) tnull, nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TFLOAT):
ffgr4b(fptr, readptr, ntodo, incre, (float *) buffer, status);
fffr4u8((float *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TDOUBLE):
ffgr8b(fptr, readptr, ntodo, incre, (double *) buffer, status);
fffr8u8((double *) buffer, ntodo, scale, zero, nulcheck,
nulval, &nularray[next], anynul,
&array[next], status);
break;
case (TSTRING):
ffmbyt(fptr, readptr, REPORT_EOF, status);
if (incre == twidth) /* contiguous bytes */
ffgbyt(fptr, ntodo * twidth, buffer, status);
else
ffgbytoff(fptr, twidth, ntodo, incre - twidth, buffer,
status);
fffstru8((char *) buffer, ntodo, scale, zero, twidth, power,
nulcheck, snull, nulval, &nularray[next], anynul,
&array[next], status);
break;
default: /* error trap for invalid column format */
snprintf(message, 81,
"Cannot read numbers from column %d which has format %s",
colnum, tform);
ffpmsg(message);
if (hdutype == ASCII_TBL)
return(*status = BAD_ATABLE_FORMAT);
else
return(*status = BAD_BTABLE_FORMAT);
} /* End of switch block */
/*-------------------------*/
/* Check for fatal error */
/*-------------------------*/
if (*status > 0) /* test for error during previous read operation */
{
dtemp = (double) next;
if (hdutype > 0)
snprintf(message, 81,
"Error reading elements %.0f thru %.0f from column %d (ffgclj).",
dtemp+1., dtemp+ntodo, colnum);
else
snprintf(message, 81,
"Error reading elements %.0f thru %.0f from image (ffgclj).",
dtemp+1., dtemp+ntodo);
ffpmsg(message);
return(*status);
}
/*--------------------------------------------*/
/* increment the counters for the next loop */
/*--------------------------------------------*/
remain -= ntodo;
if (remain)
{
next += ntodo;
elemnum = elemnum + (ntodo * elemincre);
if (elemnum >= repeat) /* completed a row; start on later row */
{
rowincre = elemnum / repeat;
rownum += rowincre;
elemnum = elemnum - (rowincre * repeat);
}
else if (elemnum < 0) /* completed a row; start on a previous row */
{
rowincre = (-elemnum - 1) / repeat + 1;
rownum -= rowincre;
elemnum = (rowincre * repeat) + elemnum;
}
}
} /* End of main while Loop */
/*--------------------------------*/
/* check for numerical overflow */
/*--------------------------------*/
if (*status == OVERFLOW_ERR)
{
ffpmsg(
"Numerical overflow during type conversion while reading FITS data.");
*status = NUM_OVERFLOW;
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x71c8, %rsp # imm = 0x71C8
movq %rcx, %r13
movq %rdx, %rbp
movq 0x7228(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
setg %cl
testq %r8, %r8
sete %dl
orb %cl, %dl
jne 0x6756e
movq %r9, %r14
movq %r8, %r15
movq 0x7220(%rsp), %rax
testq %rax, %rax
je 0x66e27
movl $0x0, (%rax)
cmpl $0x2, 0x7200(%rsp)
movq %rdi, 0x10(%rsp)
jne 0x66e51
movq 0x7218(%rsp), %rdi
movl %esi, %ebx
xorl %esi, %esi
movq %r15, %rdx
callq 0x6090
movl %ebx, %esi
movq 0x10(%rsp), %rdi
movq %r14, %r9
sarq $0x3f, %r9
subq $0x8, %rsp
leaq 0xa8(%rsp), %rax
leaq 0x38(%rsp), %r10
leaq 0x4c(%rsp), %r11
leaq 0x90(%rsp), %r12
movl %esi, %ebx
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
movq 0x7230(%rsp), %rbp
pushq %rbp
pushq %rax
pushq %r10
pushq %r11
pushq %r12
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0x78(%rsp), %rax
pushq %rax
leaq 0xd8(%rsp), %rax
pushq %rax
leaq 0xac(%rsp), %rax
pushq %rax
leaq 0x84(%rsp), %rax
pushq %rax
leaq 0xc8(%rsp), %rax
pushq %rax
leaq 0x128(%rsp), %rax
pushq %rax
leaq 0x88(%rsp), %rax
pushq %rax
leaq 0x98(%rsp), %rax
pushq %rax
callq 0x3e16b
addq $0x80, %rsp
testl %eax, %eax
jg 0x6756b
movl %ebx, 0x40(%rsp)
movslq 0x5c(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rax
imulq %r14, %rax
movq %rax, 0x48(%rsp)
movsd 0x6215d(%rip), %xmm1 # 0xc9080
cmpl $0x10, 0x2c(%rsp)
jne 0x66f88
leaq 0xc0(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
leaq 0x98(%rsp), %r13
movq %r13, %rcx
movq %rbp, %r8
callq 0x39e6d
movsd 0x62123(%rip), %xmm1 # 0xc9080
movslq (%r13), %rax
testq %rax, %rax
movl 0x7200(%rsp), %edi
jle 0x66f8f
movsd 0x6210b(%rip), %xmm1 # 0xc9080
movsd 0x70b2b(%rip), %xmm0 # 0xd7aa8
mulsd %xmm0, %xmm1
decq %rax
jne 0x66f7d
jmp 0x66f8f
movl 0x7200(%rsp), %edi
cmpl $0x1, %edi
sete %al
cmpq $0x0, 0x7208(%rsp)
sete %cl
movl $0x0, 0xc(%rsp)
testb %cl, %al
jne 0x6702b
movslq 0x2c(%rsp), %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x1, %edx
sete %dl
movq 0x30(%rsp), %rcx
cmpq $0x4995cdd1, %rcx # imm = 0x4995CDD1
sete %sil
testb %sil, %dl
jne 0x6702b
cmpl $0x15, %eax
sete %dl
movswq %cx, %rsi
cmpq %rcx, %rsi
setne %sil
testb %sil, %dl
jne 0x6702b
cmpl $0xb, %eax
sete %dl
cmpq $0x100, %rcx # imm = 0x100
setae %cl
testb %cl, %dl
jne 0x6702b
xorl %ecx, %ecx
cmpb $0x1, 0xa0(%rsp)
cmovnel %edi, %ecx
cmpl $0x10, %eax
cmovnel %edi, %ecx
movl %ecx, 0xc(%rsp)
movq %r14, %rax
negq %rax
movq %rax, 0x78(%rsp)
xorl %ebx, %ebx
movq $0x0, 0x50(%rsp)
movsd %xmm1, 0x70(%rsp)
movq 0x80(%rsp), %rcx
cmpq %rcx, %r15
cmovlq %r15, %rcx
testq %r14, %r14
js 0x67072
movq 0x38(%rsp), %rsi
movq %rsi, %rax
notq %rax
addq 0x60(%rsp), %rax
cqto
idivq %r14
jmp 0x67081
movq 0x38(%rsp), %rsi
movq %rsi, %rax
cqto
idivq 0x78(%rsp)
leaq 0x1(%rax), %r13
cmpq %rax, %rcx
cmovleq %rcx, %r13
movq 0x88(%rsp), %rdi
imulq 0x50(%rsp), %rdi
addq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r14
imulq %rsi, %rax
addq %rdi, %rax
movl 0x2c(%rsp), %edx
cmpl $0x28, %edx
jle 0x67146
cmpl $0x50, %edx
jg 0x671d1
cmpl $0x29, %edx
je 0x6725e
cmpl $0x2a, %edx
jne 0x67580
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %r8
movq %rbp, %r9
callq 0xc306e
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x7218(%rsp), %rax
leaq (%rax,%rbx), %r8
movq 0x7210(%rsp), %rax
leaq (%rax,%rbx,8), %rax
movq %r12, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movq 0x7208(%rsp), %rcx
movq 0x7220(%rsp), %r9
pushq %rbp
pushq %rax
callq 0x695a4
jmp 0x67330
cmpl $0xb, %edx
je 0x67383
cmpl $0x10, %edx
je 0x67339
cmpl $0x15, %edx
jne 0x67580
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %r8
movq %rbp, %r9
callq 0xc2e32
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movswl 0x30(%rsp), %ecx
movq 0x7218(%rsp), %rax
leaq (%rax,%rbx), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%rbx,8), %rax
subq $0x8, %rsp
movq %r12, %rdi
movq %r13, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbp
pushq %rax
pushq 0x7238(%rsp)
callq 0x693e1
jmp 0x67467
cmpl $0x52, %edx
je 0x672cd
cmpl $0x51, %edx
jne 0x67580
movq 0x7210(%rsp), %rdx
leaq (%rdx,%rbx,8), %rbp
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq 0x7228(%rsp), %r9
callq 0xc2fae
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x30(%rsp), %rcx
movq 0x7218(%rsp), %rax
leaq (%rax,%rbx), %r9
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq 0x7230(%rsp)
pushq %rbp
movq 0x7240(%rsp), %rbp
pushq 0x7238(%rsp)
callq 0x68d70
jmp 0x67467
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %r8
movq %rbp, %r9
callq 0xc2eee
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movl 0x30(%rsp), %ecx
movq 0x7218(%rsp), %rax
leaq (%rax,%rbx), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%rbx,8), %rax
subq $0x8, %rsp
movq %r12, %rdi
movq %r13, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbp
pushq %rax
pushq 0x7238(%rsp)
callq 0x69033
jmp 0x67467
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %r8
movq %rbp, %r9
callq 0xc312e
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x7218(%rsp), %rax
leaq (%rax,%rbx), %r8
movq 0x7210(%rsp), %rax
leaq (%rax,%rbx,8), %rax
movq %r12, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
movq 0x7208(%rsp), %rcx
movq 0x7220(%rsp), %r9
pushq %rbp
pushq %rax
callq 0x698d5
addq $0x10, %rsp
jmp 0x6746b
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0xc1ad4
movq 0x48(%rsp), %rsi
movq 0x68(%rsp), %rax
movq %rsi, %rcx
subq %rax, %rcx
jne 0x673f0
imulq %r13, %rsi
movq %r12, %rdi
leaq 0x140(%rsp), %r12
movq %r12, %rdx
movq %rbp, %rcx
callq 0xc25e0
jmp 0x6740c
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %r8
movq %rbp, %r9
callq 0xc2d8f
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movzbl 0x30(%rsp), %ecx
movq 0x7218(%rsp), %rax
leaq (%rax,%rbx), %r9
movq 0x7210(%rsp), %rax
leaq (%rax,%rbx,8), %rax
subq $0x8, %rsp
movq %r12, %rdi
movq %r13, %rsi
movl 0x14(%rsp), %edx
movq 0x7210(%rsp), %r8
pushq %rbp
pushq %rax
pushq 0x7238(%rsp)
callq 0x69209
jmp 0x67467
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %r8
movq %rbp, %r9
callq 0xc27d1
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq 0x68(%rsp), %rdx
movq 0x7218(%rsp), %rax
addq %rbx, %rax
movq 0x7210(%rsp), %rcx
leaq (%rcx,%rbx,8), %r10
movq %r12, %rdi
movq %r13, %rsi
movsd 0x70(%rsp), %xmm2
movl 0xc(%rsp), %ecx
leaq 0xa0(%rsp), %r8
movq 0x7208(%rsp), %r9
pushq %rbp
pushq %r10
movq 0x7230(%rsp), %r12
pushq %r12
pushq %rax
callq 0x69c04
addq $0x20, %rsp
movl (%rbp), %eax
testl %eax, %eax
jg 0x674d5
subq %r13, %r15
je 0x6751d
addq %r13, %rbx
imulq %r14, %r13
addq 0x38(%rsp), %r13
movq %r13, 0x38(%rsp)
movq 0x60(%rsp), %rcx
cmpq %rcx, %r13
jge 0x674be
testq %r13, %r13
jns 0x67047
movq %r13, %rax
notq %rax
cqto
idivq %rcx
movq %rax, %rdx
incq %rdx
subq %rdx, 0x50(%rsp)
imulq %rcx, %rdx
addq %r13, %rdx
jmp 0x674cb
movq %r13, %rax
cqto
idivq %rcx
addq %rax, 0x50(%rsp)
movq %rdx, 0x38(%rsp)
jmp 0x67047
xorps %xmm2, %xmm2
cvtsi2sd %rbx, %xmm2
cmpl $0x0, 0x44(%rsp)
movsd 0x61b96(%rip), %xmm0 # 0xc9080
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
addsd %xmm2, %xmm1
jle 0x67543
leaq 0x70b3f(%rip), %rdx # 0xd8042
leaq 0xe0(%rsp), %rdi
movl $0x51, %esi
movl 0x40(%rsp), %ecx
movb $0x2, %al
callq 0x60b0
jmp 0x6755e
cmpl $-0xb, %eax
jne 0x6756e
leaq 0x706c8(%rip), %rdi # 0xd7bf1
callq 0x37264
movq 0x7228(%rsp), %rax
movl $0x19c, (%rax) # imm = 0x19C
movl $0x19c, %eax # imm = 0x19C
jmp 0x6756e
leaq 0x70b37(%rip), %rdx # 0xd8081
leaq 0xe0(%rsp), %rdi
movl $0x51, %esi
movb $0x2, %al
callq 0x60b0
leaq 0xe0(%rsp), %rdi
callq 0x37264
movl (%rbp), %eax
addq $0x71c8, %rsp # imm = 0x71C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7078b(%rip), %rdx # 0xd7d12
leaq 0xe0(%rsp), %r14
leaq 0xc0(%rsp), %r8
movl $0x51, %esi
movq %r14, %rdi
movl 0x40(%rsp), %ecx
xorl %eax, %eax
callq 0x60b0
movq %r14, %rdi
callq 0x37264
cmpl $0x1, 0x44(%rsp)
jne 0x675c7
movl $0x137, (%rbp) # imm = 0x137
movl $0x137, %eax # imm = 0x137
jmp 0x6756e
movl $0x138, (%rbp) # imm = 0x138
movl $0x138, %eax # imm = 0x138
jmp 0x6756e
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
ffgsvujj | int ffgsvujj(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
ULONGLONG nulval,/* I - value to set undefined pixels */
ULONGLONG *array,/* O - array to be filled and returned */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dir[9];
long nelem, nultyp, ninc, numcol;
LONGLONG felem, dsize[10], blcll[9], trcll[9];
int hdutype, anyf;
char ldummy, msg[FLEN_ERRMSG];
int nullcheck = 1;
ULONGLONG nullvalue;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG, "NAXIS = %d in call to ffgsvj is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
nullvalue = nulval; /* set local variable */
fits_read_compressed_img(fptr, TULONGLONG, blcll, trcll, inc,
nullcheck, &nullvalue, array, NULL, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 1;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
dir[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
if (hdutype == IMAGE_HDU)
{
dir[ii] = -1;
}
else
{
snprintf(msg, FLEN_ERRMSG,"ffgsvj: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
dsize[ii] = dsize[ii] * dir[ii];
}
dsize[naxis] = dsize[naxis] * dir[naxis];
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0]*dir[0] - str[0]*dir[0]) / inc[0] + 1;
ninc = incr[0] * dir[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]*dir[8]; i8 <= stp[8]*dir[8]; i8 += incr[8])
{
for (i7 = str[7]*dir[7]; i7 <= stp[7]*dir[7]; i7 += incr[7])
{
for (i6 = str[6]*dir[6]; i6 <= stp[6]*dir[6]; i6 += incr[6])
{
for (i5 = str[5]*dir[5]; i5 <= stp[5]*dir[5]; i5 += incr[5])
{
for (i4 = str[4]*dir[4]; i4 <= stp[4]*dir[4]; i4 += incr[4])
{
for (i3 = str[3]*dir[3]; i3 <= stp[3]*dir[3]; i3 += incr[3])
{
for (i2 = str[2]*dir[2]; i2 <= stp[2]*dir[2]; i2 += incr[2])
{
for (i1 = str[1]*dir[1]; i1 <= stp[1]*dir[1]; i1 += incr[1])
{
felem=str[0] + (i1 - dir[1]) * dsize[1] + (i2 - dir[2]) * dsize[2] +
(i3 - dir[3]) * dsize[3] + (i4 - dir[4]) * dsize[4] +
(i5 - dir[5]) * dsize[5] + (i6 - dir[6]) * dsize[6] +
(i7 - dir[7]) * dsize[7] + (i8 - dir[8]) * dsize[8];
if ( ffgclujj(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &ldummy, &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp # imm = 0x3A8
movl %edx, %r13d
movl %esi, 0x8(%rsp)
movq 0x400(%rsp), %r12
leal -0xa(%r13), %eax
cmpl $-0xa, %eax
ja 0x67990
leaq 0x7068c(%rip), %rdx # 0xd7fe8
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r12) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x67a61
movq %r9, %r15
movq %r8, %rbp
movq %rcx, %rbx
movq 0x3e8(%rsp), %r14
movq %r12, %rsi
movq %rdi, %r12
callq 0x41127
testl %eax, %eax
je 0x67a36
shll $0x3, %r13d
leaq 0x350(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x1c0(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x65c0
leaq 0x260(%rsp), %rax
movq %r14, (%rax)
subq $0x8, %rsp
movq %r12, %rdi
movl $0x50, %esi
movq %rbx, %rdx
movq %rbp, %rcx
movq 0x3e8(%rsp), %r8
movl $0x1, %r9d
movq 0x408(%rsp), %rbx
pushq %rbx
pushq 0x408(%rsp)
pushq $0x0
pushq 0x410(%rsp)
pushq %rax
callq 0x8b0dd
addq $0x30, %rsp
movl (%rbx), %eax
jmp 0x67a61
movq 0x3e0(%rsp), %r14
leaq 0x44(%rsp), %rsi
movq %r12, %rdi
movq 0x400(%rsp), %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x67a73
movq 0x400(%rsp), %rax
movl (%rax), %eax
addq $0x3a8, %rsp # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0xd0(%rsp)
movl 0x44(%rsp), %edx
movl %r13d, %eax
testl %edx, %edx
je 0x67ab2
movq (%rbp,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq (%r15,%rax,8), %r10
movq %r14, %r11
movq (%r14,%rax,8), %rcx
movq %rcx, 0x18(%rsp)
movq 0x3f8(%rsp), %rcx
movq 0x400(%rsp), %r12
jmp 0x67ae9
movl 0x8(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %r10
movl $0x2, 0x8(%rsp)
movl $0x1, %esi
movq %rsi, 0x18(%rsp)
movq %r10, 0x10(%rsp)
movq 0x3f8(%rsp), %rcx
movq 0x400(%rsp), %r12
movq %r14, %r11
testq %rcx, %rcx
je 0x67af4
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %esi
movq %rsi, 0x260(%rsp,%rcx,8)
movq %rsi, 0x300(%rsp,%rcx,8)
movq %rsi, 0x2b0(%rsp,%rcx,8)
movq %rsi, 0x1c0(%rsp,%rcx,8)
movq %rsi, 0x210(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x67afb
testl %r13d, %r13d
je 0x67c11
movq %rax, %rsi
negq %rsi
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdi
movq -0x8(%rbp,%rcx,8), %r8
cmpq %r8, %rdi
jge 0x67b6c
testl %edx, %edx
jne 0x68320
movq $-0x1, 0x208(%rsp,%rcx,8)
movq $-0x1, %r9
jmp 0x67b74
movq 0x208(%rsp,%rcx,8), %r9
movq %r8, 0x258(%rsp,%rcx,8)
movq %rdi, 0x2f8(%rsp,%rcx,8)
movq -0x8(%r11,%rcx,8), %rdi
movq %rdi, 0x2a8(%rsp,%rcx,8)
movq 0x1b8(%rsp,%rcx,8), %rdi
movq -0x8(%rbx,%rcx,8), %r8
imulq %rdi, %r8
movq %r8, 0x1c0(%rsp,%rcx,8)
imulq %rdi, %r9
movq %r9, 0x1b8(%rsp,%rcx,8)
leaq (%rsi,%rcx), %rdi
incq %rdi
incq %rcx
cmpq $0x1, %rdi
jne 0x67b40
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
cmpl $0x1, %r13d
jne 0x67c2a
cmpq $0x1, (%rbx)
jne 0x67c2a
movq 0x10(%rsp), %rcx
subq %rcx, %r10
movq %r10, %rax
cqto
movq 0x18(%rsp), %rsi
idivq %rsi
movq %rcx, %r10
movq %rsi, 0xc8(%rsp)
jmp 0x67c5c
movq 0x210(%rsp,%rax,8), %rcx
imulq 0x1c0(%rsp,%rax,8), %rcx
movq %rcx, 0x1c0(%rsp,%rax,8)
movq 0x300(%rsp), %rax
movq 0x210(%rsp), %rcx
subq 0x260(%rsp), %rax
imulq %rcx, %rax
cqto
idivq (%r11)
imulq 0x2b0(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %r10, 0x160(%rsp)
cmpq %r10, 0x10(%rsp)
jg 0x67a57
movq 0x2a0(%rsp), %rcx
movq 0x250(%rsp), %r10
movq %r10, %rdx
imulq %rcx, %rdx
movq %rdx, 0x78(%rsp)
movq 0x340(%rsp), %rdx
imulq %r10, %rdx
movq %rdx, 0x80(%rsp)
movq 0x298(%rsp), %rdi
movq 0x248(%rsp), %r8
movq %r8, %rdx
imulq %rdi, %rdx
movq %rdx, 0xb8(%rsp)
movq 0x338(%rsp), %rdx
imulq %r8, %rdx
movq %rdx, 0x88(%rsp)
movq 0x290(%rsp), %rsi
movq 0x240(%rsp), %r9
movq %r9, %r12
imulq %rsi, %r12
movq 0x330(%rsp), %rdx
imulq %r9, %rdx
movq %rdx, 0x90(%rsp)
movq 0x288(%rsp), %rdx
movq 0x200(%rsp), %r11
movq %r11, 0x20(%rsp)
imulq %r11, %r10
decq %rcx
imulq %r10, %rcx
movq 0x1f8(%rsp), %r10
imulq %r10, %r8
decq %rdi
imulq %r8, %rdi
movq 0x1f0(%rsp), %rbp
imulq %rbp, %r9
decq %rsi
imulq %r9, %rsi
movq %r12, %r9
movq 0x238(%rsp), %r8
addq %rdi, %rsi
movq %r8, %rdi
imulq %rdx, %rdi
movq 0x328(%rsp), %r12
imulq %r8, %r12
movq %r12, 0x98(%rsp)
movq 0x1e8(%rsp), %rbx
imulq %rbx, %r8
decq %rdx
imulq %r8, %rdx
movq %rdi, %r8
addq %rsi, %rdx
movq 0x280(%rsp), %rsi
movq 0x230(%rsp), %rdi
movq %rdi, %r11
imulq %rsi, %r11
movq %r11, 0xb0(%rsp)
movq 0x320(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xa0(%rsp)
movq %rax, 0x38(%rsp)
movq 0x1e0(%rsp), %rax
imulq %rax, %rdi
decq %rsi
imulq %rdi, %rsi
addq 0x260(%rsp), %rcx
addq %rdx, %rsi
addq %rcx, %rsi
movq 0x278(%rsp), %rcx
movq 0x228(%rsp), %rdx
movq %rdx, %r15
imulq %rcx, %r15
movq 0x318(%rsp), %rdi
imulq %rdx, %rdi
movq %rdi, 0xa8(%rsp)
movq 0x1d8(%rsp), %r13
imulq %r13, %rdx
decq %rcx
imulq %rdx, %rcx
movq 0x270(%rsp), %rdx
movq 0x220(%rsp), %rdi
movq %rdi, %r12
imulq %rdx, %r12
movq %r12, 0x168(%rsp)
movq 0x310(%rsp), %r12
imulq %rdi, %r12
movq %r12, 0xc0(%rsp)
movq 0x1d0(%rsp), %r14
imulq %r14, %rdi
decq %rdx
imulq %rdi, %rdx
addq %rcx, %rdx
movq 0x268(%rsp), %r12
movq 0x218(%rsp), %rcx
movq %rcx, %rdi
imulq %r12, %rdi
movq %rdi, 0x198(%rsp)
movq 0x308(%rsp), %rdi
imulq %rcx, %rdi
movq %rdi, 0xd8(%rsp)
movq 0x1c8(%rsp), %r11
imulq %r11, %rcx
decq %r12
imulq %rcx, %r12
movq 0x3f0(%rsp), %rcx
movq 0xd0(%rsp), %rdi
addq %rdx, %r12
addq %rsi, %r12
movq %r12, 0xe0(%rsp)
movq 0x38(%rsp), %rdx
leaq 0x1(%rdx), %r12
leaq 0x8(,%rdx,8), %rdx
movq %rdx, 0x1b8(%rsp)
movq 0x2f0(%rsp), %rdx
movq %rdx, 0xe8(%rsp)
movq 0x20(%rsp), %rsi
imulq %rdx, %rsi
movq %rsi, 0x20(%rsp)
movq 0x2e8(%rsp), %rdx
movq %rdx, 0xf0(%rsp)
imulq %rdx, %r10
movq %r10, 0xf8(%rsp)
movq 0x2e0(%rsp), %rsi
movq %rsi, 0x100(%rsp)
imulq %rsi, %rbp
movq %rbp, 0x108(%rsp)
movq 0x2d8(%rsp), %rsi
movq %rsi, 0x110(%rsp)
imulq %rsi, %rbx
movq %rbx, 0x118(%rsp)
movq %r15, %rsi
movq 0xb0(%rsp), %rbx
movq 0x2d0(%rsp), %r15
movq %r15, 0x120(%rsp)
imulq %r15, %rax
movq %rax, 0x128(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x140(%rsp)
imulq %rax, %r13
movq %r13, 0x148(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x170(%rsp)
imulq %rax, %r14
movq %r14, 0x178(%rsp)
movq 0x2b8(%rsp), %rax
movq %rax, 0x1b0(%rsp)
imulq %rax, %r11
movq %r11, 0x38(%rsp)
movq 0xb8(%rsp), %r11
xorl %ebp, %ebp
movq %rsi, 0x180(%rsp)
movq %r9, 0x190(%rsp)
movq %r8, 0x188(%rsp)
movq 0x80(%rsp), %rax
cmpq %rax, 0x78(%rsp)
jle 0x6801b
movq 0x10(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq 0x160(%rsp), %rax
jle 0x67fee
jmp 0x67a57
movq 0xe0(%rsp), %r14
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x3e8(%rsp), %rax
cmpq 0x88(%rsp), %r11
jle 0x68062
movq 0x48(%rsp), %r15
addq 0xe8(%rsp), %r15
addq 0x20(%rsp), %r14
movq %r15, 0x48(%rsp)
cmpq 0x80(%rsp), %r15
jle 0x68035
jmp 0x67ffd
movq %r14, %r15
movq %r11, 0x50(%rsp)
movq %r14, 0x138(%rsp)
cmpq 0x90(%rsp), %r9
jle 0x680a2
movq 0x50(%rsp), %r13
addq 0xf0(%rsp), %r13
addq 0xf8(%rsp), %r15
movq %r13, 0x50(%rsp)
cmpq 0x88(%rsp), %r13
jle 0x68072
jmp 0x6803f
movq %r15, %r13
movq %r9, 0x58(%rsp)
movq %r15, 0x150(%rsp)
cmpq 0x98(%rsp), %r8
jle 0x680e8
movq %rcx, %rdx
movq 0x58(%rsp), %rcx
addq 0x100(%rsp), %rcx
addq 0x108(%rsp), %r13
movq %rcx, 0x58(%rsp)
cmpq 0x90(%rsp), %rcx
movq %rdx, %rcx
jle 0x680b2
jmp 0x6807c
movq %r13, %rdx
movq %r8, 0x60(%rsp)
movq %r13, 0x158(%rsp)
cmpq 0xa0(%rsp), %rbx
jle 0x68128
movq 0x60(%rsp), %r10
addq 0x110(%rsp), %r10
addq 0x118(%rsp), %rdx
movq %r10, 0x60(%rsp)
cmpq 0x98(%rsp), %r10
jle 0x680f8
jmp 0x680bc
movq %rdx, 0x28(%rsp)
movq %rbx, 0x68(%rsp)
movq %rdx, 0x130(%rsp)
cmpq 0xa8(%rsp), %rsi
jle 0x6817c
movq 0x68(%rsp), %r10
addq 0x120(%rsp), %r10
movq 0x28(%rsp), %rdx
addq 0x128(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq %r10, 0x68(%rsp)
cmpq 0xa0(%rsp), %r10
movq 0x130(%rsp), %rdx
jle 0x6813a
jmp 0x68102
movq 0x28(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x168(%rsp), %rdx
cmpq 0xc0(%rsp), %rdx
jle 0x681e8
movq 0x70(%rsp), %r10
addq 0x140(%rsp), %r10
movq 0x30(%rsp), %rdx
addq 0x148(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %r10, 0x70(%rsp)
cmpq 0xa8(%rsp), %r10
movq 0x138(%rsp), %r14
movq 0x150(%rsp), %r15
movq 0x158(%rsp), %r13
jle 0x6818b
jmp 0x68144
movq 0x30(%rsp), %r10
movq 0x400(%rsp), %r15
movq %rdx, 0x1a0(%rsp)
movq 0x198(%rsp), %r13
cmpq 0xd8(%rsp), %r13
movq %r10, 0x1a8(%rsp)
jg 0x682b5
leaq (%rcx,%rbp,8), %r14
movq %r10, %rbx
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0xc8(%rsp), %r9
pushq %r15
leaq 0x358(%rsp), %r10
pushq %r10
leaq 0x1f(%rsp), %r10
pushq %r10
pushq %r14
pushq %rax
pushq $0x1
callq 0x66dda
addq $0x30, %rsp
testl %eax, %eax
jg 0x68318
movq 0x3f8(%rsp), %rax
testq %rax, %rax
je 0x6827f
cmpl $0x0, 0x350(%rsp)
je 0x6827f
movl $0x1, (%rax)
addq %r12, %rbp
addq 0x1b8(%rsp), %r14
addq 0x1b0(%rsp), %r13
addq 0x38(%rsp), %rbx
cmpq 0xd8(%rsp), %r13
movq 0xd0(%rsp), %rdi
movq 0x3e8(%rsp), %rax
jle 0x68222
movq 0x1a0(%rsp), %rdx
addq 0x170(%rsp), %rdx
movq 0x1a8(%rsp), %r10
addq 0x178(%rsp), %r10
cmpq 0xc0(%rsp), %rdx
movq 0x3f0(%rsp), %rcx
movq 0xb8(%rsp), %r11
movq 0x190(%rsp), %r9
movq 0x188(%rsp), %r8
movq 0xb0(%rsp), %rbx
movq 0x180(%rsp), %rsi
jle 0x681f5
jmp 0x6819d
movl (%r15), %eax
jmp 0x67a61
leaq 0x6fcee(%rip), %rdx # 0xd8015
leaq 0x350(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r12) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x67a61
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
fffr8u8 | int fffr8u8(double *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
ULONGLONG nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
ULONGLONG *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to NaN. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
short *sptr, iret;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > DULONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT64_MAX;
}
else
output[ii] = (ULONGLONG) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DULONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT64_MAX;
}
else
output[ii] = (ULONGLONG) dvalue;
}
}
}
else /* must check for null values */
{
sptr = (short *) input;
#if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS
sptr += 3; /* point to MSBs */
#endif
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++, sptr += 4)
{
if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
output[ii] = 0;
}
else
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (input[ii] > DULONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT64_MAX;
}
else
output[ii] = (ULONGLONG) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++, sptr += 4)
{
if (0 != (iret = dnan(*sptr)) ) /* test for NaN or underflow */
{
if (iret == 1) /* is it a NaN? */
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else /* it's an underflow */
{
if (zero < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (zero > DULONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT64_MAX;
}
else
output[ii] = (ULONGLONG) zero;
}
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DULONGLONG_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT64_MAX;
}
else
output[ii] = (ULONGLONG) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %r10
testl %edx, %edx
je 0x699e3
ucomisd 0x5f787(%rip), %xmm0 # 0xc9080
jne 0x69a80
jp 0x69a80
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x69a80
jp 0x69a80
testq %rsi, %rsi
jle 0x69bf7
xorl %r11d, %r11d
movl $0x7ff0, %ebx # imm = 0x7FF0
movl $0x1, %ebp
xorpd %xmm0, %xmm0
movsd 0x6b79d(%rip), %xmm1 # 0xd50d8
movsd 0x63ded(%rip), %xmm2 # 0xcd730
movzwl 0x6(%rdi,%r11,8), %r15d
xorl %r14d, %r14d
andl %ebx, %r15d
sete %r14b
addl %r14d, %r14d
cmpl %ebx, %r15d
cmovel %ebp, %r14d
testl %r14d, %r14d
je 0x6997a
cmpl $0x1, %r14d
jne 0x6998c
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x69996
movq %rcx, (%r10,%r11,8)
jmp 0x699d2
movsd (%rdi,%r11,8), %xmm3
ucomisd %xmm3, %xmm0
jbe 0x6999d
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $0x0, (%r10,%r11,8)
jmp 0x699d2
movb $0x1, (%r8,%r11)
jmp 0x699d2
ucomisd %xmm1, %xmm3
jbe 0x699b3
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, (%r10,%r11,8)
jmp 0x699d2
cvttsd2si %xmm3, %r14
movq %r14, %r15
subsd %xmm2, %xmm3
cvttsd2si %xmm3, %r12
sarq $0x3f, %r15
andq %r15, %r12
orq %r14, %r12
movq %r12, (%r10,%r11,8)
incq %r11
cmpq %r11, %rsi
jne 0x69943
jmp 0x69bf7
ucomisd 0x5f695(%rip), %xmm0 # 0xc9080
jne 0x69b83
jp 0x69b83
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x69b83
jp 0x69b83
testq %rsi, %rsi
jle 0x69bf7
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
movsd 0x6b6b6(%rip), %xmm1 # 0xd50d8
movsd 0x63d06(%rip), %xmm2 # 0xcd730
movsd (%rdi,%rcx,8), %xmm3
ucomisd %xmm3, %xmm0
jbe 0x69a3f
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x69a6f
ucomisd %xmm1, %xmm3
jbe 0x69a54
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, %rdx
jmp 0x69a6f
cvttsd2si %xmm3, %r8
movq %r8, %r9
sarq $0x3f, %r9
subsd %xmm2, %xmm3
cvttsd2si %xmm3, %rdx
andq %r9, %rdx
orq %r8, %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x69a2a
jmp 0x69bf7
testq %rsi, %rsi
jle 0x69bf7
cvttsd2si %xmm1, %rbx
movq %rbx, %r14
sarq $0x3f, %r14
movapd %xmm1, %xmm2
subsd 0x63c8f(%rip), %xmm2 # 0xcd730
cvttsd2si %xmm2, %r11
andq %r14, %r11
orq %rbx, %r11
xorl %ebx, %ebx
movl $0x7ff0, %ebp # imm = 0x7FF0
movl $0x1, %r14d
xorpd %xmm2, %xmm2
movsd 0x6b613(%rip), %xmm3 # 0xd50d8
movsd 0x63c63(%rip), %xmm4 # 0xcd730
movzwl 0x6(%rdi,%rbx,8), %r12d
xorl %r15d, %r15d
andl %ebp, %r12d
sete %r15b
addl %r15d, %r15d
cmpl %ebp, %r12d
cmovel %r14d, %r15d
testl %r15d, %r15d
je 0x69b04
cmpl $0x1, %r15d
jne 0x69b3e
movl $0x1, (%r9)
cmpl $0x1, %edx
jne 0x69b54
movq %rcx, (%r10,%rbx,8)
jmp 0x69b75
movsd (%rdi,%rbx,8), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
ucomisd %xmm5, %xmm2
ja 0x69b44
ucomisd %xmm3, %xmm5
ja 0x69b61
cvttsd2si %xmm5, %r15
movq %r15, %r12
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %r13
sarq $0x3f, %r12
andq %r12, %r13
orq %r15, %r13
movq %r13, (%r10,%rbx,8)
jmp 0x69b75
ucomisd %xmm1, %xmm2
jbe 0x69b5b
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $0x0, (%r10,%rbx,8)
jmp 0x69b75
movb $0x1, (%r8,%rbx)
jmp 0x69b75
ucomisd %xmm3, %xmm1
jbe 0x69b71
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, (%r10,%rbx,8)
jmp 0x69b75
movq %r11, (%r10,%rbx,8)
incq %rbx
cmpq %rbx, %rsi
jne 0x69acd
jmp 0x69bf7
testq %rsi, %rsi
jle 0x69bf7
xorl %ecx, %ecx
xorpd %xmm2, %xmm2
movsd 0x6b542(%rip), %xmm3 # 0xd50d8
movsd 0x63b92(%rip), %xmm4 # 0xcd730
movsd (%rdi,%rcx,8), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
ucomisd %xmm5, %xmm2
jbe 0x69bbb
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x69beb
ucomisd %xmm3, %xmm5
jbe 0x69bd0
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movq $-0x1, %rdx
jmp 0x69beb
cvttsd2si %xmm5, %r8
movq %r8, %r9
sarq $0x3f, %r9
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %rdx
andq %r9, %rdx
orq %r8, %rdx
movq %rdx, (%r10,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x69b9e
movl (%rax), %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluj.c |
ffgpfuk | int ffgpfuk(fitsfile *fptr, /* I - FITS file pointer */
long group, /* I - group to read (1 = 1st group) */
LONGLONG firstelem, /* I - first vector element to read (1 = 1st) */
LONGLONG nelem, /* I - number of values to read */
unsigned int *array, /* O - array of values that are returned */
char *nularray, /* O - array of null pixel flags */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read an array of values from the primary array. Data conversion
and scaling will be performed if necessary (e.g, if the datatype of
the FITS array is not the same as the array being read).
Any undefined pixels in the returned array will be set = 0 and the
corresponding nularray value will be set = 1.
ANYNUL is returned with a value of .true. if any pixels are undefined.
*/
{
long row;
int nullcheck = 2;
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
fits_read_compressed_pixels(fptr, TUINT, firstelem, nelem,
nullcheck, NULL, array, nularray, anynul, status);
return(*status);
}
/*
the primary array is represented as a binary table:
each group of the primary array is a row in the table,
where the first column contains the group parameters
and the second column contains the image itself.
*/
row=maxvalue(1,group);
ffgcluk(fptr, 2, row, firstelem, nelem, 1, 2, 0L,
array, nularray, anynul, status);
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x48(%rsp), %rsi
callq 0x41127
testl %eax, %eax
je 0x6a876
movq %rbp, %rdi
movl $0x1e, %esi
movq %r13, %rdx
movq %r12, %rcx
movl $0x2, %r8d
xorl %r9d, %r9d
movq 0x48(%rsp), %rbx
pushq %rbx
pushq 0x48(%rsp)
pushq %r15
pushq %r14
callq 0x8cb5a
addq $0x20, %rsp
jmp 0x6a8b5
cmpq $0x2, %rbx
movl $0x1, %eax
cmovlq %rax, %rbx
movl $0x1, %r9d
movq %rbp, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq %r13, %rcx
movq %r12, %r8
movq 0x48(%rsp), %rbx
pushq %rbx
pushq 0x48(%rsp)
pushq %r15
pushq %r14
pushq $0x0
pushq $0x2
callq 0x6a060
addq $0x30, %rsp
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluk.c |
ffgsfuk | int ffgsfuk(fitsfile *fptr, /* I - FITS file pointer */
int colnum, /* I - number of the column to read (1 = 1st) */
int naxis, /* I - number of dimensions in the FITS array */
long *naxes, /* I - size of each dimension */
long *blc, /* I - 'bottom left corner' of the subsection */
long *trc, /* I - 'top right corner' of the subsection */
long *inc, /* I - increment to be applied in each dimension */
unsigned int *array, /* O - array to be filled and returned */
char *flagval, /* O - set to 1 if corresponding value is null */
int *anynul, /* O - set to 1 if any values are null; else 0 */
int *status) /* IO - error status */
/*
Read a subsection of data values from an image or a table column.
This routine is set up to handle a maximum of nine dimensions.
*/
{
long ii,i0, i1,i2,i3,i4,i5,i6,i7,i8,row,rstr,rstp,rinc;
long str[9],stp[9],incr[9],dsize[10];
LONGLONG blcll[9], trcll[9];
long felem, nelem, nultyp, ninc, numcol;
long nulval = 0;
int hdutype, anyf;
char msg[FLEN_ERRMSG];
int nullcheck = 2;
if (naxis < 1 || naxis > 9)
{
snprintf(msg, FLEN_ERRMSG,"NAXIS = %d in call to ffgsvj is out of range", naxis);
ffpmsg(msg);
return(*status = BAD_DIMEN);
}
if (fits_is_compressed_image(fptr, status))
{
/* this is a compressed image in a binary table */
for (ii=0; ii < naxis; ii++) {
blcll[ii] = blc[ii];
trcll[ii] = trc[ii];
}
fits_read_compressed_img(fptr, TUINT, blcll, trcll, inc,
nullcheck, NULL, array, flagval, anynul, status);
return(*status);
}
/*
if this is a primary array, then the input COLNUM parameter should
be interpreted as the row number, and we will alway read the image
data from column 2 (any group parameters are in column 1).
*/
if (ffghdt(fptr, &hdutype, status) > 0)
return(*status);
if (hdutype == IMAGE_HDU)
{
/* this is a primary array, or image extension */
if (colnum == 0)
{
rstr = 1;
rstp = 1;
}
else
{
rstr = colnum;
rstp = colnum;
}
rinc = 1;
numcol = 2;
}
else
{
/* this is a table, so the row info is in the (naxis+1) elements */
rstr = blc[naxis];
rstp = trc[naxis];
rinc = inc[naxis];
numcol = colnum;
}
nultyp = 2;
if (anynul)
*anynul = FALSE;
i0 = 0;
for (ii = 0; ii < 9; ii++)
{
str[ii] = 1;
stp[ii] = 1;
incr[ii] = 1;
dsize[ii] = 1;
}
for (ii = 0; ii < naxis; ii++)
{
if (trc[ii] < blc[ii])
{
snprintf(msg, FLEN_ERRMSG,"ffgsvj: illegal range specified for axis %ld", ii + 1);
ffpmsg(msg);
return(*status = BAD_PIX_NUM);
}
str[ii] = blc[ii];
stp[ii] = trc[ii];
incr[ii] = inc[ii];
dsize[ii + 1] = dsize[ii] * naxes[ii];
}
if (naxis == 1 && naxes[0] == 1)
{
/* This is not a vector column, so read all the rows at once */
nelem = (rstp - rstr) / rinc + 1;
ninc = rinc;
rstp = rstr;
}
else
{
/* have to read each row individually, in all dimensions */
nelem = (stp[0] - str[0]) / inc[0] + 1;
ninc = incr[0];
}
for (row = rstr; row <= rstp; row += rinc)
{
for (i8 = str[8]; i8 <= stp[8]; i8 += incr[8])
{
for (i7 = str[7]; i7 <= stp[7]; i7 += incr[7])
{
for (i6 = str[6]; i6 <= stp[6]; i6 += incr[6])
{
for (i5 = str[5]; i5 <= stp[5]; i5 += incr[5])
{
for (i4 = str[4]; i4 <= stp[4]; i4 += incr[4])
{
for (i3 = str[3]; i3 <= stp[3]; i3 += incr[3])
{
for (i2 = str[2]; i2 <= stp[2]; i2 += incr[2])
{
for (i1 = str[1]; i1 <= stp[1]; i1 += incr[1])
{
felem=str[0] + (i1 - 1) * dsize[1] + (i2 - 1) * dsize[2] +
(i3 - 1) * dsize[3] + (i4 - 1) * dsize[4] +
(i5 - 1) * dsize[5] + (i6 - 1) * dsize[6] +
(i7 - 1) * dsize[7] + (i8 - 1) * dsize[8];
if ( ffgcluk(fptr, numcol, row, felem, nelem, ninc, nultyp,
nulval, &array[i0], &flagval[i0], &anyf, status) > 0)
return(*status);
if (anyf && anynul)
*anynul = TRUE;
i0 += nelem;
}
}
}
}
}
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp # imm = 0x348
movl %edx, %r12d
movl %esi, 0x4(%rsp)
movq 0x3a0(%rsp), %r13
leal -0xa(%r12), %eax
cmpl $-0xa, %eax
ja 0x6b4f0
leaq 0x6cb2c(%rip), %rdx # 0xd7fe8
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x140, (%r13) # imm = 0x140
movl $0x140, %eax # imm = 0x140
jmp 0x6b594
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %rbp
movq %r13, %rsi
callq 0x41127
testl %eax, %eax
je 0x6b57c
shll $0x3, %r12d
leaq 0x2f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x65c0
leaq 0x2a0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x65c0
subq $0x8, %rsp
movq %rbp, %rdi
movl $0x1e, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x388(%rsp), %r8
movl $0x2, %r9d
pushq %r13
pushq 0x3a8(%rsp)
pushq 0x3a8(%rsp)
pushq 0x3a8(%rsp)
pushq $0x0
callq 0x8b0dd
addq $0x30, %rsp
jmp 0x6b590
leaq 0x74(%rsp), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x3b4a1
testl %eax, %eax
jle 0x6b5a6
movl (%r13), %eax
addq $0x348, %rsp # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x74(%rsp)
movl %r12d, %eax
je 0x6b5e8
movq (%rbx,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq (%r15,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x380(%rsp), %r9
movq (%r9,%rax,8), %rdi
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
movq 0x398(%rsp), %rcx
jmp 0x6b62c
movl 0x4(%rsp), %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
movslq %ecx, %rcx
movl $0x2, 0x4(%rsp)
movl $0x1, %edi
movq %rcx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
movq 0x398(%rsp), %rcx
movq 0x380(%rsp), %r9
testq %rcx, %rcx
je 0x6b637
movl $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %edx
movq %rdx, 0x1b0(%rsp,%rcx,8)
movq %rdx, 0x250(%rsp,%rcx,8)
movq %rdx, 0x200(%rsp,%rcx,8)
movq %rdx, 0x2a0(%rsp,%rcx,8)
incq %rcx
cmpq $0x9, %rcx
jne 0x6b63e
testl %r12d, %r12d
je 0x6b703
negq %rax
movl $0x1, %ecx
movq -0x8(%r15,%rcx,8), %rdx
movq -0x8(%rbx,%rcx,8), %rsi
cmpq %rsi, %rdx
jl 0x6bd9c
movq %rsi, 0x1a8(%rsp,%rcx,8)
movq %rdx, 0x248(%rsp,%rcx,8)
movq -0x8(%r9,%rcx,8), %rdx
movq %rdx, 0x1f8(%rsp,%rcx,8)
movq -0x8(%r14,%rcx,8), %rdx
imulq 0x298(%rsp,%rcx,8), %rdx
movq %rdx, 0x2a0(%rsp,%rcx,8)
leaq (%rax,%rcx), %rdx
incq %rdx
incq %rcx
cmpq $0x1, %rdx
jne 0x6b678
cmpl $0x1, %r12d
jne 0x6b703
cmpq $0x1, (%r14)
jne 0x6b703
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
cqto
idivq %rdi
movq %rax, %rdx
movq %rcx, 0x10(%rsp)
movq %rdi, 0x78(%rsp)
movq %rdi, 0x108(%rsp)
jmp 0x6b730
movq %rdi, 0x78(%rsp)
movq 0x250(%rsp), %rax
subq 0x1b0(%rsp), %rax
cqto
idivq (%r9)
movq %rax, %rdx
movq 0x200(%rsp), %rcx
movq %rcx, 0x108(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, 0x8(%rsp)
jle 0x6b744
movl (%r10), %eax
jmp 0x6b594
movq %rbp, %r14
movq 0x1f0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x1e8(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x1e0(%rsp), %rbx
movq %rbx, 0xf0(%rsp)
movq 0x1d8(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
movq 0x1d0(%rsp), %r11
movq 0x1c8(%rsp), %r12
movq 0x2b8(%rsp), %rbp
movq %rbp, 0x58(%rsp)
movq 0x2c0(%rsp), %r13
movq %r13, 0x30(%rsp)
movq 0x2c8(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x2d8(%rsp), %r15
movq 0x2e0(%rsp), %r9
decq %rcx
imulq %r15, %rcx
leaq -0x1(%rbx), %rdx
imulq %rax, %rdx
addq %rcx, %rdx
leaq -0x1(%rdi), %rcx
imulq %rsi, %rcx
addq %rdx, %rcx
movq %r11, 0xe0(%rsp)
leaq -0x1(%r11), %rdx
imulq %r13, %rdx
addq %rcx, %rdx
movq 0x68(%rsp), %rax
leaq -0x1(%rax), %rcx
imulq %r9, %rcx
addq 0x1b0(%rsp), %rcx
addq %rcx, %rdx
leaq -0x1(%r12), %rcx
imulq %rbp, %rcx
movq 0x1c0(%rsp), %rdi
movq 0x2b0(%rsp), %r11
leaq -0x1(%rdi), %rsi
imulq %r11, %rsi
addq %rcx, %rsi
movq %r12, %rcx
movq 0x1b8(%rsp), %r12
movq 0x2a8(%rsp), %rbx
movq %r12, 0x180(%rsp)
decq %r12
imulq %rbx, %r12
addq %rsi, %r12
movq 0x388(%rsp), %rbp
addq %rdx, %r12
movq %r12, 0x110(%rsp)
movq %rdi, %rdx
movq 0x18(%rsp), %rax
leaq 0x1(%rax), %r12
leaq 0x4(,%rax,4), %rsi
movq %rsi, 0x1a0(%rsp)
movq 0x240(%rsp), %r13
movq %r13, 0x118(%rsp)
imulq %r13, %r9
movq %r9, 0x120(%rsp)
movq 0xf0(%rsp), %r9
movq 0x238(%rsp), %r13
movq %r13, 0x128(%rsp)
imulq %r13, %r15
movq %r15, 0x130(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x20(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x20(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x28(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x30(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x30(%rsp)
movq 0x218(%rsp), %rax
movq %rax, 0x150(%rsp)
movq 0x58(%rsp), %rsi
imulq %rax, %rsi
movq %rsi, 0x58(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0x168(%rsp)
imulq %rax, %r11
movq %r11, 0x170(%rsp)
movq 0xe8(%rsp), %r11
movq 0x208(%rsp), %rax
movq %rax, 0x198(%rsp)
imulq %rax, %rbx
movq %rbx, 0x1a8(%rsp)
movq 0x290(%rsp), %rbx
movq 0x288(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x280(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x278(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x268(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x100(%rsp)
xorl %r15d, %r15d
movq %rcx, 0xf8(%rsp)
movq %rdi, 0x178(%rsp)
movq %rbx, 0x160(%rsp)
cmpq %rbx, 0x68(%rsp)
jle 0x6ba47
movq 0x8(%rsp), %rax
addq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rax
jle 0x6ba25
jmp 0x6b73c
movq 0x110(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jle 0x6baaa
movq %rbp, %rax
movq %rax, %rbp
movq 0x80(%rsp), %r13
addq 0x118(%rsp), %r13
movq 0x38(%rsp), %rax
addq 0x120(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %r13, 0x80(%rsp)
cmpq %rbx, %r13
jle 0x6ba61
jmp 0x6ba2c
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %rbp, %rax
movq 0xe0(%rsp), %r13
cmpq 0xc0(%rsp), %r9
jle 0x6bb1a
movq 0x88(%rsp), %rcx
addq 0x128(%rsp), %rcx
movq 0x40(%rsp), %rbp
addq 0x130(%rsp), %rbp
movq %rbp, 0x40(%rsp)
movq %rcx, 0x88(%rsp)
cmpq 0xb8(%rsp), %rcx
movq 0xf8(%rsp), %rcx
jle 0x6bacf
jmp 0x6ba76
movq 0x40(%rsp), %rbp
movq %r9, 0x90(%rsp)
cmpq 0xc8(%rsp), %r11
jle 0x6bb5d
movq 0x90(%rsp), %rdi
addq 0x138(%rsp), %rdi
addq 0x20(%rsp), %rbp
movq %rdi, 0x90(%rsp)
cmpq 0xc0(%rsp), %rdi
jle 0x6bb27
jmp 0x6bad9
movq %rbp, 0x48(%rsp)
movq %r11, 0x98(%rsp)
movq %rbp, 0x158(%rsp)
cmpq 0xd0(%rsp), %r13
jle 0x6bbaf
movq 0x98(%rsp), %rsi
addq 0x140(%rsp), %rsi
movq 0x48(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq %rdi, 0x48(%rsp)
movq %rsi, 0x98(%rsp)
cmpq 0xc8(%rsp), %rsi
jle 0x6bb72
jmp 0x6bb31
movq 0x48(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq %r13, 0xa0(%rsp)
cmpq 0xd8(%rsp), %rcx
jle 0x6bc01
movq 0xa0(%rsp), %rdi
addq 0x148(%rsp), %rdi
movq 0x50(%rsp), %rsi
addq 0x30(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq %rdi, 0xa0(%rsp)
cmpq 0xd0(%rsp), %rdi
jle 0x6bbc1
jmp 0x6bb7c
movq 0x50(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rcx, 0xa8(%rsp)
cmpq 0x100(%rsp), %rdx
jle 0x6bc5b
movq 0xa8(%rsp), %rdi
addq 0x150(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq 0x58(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rdi, 0xa8(%rsp)
cmpq 0xd8(%rsp), %rdi
movq 0x158(%rsp), %rbp
jle 0x6bc13
jmp 0x6bbcb
movq 0x60(%rsp), %rsi
movq %rdx, %rbp
movq %rbp, 0x188(%rsp)
movq 0x180(%rsp), %rbp
cmpq 0x18(%rsp), %rbp
movq %rsi, 0x190(%rsp)
jg 0x6bd22
leaq (%rax,%r15,4), %r13
movq %rsi, %rbx
leaq (%r8,%r15), %rax
movq %r14, %rdi
movl 0x4(%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x108(%rsp), %r9
pushq %r10
leaq 0x2f8(%rsp), %r10
pushq %r10
pushq %rax
pushq %r13
pushq $0x0
pushq $0x2
callq 0x6a060
addq $0x30, %rsp
testl %eax, %eax
jg 0x6bd8d
movq 0x398(%rsp), %rax
testq %rax, %rax
je 0x6bcec
cmpl $0x0, 0x2f0(%rsp)
je 0x6bcec
movl $0x1, (%rax)
addq %r12, %r15
addq 0x198(%rsp), %rbp
addq 0x1a0(%rsp), %r13
addq 0x1a8(%rsp), %rbx
cmpq 0x18(%rsp), %rbp
movq 0x3a0(%rsp), %r10
movq 0x390(%rsp), %r8
jle 0x6bc8d
movq 0x188(%rsp), %rbp
addq 0x168(%rsp), %rbp
movq 0x190(%rsp), %rsi
addq 0x170(%rsp), %rsi
cmpq 0x100(%rsp), %rbp
movq 0x388(%rsp), %rax
movq 0xf0(%rsp), %r9
movq 0xe8(%rsp), %r11
movq 0xe0(%rsp), %r13
movq 0xf8(%rsp), %rcx
movq 0x178(%rsp), %rdx
movq 0x160(%rsp), %rbx
jle 0x6bc63
jmp 0x6bc1d
movq 0x3a0(%rsp), %rax
movl (%rax), %eax
jmp 0x6b594
leaq 0x6c272(%rip), %rdx # 0xd8015
leaq 0x2f0(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
movq %r10, %r14
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0x141, (%r14) # imm = 0x141
movl $0x141, %eax # imm = 0x141
jmp 0x6b594
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluk.c |
fffi4uint | int fffi4uint(INT32BIT *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
INT32BIT tnull, /* I - value of FITS TNULLn keyword if any */
unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned int *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 2147483648.)
{
/* Instead of adding 2147483648, it is more efficient */
/* to just flip the sign bit with the XOR operator */
for (ii = 0; ii < ntodo; ii++)
output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000;
}
else if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else
output[ii] = (unsigned int) input[ii]; /* copy to output */
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT_MAX;
}
else
output[ii] = (unsigned int) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 2147483648.)
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
output[ii] = ( *(unsigned int *) &input[ii] ) ^ 0x80000000;
}
}
else if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else
output[ii] = (unsigned int) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT_MAX;
}
else
output[ii] = (unsigned int) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r14
pushq %rbx
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %r10
movsd 0x62340(%rip), %xmm2 # 0xce1f8
cmpeqpd %xmm1, %xmm2
movsd 0x5d1bb(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x6bf22
movq 0x20(%rsp), %r11
testb $0x1, %bl
je 0x6bf53
testq %rsi, %rsi
jle 0x6c102
xorl %ebx, %ebx
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x6bf04
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x6bf10
movl %r8d, (%r10,%rbx,4)
jmp 0x6bf15
addl $0x80000000, %ebp # imm = 0x80000000
movl %ebp, (%r10,%rbx,4)
jmp 0x6bf15
movb $0x1, (%r9,%rbx)
incq %rbx
cmpq %rbx, %rsi
jne 0x6beeb
jmp 0x6c102
testb $0x1, %bl
je 0x6bfcb
testq %rsi, %rsi
jle 0x6c102
xorl %ecx, %ecx
movl $0x80000000, %edx # imm = 0x80000000
movl (%rdi,%rcx,4), %r8d
xorl %edx, %r8d
movl %r8d, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x6bf3b
jmp 0x6c102
ucomisd 0x5d125(%rip), %xmm0 # 0xc9080
jne 0x6c01e
jp 0x6c01e
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x6c01e
jp 0x6c01e
testq %rsi, %rsi
jle 0x6c102
xorl %ebx, %ebx
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x6bf9f
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x6bfa9
movl %r8d, (%r10,%rbx,4)
jmp 0x6bfbe
testl %ebp, %ebp
js 0x6bfb0
movl %ebp, (%r10,%rbx,4)
jmp 0x6bfbe
movb $0x1, (%r9,%rbx)
jmp 0x6bfbe
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x0, (%r10,%rbx,4)
incq %rbx
cmpq %rbx, %rsi
jne 0x6bf86
jmp 0x6c102
ucomisd 0x5d0ad(%rip), %xmm0 # 0xc9080
jne 0x6c0a7
jp 0x6c0a7
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x6c0a7
jp 0x6c0a7
testq %rsi, %rsi
jle 0x6c102
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
testl %edx, %edx
jns 0x6c00d
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x6bffe
jmp 0x6c102
testq %rsi, %rsi
jle 0x6c102
xorl %ebx, %ebx
movsd 0x690af(%rip), %xmm2 # 0xd50e0
movsd 0x6c88f(%rip), %xmm3 # 0xd88c8
movl (%rdi,%rbx,4), %ebp
cmpl %ecx, %ebp
jne 0x6c052
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x6c077
movl %r8d, (%r10,%rbx,4)
jmp 0x6c09d
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x6c07e
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x0, (%r10,%rbx,4)
jmp 0x6c09d
movb $0x1, (%r9,%rbx)
jmp 0x6c09d
ucomisd %xmm3, %xmm4
jbe 0x6c094
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0xffffffff, (%r10,%rbx,4) # imm = 0xFFFFFFFF
jmp 0x6c09d
cvttsd2si %xmm4, %r14
movl %r14d, (%r10,%rbx,4)
incq %rbx
cmpq %rbx, %rsi
jne 0x6c039
jmp 0x6c102
testq %rsi, %rsi
jle 0x6c102
xorl %ecx, %ecx
movsd 0x6902a(%rip), %xmm2 # 0xd50e0
movsd 0x6c80a(%rip), %xmm3 # 0xd88c8
xorps %xmm4, %xmm4
cvtsi2sdl (%rdi,%rcx,4), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x6c0de
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x6c0f6
ucomisd %xmm3, %xmm4
jbe 0x6c0f1
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
jmp 0x6c0f6
cvttsd2si %xmm4, %rdx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x6c0be
movl (%rax), %eax
popq %rbx
popq %r14
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluk.c |
fffi2uint | int fffi2uint(short *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
int nullcheck, /* I - null checking code; 0 = don't check */
/* 1:set null pixels = nullval */
/* 2: if null pixel, set nullarray = 1 */
short tnull, /* I - value of FITS TNULLn keyword if any */
unsigned int nullval, /* I - set null pixels, if nullcheck = 1 */
char *nullarray, /* I - bad pixel array, if nullcheck = 2 */
int *anynull, /* O - set to 1 if any pixels are null */
unsigned int *output, /* O - array of converted pixels */
int *status) /* IO - error status */
/*
Copy input to output following reading of the input from a FITS file.
Check for null values and do datatype conversion and scaling if required.
The nullcheck code value determines how any null values in the input array
are treated. A null value is an input pixel that is equal to tnull. If
nullcheck = 0, then no checking for nulls is performed and any null values
will be transformed just like any other pixel. If nullcheck = 1, then the
output pixel will be set = nullval if the corresponding input pixel is null.
If nullcheck = 2, then if the pixel is null then the corresponding value of
nullarray will be set to 1; the value of nullarray for non-null pixels
will = 0. The anynull parameter will be set = 1 if any of the returned
pixels are null, otherwise anynull will be returned with a value = 0;
*/
{
long ii;
double dvalue;
if (nullcheck == 0) /* no null checking required */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else
output[ii] = (unsigned int) input[ii];
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT_MAX;
}
else
output[ii] = (unsigned int) dvalue;
}
}
}
else /* must check for null values */
{
if (scale == 1. && zero == 0.) /* no scaling */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
if (input[ii] < 0)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else
output[ii] = (unsigned int) input[ii];
}
}
}
else /* must scale the data */
{
for (ii = 0; ii < ntodo; ii++)
{
if (input[ii] == tnull)
{
*anynull = 1;
if (nullcheck == 1)
output[ii] = nullval;
else
nullarray[ii] = 1;
}
else
{
dvalue = input[ii] * scale + zero;
if (dvalue < DUINT_MIN)
{
*status = OVERFLOW_ERR;
output[ii] = 0;
}
else if (dvalue > DUINT_MAX)
{
*status = OVERFLOW_ERR;
output[ii] = UINT_MAX;
}
else
output[ii] = (unsigned int) dvalue;
}
}
}
}
return(*status);
} | pushq %rbp
pushq %r14
pushq %rbx
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %r10
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movsd 0x5caef(%rip), %xmm3 # 0xc9080
cmpeqpd %xmm0, %xmm3
andpd %xmm2, %xmm3
movd %xmm3, %ebx
testl %edx, %edx
je 0x6c603
movq 0x20(%rsp), %r11
testb $0x1, %bl
je 0x6c638
testq %rsi, %rsi
jle 0x6c724
xorl %ebx, %ebx
movswl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x6c5d6
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x6c5e1
movl %r8d, (%r10,%rbx,4)
jmp 0x6c5f6
testw %bp, %bp
js 0x6c5e8
movl %ebp, (%r10,%rbx,4)
jmp 0x6c5f6
movb $0x1, (%r9,%rbx)
jmp 0x6c5f6
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x0, (%r10,%rbx,4)
incq %rbx
cmpq %rbx, %rsi
jne 0x6c5bb
jmp 0x6c724
testb $0x1, %bl
je 0x6c6c6
testq %rsi, %rsi
jle 0x6c724
xorl %ecx, %ecx
movswl (%rdi,%rcx,2), %edx
testl %edx, %edx
jns 0x6c627
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x6c617
jmp 0x6c724
testq %rsi, %rsi
jle 0x6c724
xorl %ebx, %ebx
movsd 0x68a95(%rip), %xmm2 # 0xd50e0
movsd 0x6c275(%rip), %xmm3 # 0xd88c8
movzwl (%rdi,%rbx,2), %ebp
cmpw %cx, %bp
jne 0x6c66e
movl $0x1, (%r11)
cmpl $0x1, %edx
jne 0x6c696
movl %r8d, (%r10,%rbx,4)
jmp 0x6c6bc
movswl %bp, %ebp
xorps %xmm4, %xmm4
cvtsi2sd %ebp, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x6c69d
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0x0, (%r10,%rbx,4)
jmp 0x6c6bc
movb $0x1, (%r9,%rbx)
jmp 0x6c6bc
ucomisd %xmm3, %xmm4
jbe 0x6c6b3
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0xffffffff, (%r10,%rbx,4) # imm = 0xFFFFFFFF
jmp 0x6c6bc
cvttsd2si %xmm4, %r14
movl %r14d, (%r10,%rbx,4)
incq %rbx
cmpq %rbx, %rsi
jne 0x6c653
jmp 0x6c724
testq %rsi, %rsi
jle 0x6c724
xorl %ecx, %ecx
movsd 0x68a0b(%rip), %xmm2 # 0xd50e0
movsd 0x6c1eb(%rip), %xmm3 # 0xd88c8
movswl (%rdi,%rcx,2), %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm1, %xmm4
ucomisd %xmm4, %xmm2
jbe 0x6c700
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
xorl %edx, %edx
jmp 0x6c718
ucomisd %xmm3, %xmm4
jbe 0x6c713
movl $0xfffffff5, (%rax) # imm = 0xFFFFFFF5
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
jmp 0x6c718
cvttsd2si %xmm4, %rdx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq %rcx, %rsi
jne 0x6c6dd
movl (%rax), %eax
popq %rbx
popq %r14
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getcoluk.c |
ffghsp | int ffghsp(fitsfile *fptr, /* I - FITS file pointer */
int *nexist, /* O - number of existing keywords in header */
int *nmore, /* O - how many more keywords will fit */
int *status) /* IO - error status */
/*
returns the number of existing keywords (not counting the END keyword)
and the number of more keyword that will fit in the current header
without having to insert more FITS blocks.
*/
{
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
if (nexist)
*nexist = (int) (( ((fptr->Fptr)->headend) -
((fptr->Fptr)->headstart[(fptr->Fptr)->curhdu]) ) / 80);
if ((fptr->Fptr)->datastart == DATA_UNDEFINED)
{
if (nmore)
*nmore = -1; /* data not written yet, so room for any keywords */
}
else
{
/* calculate space available between the data and the END card */
if (nmore)
*nmore = (int) (((fptr->Fptr)->datastart - (fptr->Fptr)->headend) / 80 - 1);
}
return(*status);
} | movl (%rcx), %eax
testl %eax, %eax
jle 0x6d01b
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl (%rdi), %esi
movq 0x8(%rdi), %rcx
cmpl 0x54(%rcx), %esi
je 0x6d04e
incl %esi
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x37f5e
movq 0x8(%r12), %rcx
movabsq $0x6666666666666667, %rsi # imm = 0x6666666666666667
testq %r15, %r15
je 0x6d080
movq 0x68(%rcx), %rdx
movq 0x70(%rcx), %rax
movslq 0x54(%rcx), %rdi
subq (%rdx,%rdi,8), %rax
imulq %rsi
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
addl %eax, %edx
movl %edx, (%r15)
movq 0x88(%rcx), %rax
cmpq $-0x1, %rax
je 0x6d0aa
testq %r14, %r14
je 0x6d0b7
subq 0x70(%rcx), %rax
imulq %rsi
movq %rdx, %rax
shrq $0x5, %rax
shrq $0x3f, %rdx
addl %edx, %eax
decl %eax
jmp 0x6d0b4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x6d0b7
movl %eax, (%r14)
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffgkys | int ffgkys( fitsfile *fptr, /* I - FITS file pointer */
const char *keyname, /* I - name of keyword to read */
char *value, /* O - keyword value */
char *comm, /* O - keyword comment */
int *status) /* IO - error status */
/*
Get KeYword with a String value:
Read (get) a simple string valued keyword. The returned value may be up to
68 chars long ( + 1 null terminator char). The routine does not support the
HEASARC convention for continuing long string values over multiple keywords.
The ffgkls routine may be used to read long continued strings. The returned
comment string may be up to 69 characters long (including null terminator).
*/
{
char valstring[FLEN_VALUE];
if (*status > 0)
return(*status);
ffgkey(fptr, keyname, valstring, comm, status); /* read the keyword */
value[0] = '\0';
ffc2s(valstring, value, status); /* remove quotes from string */
return(*status);
} | movl (%r8), %eax
testl %eax, %eax
jle 0x6dd12
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %r8, %rbx
movq %rdx, %r14
movq %rsp, %r15
movq %r15, %rdx
callq 0x6e02a
movb $0x0, (%r14)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c9a1
movl (%rbx), %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffgkey | int ffgkey( fitsfile *fptr, /* I - FITS file pointer */
const char *keyname, /* I - name of keyword to read */
char *keyval, /* O - keyword value */
char *comm, /* O - keyword comment */
int *status) /* IO - error status */
/*
Read (get) the named keyword, returning the keyword value and comment.
The value is just the literal string of characters in the value field
of the keyword. In the case of a string valued keyword, the returned
value includes the leading and closing quote characters. The value may be
up to 70 characters long, and the comment may be up to 72 characters long.
If the keyword has no value (no equal sign in column 9) then a null value
is returned.
*/
{
char card[FLEN_CARD];
keyval[0] = '\0';
if (comm)
comm[0] = '\0';
if (*status > 0)
return(*status);
if (ffgcrd(fptr, keyname, card, status) > 0) /* get the 80-byte card */
return(*status);
ffpsvc(card, keyval, comm, status); /* parse the value and comment */
return(*status);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movb $0x0, (%rdx)
testq %rcx, %rcx
je 0x6e048
movb $0x0, (%r14)
movl (%rbx), %eax
testl %eax, %eax
jg 0x6e070
movq %rsp, %rdx
movq %rbx, %rcx
callq 0x6d586
testl %eax, %eax
jg 0x6e06e
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x381ee
movl (%rbx), %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffgsky | int ffgsky( fitsfile *fptr, /* I - FITS file pointer */
const char *keyname, /* I - name of keyword to read */
int firstchar, /* I - first character of string to return */
int maxchar, /* I - maximum length of string to return */
/* (string will be null terminated) */
char *value, /* O - pointer to keyword value */
int *valuelen, /* O - total length of the keyword value string */
/* The returned 'value' string may only */
/* contain a piece of the total string, depending */
/* on the value of firstchar and maxchar */
char *comm, /* O - keyword comment (may be NULL) */
int *status) /* IO - error status */
/*
Read and return the value of the specified string-valued keyword.
This new routine was added in 2016 to provide a more convenient user
interface than the older ffgkls routine.
Read a string keyword, returning up to 'naxchars' characters of the value
starting with the 'firstchar' character.
The input 'value' string must be allocated at least 1 char bigger to
allow for the terminating null character.
This routine may be used to read continued string keywords that use
the CONTINUE keyword convention, as well as normal string keywords
that are contained within a single header record.
This routine differs from the ffkls routine in that it does not
internally allocate memory for the returned value string, and consequently
the calling routine does not need to call fffree to free the memory.
*/
{
char valstring[FLEN_VALUE], nextcomm[FLEN_COMMENT], card[FLEN_CARD];
char *tempstring;
int contin, commSpace = 0, addCommDelim=0, keynum=0;
size_t len;
if (*status > 0)
return(*status);
tempstring = NULL; /* initialize in case of error */
*value = '\0';
if (valuelen) *valuelen = 0;
card[0] = '\0';
if (comm)
comm[0] = '\0';
ffgcrd(fptr, keyname, card, status);
if (*status > 0)
return(*status);
if (strlen(card) < FLEN_CARD-1)
addCommDelim=1;
ffpsvc(card,valstring, comm, status);
if (*status > 0)
return(*status);
if (comm)
{
/* remaining space in comment string */
commSpace = FLEN_COMMENT-1 - strlen(comm);
}
if (!valstring[0]) /* null value string? */
{
tempstring = (char *) malloc(1); /* allocate and return a null string */
*tempstring = '\0';
}
else
{
/* allocate space, plus 1 for null */
tempstring = (char *) malloc(strlen(valstring) + 1);
ffc2s(valstring, tempstring, status); /* convert string to value */
len = strlen(tempstring);
/* If last character is a & then value may be continued on next keyword */
contin = 1;
while (contin && *status <= 0)
{
if (len && *(tempstring+len-1) == '&') /* is last char an ampersand? */
{
valstring[0] = '\0';
nextcomm[0] = '\0';
ffgcnt(fptr, valstring, nextcomm, status);
if (*valstring || *nextcomm) /* If either valstring or nextcom
is filled, this must be a CONTINUE line */
{
*(tempstring+len-1) = '\0'; /* erase the trailing & char */
if (*valstring)
{
len += strlen(valstring) - 1;
tempstring = (char *) realloc(tempstring, len + 1); /* increase size */
strcat(tempstring, valstring); /* append the continued chars */
}
if (*nextcomm)
{
if ((commSpace > 0) && (*nextcomm != 0))
{
/* If in here, input 'comm' cannot be 0 */
/* concantenate comment strings (if any) */
if (strlen(comm) && addCommDelim)
{
strcat(comm, " ");
commSpace -=1;
}
strncat(comm, nextcomm, commSpace);
commSpace = FLEN_COMMENT-1 - strlen(comm);
}
}
/* Determine if a space delimiter is needed for next
comment concatenation (if any). Assume it is if card length
of the most recently read keyword is less than max.
keynum is 1-based. */
ffghps(fptr,0,&keynum,status);
ffgrec(fptr, keynum-1, card, status);
addCommDelim = (strlen(card) < FLEN_CARD-1) ? 1 : 0;
}
else
{
contin = 0;
}
}
else
{
contin = 0;
}
}
}
if (tempstring)
{
len = strlen(tempstring);
if (firstchar <= len)
strncat(value, tempstring + (firstchar - 1), maxchar);
free(tempstring);
if (valuelen) *valuelen = len; /* total length of the keyword value */
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %r8, 0x20(%rsp)
movq 0x168(%rsp), %r14
movl $0x0, 0xc(%rsp)
movl (%r14), %eax
testl %eax, %eax
jg 0x6ec47
movq %r9, %rbx
movl %ecx, %r12d
movl %edx, %ebp
movq %rdi, %r13
movq 0x160(%rsp), %rax
movq 0x20(%rsp), %rcx
movb $0x0, (%rcx)
testq %r9, %r9
je 0x6e9b8
movl $0x0, (%rbx)
movb $0x0, 0xd0(%rsp)
testq %rax, %rax
je 0x6e9c8
movb $0x0, (%rax)
leaq 0xd0(%rsp), %rdx
movq %r13, %rdi
movq %r14, %rcx
callq 0x6d586
movl (%r14), %eax
testl %eax, %eax
jg 0x6ec47
movl %ebp, 0x1c(%rsp)
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
callq 0x6280
movq %rax, %r15
leaq 0x30(%rsp), %rsi
movq %rbp, %rdi
movq 0x160(%rsp), %rdx
movq %r14, %rcx
callq 0x381ee
movl (%r14), %eax
testl %eax, %eax
jg 0x6ec47
movq %r15, 0x10(%rsp)
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0x6ea40
callq 0x6280
movl $0x48, %ecx
subl %eax, %ecx
jmp 0x6ea42
xorl %ecx, %ecx
cmpb $0x0, 0x30(%rsp)
movl %r12d, 0x18(%rsp)
je 0x6ebf6
movl %ecx, 0x8(%rsp)
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
callq 0x6280
leaq 0x1(%rax), %rdi
callq 0x61a0
movq %rax, %r12
movq %rbp, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3c9a1
movq %r12, %rdi
callq 0x6280
cmpl $0x0, (%r14)
jg 0x6ebef
movq %rax, %rbp
testq %rax, %rax
je 0x6ebef
movq 0x10(%rsp), %r15
movq %rbx, 0x28(%rsp)
cmpb $0x26, -0x1(%r12,%rbp)
jne 0x6ec06
xorl %eax, %eax
movb %al, 0x30(%rsp)
movb %al, 0x80(%rsp)
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x80(%rsp), %rdx
movq %r14, %rcx
callq 0x6e894
movb 0x80(%rsp), %al
orb 0x30(%rsp), %al
je 0x6ec06
movb $0x0, -0x1(%r12,%rbp)
cmpb $0x0, 0x30(%rsp)
je 0x6eb2f
leaq 0x30(%rsp), %rdi
callq 0x6280
leaq (%rax,%rbp), %rbx
decq %rbx
addq %rax, %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6658
movq %rax, 0x10(%rsp)
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6330
movq %rbx, %rbp
movq 0x28(%rsp), %rbx
jmp 0x6eb34
movq %r12, 0x10(%rsp)
movq 0x160(%rsp), %r12
movl 0x8(%rsp), %ecx
cmpb $0x0, 0x80(%rsp)
je 0x6eba2
testl %ecx, %ecx
jle 0x6eba2
cmpb $0x0, (%r12)
je 0x6eb7d
cmpq $0x4f, %r15
ja 0x6eb7d
movq 0x160(%rsp), %rdi
callq 0x6280
movl 0x8(%rsp), %ecx
movq 0x160(%rsp), %r12
movw $0x20, (%r12,%rax)
decl %ecx
movl %ecx, %edx
movq %r12, %rdi
leaq 0x80(%rsp), %rsi
callq 0x60f0
movq %r12, %rdi
callq 0x6280
movl $0x48, %ecx
subl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq %r13, %rdi
xorl %esi, %esi
leaq 0xc(%rsp), %rdx
movq %r14, %rcx
callq 0x6d0c5
movl 0xc(%rsp), %esi
decl %esi
movq %r13, %rdi
leaq 0xd0(%rsp), %r15
movq %r15, %rdx
movq %r14, %rcx
callq 0x6e07a
movq %r15, %rdi
callq 0x6280
cmpl $0x0, (%r14)
movq 0x10(%rsp), %r12
jg 0x6ebef
movq %rax, %r15
testq %rbp, %rbp
jne 0x6eaa5
testq %r12, %r12
jne 0x6ec06
jmp 0x6ec44
movl $0x1, %edi
callq 0x61a0
movq %rax, %r12
movb $0x0, (%rax)
movq %r12, %rdi
callq 0x6280
movq %r12, %r13
movq %rax, %r12
movslq 0x1c(%rsp), %rax
cmpq %rax, %r12
jb 0x6ec34
leaq (%rax,%r13), %rsi
decq %rsi
movslq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x60f0
movq %r13, %rdi
callq 0x6260
testq %rbx, %rbx
je 0x6ec44
movl %r12d, (%rbx)
movl (%r14), %eax
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffgknd | int ffgknd( fitsfile *fptr, /* I - FITS file pointer */
const char *keyname, /* I - root name of keywords to read */
int nstart, /* I - starting index number */
int nmax, /* I - maximum number of keywords to return */
double *value, /* O - array of keyword values */
int *nfound, /* O - number of values that were returned */
int *status) /* IO - error status */
/*
Read (get) an indexed array of keywords with index numbers between
NSTART and (NSTART + NMAX -1) inclusive.
*/
{
int nend, lenroot, ii, nkeys, mkeys, tstatus, undefinedval;
long ival;
char keyroot[FLEN_KEYWORD], keyindex[8], card[FLEN_CARD];
char svalue[FLEN_VALUE], comm[FLEN_COMMENT], *equalssign;
if (*status > 0)
return(*status);
*nfound = 0;
nend = nstart + nmax - 1;
keyroot[0] = '\0';
strncat(keyroot, keyname, FLEN_KEYWORD - 1);
lenroot = strlen(keyroot);
if (lenroot == 0) /* root must be at least 1 char long */
return(*status);
for (ii=0; ii < lenroot; ii++) /* make sure upper case */
keyroot[ii] = toupper(keyroot[ii]);
ffghps(fptr, &nkeys, &mkeys, status); /* get the number of keywords */
ffmaky(fptr, 3, status); /* move to 3rd keyword (skip 1st 2 keywords) */
undefinedval = FALSE;
for (ii=3; ii <= nkeys; ii++)
{
if (ffgnky(fptr, card, status) > 0) /* get next keyword */
return(*status);
if (strncmp(keyroot, card, lenroot) == 0) /* see if keyword matches */
{
keyindex[0] = '\0';
equalssign = strchr(card, '=');
if (equalssign == 0) continue; /* keyword has no value */
if (equalssign - card - lenroot > 7)
{
return (*status=BAD_KEYCHAR);
}
strncat(keyindex, &card[lenroot], equalssign - card - lenroot); /* copy suffix */
tstatus = 0;
if (ffc2ii(keyindex, &ival, &tstatus) <= 0) /* test suffix */
{
if (ival <= nend && ival >= nstart) /* is index within range? */
{
ffpsvc(card, svalue, comm, status); /* parse the value */
ffc2d(svalue, &value[ival-nstart], status); /* convert */
if (ival - nstart + 1 > *nfound)
*nfound = ival - nstart + 1; /* max found */
if (*status == VALUE_UNDEFINED)
{
undefinedval = TRUE;
*status = 0; /* reset status to read remaining values */
}
}
}
}
}
if (undefinedval && (*status <= 0) )
*status = VALUE_UNDEFINED; /* report at least 1 value undefined */
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq 0x1d0(%rsp), %rbx
movl (%rbx), %eax
testl %eax, %eax
jg 0x6fc2f
movq %r9, %r14
movl %ecx, %r13d
movl %edx, %r15d
movq %rdi, %r12
movq %r8, 0x30(%rsp)
movl $0x0, (%r9)
leaq 0x50(%rsp), %rbp
movb $0x0, (%rbp)
movl $0x4a, %edx
movq %rbp, %rdi
callq 0x60f0
movq %rbp, %rdi
callq 0x6280
movq %rax, %rbp
testl %ebp, %ebp
je 0x6fc2d
movq %r14, 0x20(%rsp)
jle 0x6fbfc
callq 0x6230
movl %ebp, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %edx, %edx
movq (%rax), %rsi
movsbq 0x50(%rsp,%rdx), %rdi
movb (%rsi,%rdi,4), %sil
movb %sil, 0x50(%rsp,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x6fbe2
movq %rsp, %rsi
leaq 0x44(%rsp), %rdx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x6d0c5
movl $0x3, %r14d
movq %r12, %rdi
movl $0x3, %esi
movq %rbx, %rdx
callq 0x6d279
movq %rsp, %rax
cmpl $0x2, (%rax)
jg 0x6fc41
movl (%rbx), %eax
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal (%r15,%r13), %eax
decl %eax
movslq %ebp, %r13
leaq 0x140(%rsp), %rbp
leaq (%r13,%rbp), %rcx
movq %rcx, 0x38(%rsp)
cltq
movq %rax, 0x28(%rsp)
movslq %r15d, %rax
movq %rax, 0x18(%rsp)
movb $0x1, %al
movl %eax, 0x4(%rsp)
leaq 0x50(%rsp), %r15
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x6d30f
testl %eax, %eax
jg 0x6fc2d
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x6190
testl %eax, %eax
je 0x6fcac
leal 0x1(%r14), %eax
cmpl (%rsp), %r14d
movl %eax, %r14d
jl 0x6fc76
jmp 0x6fdd4
movb $0x0, 0x48(%rsp)
movq %rbp, %rdi
movl $0x3d, %esi
callq 0x63c0
testq %rax, %rax
je 0x6fc9a
movq 0x38(%rsp), %rsi
subq %rsi, %rax
cmpq $0x8, %rax
jge 0x6fdf9
movq %rbp, %r15
movq %r12, %rbp
movq %r13, %r12
movq %rbx, %r13
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rdx
callq 0x60f0
movl $0x0, 0x14(%rsp)
movq %rbx, %rdi
movq %r13, %rbx
movq %r12, %r13
movq %rbp, %r12
movq %r15, %rbp
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x3a10c
testl %eax, %eax
jg 0x6fc9a
movq 0x8(%rsp), %rax
cmpq 0x28(%rsp), %rax
setg %cl
cmpq 0x18(%rsp), %rax
setl %al
orb %cl, %al
jne 0x6fc9a
movq %rbp, %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
movq %rbx, %rcx
callq 0x381ee
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %r15
subq %r15, %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,8), %rsi
leaq 0xa0(%rsp), %rdi
movq %rbx, %rdx
callq 0x43583
movq 0x8(%rsp), %rax
subq %r15, %rax
movq 0x20(%rsp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jl 0x6fda0
incl %eax
movq 0x20(%rsp), %rcx
movl %eax, (%rcx)
cmpl $0xcc, (%rbx)
leaq 0x50(%rsp), %r15
jne 0x6fc9a
movl $0x0, (%rbx)
leal 0x1(%r14), %eax
movl $0x0, 0x4(%rsp)
cmpl (%rsp), %r14d
movl %eax, %r14d
jl 0x6fc76
movl (%rbx), %eax
jmp 0x6fde1
movl (%rbx), %eax
testb $0x1, 0x4(%rsp)
jne 0x6fc2f
testl %eax, %eax
jg 0x6fc2f
movl $0xcc, (%rbx)
movl $0xcc, %eax
jmp 0x6fc2f
movl $0xcf, (%rbx)
movl $0xcf, %eax
jmp 0x6fc2f
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffdtdmll | int ffdtdmll(fitsfile *fptr, /* I - FITS file pointer */
char *tdimstr, /* I - TDIMn keyword value string. e.g. (10,10) */
int colnum, /* I - number of the column */
int maxdim, /* I - maximum no. of dimensions to read; */
int *naxis, /* O - number of axes in the data array */
LONGLONG naxes[], /* O - length of each data axis */
int *status) /* IO - error status */
/*
decode the TDIMnnn keyword to get the dimensionality of a column.
Check that the value is legal and consistent with the TFORM value.
*/
{
LONGLONG dimsize;
LONGLONG totalpix = 1;
char *loc, *lastloc, message[FLEN_ERRMSG];
tcolumn *colptr;
double doublesize;
if (*status > 0)
return(*status);
if (fptr->HDUposition != (fptr->Fptr)->curhdu)
ffmahd(fptr, (fptr->HDUposition) + 1, NULL, status);
if (colnum < 1 || colnum > (fptr->Fptr)->tfield)
return(*status = BAD_COL_NUM);
colptr = (fptr->Fptr)->tableptr; /* set pointer to the first column */
colptr += (colnum - 1); /* increment to the correct column */
if (!tdimstr[0]) /* TDIMn keyword doesn't exist? */
{
*naxis = 1; /* default = 1 dimensional */
if (maxdim > 0)
naxes[0] = colptr->trepeat; /* default length = repeat */
}
else
{
*naxis = 0;
loc = strchr(tdimstr, '(' ); /* find the opening quote */
if (!loc)
{
snprintf(message, FLEN_ERRMSG, "Illegal TDIM keyword value: %s", tdimstr);
return(*status = BAD_TDIM);
}
while (loc)
{
loc++;
/* Read value as a double because the string to 64-bit int function is */
/* platform dependent (strtoll, strtol, _atoI64). This still gives */
/* about 48 bits of precision, which is plenty for this purpose. */
doublesize = strtod(loc, &loc);
dimsize = (LONGLONG) (doublesize + 0.1);
if (*naxis < maxdim)
naxes[*naxis] = dimsize;
if (dimsize < 0)
{
ffpmsg("one or more TDIM values are less than 0 (ffdtdm)");
ffpmsg(tdimstr);
return(*status = BAD_TDIM);
}
totalpix *= dimsize;
(*naxis)++;
lastloc = loc;
loc = strchr(loc, ','); /* look for comma before next dimension */
}
loc = strchr(lastloc, ')' ); /* check for the closing quote */
if (!loc)
{
snprintf(message, FLEN_ERRMSG, "Illegal TDIM keyword value: %s", tdimstr);
return(*status = BAD_TDIM);
}
if ((colptr->tdatatype > 0) && (colptr->trepeat != totalpix))
{
snprintf(message, FLEN_ERRMSG,
"column vector length, %.0f, does not equal TDIMn array size, %.0f",
(double) (colptr->trepeat), (double) totalpix);
ffpmsg(message);
ffpmsg(tdimstr);
return(*status = BAD_TDIM);
}
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movq 0xa0(%rsp), %rcx
movl (%rcx), %eax
testl %eax, %eax
jg 0x701da
movq %r9, %r15
movq %r8, %r12
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %esi
movq 0x8(%rdi), %rax
cmpl 0x54(%rax), %esi
je 0x701bd
incl %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x37f5e
movq 0xa0(%rsp), %rcx
testl %r13d, %r13d
jle 0x701cf
movq 0x8(%rbx), %rax
cmpl %r13d, 0x3b0(%rax)
jge 0x701e9
movl $0x12e, (%rcx) # imm = 0x12E
movl $0x12e, %eax # imm = 0x12E
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %edx
leaq (%rdx,%rdx,4), %rbx
shlq $0x5, %rbx
addq 0x3d0(%rax), %rbx
cmpb $0x0, (%r14)
je 0x702fb
movl $0x0, (%r12)
movq %r14, %rdi
movl $0x28, %esi
callq 0x63c0
testq %rax, %rax
je 0x70315
movq %rbx, 0x8(%rsp)
movl $0x1, %r13d
incq %rax
movq %rax, (%rsp)
movq %rax, %rdi
movq %rsp, %rsi
callq 0x6600
addsd 0x5dfc0(%rip), %xmm0 # 0xce208
cvttsd2si %xmm0, %rcx
movslq (%r12), %rax
cmpl %ebp, %eax
jge 0x70259
movq %rcx, (%r15,%rax,8)
testq %rcx, %rcx
js 0x70332
imulq %rcx, %r13
incl %eax
movl %eax, (%r12)
movq (%rsp), %rbx
movq %rbx, %rdi
movl $0x2c, %esi
callq 0x63c0
movq %rax, (%rsp)
testq %rax, %rax
jne 0x7022e
movq %rbx, %rdi
movl $0x29, %esi
callq 0x63c0
testq %rax, %rax
je 0x70315
movq 0x8(%rsp), %rax
cmpl $0x0, -0x50(%rax)
movq 0xa0(%rsp), %rcx
jle 0x7030e
movq -0x48(%rax), %rax
cmpq %r13, %rax
je 0x7030e
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
cvtsi2sd %r13, %xmm1
leaq 0x68926(%rip), %rdx # 0xd8bee
leaq 0x10(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movb $0x2, %al
movq %r14, %r15
movq %rcx, %r14
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movq %r15, %rdi
callq 0x37264
movl $0x107, (%r14) # imm = 0x107
jmp 0x70354
movl $0x1, (%r12)
testl %ebp, %ebp
jle 0x7030e
movq -0x48(%rbx), %rax
movq %rax, (%r15)
movl (%rcx), %eax
jmp 0x701da
leaq 0x68882(%rip), %rdx # 0xd8b9e
leaq 0x10(%rsp), %rdi
movl $0x51, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x60b0
jmp 0x70346
leaq 0x68884(%rip), %rdi # 0xd8bbd
callq 0x37264
movq %r14, %rdi
callq 0x37264
movq 0xa0(%rsp), %rax
movl $0x107, (%rax) # imm = 0x107
movl $0x107, %eax # imm = 0x107
jmp 0x701da
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffghprll | int ffghprll(fitsfile *fptr, /* I - FITS file pointer */
int maxdim, /* I - maximum no. of dimensions to read; */
int *simple, /* O - does file conform to FITS standard? 1/0 */
int *bitpix, /* O - number of bits per data value pixel */
int *naxis, /* O - number of axes in the data array */
LONGLONG naxes[], /* O - length of each data axis */
long *pcount, /* O - number of group parameters (usually 0) */
long *gcount, /* O - number of random groups (usually 1 or 0) */
int *extend, /* O - may FITS file haave extensions? */
int *status) /* IO - error status */
/*
Get keywords from the Header of the PRimary array:
Check that the keywords conform to the FITS standard and return the
parameters which determine the size and structure of the primary array
or IMAGE extension.
*/
{
int idummy;
LONGLONG lldummy;
double ddummy;
ffgphd(fptr, maxdim, simple, bitpix, naxis, naxes, pcount, gcount, extend,
&ddummy, &ddummy, &lldummy, &idummy, status);
return(*status);
} | pushq %rbx
subq $0x60, %rsp
movaps 0x70(%rsp), %xmm0
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rbx
movq %rbx, 0x38(%rsp)
leaq 0x4c(%rsp), %r10
movq %r10, 0x30(%rsp)
leaq 0x58(%rsp), %r10
movq %r10, 0x28(%rsp)
leaq 0x50(%rsp), %r10
movq %r10, 0x20(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x70419
movl (%rbx), %eax
addq $0x60, %rsp
popq %rbx
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffghtbll | int ffghtbll(fitsfile *fptr, /* I - FITS file pointer */
int maxfield, /* I - maximum no. of columns to read; */
LONGLONG *naxis1, /* O - length of table row in bytes */
LONGLONG *naxis2, /* O - number of rows in the table */
int *tfields, /* O - number of columns in the table */
char **ttype, /* O - name of each column */
LONGLONG *tbcol, /* O - byte offset in row to each column */
char **tform, /* O - value of TFORMn keyword for each column */
char **tunit, /* O - value of TUNITn keyword for each column */
char *extnm, /* O - value of EXTNAME keyword, if any */
int *status) /* IO - error status */
/*
Get keywords from the Header of the ASCII TaBle:
Check that the keywords conform to the FITS standard and return the
parameters which describe the table.
*/
{
int ii, maxf, nfound, tstatus;
long fields;
char name[FLEN_KEYWORD], value[FLEN_VALUE], comm[FLEN_COMMENT];
char xtension[FLEN_VALUE], message[FLEN_ERRMSG];
LONGLONG llnaxis1, llnaxis2, pcount;
if (*status > 0)
return(*status);
/* read the first keyword of the extension */
ffgkyn(fptr, 1, name, value, comm, status);
if (!strcmp(name, "XTENSION"))
{
if (ffc2s(value, xtension, status) > 0) /* get the value string */
{
ffpmsg("Bad value string for XTENSION keyword:");
ffpmsg(value);
return(*status);
}
/* allow the quoted string value to begin in any column and */
/* allow any number of trailing blanks before the closing quote */
if ( (value[0] != '\'') || /* first char must be a quote */
( strcmp(xtension, "TABLE") ) )
{
snprintf(message, FLEN_ERRMSG,
"This is not a TABLE extension: %s", value);
ffpmsg(message);
return(*status = NOT_ATABLE);
}
}
else /* error: 1st keyword of extension != XTENSION */
{
snprintf(message, FLEN_ERRMSG,
"First keyword of the extension is not XTENSION: %s", name);
ffpmsg(message);
return(*status = NO_XTENSION);
}
if (ffgttb(fptr, &llnaxis1, &llnaxis2, &pcount, &fields, status) > 0)
return(*status);
if (naxis1)
*naxis1 = llnaxis1;
if (naxis2)
*naxis2 = llnaxis2;
if (pcount != 0)
{
snprintf(message, FLEN_ERRMSG, "PCOUNT = %.0f is illegal in ASCII table; must = 0",
(double) pcount);
ffpmsg(message);
return(*status = BAD_PCOUNT);
}
if (tfields)
*tfields = fields;
if (maxfield < 0)
maxf = fields;
else
maxf = minvalue(maxfield, fields);
if (maxf > 0)
{
for (ii = 0; ii < maxf; ii++)
{ /* initialize optional keyword values */
if (ttype)
*ttype[ii] = '\0';
if (tunit)
*tunit[ii] = '\0';
}
if (ttype)
ffgkns(fptr, "TTYPE", 1, maxf, ttype, &nfound, status);
if (tunit)
ffgkns(fptr, "TUNIT", 1, maxf, tunit, &nfound, status);
if (*status > 0)
return(*status);
if (tbcol)
{
ffgknjj(fptr, "TBCOL", 1, maxf, tbcol, &nfound, status);
if (*status > 0 || nfound != maxf)
{
ffpmsg(
"Required TBCOL keyword(s) not found in ASCII table header (ffghtbll).");
return(*status = NO_TBCOL);
}
}
if (tform)
{
ffgkns(fptr, "TFORM", 1, maxf, tform, &nfound, status);
if (*status > 0 || nfound != maxf)
{
ffpmsg(
"Required TFORM keyword(s) not found in ASCII table header (ffghtbll).");
return(*status = NO_TFORM);
}
}
}
if (extnm)
{
extnm[0] = '\0';
tstatus = *status;
ffgkys(fptr, "EXTNAME", extnm, comm, status);
if (*status == KEY_NO_EXIST)
*status = tstatus; /* keyword not required, so ignore error */
}
return(*status);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
movq 0x240(%rsp), %r15
movl (%r15), %eax
testl %eax, %eax
jg 0x7177d
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movl %esi, 0x1c(%rsp)
movq %r9, 0x20(%rsp)
leaq 0x190(%rsp), %r14
leaq 0xa0(%rsp), %rcx
leaq 0x140(%rsp), %r8
movq %rdi, %rbp
movl $0x1, %esi
movq %r14, %rdx
movq %r15, %r9
callq 0x6ed84
movabsq $0x4e4f49534e455458, %rax # imm = 0x4E4F49534E455458
xorq (%r14), %rax
movzbl 0x8(%r14), %ecx
orq %rax, %rcx
je 0x716dd
leaq 0x675aa(%rip), %rdx # 0xd8c52
leaq 0x40(%rsp), %rbx
leaq 0x190(%rsp), %rcx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movl $0xe1, (%r15)
movl $0xe1, %eax
jmp 0x7177d
movq %rbp, %r14
leaq 0xa0(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
movq %r15, %rdx
callq 0x3c9a1
testl %eax, %eax
jle 0x7171a
leaq 0x650d6(%rip), %rdi # 0xd67d9
callq 0x37264
leaq 0xa0(%rsp), %rdi
callq 0x37264
movl (%r15), %eax
jmp 0x7177d
cmpb $0x27, 0xa0(%rsp)
jne 0x7173f
movl $0x4c424154, %eax # imm = 0x4C424154
xorl 0xf0(%rsp), %eax
movzwl 0xf4(%rsp), %ecx
xorl $0x45, %ecx
orl %eax, %ecx
je 0x7178f
leaq 0x674ea(%rip), %rdx # 0xd8c30
leaq 0x40(%rsp), %rbx
leaq 0xa0(%rsp), %rcx
movl $0x51, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movq 0x240(%rsp), %rax
movl $0xe2, (%rax)
movl $0xe2, %eax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r14, %rdi
movq 0x240(%rsp), %r15
movq %r15, %r9
callq 0x713fa
testl %eax, %eax
jg 0x71715
testq %rbx, %rbx
je 0x717cb
movq 0x38(%rsp), %rax
movq %rax, (%rbx)
testq %r13, %r13
movq 0x20(%rsp), %r10
je 0x717de
movq 0x30(%rsp), %rax
movq %rax, (%r13)
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x71828
cvtsi2sd %rax, %xmm0
leaq 0x67491(%rip), %rdx # 0xd8c85
leaq 0x40(%rsp), %rbx
movl $0x51, %esi
movq %rbx, %rdi
movb $0x1, %al
callq 0x60b0
movq %rbx, %rdi
callq 0x37264
movq 0x240(%rsp), %rax
movl $0xd6, (%rax)
movl $0xd6, %eax
jmp 0x7177d
testq %r12, %r12
je 0x71835
movl 0x10(%rsp), %eax
movl %eax, (%r12)
movl 0x1c(%rsp), %eax
testl %eax, %eax
movq 0x240(%rsp), %r8
js 0x71856
movl %eax, %r12d
movq 0x10(%rsp), %rax
cmpq %r12, %rax
cmovlq %rax, %r12
jmp 0x7185b
movq 0x10(%rsp), %r12
testl %r12d, %r12d
jle 0x71993
movq 0x230(%rsp), %rbx
movq 0x228(%rsp), %r13
movq 0x220(%rsp), %rbp
movl %r12d, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %ecx, %ecx
testq %r10, %r10
je 0x71892
movq (%r10,%rcx,8), %rdx
movb $0x0, (%rdx)
testq %rbx, %rbx
je 0x7189e
movq (%rbx,%rcx,8), %rdx
movb $0x0, (%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x71886
testq %r10, %r10
je 0x718d6
movq %r8, (%rsp)
leaq 0x5a7ae(%rip), %rsi # 0xcc064
leaq 0x40(%rsp), %r9
movq %r14, %rdi
movl $0x1, %edx
movl %r12d, %ecx
movq %r10, %r8
callq 0x6ee66
movq 0x240(%rsp), %r8
testq %rbx, %rbx
je 0x71906
movq %r8, (%rsp)
leaq 0x5d261(%rip), %rsi # 0xceb47
leaq 0x40(%rsp), %r9
movq %r14, %rdi
movl $0x1, %edx
movl %r12d, %ecx
movq %rbx, %r8
callq 0x6ee66
movq 0x240(%rsp), %r8
movl (%r8), %eax
testl %eax, %eax
jg 0x7177d
testq %rbp, %rbp
je 0x71956
movq %r8, (%rsp)
leaq 0x5cf8d(%rip), %rsi # 0xce8ae
leaq 0x40(%rsp), %r9
movq %r14, %rdi
movl $0x1, %edx
movl %r12d, %ecx
movq %rbp, %r8
callq 0x6f632
movq 0x240(%rsp), %r8
cmpl $0x0, (%r8)
jg 0x719e5
cmpl %r12d, 0x40(%rsp)
jne 0x719e5
testq %r13, %r13
je 0x71993
movq %r8, (%rsp)
leaq 0x5cf66(%rip), %rsi # 0xce8cc
leaq 0x40(%rsp), %r9
movq %r14, %rdi
movl $0x1, %edx
movl %r12d, %ecx
movq %r13, %r8
callq 0x6ee66
movq 0x240(%rsp), %r8
cmpl $0x0, (%r8)
jg 0x71a04
cmpl %r12d, 0x40(%rsp)
jne 0x71a04
movq 0x238(%rsp), %rdx
testq %rdx, %rdx
je 0x719dd
movb $0x0, (%rdx)
movl (%r8), %ebx
leaq 0x59ed5(%rip), %rsi # 0xcb882
leaq 0x140(%rsp), %rcx
movq %r14, %rdi
callq 0x6dd0a
movq 0x240(%rsp), %r15
movl (%r15), %eax
cmpl $0xca, %eax
jne 0x7177d
movl %ebx, (%r15)
movl %ebx, %eax
jmp 0x7177d
movl (%r8), %eax
jmp 0x7177d
leaq 0x67353(%rip), %rdi # 0xd8d3f
movq %r8, %rbx
callq 0x37264
movl $0xe7, (%rbx)
movl $0xe7, %eax
jmp 0x7177d
leaq 0x6737a(%rip), %rdi # 0xd8d85
movq %r8, %rbx
callq 0x37264
movl $0xe8, (%rbx)
movl $0xe8, %eax
jmp 0x7177d
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffgtkn | int ffgtkn(fitsfile *fptr, /* I - FITS file pointer */
int numkey, /* I - number of the keyword to read */
char *name, /* I - expected name of the keyword */
long *value, /* O - integer value of the keyword */
int *status) /* IO - error status */
{
/*
test that keyword number NUMKEY has the expected name and get the
integer value of the keyword. Return an error if the keyword
name does not match the input name, or if the value of the
keyword is not a positive integer.
*/
char keyname[FLEN_KEYWORD], valuestring[FLEN_VALUE];
char comm[FLEN_COMMENT], message[FLEN_ERRMSG];
if (*status > 0)
return(*status);
keyname[0] = '\0';
valuestring[0] = '\0';
if (ffgkyn(fptr, numkey, keyname, valuestring, comm, status) <= 0)
{
if (strcmp(keyname, name) )
*status = BAD_ORDER; /* incorrect keyword name */
else
{
ffc2ii(valuestring, value, status); /* convert to integer */
if (*status > 0 || *value < 0 )
*status = NOT_POS_INT;
}
if (*status > 0)
{
snprintf(message, FLEN_ERRMSG,
"ffgtkn found unexpected keyword or value for keyword no. %d.",
numkey);
ffpmsg(message);
snprintf(message, FLEN_ERRMSG,
" Expected positive integer keyword %s, but instead", name);
ffpmsg(message);
snprintf(message, FLEN_ERRMSG,
" found keyword %s with value %s", keyname, valuestring);
ffpmsg(message);
}
}
return(*status);
} | movl (%r8), %eax
testl %eax, %eax
jle 0x7212d
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
xorl %eax, %eax
leaq 0x50(%rsp), %rdx
movb %al, (%rdx)
movq %rsp, %rcx
movb %al, (%rcx)
leaq 0xa0(%rsp), %r8
movq %rbx, %r9
callq 0x6ed84
testl %eax, %eax
jg 0x7220e
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x6420
movl $0xd0, %ecx
testl %eax, %eax
jne 0x7219d
movq %rsp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3a10c
movl $0xd1, %ecx
cmpl $0x0, (%rbx)
jle 0x7221e
movl %ecx, (%rbx)
leaq 0x67030(%rip), %rdx # 0xd91d6
leaq 0xf0(%rsp), %r15
movl $0x51, %esi
movq %r15, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x60b0
movq %r15, %rdi
callq 0x37264
leaq 0x67045(%rip), %rdx # 0xd9213
movl $0x51, %esi
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x60b0
movq %r15, %rdi
callq 0x37264
leaq 0x67057(%rip), %rdx # 0xd9246
leaq 0x50(%rsp), %rcx
movq %rsp, %r8
movl $0x51, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x60b0
movq %r15, %rdi
callq 0x37264
movl (%rbx), %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, (%r15)
jns 0x7220e
jmp 0x7219d
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/getkey.c |
ffgtnm | int ffgtnm(fitsfile *gfptr, /* FITS file pointer to grouping table */
long *nmembers, /* member count of the groping table */
int *status) /* return status code */
/*
return the number of member HDUs in a grouping table. The fitsfile pointer
gfptr must be positioned with the grouping table as the CHDU. The number
of grouping table member HDUs is just the NAXIS2 value of the grouping
table.
*/
{
char keyvalue[FLEN_VALUE];
char comment[FLEN_COMMENT];
if(*status != 0) return(*status);
*status = fits_read_keyword(gfptr,"EXTNAME",keyvalue,comment,status);
if(*status == KEY_NO_EXIST)
*status = NOT_GROUP_TABLE;
else
{
prepare_keyvalue(keyvalue);
if(fits_strcasecmp(keyvalue,"GROUPING") != 0)
{
*status = NOT_GROUP_TABLE;
ffpmsg("Specified HDU is not a Grouping table (ffgtnm)");
}
*status = fits_read_key_lng(gfptr,"NAXIS2",nmembers,comment,status);
}
return(*status);
} | movl (%rdx), %eax
testl %eax, %eax
je 0x737a5
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x580bf(%rip), %rsi # 0xcb882
movq %rsp, %rdx
leaq 0x50(%rsp), %rcx
movq %rbx, %r8
callq 0x6e02a
movl %eax, %ecx
movl %eax, (%rbx)
movl $0x154, %eax # imm = 0x154
cmpl $0xca, %ecx
je 0x7382e
movq %rsp, %r12
movq %r12, %rdi
callq 0x767e3
leaq 0x65d07(%rip), %rsi # 0xd94fd
movq %r12, %rdi
callq 0x43694
testl %eax, %eax
je 0x73814
movl $0x154, (%rbx) # imm = 0x154
leaq 0x66131(%rip), %rdi # 0xd9940
callq 0x37264
leaq 0x68e0e(%rip), %rsi # 0xdc629
leaq 0x50(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %r8
callq 0x6ec9d
movl %eax, (%rbx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /Helioviewer-Project[P]fits2img/support/cfitsio/cfitsio-4.6.2/group.c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.