LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tar.c
// Function: destroy_pmd
static void destroy_pmd(deark *c, struct phys_member_data *pmd)
{
	if(!pmd) return;
	ucstring_destroy(pmd->name);
	de_destroy_stringreaderdata(c, pmd->linkname);
	ucstring_destroy(pmd->prefix);
	de_free(c, pmd);
}

// Assembly:
testq %rsi, %rsi
je 0xc8d8b
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdi
callq 0xf6753
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0xefaca
movq 0x40(%rbx), %rdi
callq 0xf6753
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tar.c
// Function: read_ascii_octal_number
static int read_ascii_octal_number(dbuf *f, i64 pos, i64 fieldsize,
	i64 *value)
{
	u8 b1;
	b1 = dbuf_getbyte(f, pos);

	if(b1<0x80) {
		// The usual ASCII-octal format
		return dbuf_read_ascii_number(f, pos, fieldsize, 8, value);
	}

	// "base-256" or some other special format
	if(b1==0x80) { // positive base-256 number
		*value = dbuf_getint_ext(f, pos+1, (unsigned int)(fieldsize-1), 0, 0);
		return 1;
	}
	else if(b1==0xff) { // negative base-256 number
		*value = dbuf_getint_ext(f, pos+1, (unsigned int)(fieldsize-1), 0, 1);
		return 1;
	}

	*value = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xeead3
testb %al, %al
js 0xc937a
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x8, %ecx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xef3d9
cmpb $-0x1, %al
je 0xc93ab
movzbl %al, %eax
cmpl $0x80, %eax
jne 0xc93d1
incq %r15
decl %r14d
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xef0f6
movq %rax, (%rbx)
movl $0x1, %ebp
jmp 0xc93da
incq %r15
decl %r14d
movl $0x1, %ebp
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xef0f6
movq %rax, (%rbx)
jmp 0xc93da
movq $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tar.c
// Function: do_exthdr_timestamp
static void do_exthdr_timestamp(deark *c, lctx *d, struct phys_member_data *pmd,
	struct exthdr_item *ehi, struct extattr_data *ea, int tsidx, const char *name)
{
	double val_dbl;
	double val_frac;
	i64 val_int;
	char timestamp_buf[64];

	if(ehi->val_len<1) return;

	// TODO: There is probably more roundoff error here than there needs to be.
	val_dbl = de_strtod(ehi->value->sz, NULL);
	if(val_dbl > 0.0) {
		val_int = (i64)val_dbl;
		val_frac = val_dbl - (double)val_int;
	}
	else {
		val_int = (i64)val_dbl;
		val_frac = 0.0;
	}

	de_unix_time_to_timestamp(val_int, &ea->alt_timestamps[tsidx], 0x1);
	if(val_frac > 0.0) {
		de_timestamp_set_subsec(&ea->alt_timestamps[tsidx], val_frac);
	}

	de_dbg_timestamp_to_string(c, &ea->alt_timestamps[tsidx],
		timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "%s: %s", name, timestamp_buf);
}

// Assembly:
cmpq $0x0, 0x38(%rsi)
jle 0xc94a5
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %r14
movq 0x48(%rsi), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x18090
cvttsd2si %xmm0, %rdi
cvtsi2sd %rdi, %xmm2
xorpd %xmm1, %xmm1
cmpltsd %xmm0, %xmm1
subsd %xmm2, %xmm0
andpd %xmm1, %xmm0
movapd %xmm0, (%rsp)
movl %ebp, %eax
shlq $0x4, %rax
addq %rax, %r15
addq $0x20, %r15
movq %r15, %rsi
movl $0x1, %edx
callq 0xea7f5
movapd (%rsp), %xmm0
ucomisd 0x69953(%rip), %xmm0    # 0x132db0
jbe 0xc9467
movq %r15, %rdi
callq 0xea849
leaq 0x10(%rsp), %r12
movl $0x40, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xeb0d6
leaq 0x7fef9(%rip), %rsi     # 0x149382
movq %r14, %rdi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe8617
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tga.c
// Function: de_module_tga
void de_module_tga(deark *c, struct deark_module_info *mi)
{
	mi->id = "tga";
	mi->desc = "Truevision TGA, a.k.a. TARGA";
	mi->run_fn = de_run_tga;
	mi->identify_fn = de_identify_tga;
	mi->help_fn = de_help_tga;
}

// Assembly:
leaq 0x72a4d(%rip), %rax     # 0x13befc
movq %rax, (%rsi)
leaq 0x72a47(%rip), %rax     # 0x13bf00
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc94df
movq %rax, 0x18(%rsi)
leaq 0x1296(%rip), %rax      # 0xca765
movq %rax, 0x20(%rsi)
leaq 0x13d7(%rip), %rax      # 0xca8b1
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tga.c
// Function: de_identify_tga
static int de_identify_tga(deark *c)
{
	u8 b[18];
	u8 x;
	int has_tga_ext;
	i64 v2_footer_pos = 0;

	// TGA v1 format has no signature, but there are only a few common types of
	// it. We'll at least try to identify anything that we support.
	de_read(b, 0, 18);

	if(b[1]>1) return 0; // Color map type should be 0 or 1.

	if(b[12]==0 && b[13]==0) return 0; // Width can't be 0.
	if(b[14]==0 && b[15]==0) return 0; // Height can't be 0.

	if(look_for_v2_signature(c, 1, &v2_footer_pos)) {
		return 100;
	}

	// 0 is valid here, but it means "no image", and we need all the
	// can't-be-0 bytes we can find...
	if(b[2]==0) {
		// ...except that we have to allow 0 in .vst format.
		// TODO: .vst should maybe be a separate module.
		if((UI)de_getu32be(20)!=CODE_IGCH) {
			return 0;
		}
	}
	else if(b[2]==1 || b[2]==2 || b[2]==3 ||
		b[2]==9 || b[2]==10 || b[2]==11 || b[2]==32 || b[2]==33)
	{
		;
	}
	else {
		return 0; // Unknown image type
	}

	// bits/pixel:
	if(b[16]!=1 && b[16]!=8 && b[16]!=15 && b[16]!=16 && b[16]!=24 && b[16]!=32) return 0;

	// Bits per palette entry. Supposed to be 0 if there is no palette, but
	// in practice it may be 24 instead.
	if((b[1]==0 && b[7]==0) || b[7]==15 || b[7]==16 || b[7]==24 || b[7]==32) {
		;
	}
	else {
		return 0;
	}

	has_tga_ext = de_input_file_has_ext(c, "tga");

	x = b[17]&0x0f; // Number of attribute bits
	if(x!=0 && x!=1 && x!=8 && !has_tga_ext) return 0;

	if(has_tga_ext) {
		return 100;
	}
	if(de_input_file_has_ext(c, "vst")) {
		return 40;
	}
	return 8;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rsp, %r14
movl $0x12, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xee8d4
cmpb $0x1, 0x1(%r14)
ja 0xca7a1
movb 0xd(%rsp), %al
orb 0xc(%rsp), %al
je 0xca7a1
movb 0xf(%rsp), %al
orb 0xe(%rsp), %al
jne 0xca7ae
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0xcaf0d
movl $0x64, %ebp
testl %eax, %eax
jne 0xca7a3
movzbl 0x2(%rsp), %eax
cmpq $0x21, %rax
ja 0xca7a1
movabsq $0x300000e0e, %rcx      # imm = 0x300000E0E
btq %rax, %rcx
jae 0xca88a
movzbl 0x10(%rsp), %eax
cmpq $0x20, %rax
ja 0xca7a1
movabsq $0x101018102, %rcx      # imm = 0x101018102
btq %rax, %rcx
jae 0xca7a1
movb 0x7(%rsp), %al
movb 0x1(%rsp), %cl
orb %al, %cl
je 0xca82d
movzbl %al, %eax
cmpl $0x20, %eax
ja 0xca7a1
movl %eax, %eax
movabsq $0x101018000, %rcx      # imm = 0x101018000
btq %rax, %rcx
jae 0xca7a1
leaq 0x716c8(%rip), %rsi     # 0x13befc
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
jne 0xca7a3
movzbl 0x11(%rsp), %eax
andl $0xf, %eax
cmpl $0x8, %eax
ja 0xca7a1
movl $0x103, %ecx            # imm = 0x103
btl %eax, %ecx
movl $0x0, %ebp
jae 0xca7a3
leaq 0x71dc3(%rip), %rsi     # 0x13c632
movq %rbx, %rdi
callq 0xea491
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
shll $0x5, %ebp
orl $0x8, %ebp
jmp 0xca7a3
testq %rax, %rax
jne 0xca7a1
movq 0x18(%rbx), %rdi
movl $0x14, %esi
callq 0xeed0d
cmpl $0x49474348, %eax       # imm = 0x49474348
jne 0xca7a1
jmp 0xca7e8
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tga.c
// Function: look_for_v2_signature
static int look_for_v2_signature(deark *c, int idmode, i64 *pfooterpos)
{
	i64 x;
	i64 possible_sig_pos;
	static const u8 v2sig[18] = "TRUEVISION-XFILE."; // size 18 includes trailing NUL

	if(c->infile->len<18+26) return 0;
	if(de_getbyte(c->infile->len-1) != 0x00) return 0;
	possible_sig_pos = c->infile->len-18;
	if(!dbuf_memcmp(c->infile, possible_sig_pos, v2sig, 18)) {
		*pfooterpos = possible_sig_pos-8;
		return 1;
	}
	if(idmode) return 0;

	x = find_last_nonNUL_byte_for_sig_search(c);
	if(x<=0) return 0;
	possible_sig_pos = x-16;
	if(!dbuf_memcmp(c->infile, possible_sig_pos, v2sig, 18)) {
		de_warn(c, "v2 signature found at %"I64_FMT"; ignoring %"I64_FMT" extra "
			"bytes at end of file",
			possible_sig_pos, c->infile->len-(possible_sig_pos+18));
		*pfooterpos = possible_sig_pos-8;
		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movl %esi, %r15d
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x18(%rdi), %rsi
xorl %ebp, %ebp
cmpq $0x2c, %rsi
jl 0xcaf43
movq %rdx, %rbx
decq %rsi
callq 0xeead3
testb %al, %al
je 0xcaf57
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %r12
leaq -0x12(%r12), %rsi
leaq 0x70f25(%rip), %rdx     # 0x13be90
movl $0x12, %ecx
callq 0xefc85
testl %eax, %eax
je 0xcafbc
testl %r15d, %r15d
jne 0xcaf43
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %r12
leaq -0x812(%r12), %rdx
movq %rsp, %rsi
movl $0x812, %ecx            # imm = 0x812
callq 0xee8d4
xorl %r13d, %r13d
movzbl 0x811(%rsp,%r13), %eax
testl %eax, %eax
jne 0xcafcd
decq %r13
cmpq $-0x812, %r13           # imm = 0xF7EE
jne 0xcaf9e
jmp 0xcb03e
addq $-0x1a, %r12
movq %r12, (%rbx)
movl $0x1, %ebp
jmp 0xcaf43
cmpl $0x2e, %eax
jne 0xcb03e
leaq (%r12,%r13), %rax
decq %rax
xorl %ebp, %ebp
testq %rax, %rax
jle 0xcaf43
leaq (%r12,%r13), %r15
addq $-0x11, %r15
movq 0x18(%r14), %rdi
leaq 0x70e99(%rip), %rdx     # 0x13be90
movl $0x12, %ecx
movq %r15, %rsi
callq 0xefc85
testl %eax, %eax
jne 0xcaf43
movq 0x18(%r14), %rax
movq %r12, %rcx
notq %rcx
addq 0x18(%rax), %rcx
subq %r13, %rcx
leaq 0x7100e(%rip), %rsi     # 0x13c032
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8faa
leaq (%r12,%r13), %rax
addq $-0x19, %rax
movq %rax, (%rbx)
jmp 0xcafc3
xorl %ebp, %ebp
jmp 0xcaf43
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tga.c
// Function: do_read_image_descriptor
static void do_read_image_descriptor(deark *c, lctx *d)
{
	d->image_descriptor = de_getbyte(17);
	de_dbg(c, "descriptor: 0x%02x", (UI)d->image_descriptor);

	de_dbg_indent(c, 1);
	d->num_attribute_bits = (i64)(d->image_descriptor & 0x0f);
	de_dbg(c, "number of %s bits: %d",
		d->file_format==FMT_VST?"alpha channel":"attribute",
		(int)d->num_attribute_bits);

	d->right_to_left = (d->image_descriptor>>4)&0x01;
	d->top_down = (d->image_descriptor>>5)&0x01;
	de_dbg(c, "right-to-left flag: %d", (int)d->right_to_left);
	de_dbg(c, "top-down flag: %d", (int)d->top_down);

	d->interleave_mode = d->image_descriptor >> 6;
	if(d->interleave_mode != 0) {
		de_dbg(c, "interleaving: %d", (int)d->interleave_mode);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl $0x11, %esi
callq 0xeead3
movb %al, 0x78(%r14)
movzbl %al, %edx
leaq 0x5753b(%rip), %rsi     # 0x1225a6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movzbl 0x78(%r14), %ecx
andl $0xf, %ecx
movq %rcx, 0x80(%r14)
cmpl $0x1, 0xc(%r14)
leaq 0x70ffe(%rip), %rax     # 0x13c09b
leaq 0x71005(%rip), %rdx     # 0x13c0a9
cmoveq %rax, %rdx
leaq 0x70fd6(%rip), %rsi     # 0x13c085
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x78(%r14), %eax
movl %eax, %edx
shrl $0x4, %edx
andl $0x1, %edx
movb %dl, 0x8b(%r14)
shrb $0x5, %al
andb $0x1, %al
movb %al, 0x8a(%r14)
leaq 0x70fd4(%rip), %rsi     # 0x13c0b3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movzbl 0x8a(%r14), %edx
leaq 0x70fd2(%rip), %rsi     # 0x13c0ca
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movzbl 0x78(%r14), %eax
movl %eax, %edx
shrl $0x6, %edx
movb %dl, 0x8c(%r14)
cmpl $0x40, %eax
jb 0xcb129
leaq 0x70fbd(%rip), %rsi     # 0x13c0dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8a15
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: de_module_tiff
void de_module_tiff(deark *c, struct deark_module_info *mi)
{
	mi->id = "tiff";
	mi->desc = "TIFF image";
	mi->run_fn = de_run_tiff;
	mi->identify_fn = de_identify_tiff;
	mi->help_fn = de_help_tiff;
}

// Assembly:
leaq 0x7f349(%rip), %rax     # 0x14a490
movq %rax, (%rsi)
leaq 0x7185f(%rip), %rax     # 0x13c9b0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xcb177
movq %rax, 0x18(%rsi)
leaq 0x1dcd(%rip), %rax      # 0xccf34
movq %rax, 0x20(%rsi)
leaq 0x1dd9(%rip), %rax      # 0xccf4b
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: de_identify_tiff_internal
static int de_identify_tiff_internal(deark *c, int *is_le)
{
	i64 byte_order_sig;
	i64 magic;
	int fmt = 0;

	byte_order_sig = de_getu16be(0);
	*is_le = (byte_order_sig == 0x4d4d) ? 0 : 1;

	if(*is_le)
		magic = de_getu16le(2);
	else
		magic = de_getu16be(2);

	if(byte_order_sig==0x4550 && magic==0x002a) {
		fmt = DE_TIFFFMT_MDI;
	}
	else if(byte_order_sig==0x4d4d || byte_order_sig==0x4949) {

		switch(magic) {
		case 0x002a: // Standard TIFF
			fmt = DE_TIFFFMT_TIFF;
			break;
		case 0x002b:
			fmt = DE_TIFFFMT_BIGTIFF;
			break;
		case 0x0055:
			fmt = DE_TIFFFMT_PANASONIC;
			break;

		case 0x01bc: // JPEG-XR
			fmt = DE_TIFFFMT_JPEGXR;
			break;

		//case 0x314e: // NIFF

		case 0x4352:
			fmt = DE_TIFFFMT_DCP;
			break;
		case 0x4f52:
		case 0x5352:
			fmt = DE_TIFFFMT_ORF;
			break;
		}
	}

	return fmt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xeeb67
movq %rax, %rbx
xorl %eax, %eax
cmpq $0x4d4d, %rbx           # imm = 0x4D4D
setne %al
movl %eax, (%r14)
movq 0x18(%r15), %rdi
movl $0x2, %esi
je 0xccfe7
callq 0xeebc8
movq %rax, %rcx
movq %rbx, %rdx
xorq $0x4550, %rdx           # imm = 0x4550
movq %rax, %rsi
xorq $0x2a, %rsi
movl $0x6, %eax
orq %rdx, %rsi
je 0xcd061
xorl %eax, %eax
cmpq $0x4949, %rbx           # imm = 0x4949
je 0xccfef
jmp 0xcd061
callq 0xeeb67
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x1bb, %rcx            # imm = 0x1BB
jle 0xcd01c
cmpq $0x4f51, %rcx           # imm = 0x4F51
jg 0xcd035
cmpq $0x1bc, %rcx            # imm = 0x1BC
je 0xcd055
cmpq $0x4352, %rcx           # imm = 0x4352
jne 0xcd061
movl $0x5, %eax
jmp 0xcd061
cmpq $0x2a, %rcx
je 0xcd04e
cmpq $0x2b, %rcx
je 0xcd05c
cmpq $0x55, %rcx
jne 0xcd061
movl $0x3, %eax
jmp 0xcd061
cmpq $0x4f52, %rcx           # imm = 0x4F52
je 0xcd047
cmpq $0x5352, %rcx           # imm = 0x5352
jne 0xcd061
movl $0x4, %eax
jmp 0xcd061
movl $0x1, %eax
jmp 0xcd061
movl $0x7, %eax
jmp 0xcd061
movl $0x2, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: detiff_warn
static void detiff_warn(deark *c, lctx *d, struct page_ctx *pg, const char *fmt, ...)
{
	va_list ap;
	char buf[256];

	va_start(ap, fmt);
	if(d->errmsgtoken_module[0] && pg) {
		de_vsnprintf(buf, sizeof(buf), fmt, ap);
		de_warn(c, "[%s:%s] %s", d->errmsgtoken_module, pg->errmsgtoken_ifd, buf);
	}
	else if(d->errmsgtoken_module[0]) {
		de_vsnprintf(buf, sizeof(buf), fmt, ap);
		de_warn(c, "[%s] %s", d->errmsgtoken_module, buf);
	}
	else if(pg) {
		de_vsnprintf(buf, sizeof(buf), fmt, ap);
		de_warn(c, "[%s] %s", pg->errmsgtoken_ifd, buf);
	}
	else {
		de_vwarn(c, fmt, ap);
	}
	va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x120(%rsp), %rdx
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0xcd0d2
movaps %xmm0, 0x150(%rsp)
movaps %xmm1, 0x160(%rsp)
movaps %xmm2, 0x170(%rsp)
movaps %xmm3, 0x180(%rsp)
movaps %xmm4, 0x190(%rsp)
movaps %xmm5, 0x1a0(%rsp)
movaps %xmm6, 0x1b0(%rsp)
movaps %xmm7, 0x1c0(%rsp)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rsp)
leaq 0x200(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movb 0x7c(%rsi), %al
addq $0x7c, %r15
testb %al, %al
sete %dl
testq %r14, %r14
sete %sil
orb %dl, %sil
jne 0xcd148
leaq 0x20(%rsp), %r12
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6f9d4(%rip), %rsi     # 0x13cb07
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xe8faa
jmp 0xcd1b7
testb %al, %al
je 0xcd179
leaq 0x20(%rsp), %r14
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
leaq 0x6f9a4(%rip), %rsi     # 0x13cb12
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
jmp 0xcd1b0
testq %r14, %r14
je 0xcd1c6
leaq 0x20(%rsp), %r15
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6f96b(%rip), %rsi     # 0x13cb12
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe8faa
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xe9319
jmp 0xcd1b7
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: push_ifd
static void push_ifd(deark *c, lctx *d, i64 ifdpos, u8 ifdtype, u8 is_in_main_ifd_list)
{
	if(ifdpos==0) return;

	if(ifdpos < 0 || ifdpos >= c->infile->len) {
		detiff_warn(c, d, NULL, "Invalid IFD offset: %"I64_FMT, ifdpos);
		return;
	}

	// Append to the IFD list (of all IFDs). This is only used for loop detection.
	if(!d->ifds_seen) {
		d->ifds_seen = de_inthashtable_create(c);
	}
	if(d->ifd_count >= MAX_IFDS) {
		detiff_warn(c, d, NULL, "Too many TIFF IFDs");
		return;
	}
	if(!de_inthashtable_add_item(c, d->ifds_seen, ifdpos, NULL)) {
		detiff_err(c, d, NULL, "IFD loop detected");
		return;
	}
	d->ifd_count++;

	// Add to the IFD stack (of unprocessed IFDs).
	if(!d->ifdstack) {
		d->ifdstack_capacity = 200;
		d->ifdstack = de_mallocarray(c, d->ifdstack_capacity, sizeof(struct ifdstack_item));
		d->ifdstack_numused = 0;
	}
	if(d->ifdstack_numused >= d->ifdstack_capacity) {
		detiff_warn(c, d, NULL, "Too many TIFF IFDs");
		return;
	}
	d->ifdstack[d->ifdstack_numused].offset = ifdpos;
	d->ifdstack[d->ifdstack_numused].ifdtype = ifdtype;
	d->ifdstack[d->ifdstack_numused].is_in_main_ifd_list = is_in_main_ifd_list;
	d->ifdstack_numused++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0xcd2cd
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
js 0xcd249
movq 0x18(%r14), %rax
cmpq %r15, 0x18(%rax)
jle 0xcd249
movl %r8d, %ebp
movl %ecx, %r12d
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
jne 0xcd21a
movq %r14, %rdi
callq 0xeb2a9
movq %rax, %rsi
movq %rax, 0x40(%rbx)
cmpl $0x3e8, 0x48(%rbx)      # imm = 0x3E8
jge 0xcd2d6
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xeb3ad
testl %eax, %eax
je 0xcd26a
incl 0x48(%rbx)
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xcd288
movl 0x34(%rbx), %ecx
jmp 0xcd2ae
leaq 0x6f921(%rip), %rcx     # 0x13cb71
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r15, %r8
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcd067
leaq 0x6f92b(%rip), %rcx     # 0x13cb9c
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcd338
movl $0xc8, 0x30(%rbx)
movl $0xc8, %esi
movl $0x10, %edx
movq %r14, %rdi
callq 0xe96f7
movq %rax, 0x28(%rbx)
movl $0x0, 0x34(%rbx)
xorl %ecx, %ecx
cmpl 0x30(%rbx), %ecx
jge 0xcd2d6
movslq %ecx, %rdx
shlq $0x4, %rdx
movq %r15, (%rax,%rdx)
movb %r12b, 0x8(%rax,%rdx)
movb %bpl, 0x9(%rax,%rdx)
incl %ecx
movl %ecx, 0x34(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6f8ac(%rip), %rcx     # 0x13cb89
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcd067
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: get_u32_or_u64_count
static i64 get_u32_or_u64_count(deark *c, lctx *d, i64 pos)
{
	if(d->is_bigtiff) {
		i64 n;

		n = dbuf_geti64x(c->infile, pos, d->is_le);
		de_sanitize_count(&n);
		return n;
	}
	return dbuf_getu32x(c->infile, pos, d->is_le);
}

// Assembly:
cmpb $0x0, 0x8(%rsi)
je 0xcd328
pushq %rbx
subq $0x10, %rsp
movq 0x18(%rdi), %rdi
movl (%rsi), %eax
movq %rdx, %rsi
movl %eax, %edx
callq 0xef065
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0xebad2
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
movq 0x18(%rdi), %rdi
movl (%rsi), %eax
movq %rdx, %rsi
movl %eax, %edx
jmp 0xeeff3
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: detiff_err
static void detiff_err(deark *c, lctx *d, struct page_ctx *pg, const char *fmt, ...)
{
	va_list ap;
	char buf[256];

	va_start(ap, fmt);
	if(d->errmsgtoken_module[0] && pg) {
		de_vsnprintf(buf, sizeof(buf), fmt, ap);
		de_err(c, "[%s:%s] %s", d->errmsgtoken_module, pg->errmsgtoken_ifd, buf);
	}
	else if(d->errmsgtoken_module[0]) {
		de_vsnprintf(buf, sizeof(buf), fmt, ap);
		de_err(c, "[%s] %s", d->errmsgtoken_module, buf);
	}
	else if(pg) {
		de_vsnprintf(buf, sizeof(buf), fmt, ap);
		de_err(c, "[%s] %s", pg->errmsgtoken_ifd, buf);
	}
	else {
		de_verr(c, fmt, ap);
	}
	va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x120(%rsp), %rdx
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0xcd3a3
movaps %xmm0, 0x150(%rsp)
movaps %xmm1, 0x160(%rsp)
movaps %xmm2, 0x170(%rsp)
movaps %xmm3, 0x180(%rsp)
movaps %xmm4, 0x190(%rsp)
movaps %xmm5, 0x1a0(%rsp)
movaps %xmm6, 0x1b0(%rsp)
movaps %xmm7, 0x1c0(%rsp)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rsp)
leaq 0x200(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movb 0x7c(%rsi), %al
addq $0x7c, %r15
testb %al, %al
sete %dl
testq %r14, %r14
sete %sil
orb %dl, %sil
jne 0xcd419
leaq 0x20(%rsp), %r12
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6f703(%rip), %rsi     # 0x13cb07
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xe9295
jmp 0xcd488
testb %al, %al
je 0xcd44a
leaq 0x20(%rsp), %r14
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
leaq 0x6f6d3(%rip), %rsi     # 0x13cb12
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
jmp 0xcd481
testq %r14, %r14
je 0xcd497
leaq 0x20(%rsp), %r15
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6f69a(%rip), %rsi     # 0x13cb12
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe9295
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xe920f
jmp 0xcd488
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_newsubfiletype
static int valdec_newsubfiletype(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	i64 n = vp->n;

	if(n<1) return 0;

	if(n&0x1) {
		ucstring_append_flags_item(vr->s, "reduced-res");
		n -= 0x1;
	}
	if(n&0x2) {
		ucstring_append_flags_item(vr->s, "one-page-of-many");
		n -= 0x2;
	}
	if(n&0x4) {
		ucstring_append_flags_item(vr->s, "mask");
		n -= 0x4;
	}
	if(n&0x10) {
		ucstring_append_flags_item(vr->s, "MRC-related");
		n -= 0x10;
	}
	if(n!=0) {
		ucstring_append_flags_itemf(vr->s, "0x%x", (unsigned int)n);
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rsi), %rbx
testq %rbx, %rbx
jle 0xcd733
movq %rdx, %r14
testb $0x1, %bl
je 0xcd6cc
movq (%r14), %rdi
leaq 0x7179a(%rip), %rsi     # 0x13ee5e
callq 0xf7105
decq %rbx
testb $0x2, %bl
je 0xcd6e4
movq (%r14), %rdi
leaq 0x7178f(%rip), %rsi     # 0x13ee6a
callq 0xf7105
addq $-0x2, %rbx
testb $0x4, %bl
je 0xcd6fc
movq (%r14), %rdi
leaq 0x7898a(%rip), %rsi     # 0x14607d
callq 0xf7105
addq $-0x4, %rbx
testb $0x10, %bl
je 0xcd714
movq (%r14), %rdi
leaq 0x71770(%rip), %rsi     # 0x13ee7b
callq 0xf7105
addq $-0x10, %rbx
movl $0x1, %ebp
testq %rbx, %rbx
je 0xcd735
movq (%r14), %rdi
leaq 0x5b6ee(%rip), %rsi     # 0x128e16
movl %ebx, %edx
xorl %eax, %eax
callq 0xf7132
jmp 0xcd735
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_oldsubfiletype
static int valdec_oldsubfiletype(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "full-res"}, {2, "reduced-res"}, {3, "one-page-of-many"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
movl $0x8, %ecx
leaq 0xbea21(%rip), %r8      # 0x18c170
leaq 0x5e9fb(%rip), %rdx     # 0x12c151
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcd766
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcd773
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xcd756
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_bitspersample
static void handler_bitspersample(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	i64 val;

	tg->pg->valcount_bitspersample = (u8)tg->valcount;
	if(tg->valcount<1) return;

	// FIXME: This is a multi-valued field.
	read_tag_value_as_int64(c, d, tg, 0, &val);
	tg->pg->bits_per_sample = (u32)val;
}

// Assembly:
movq (%rdx), %rax
movq 0x18(%rdx), %rcx
movb %cl, 0x9b(%rax)
testq %rcx, %rcx
jle 0xcd7bb
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsp, %r14
xorl %ecx, %ecx
movq %r14, %r8
callq 0xcf7bf
movl (%r14), %eax
movq (%rbx), %rcx
movl %eax, 0x28(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_compression
static int valdec_compression(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	const struct cmpr_meth_info *cmi;

	cmi = find_cmpr_meth_info((u32)vp->n);

	if(cmi && cmi->name) {
		ucstring_append_sz(vr->s, cmi->name, DE_ENCODING_UTF8);
	}
	else {
		ucstring_append_sz(vr->s, "?", DE_ENCODING_LATIN1);
	}
	return 1;
}

// Assembly:
pushq %rax
movl 0x18(%rsi), %ecx
movl $0x8, %eax
leaq 0xbe9d4(%rip), %rsi     # 0x18c1a0
cmpl %ecx, -0x8(%rax,%rsi)
je 0xcd7e0
addq $0x18, %rax
cmpq $0x320, %rax            # imm = 0x320
jne 0xcd7cc
jmp 0xcd7f3
movq (%rax,%rsi), %rsi
testq %rsi, %rsi
je 0xcd7f3
movq (%rdx), %rdi
movl $0x2, %edx
jmp 0xcd802
movq (%rdx), %rdi
leaq 0x5e954(%rip), %rsi     # 0x12c151
movl $0x5, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_threshholding
static int valdec_threshholding(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "not dithered"}, {2, "ordered dither"}, {3, "error diffusion"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
movl $0x8, %ecx
leaq 0xbed33(%rip), %r8      # 0x18c5a0
leaq 0x5e8dd(%rip), %rdx     # 0x12c151
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcd884
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcd891
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xcd874
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_fillorder
static int valdec_fillorder(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "MSB-first"}, {2, "LSB-first"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbed1d(%rip), %r8      # 0x18c5d0
leaq 0x5e897(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xcd8ca
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcd8d7
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xcd8ba
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_strileoffsets
static void handler_strileoffsets(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	struct page_ctx *pg = tg->pg;
	i64 i;

	if(tni->tagnum==TAG_TILEOFFSETS) {
		pg->have_tile_tags = 1;
	}
	else {
		pg->have_strip_tags = 1;
	}
	if(!alloc_striledata(c, pg, tg->valcount)) return;

	for(i=0; i<tg->valcount; i++) {
		read_tag_value_as_int64(c, d, tg, i, &pg->strile_data[i].pos);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %r12
cmpl $0x144, (%rcx)          # imm = 0x144
jne 0xcd910
movb $0x1, 0x16(%r12)
jmp 0xcd916
movb $0x1, 0x15(%r12)
movq 0x18(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xcfc11
testl %eax, %eax
je 0xcd95e
cmpq $0x0, 0x18(%rbx)
jle 0xcd95e
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0xb8(%r12), %r8
addq %rbp, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xcf7bf
incq %r13
addq $0x10, %rbp
cmpq 0x18(%rbx), %r13
jl 0xcd935
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_strilebytecounts
static void handler_strilebytecounts(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	struct page_ctx *pg = tg->pg;
	i64 i;

	pg->have_strilebytecounts = 1;
	if(tni->tagnum==TAG_TILEBYTECOUNTS) {
		pg->have_tile_tags = 1;
	}
	else {
		pg->have_strip_tags = 1;
	}
	if(!alloc_striledata(c, pg, tg->valcount)) return;

	for(i=0; i<tg->valcount; i++) {
		read_tag_value_as_int64(c, d, tg, i, &pg->strile_data[i].len);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %r12
movb $0x1, 0x17(%r12)
cmpl $0x145, (%rcx)          # imm = 0x145
jne 0xcd9be
movb $0x1, 0x16(%r12)
jmp 0xcd9c4
movb $0x1, 0x15(%r12)
movq 0x18(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xcfc11
testl %eax, %eax
je 0xcda0f
cmpq $0x0, 0x18(%rbx)
jle 0xcda0f
movl $0x8, %ebp
xorl %r13d, %r13d
movq 0xb8(%r12), %r8
addq %rbp, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xcf7bf
incq %r13
addq $0x10, %rbp
cmpq 0x18(%rbx), %r13
jl 0xcd9e6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_resolution
static void handler_resolution(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	struct numeric_value nv;

	if(tg->valcount<1) return;
	read_numeric_value(c, d, tg, 0, &nv, NULL);
	if(!nv.isvalid) return;
	tg->pg->have_density = 1;
	if(tg->tagnum==TAG_XRESOLUTION) {
		tg->pg->density_ImageWidth = nv.val_double;
	}
	else if(tg->tagnum==TAG_YRESOLUTION) {
		tg->pg->density_ImageLength = nv.val_double;
	}
}

// Assembly:
cmpq $0x0, 0x18(%rdx)
jle 0xcda7d
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsp, %r14
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0xcfc74
cmpl $0x0, (%r14)
je 0xcda76
movq (%rbx), %rax
movb $0x1, 0x14(%rax)
movl 0x8(%rbx), %ecx
cmpl $0x11a, %ecx            # imm = 0x11A
je 0xcda66
cmpl $0x11b, %ecx            # imm = 0x11B
jne 0xcda76
movl $0x58, %ecx
jmp 0xcda6b
movl $0x50, %ecx
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_planarconfiguration
static int valdec_planarconfiguration(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "contiguous"}, {2, "separated"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbeb62(%rip), %r8      # 0x18c5f0
leaq 0x5e6bc(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xcdaa5
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcdab2
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xcda95
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_t4options
static int valdec_t4options(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	if(vp->n<1) return 0;

	if(vp->n&0x1) {
		ucstring_append_flags_item(vr->s, "2-d encoding");
	}
	if(vp->n&0x2) {
		ucstring_append_flags_item(vr->s, "uncompressed mode allowed");
	}
	if(vp->n&0x4) {
		ucstring_append_flags_item(vr->s, "has fill bits");
	}
	if((vp->n & ~0x7)!=0) {
		ucstring_append_flags_item(vr->s, "?");
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rsi), %rax
testq %rax, %rax
jle 0xcdb38
movq %rdx, %rbx
movq %rsi, %r14
testb $0x1, %al
je 0xcdaee
movq (%rbx), %rdi
leaq 0x71548(%rip), %rsi     # 0x13f02d
callq 0xf7105
movq 0x18(%r14), %rax
testb $0x2, %al
je 0xcdb05
movq (%rbx), %rdi
leaq 0x7153e(%rip), %rsi     # 0x13f03a
callq 0xf7105
movq 0x18(%r14), %rax
testb $0x4, %al
je 0xcdb1c
movq (%rbx), %rdi
leaq 0x71541(%rip), %rsi     # 0x13f054
callq 0xf7105
movq 0x18(%r14), %rax
movl $0x1, %ebp
cmpq $0x8, %rax
jb 0xcdb3a
movq (%rbx), %rdi
leaq 0x5e620(%rip), %rsi     # 0x12c151
callq 0xf7105
jmp 0xcdb3a
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_t6options
static int valdec_t6options(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	if(vp->n<1) return 0;

	if(vp->n&0x2) {
		ucstring_append_flags_item(vr->s, "uncompressed mode allowed");
	}
	if((vp->n & ~0x2)!=0) {
		ucstring_append_flags_item(vr->s, "?");
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rsi), %rax
testq %rax, %rax
jle 0xcdb89
movq %rdx, %rbx
testb $0x2, %al
je 0xcdb6b
movq %rsi, %r14
movq (%rbx), %rdi
leaq 0x714d8(%rip), %rsi     # 0x13f03a
callq 0xf7105
movq 0x18(%r14), %rax
movl $0x1, %ebp
testq $-0x3, %rax
je 0xcdb8b
movq (%rbx), %rdi
leaq 0x5e5cf(%rip), %rsi     # 0x12c151
callq 0xf7105
jmp 0xcdb8b
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_resolutionunit
static int valdec_resolutionunit(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "unspecified"}, {2, "pixels/inch"}, {3, "pixels/cm"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
movl $0x8, %ecx
leaq 0xbea6b(%rip), %r8      # 0x18c610
leaq 0x5e5a5(%rip), %rdx     # 0x12c151
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcdbbc
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcdbc9
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xcdbac
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_pagenumber
static int valdec_pagenumber(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	if(vp->idx==0) {
		ucstring_printf(vr->s, DE_ENCODING_LATIN1, "page %d", (int)(vp->n+1));
		return 1;
	}
	if(vp->idx==1) {
		if(vp->n==0) {
			ucstring_append_sz(vr->s, "of an unknown number", DE_ENCODING_LATIN1);
		}
		else {
			ucstring_printf(vr->s, DE_ENCODING_LATIN1, "of %d", (int)vp->n);
		}
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rax
movq 0x10(%rsi), %rcx
cmpq $0x1, %rcx
je 0xcdc03
xorl %eax, %eax
testq %rcx, %rcx
jne 0xcdc27
movq (%rdx), %rdi
movl 0x18(%rsi), %ecx
incl %ecx
leaq 0x73ae1(%rip), %rdx     # 0x1416dd
movl $0x5, %esi
jmp 0xcdc1b
movq 0x18(%rsi), %rcx
movq (%rdx), %rdi
testq %rcx, %rcx
je 0xcdc29
leaq 0x47350(%rip), %rdx     # 0x114f66
movl $0x5, %esi
xorl %eax, %eax
callq 0xf6653
movl $0x1, %eax
popq %rcx
retq
leaq 0x71432(%rip), %rsi     # 0x13f062
movl $0x5, %edx
callq 0xf65e3
jmp 0xcdc22
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_datetime
static void parse_tiff_datetime(deark *c, lctx *d, const struct taginfo *tg, struct de_timestamp *ts)
{
	i64 yr, mo, da;
	i64 hr, mi, se;

	if(tg->unit_size!=1) return;
	if(tg->valcount<19) return;
	// Format: "YYYY:MM:DD HH:MM:SS"
	yr = read_fixed_decimal(c->infile, tg->val_offset, 4);
	mo = read_fixed_decimal(c->infile, tg->val_offset+5, 2);
	da = read_fixed_decimal(c->infile, tg->val_offset+8, 2);
	hr = read_fixed_decimal(c->infile, tg->val_offset+11, 2);
	mi = read_fixed_decimal(c->infile, tg->val_offset+14, 2);
	se = read_fixed_decimal(c->infile, tg->val_offset+17, 2);
	de_make_timestamp(ts, yr, mo, da, hr, mi, se);
	if(ts->is_valid) {
		ts->tzcode = DE_TZCODE_UNKNOWN;
		ts->precision = DE_TSPREC_1SEC;
	}
}

// Assembly:
cmpq $0x1, 0x28(%rdx)
jne 0xcddcf
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
cmpq $0x13, 0x18(%rdx)
jl 0xcddc1
movq %rdi, %r15
movq (%r14), %rax
movq %rax, 0x28(%rsp)
addq $0xc0, %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rdi), %rdi
movq 0x20(%r14), %rdx
leaq 0x10(%rsp), %r12
movl $0x4, %ecx
movq %r12, %rsi
callq 0xee8d4
xorl %ebx, %ebx
movb %bl, 0x4(%r12)
movq %r12, %rdi
callq 0xe9c2f
movq %rax, 0x38(%rsp)
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rdx
addq $0x5, %rdx
leaq 0x10(%rsp), %r12
movl $0x2, %ecx
movq %r12, %rsi
callq 0xee8d4
movb %bl, 0x2(%r12)
movq %r12, %rdi
callq 0xe9c2f
movq %rax, 0x30(%rsp)
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rdx
addq $0x8, %rdx
leaq 0x10(%rsp), %r12
movl $0x2, %ecx
movq %r12, %rsi
callq 0xee8d4
movb %bl, 0x2(%r12)
movq %r12, %rdi
callq 0xe9c2f
movq %rax, %rbp
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rdx
addq $0xb, %rdx
leaq 0x10(%rsp), %r12
movl $0x2, %ecx
movq %r12, %rsi
callq 0xee8d4
movb %bl, 0x2(%r12)
movq %r12, %rdi
callq 0xe9c2f
movq %rax, %r12
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rdx
addq $0xe, %rdx
leaq 0x10(%rsp), %r13
movl $0x2, %ecx
movq %r13, %rsi
callq 0xee8d4
movb %bl, 0x2(%r13)
movq %r13, %rdi
callq 0xe9c2f
movq %rax, %r13
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rdx
addq $0x11, %rdx
leaq 0x10(%rsp), %r14
movl $0x2, %ecx
movq %r14, %rsi
callq 0xee8d4
movb %bl, 0x2(%r14)
movq %r14, %rdi
callq 0xe9c2f
movq %rax, (%rsp)
movq 0x40(%rsp), %r14
movq %r14, %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0xea98e
cmpb %bl, (%r14)
je 0xcddc1
movq 0x28(%rsp), %rax
movw $0x1e00, 0xc1(%rax)     # imm = 0x1E00
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_predictor
static int valdec_predictor(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "none"}, {2, "horizontal differencing"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbe860(%rip), %r8      # 0x18c640
leaq 0x5e36a(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xcddf7
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcde04
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xcdde7
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_subifd
static void handler_subifd(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	i64 j;
	i64 tmpoffset;
	u8 ifdtype = IFDTYPE_NORMAL;

	if(d->fmt==DE_TIFFFMT_NIKONMN && tg->tagnum==0x11) ifdtype = IFDTYPE_NIKONPREVIEW;
	else if(tg->tagnum==330) ifdtype = IFDTYPE_SUBIFD;
	else if(tg->tagnum==400) ifdtype = IFDTYPE_GLOBALPARAMS;
	else if(tg->tagnum==34665) ifdtype = IFDTYPE_EXIF;
	else if(tg->tagnum==34731) ifdtype = IFDTYPE_MASKSUBIFD;
	else if(tg->tagnum==34853) ifdtype = IFDTYPE_GPS;
	else if(tg->tagnum==40965) ifdtype = IFDTYPE_EXIFINTEROP;

	for(j=0; j<tg->valcount;j++) {
		read_tag_value_as_int64(c, d, tg, j, &tmpoffset);
		de_dbg(c, "offset of %s: %d", tni->tagname, (int)tmpoffset);
		push_ifd(c, d, tmpoffset, ifdtype, 0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movl 0x4(%rsi), %r8d
xorl $0x9, %r8d
movl 0x8(%rdx), %ecx
movl %ecx, %edi
xorl $0x11, %edi
movb $0x7, %al
orl %r8d, %edi
jne 0xce103
cmpq $0x0, 0x18(%rbx)
jle 0xce0f4
movzbl %al, %eax
movl %eax, 0xc(%rsp)
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
leaq 0x10(%rsp), %r8
callq 0xcf7bf
movq 0x8(%r15), %rdx
movq 0x10(%rsp), %rbp
movq %r12, %rdi
leaq 0x7100c(%rip), %rsi     # 0x13f0d9
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movl 0xc(%rsp), %ecx
xorl %r8d, %r8d
callq 0xcd1d6
incq %r13
cmpq 0x18(%rbx), %r13
jl 0xce0a4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x87aa, %ecx           # imm = 0x87AA
jg 0xce12a
cmpl $0x14a, %ecx            # imm = 0x14A
je 0xce149
cmpl $0x190, %ecx            # imm = 0x190
je 0xce15e
cmpl $0x8769, %ecx           # imm = 0x8769
jne 0xce157
movb $0x2, %al
jmp 0xce093
cmpl $0x87ab, %ecx           # imm = 0x87AB
je 0xce150
cmpl $0x8825, %ecx           # imm = 0x8825
je 0xce165
cmpl $0xa005, %ecx           # imm = 0xA005
jne 0xce157
movb $0x3, %al
jmp 0xce093
movb $0x1, %al
jmp 0xce093
movb $0x9, %al
jmp 0xce093
xorl %eax, %eax
jmp 0xce093
movb $0x5, %al
jmp 0xce093
movb $0x4, %al
jmp 0xce093
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_inkset
static int valdec_inkset(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "CMYK"}, {2, "not CMYK"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbe4e4(%rip), %r8      # 0x18c660
leaq 0x5dfce(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xce193
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xce1a0
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xce183
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_extrasamples
static void handler_extrasamples(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	struct page_ctx *pg = tg->pg;
	u8 i;

	pg->extrasamples_count = (u8)tg->valcount;
	if(pg->extrasamples_count>DE_TIFF_MAX_SAMPLES) {
		pg->extrasamples_count = DE_TIFF_MAX_SAMPLES;
	}

	for(i=0; i<pg->extrasamples_count; i++) {
		i64 val;

		read_tag_value_as_int64(c, d, tg, 0, &val);
		pg->extrasample_type[(size_t)i] = (u8)val;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdx), %r13
movq 0x18(%rdx), %rax
movzbl %al, %ecx
cmpl $0xb, %ecx
movl $0xa, %ecx
cmovbl %eax, %ecx
movb %cl, 0x9c(%r13)
testb %cl, %cl
je 0xce219
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0xcf7bf
movb (%rsp), %al
movb %al, 0x9d(%r13,%rbp)
incq %rbp
movzbl 0x9c(%r13), %eax
cmpq %rax, %rbp
jb 0xce1eb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_extrasamples
static int valdec_extrasamples(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "unspecified"}, {1, "assoc-alpha"}, {2, "unassoc-alpha"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
movl $0x8, %ecx
leaq 0xbe445(%rip), %r8      # 0x18c680
leaq 0x5df0f(%rip), %rdx     # 0x12c151
cmpq %rax, -0x8(%rcx,%r8)
jne 0xce252
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xce25f
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xce242
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_sampleformat
static int valdec_sampleformat(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "uint"}, {2, "signed int"}, {3, "float"}, {4, "undefined"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbe403(%rip), %r8      # 0x18c6b0
leaq 0x5de9d(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xce2c4
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xce2d1
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0xce2b4
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_jpegproc
static int valdec_jpegproc(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "baseline"}, {14, "lossless+huffman"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbe3fd(%rip), %r8      # 0x18c6f0
leaq 0x5de57(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xce30a
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xce317
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xce2fa
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: valdec_ycbcrpositioning
static int valdec_ycbcrpositioning(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "centered"}, {2, "cosited"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
movq 0x18(%rsi), %rax
movq (%rdx), %rdi
xorl %ecx, %ecx
leaq 0xbe3d7(%rip), %r8      # 0x18c710
leaq 0x5de11(%rip), %rdx     # 0x12c151
cmpq %rax, (%rcx,%r8)
jne 0xce350
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xce35d
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xce340
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf65e3
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tiff.c
// Function: handler_matteing
static void handler_matteing(deark *c, lctx *d, const struct taginfo *tg,
	const struct tagnuminfo *tni)
{
	i64 val;

	if(tg->valcount<1) return;
	read_tag_value_as_int64(c, d, tg, 0, &val);
	if(val==1) {
		tg->pg->extrasamples_count = 1;
		tg->pg->extrasample_type[0] = 1; // = Assoc. alpha
	}
}

// Assembly:
cmpq $0x0, 0x18(%rdx)
jle 0xce3c4
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsp, %r14
xorl %ecx, %ecx
movq %r14, %r8
callq 0xcf7bf
cmpq $0x1, (%r14)
jne 0xce3bd
movq (%rbx), %rax
movw $0x101, 0x9c(%rax)      # imm = 0x101
addq $0x8, %rsp
popq %rbx
popq %r14
retq