LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0xe3eb4
testb %al, %al
js 0xc11c3
pushq $0x8
popq %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe4553
cmpb $-0x1, %al
je 0xc11f2
movzbl %al, %eax
cmpl $0x80, %eax
jne 0xc1213
incq %r15
decl %r14d
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xe424b
movq %rax, (%rbx)
pushq $0x1
popq %rbp
jmp 0xc1219
incq %r15
decl %r14d
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0xe424b
movq %rax, (%rbx)
jmp 0xc1219
andq $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_O2/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 0xc12e0
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
pushq $0x1
popq %rdx
movq %r15, %rsi
callq 0xe002e
movapd (%rsp), %xmm0
ucomisd 0x64816(%rip), %xmm0    # 0x125ab0
jbe 0xc12a4
movq %r15, %rdi
callq 0xe0071
leaq 0x10(%rsp), %r12
pushq $0x40
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xe07a8
leaq 0x7abee(%rip), %rsi     # 0x13beb2
movq %r14, %rdi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xde896
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x6d921(%rip), %rax     # 0x12ec0c
movq %rax, (%rsi)
leaq 0x6d91b(%rip), %rax     # 0x12ec10
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc131b
movq %rax, 0x18(%rsi)
leaq 0x120c(%rip), %rax      # 0xc2517
movq %rax, 0x20(%rsi)
leaq 0x1345(%rip), %rax      # 0xc265b
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x12
popq %rcx
movq %r14, %rsi
xorl %edx, %edx
callq 0xe3cb7
cmpb $0x1, 0x1(%r14)
ja 0xc2551
movb 0xd(%rsp), %al
orb 0xc(%rsp), %al
je 0xc2551
movb 0xf(%rsp), %al
orb 0xe(%rsp), %al
jne 0xc255e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0xc2c2d
pushq $0x64
popq %rbp
testl %eax, %eax
jne 0xc2553
movzbl 0x2(%rsp), %eax
cmpq $0x21, %rax
ja 0xc2551
movabsq $0x300000e0e, %rcx      # imm = 0x300000E0E
btq %rax, %rcx
jae 0xc2636
movzbl 0x10(%rsp), %eax
cmpq $0x20, %rax
ja 0xc2551
movabsq $0x101018102, %rcx      # imm = 0x101018102
btq %rax, %rcx
jae 0xc2551
movb 0x7(%rsp), %al
movb 0x1(%rsp), %cl
orb %al, %cl
je 0xc25d9
movzbl %al, %eax
cmpl $0x20, %eax
ja 0xc2551
movl %eax, %eax
movabsq $0x101018000, %rcx      # imm = 0x101018000
btq %rax, %rcx
jae 0xc2551
leaq 0x6c62c(%rip), %rsi     # 0x12ec0c
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
jne 0xc2553
movzbl 0x11(%rsp), %eax
andl $0xf, %eax
cmpl $0x8, %eax
ja 0xc2551
movl $0x103, %ecx            # imm = 0x103
btl %eax, %ecx
movl $0x0, %ebp
jae 0xc2553
leaq 0x6cd27(%rip), %rsi     # 0x12f342
movq %rbx, %rdi
callq 0xdfcd5
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
shll $0x5, %ebp
orl $0x8, %ebp
jmp 0xc2553
testq %rax, %rax
jne 0xc2551
movq 0x18(%rbx), %rdi
pushq $0x14
popq %rsi
callq 0xe404f
cmpl $0x49474348, %eax       # imm = 0x49474348
jne 0xc2551
jmp 0xc2594
// File: /workspace/github_c_makefile_star2_O2/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 0xc2c63
movq %rdx, %rbx
decq %rsi
callq 0xe3eb4
testb %al, %al
je 0xc2c77
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 0x6bf15(%rip), %rdx     # 0x12eba0
pushq $0x12
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0xc2cdd
testl %r15d, %r15d
jne 0xc2c63
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %r12
leaq -0x812(%r12), %rdx
movq %rsp, %rsi
movl $0x812, %ecx            # imm = 0x812
callq 0xe3cb7
xorl %r13d, %r13d
movq %r13, %rax
addq $0x811, %rax            # imm = 0x811
js 0xc2d5b
movzbl 0x811(%rsp,%r13), %eax
testl %eax, %eax
jne 0xc2cec
decq %r13
jmp 0xc2cbc
addq $-0x1a, %r12
movq %r12, (%rbx)
pushq $0x1
popq %rbp
jmp 0xc2c63
cmpl $0x2e, %eax
jne 0xc2d5b
leaq (%r12,%r13), %rax
decq %rax
xorl %ebp, %ebp
testq %rax, %rax
jle 0xc2c63
leaq (%r12,%r13), %r15
addq $-0x11, %r15
movq 0x18(%r14), %rdi
leaq 0x6be8a(%rip), %rdx     # 0x12eba0
pushq $0x12
popq %rcx
movq %r15, %rsi
callq 0xe4d48
testl %eax, %eax
jne 0xc2c63
movq 0x18(%r14), %rax
movq %r12, %rcx
notq %rcx
addq 0x18(%rax), %rcx
subq %r13, %rcx
leaq 0x6c001(%rip), %rsi     # 0x12ed42
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xdf05a
leaq (%r12,%r13), %rax
addq $-0x19, %rax
movq %rax, (%rbx)
jmp 0xc2ce4
xorl %ebp, %ebp
jmp 0xc2c63
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x11
popq %rsi
callq 0xe3eb4
movb %al, 0x78(%r14)
movzbl %al, %edx
leaq 0x52660(%rip), %rsi     # 0x1153e6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movzbl 0x78(%r14), %ecx
andl $0xf, %ecx
movq %rcx, 0x80(%r14)
cmpl $0x1, 0xc(%r14)
leaq 0x6bff5(%rip), %rax     # 0x12edab
leaq 0x6bffc(%rip), %rdx     # 0x12edb9
cmoveq %rax, %rdx
leaq 0x6bfcd(%rip), %rsi     # 0x12ed95
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
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 0x6bfcb(%rip), %rsi     # 0x12edc3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movzbl 0x8a(%r14), %edx
leaq 0x6bfc9(%rip), %rsi     # 0x12edda
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movzbl 0x78(%r14), %eax
movl %eax, %edx
shrl $0x6, %edx
movb %dl, 0x8c(%r14)
cmpl $0x40, %eax
jb 0xc2e42
leaq 0x6bfb4(%rip), %rsi     # 0x12edec
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $-0x1
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xdeba7
// File: /workspace/github_c_makefile_star2_O2/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 0x7a165(%rip), %rax     # 0x13cfc0
movq %rax, (%rsi)
leaq 0x6c81b(%rip), %rax     # 0x12f680
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc2e8b
movq %rax, 0x18(%rsi)
leaq 0x2370(%rip), %rax      # 0xc51eb
movq %rax, 0x20(%rsi)
leaq 0x237a(%rip), %rax      # 0xc5200
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe3f46
movq %rax, %rbx
xorl %eax, %eax
cmpq $0x4d4d, %rbx           # imm = 0x4D4D
setne %al
movl %eax, (%r14)
movq 0x18(%r15), %rdi
pushq $0x2
popq %rsi
je 0xc5285
callq 0xe3fa3
movq %rbx, %rcx
xorq $0x4550, %rcx           # imm = 0x4550
movq %rax, %rdx
xorq $0x2a, %rdx
orq %rcx, %rdx
jne 0xc52c0
pushq $0x6
jmp 0xc52df
callq 0xe3f46
cmpq $0x5352, %rax           # imm = 0x5352
je 0xc52cd
cmpq $0x2b, %rax
je 0xc52dd
cmpq $0x55, %rax
je 0xc52d9
cmpq $0x1bc, %rax            # imm = 0x1BC
je 0xc52d1
cmpq $0x4352, %rax           # imm = 0x4352
je 0xc52d5
cmpq $0x4f52, %rax           # imm = 0x4F52
je 0xc52cd
cmpq $0x2a, %rax
jne 0xc52c9
pushq $0x1
jmp 0xc52df
cmpq $0x4949, %rbx           # imm = 0x4949
je 0xc528a
xorl %eax, %eax
jmp 0xc52e0
pushq $0x4
jmp 0xc52df
pushq $0x7
jmp 0xc52df
pushq $0x5
jmp 0xc52df
pushq $0x3
jmp 0xc52df
pushq $0x2
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5351
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 0xc53c7
leaq 0x20(%rsp), %r12
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xfc8d8
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6a425(%rip), %rsi     # 0x12f7d7
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xdf05a
jmp 0xc5436
testb %al, %al
je 0xc53f8
leaq 0x20(%rsp), %r14
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xfc8d8
leaq 0x6a3f5(%rip), %rsi     # 0x12f7e2
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
jmp 0xc542f
testq %r14, %r14
je 0xc5445
leaq 0x20(%rsp), %r15
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xfc8d8
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6a3bc(%rip), %rsi     # 0x12f7e2
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xdf05a
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xdf329
jmp 0xc5436
// File: /workspace/github_c_makefile_star2_O2/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 0xc5547
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
js 0xc54c8
movq 0x18(%r14), %rax
cmpq %r15, 0x18(%rax)
jle 0xc54c8
movl %r8d, %ebp
movl %ecx, %r12d
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
jne 0xc5499
movq %r14, %rdi
callq 0xe0955
movq %rax, %rsi
movq %rax, 0x40(%rbx)
cmpl $0x3e8, 0x48(%rbx)      # imm = 0x3E8
jge 0xc5550
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xe0a0b
testl %eax, %eax
je 0xc54e9
incl 0x48(%rbx)
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xc5507
movl 0x34(%rbx), %ecx
jmp 0xc5528
leaq 0x6a372(%rip), %rcx     # 0x12f841
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 0xc52e6
leaq 0x6a37c(%rip), %rcx     # 0x12f86c
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc55b2
movl $0xc8, 0x30(%rbx)
pushq $0x10
popq %rdx
movl $0xc8, %esi
movq %r14, %rdi
callq 0xdf66f
movq %rax, 0x28(%rbx)
andl $0x0, 0x34(%rbx)
xorl %ecx, %ecx
cmpl 0x30(%rbx), %ecx
jge 0xc5550
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 0x6a302(%rip), %rcx     # 0x12f859
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc52e6
// File: /workspace/github_c_makefile_star2_O2/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 0xc55a2
pushq %rbx
subq $0x10, %rsp
movq 0x18(%rdi), %rdi
movl (%rsi), %eax
movq %rdx, %rsi
movl %eax, %edx
callq 0xe41e5
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0xe10b1
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
movq 0x18(%rdi), %rdi
movl (%rsi), %eax
movq %rdx, %rsi
movl %eax, %edx
jmp 0xe41cb
// File: /workspace/github_c_makefile_star2_O2/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 0xc561d
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 0xc5693
leaq 0x20(%rsp), %r12
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xfc8d8
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6a159(%rip), %rsi     # 0x12f7d7
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xdf2a5
jmp 0xc5702
testb %al, %al
je 0xc56c4
leaq 0x20(%rsp), %r14
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xfc8d8
leaq 0x6a129(%rip), %rsi     # 0x12f7e2
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
jmp 0xc56fb
testq %r14, %r14
je 0xc5711
leaq 0x20(%rsp), %r15
movq %rsp, %rax
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xfc8d8
addq $0x4e4, %r14            # imm = 0x4E4
leaq 0x6a0f0(%rip), %rsi     # 0x12f7e2
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xdf2a5
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %rdx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xdf24e
jmp 0xc5702
// File: /workspace/github_c_makefile_star2_O2/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 0xc5984
movq %rdx, %r14
testb $0x1, %bl
je 0xc591f
movq (%r14), %rdi
leaq 0x6c217(%rip), %rsi     # 0x131b2e
callq 0xeb884
decq %rbx
testb $0x2, %bl
je 0xc5937
movq (%r14), %rdi
leaq 0x6c20c(%rip), %rsi     # 0x131b3a
callq 0xeb884
addq $-0x2, %rbx
testb $0x4, %bl
je 0xc594f
movq (%r14), %rdi
leaq 0x732e7(%rip), %rsi     # 0x138c2d
callq 0xeb884
addq $-0x4, %rbx
testb $0x10, %bl
je 0xc5967
movq (%r14), %rdi
leaq 0x6c1ed(%rip), %rsi     # 0x131b4b
callq 0xeb884
addq $-0x10, %rbx
pushq $0x1
popq %rbp
testq %rbx, %rbx
je 0xc5986
movq (%r14), %rdi
leaq 0x5625d(%rip), %rsi     # 0x11bbd6
movl %ebx, %edx
xorl %eax, %eax
callq 0xeb8af
jmp 0xc5986
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc59e2
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsp, %r14
xorl %ecx, %ecx
movq %r14, %r8
callq 0xc7374
movl (%r14), %eax
movq (%rbx), %rcx
movl %eax, 0x28(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdx, %rbx
movl 0x18(%rsi), %edi
callq 0xc757f
testq %rax, %rax
je 0xc5a04
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0xc5a04
movq (%rbx), %rdi
pushq $0x2
jmp 0xc5a10
movq (%rbx), %rdi
leaq 0x594d3(%rip), %rsi     # 0x11eee1
pushq $0x5
popq %rdx
callq 0xeae42
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5a9f
movb $0x1, 0x16(%r12)
jmp 0xc5aa5
movb $0x1, 0x15(%r12)
movq 0x18(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xc77f8
testl %eax, %eax
je 0xc5ae8
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq 0x18(%rbx), %r13
jge 0xc5ae8
movq 0xb8(%r12), %r8
addq %rbp, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xc7374
incq %r13
addq $0x10, %rbp
jmp 0xc5abd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5b44
movb $0x1, 0x16(%r12)
jmp 0xc5b4a
movb $0x1, 0x15(%r12)
movq 0x18(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xc77f8
testl %eax, %eax
je 0xc5b8e
pushq $0x8
popq %rbp
xorl %r13d, %r13d
cmpq 0x18(%rbx), %r13
jge 0xc5b8e
movq 0xb8(%r12), %r8
addq %rbp, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xc7374
incq %r13
addq $0x10, %rbp
jmp 0xc5b63
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5bf7
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsp, %r14
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0xc784f
cmpl $0x0, (%r14)
je 0xc5bf0
movq (%rbx), %rax
movb $0x1, 0x14(%rax)
movl 0x8(%rbx), %ecx
cmpl $0x11a, %ecx            # imm = 0x11A
je 0xc5be2
cmpl $0x11b, %ecx            # imm = 0x11B
jne 0xc5bf0
pushq $0x58
jmp 0xc5be4
pushq $0x50
popq %rcx
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5c89
movq %rdx, %rbx
movq %rsi, %r14
testb $0x1, %al
je 0xc5c41
movq (%rbx), %rdi
leaq 0x6c0c5(%rip), %rsi     # 0x131cfd
callq 0xeb884
movq 0x18(%r14), %rax
testb $0x2, %al
je 0xc5c58
movq (%rbx), %rdi
leaq 0x6c0bb(%rip), %rsi     # 0x131d0a
callq 0xeb884
movq 0x18(%r14), %rax
testb $0x4, %al
je 0xc5c6f
movq (%rbx), %rdi
leaq 0x6c0be(%rip), %rsi     # 0x131d24
callq 0xeb884
movq 0x18(%r14), %rax
pushq $0x1
popq %rbp
cmpq $0x8, %rax
jb 0xc5c8b
movq (%rbx), %rdi
leaq 0x5925f(%rip), %rsi     # 0x11eee1
callq 0xeb884
jmp 0xc5c8b
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5cd8
movq %rdx, %rbx
testb $0x2, %al
je 0xc5cbc
movq %rsi, %r14
movq (%rbx), %rdi
leaq 0x6c057(%rip), %rsi     # 0x131d0a
callq 0xeb884
movq 0x18(%r14), %rax
pushq $0x1
popq %rbp
testq $-0x3, %rax
je 0xc5cda
movq (%rbx), %rdi
leaq 0x59210(%rip), %rsi     # 0x11eee1
callq 0xeb884
jmp 0xc5cda
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc5d26
xorl %eax, %eax
testq %rcx, %rcx
jne 0xc5d46
movq (%rdx), %rdi
movl 0x18(%rsi), %ecx
incl %ecx
leaq 0x6e56c(%rip), %rdx     # 0x13428d
pushq $0x5
popq %rsi
jmp 0xc5d3c
movq 0x18(%rsi), %rcx
movq (%rdx), %rdi
testq %rcx, %rcx
je 0xc5d48
leaq 0x421cd(%rip), %rdx     # 0x107f06
pushq $0x5
popq %rsi
xorl %eax, %eax
callq 0xeae8b
pushq $0x1
popq %rax
popq %rcx
retq
leaq 0x6bfe3(%rip), %rsi     # 0x131d32
pushq $0x5
popq %rdx
callq 0xeae42
jmp 0xc5d43
// File: /workspace/github_c_makefile_star2_O2/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 0xc5e66
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
cmpq $0x13, 0x18(%rdx)
jl 0xc5e58
movq %rdi, %r15
movq (%r14), %rax
movq %rax, 0x8(%rsp)
addq $0xc0, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rdi), %rdi
movq 0x20(%r14), %rsi
pushq $0x4
popq %rdx
callq 0xc7a48
movq %rax, 0x18(%rsp)
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
addq $0x5, %rsi
pushq $0x2
popq %rbp
movq %rbp, %rdx
callq 0xc7a48
movq %rax, 0x10(%rsp)
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %rbp, %rdx
callq 0xc7a48
movq %rax, %r12
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
addq $0xb, %rsi
movq %rbp, %rdx
callq 0xc7a48
movq %rax, %r13
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
addq $0xe, %rsi
movq %rbp, %rdx
callq 0xc7a48
movq %rax, %rbx
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
addq $0x11, %rsi
movq %rbp, %rdx
callq 0xc7a48
movq %rax, (%rsp)
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbx, %r9
callq 0xe0174
cmpb $0x0, (%r14)
je 0xc5e58
movq 0x8(%rsp), %rax
movw $0x1e00, 0xc1(%rax)     # imm = 0x1E00
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rsi), %edx
xorl $0x9, %edx
movl 0x8(%r14), %ecx
movl %ecx, %esi
xorl $0x11, %esi
movb $0x7, %al
orl %edx, %esi
jne 0xc615b
movzbl %al, %ebx
xorl %r13d, %r13d
cmpq 0x18(%r14), %r13
jge 0xc614c
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
leaq 0x10(%rsp), %r8
callq 0xc7374
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rsp), %rbp
movq %r12, %rdi
leaq 0x6bc7e(%rip), %rsi     # 0x131da9
movl %ebp, %ecx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0xc5455
incq %r13
jmp 0xc60f7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x14a, %ecx            # imm = 0x14A
je 0xc61b5
cmpl $0xa005, %ecx           # imm = 0xA005
je 0xc61ae
cmpl $0x8769, %ecx           # imm = 0x8769
je 0xc6192
cmpl $0x87ab, %ecx           # imm = 0x87AB
je 0xc61a0
cmpl $0x8825, %ecx           # imm = 0x8825
je 0xc6199
cmpl $0x190, %ecx            # imm = 0x190
jne 0xc61a7
movb $0x5, %al
jmp 0xc60f1
movb $0x2, %al
jmp 0xc60f1
movb $0x4, %al
jmp 0xc60f1
movb $0x9, %al
jmp 0xc60f1
xorl %eax, %eax
jmp 0xc60f1
movb $0x3, %al
jmp 0xc60f1
movb $0x1, %al
jmp 0xc60f1
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdx), %rcx
movzbl %cl, %eax
cmpl $0xb, %eax
pushq $0xa
popq %rax
cmovbl %ecx, %eax
movq (%rdx), %r13
movb %al, 0x9c(%r13)
xorl %ebp, %ebp
movq %rsp, %r12
movzbl %al, %eax
cmpq %rax, %rbp
jae 0xc6240
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0xc7374
movb (%rsp), %al
movb %al, 0x9d(%r13,%rbp)
incq %rbp
movb 0x9c(%r13), %al
jmp 0xc620e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc634a
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsp, %r14
xorl %ecx, %ecx
movq %r14, %r8
callq 0xc7374
cmpq $0x1, (%r14)
jne 0xc6343
movq (%rbx), %rax
movw $0x101, 0x9c(%rax)      # imm = 0x101
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tiff.c
// Function: handler_photoshoprsrc
static void handler_photoshoprsrc(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	de_dbg(c, "Photoshop resources at %d, len=%d",
		(int)tg->val_offset, (int)tg->total_size);
	de_dbg_indent(c, 1);
	fmtutil_handle_photoshop_rsrc(c, c->infile, tg->val_offset, tg->total_size,
		d->is_deark_8bim?0x2:0x0);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x20(%rdx), %edx
movl 0x30(%r14), %ecx
leaq 0x6b9c4(%rip), %rsi     # 0x131e43
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rsi
movq 0x20(%r14), %rdx
movq 0x30(%r14), %rcx
xorl %r8d, %r8d
cmpb $0x0, 0x18(%r15)
setne %r8b
addl %r8d, %r8d
movq %rbx, %rdi
callq 0xec5fa
pushq $-0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xdeba7
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tiff.c
// Function: valdec_flash
static int valdec_flash(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	i64 v;

	ucstring_append_flags_item(vr->s, (vp->n&0x01)?"flash fired":"flash did not fire");

	v = (vp->n&0x06)>>1;
	if(v==0) ucstring_append_flags_item(vr->s, "no strobe return detection function");
	else if(v==2) ucstring_append_flags_item(vr->s, "strobe return light not detected");
	else if(v==3) ucstring_append_flags_item(vr->s, "strobe return light detected");

	v = (vp->n&0x18)>>3;
	if(v==1) ucstring_append_flags_item(vr->s, "compulsory flash firing");
	else if(v==2) ucstring_append_flags_item(vr->s, "compulsory flash suppression");
	else if(v==3) ucstring_append_flags_item(vr->s, "auto mode");

	ucstring_append_flags_item(vr->s, (vp->n&0x20)?"no flash function":"flash function present");

	if(vp->n&0x40) ucstring_append_flags_item(vr->s, "red eye reduction supported");

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

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rdi
testb $0x1, 0x18(%rsi)
leaq 0x6ba4c(%rip), %rax     # 0x13200d
leaq 0x6ba39(%rip), %rsi     # 0x132001
cmoveq %rax, %rsi
callq 0xeb884
movl 0x18(%r14), %eax
shrl %eax
andl $0x3, %eax
leaq 0x68ee3(%rip), %rcx     # 0x12f4c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6ba2f(%rip), %rsi     # 0x132020
jmp 0xc6603
leaq 0x6ba4a(%rip), %rsi     # 0x132044
jmp 0xc6603
leaq 0x6ba62(%rip), %rsi     # 0x132065
movq (%rbx), %rdi
callq 0xeb884
movl 0x18(%r14), %eax
shrl $0x3, %eax
andl $0x3, %eax
leaq 0x68eb8(%rip), %rcx     # 0x12f4d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6ba56(%rip), %rsi     # 0x132082
jmp 0xc663e
leaq 0x6ba65(%rip), %rsi     # 0x13209a
jmp 0xc663e
leaq 0x6ba79(%rip), %rsi     # 0x1320b7
movq (%rbx), %rdi
callq 0xeb884
movq (%rbx), %rdi
testb $0x20, 0x18(%r14)
leaq 0x6ba7e(%rip), %rax     # 0x1320d3
leaq 0x6ba65(%rip), %rsi     # 0x1320c1
cmoveq %rax, %rsi
callq 0xeb884
movq 0x18(%r14), %rax
testb $0x40, %al
je 0xc6680
movq (%rbx), %rdi
leaq 0x6ba73(%rip), %rsi     # 0x1320ea
callq 0xeb884
movq 0x18(%r14), %rax
cmpq $0x80, %rax
jb 0xc6697
movq (%rbx), %rdi
leaq 0x5884f(%rip), %rsi     # 0x11eee1
callq 0xeb884
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tiff.c
// Function: handler_usercomment
static void handler_usercomment(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	static u8 charcode[8];
	de_ucstring *s = NULL;
	de_encoding enc = DE_ENCODING_UNKNOWN;
	i64 bytes_per_char = 1;

	if(tg->datatype != DATATYPE_UNDEF) goto done;
	if(tg->total_size < 8) goto done;

	de_read(charcode, tg->val_offset, 8);

	if(!de_memcmp(charcode, "ASCII\0\0\0", 8)) {
		enc = DE_ENCODING_ASCII;
	}
	else if(!de_memcmp(charcode, "UNICODE\0", 8)) {
		enc = d->is_le ? DE_ENCODING_UTF16LE : DE_ENCODING_UTF16BE;
		bytes_per_char = 2;
	}

	if(enc == DE_ENCODING_UNKNOWN) goto done;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, tg->val_offset + 8, tg->total_size - 8,
		DE_TIFF_MAX_CHARS_TO_PRINT*bytes_per_char, s, 0, enc);

	// Should we truncate at NUL, or not? The Exif spec says "NULL termination
	// is not necessary", but it doesn't say whether it is *allowed*.
	// In practice, if we don't do this, we sometimes end up printing a lot of
	// garbage.
	ucstring_truncate_at_NUL(s);

	// FIXME: This is not quite right, though it's not important. We really
	// need to read the entire string, not just the first
	// DE_TIFF_MAX_CHARS_TO_PRINT bytes, in order to determine which characters
	// are trailing spaces.
	ucstring_strip_trailing_spaces(s);

	de_dbg(c, "%s: \"%s\"", tni->tagname, ucstring_getpsz(s));

done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x7, 0xc(%rdx)
jne 0xc694b
movq %rdx, %r12
cmpq $0x8, 0x30(%rdx)
jge 0xc6964
xorl %r15d, %r15d
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
movq %rcx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x20(%r12), %rdx
leaq 0xcb813(%rip), %rsi     # 0x192190
pushq $0x8
popq %rcx
callq 0xe3cb7
movabsq $0x4949435341, %rax     # imm = 0x4949435341
cmpq %rax, 0xcb7fa(%rip)     # 0x192190
je 0xc69c2
xorl %r15d, %r15d
movabsq $0x45444f43494e55, %rax # imm = 0x45444F43494E55
cmpq %rax, 0xcb7e4(%rip)     # 0x192190
jne 0xc694e
cmpl $0x1, (%r13)
adcl $0x3, %r15d
movl $0x3e8, %r13d           # imm = 0x3E8
movl %r15d, %ebp
jmp 0xc69cb
movl $0x1f4, %r13d           # imm = 0x1F4
pushq $0x1
popq %rbp
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq 0x20(%r12), %rsi
movq 0x30(%r12), %rdx
addq $0x8, %rsi
addq $-0x8, %rdx
movl %ebp, (%rsp)
movq %r13, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r15, %rdi
callq 0xeacc0
movq %r15, %rdi
callq 0xead03
movq 0x8(%r14), %r14
movq %r15, %rdi
callq 0xeb7e4
leaq 0x5849a(%rip), %rsi     # 0x11eeba
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
jmp 0xc694e
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tiff.c
// Function: handler_olepropset
static void handler_olepropset(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	de_dbg(c, "OLE property set storage dump at %"I64_FMT", len=%"I64_FMT,
		tg->val_offset, tg->total_size);
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "cfb", "T", c->infile, tg->val_offset, tg->total_size);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq 0x20(%rdx), %rdx
movq 0x30(%r14), %rcx
leaq 0x6b770(%rip), %rsi     # 0x1321be
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rcx
movq 0x20(%r14), %r8
movq 0x30(%r14), %r9
leaq 0x45cdd(%rip), %rsi     # 0x10c750
leaq 0x54ffb(%rip), %rdx     # 0x11ba75
movq %rbx, %rdi
callq 0xdfa28
pushq $-0x1
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xdeba7
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tiff.c
// Function: handler_37724
static void handler_37724(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	const char *codes;
	static const i64 siglen = 36;
	i64 dpos, dlen;
	int psdver = 0;

	if(tg->total_size<siglen) {
		;
	}
	else if(!dbuf_memcmp(c->infile, tg->val_offset, "Adobe Photoshop Document Data Block\0", (size_t)siglen)) {
		psdver = 1;
	}
	else if(!dbuf_memcmp(c->infile, tg->val_offset, "Adobe Photoshop Document Data V0002\0", (size_t)siglen)) {
		psdver = 2;
	}

	if(psdver==0) {
		detiff_warn(c, d, tg->pg, "Bad or unsupported ImageSourceData tag at %d", (int)tg->val_offset);
		goto done;
	}

	de_dbg(c, "ImageSourceData signature at %d, PSD version=%d", (int)tg->val_offset, psdver);

	dpos = tg->val_offset + siglen;
	dlen = tg->total_size - siglen;
	de_dbg(c, "ImageSourceData blocks at %d, len=%d", (int)dpos, (int)dlen);

	codes = (psdver==2)? "B" : "T";
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "psd", codes, c->infile, dpos, dlen);
	de_dbg_indent(c, -1);
done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x24, 0x30(%rdx)
jl 0xc6ae2
movq 0x18(%rbx), %rdi
movq 0x20(%r14), %rsi
leaq 0x68af7(%rip), %rdx     # 0x12f5b2
pushq $0x24
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0xc6b08
movq 0x18(%rbx), %rdi
movq 0x20(%r14), %rsi
leaq 0x68b01(%rip), %rdx     # 0x12f5d7
pushq $0x24
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0xc6b14
movq (%r14), %rdx
movl 0x20(%r14), %r8d
leaq 0x6b6fc(%rip), %rcx     # 0x1321ec
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xc52e6
pushq $0x1
popq %rcx
leaq 0x54f63(%rip), %r15     # 0x11ba75
jmp 0xc6b1e
pushq $0x2
popq %rcx
leaq 0x6b4ac(%rip), %r15     # 0x131fca
movl 0x20(%r14), %edx
leaq 0x6b6f0(%rip), %rsi     # 0x132219
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x20(%r14), %r12
movq 0x30(%r14), %r14
addq $0x24, %r12
addq $-0x24, %r14
leaq 0x6b6ff(%rip), %rsi     # 0x132249
movq %rbx, %rdi
movl %r12d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rcx
leaq 0x5efd0(%rip), %rsi     # 0x125b40
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %r8
movq %r14, %r9
callq 0xdfa28
pushq $-0x1
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xdeba7