LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0xcf7b0
movq %rdx, %r15
cmpq $0x8, 0x30(%rdx)
jl 0xcf7b0
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x20(%r15), %rdx
leaq 0xbfa98(%rip), %rsi     # 0x18f190
movl $0x8, %ecx
callq 0xeeee8
movl $0x1f4, %r13d           # imm = 0x1F4
movabsq $0x4949435341, %rax     # imm = 0x4949435341
cmpq %rax, 0xbfa77(%rip)     # 0x18f190
je 0xcf742
xorl %ebp, %ebp
movabsq $0x45444f43494e55, %rax # imm = 0x45444F43494E55
cmpq %rax, 0xbfa62(%rip)     # 0x18f190
jne 0xcf747
xorl %ebp, %ebp
cmpl $0x1, (%r12)
adcl $0x3, %ebp
movl $0x3e8, %r13d           # imm = 0x3E8
jmp 0xcf747
movl $0x1, %ebp
testl %ebp, %ebp
je 0xcf7b0
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq 0x20(%r15), %rsi
movq 0x30(%r15), %rdx
addq $0x8, %rsi
addq $-0x8, %rdx
movl %ebp, (%rsp)
movq %r13, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r12, %rdi
callq 0xf68c1
movq %r12, %rdi
callq 0xf6900
movq 0x8(%r14), %r14
movq %r12, %rdi
callq 0xf74bd
leaq 0x5c6a4(%rip), %rsi     # 0x12be42
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
jmp 0xcf7b3
xorl %r12d, %r12d
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/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 0x6f90c(%rip), %rsi     # 0x13f0ee
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rcx
movq 0x20(%r14), %r8
movq 0x30(%r14), %r9
leaq 0x49f17(%rip), %rsi     # 0x119720
leaq 0x59275(%rip), %rdx     # 0x128a85
movq %rbx, %rdi
callq 0xea66a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0x5923c(%rip), %r14     # 0x128a85
movb $0x1, %r13b
cmpq $0x24, 0x30(%rdx)
jl 0xcf8a5
movq 0x18(%rbx), %rdi
movq 0x20(%r15), %rsi
leaq 0x6cc70(%rip), %rdx     # 0x13c4d2
movl $0x24, %ecx
callq 0xf025e
xorl %ebp, %ebp
testl %eax, %eax
je 0xcf89d
movq 0x18(%rbx), %rdi
movq 0x20(%r15), %rsi
leaq 0x6cc76(%rip), %rdx     # 0x13c4f7
movl $0x24, %ecx
callq 0xf025e
testl %eax, %eax
jne 0xcf8a5
movl $0x2, %ebp
leaq 0x6f65f(%rip), %r14     # 0x13eefa
jmp 0xcf8a2
movl $0x1, %ebp
xorl %r13d, %r13d
testb %r13b, %r13b
je 0xcf8d3
movq (%r15), %rdx
movl 0x20(%r15), %r8d
leaq 0x6f864(%rip), %rcx     # 0x13f11c
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcdc5c
movl 0x20(%r15), %edx
leaq 0x6f86b(%rip), %rsi     # 0x13f149
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x20(%r15), %r12
movq 0x30(%r15), %r15
addq $0x24, %r12
addq $-0x24, %r15
leaq 0x6f878(%rip), %rsi     # 0x13f179
movq %rbx, %rdi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rcx
leaq 0x630f7(%rip), %rsi     # 0x132a20
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %r8
movq %r15, %r9
callq 0xea66a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: handler_utf16
static void handler_utf16(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	de_ucstring *s = NULL;

	if(tg->datatype!=DATATYPE_BYTE && tg->datatype!=DATATYPE_UNDEF) goto done;
	if(tg->total_size % 2) goto done; // Something's wrong if the byte count is odd.

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, tg->val_offset, tg->total_size,
		DE_TIFF_MAX_CHARS_TO_PRINT*2, s, 0, DE_ENCODING_UTF16LE);
	ucstring_truncate_at_NUL(s);
	de_dbg(c, "UTF-16 string: \"%s\"", ucstring_getpsz(s));

done:
	ucstring_destroy(s);
	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rdi, %r14
movl 0xc(%rdx), %eax
cmpl $0x7, %eax
je 0xcf971
cmpl $0x1, %eax
jne 0xcf9cc
testb $0x1, 0x30(%r15)
jne 0xcf9cc
movq %r14, %rdi
callq 0xf6870
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq 0x20(%r15), %rsi
movq 0x30(%r15), %rdx
movl $0x3, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %rbx, %rdi
callq 0xf68c1
movq %rbx, %rdi
callq 0xf74bd
leaq 0x6f7e1(%rip), %rsi     # 0x13f19e
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0xcf9ce
xorl %ebx, %ebx
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_exifcolorspace
static int valdec_exifcolorspace(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "sRGB"}, {0xffff, "Uncalibrated"}
	};
	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 0xbd091(%rip), %r8      # 0x18ca80
leaq 0x5c473(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xcfa06
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfa13
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xcf9f6
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_sensingmethod
static int valdec_sensingmethod(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "not defined"}, {2, "1-chip color area"}, {3, "2-chip color area"},
		{4, "3-chip color area"}, {5, "color sequential area"}, {7, "trilinear"},
		{8, "color sequential linear"}
	};
	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 0xbd068(%rip), %r8      # 0x18caa0
leaq 0x5c42a(%rip), %rdx     # 0x12be69
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcfa4f
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfa5c
addq $0x10, %rcx
cmpq $0x78, %rcx
jne 0xcfa3f
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_filesource
static int valdec_filesource(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "others"}, {1, "scanner of transparent type"},
		{2, "scanner of reflex type"}, {3, "DSC"}
	};
	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 0xbd092(%rip), %r8      # 0x18cb10
leaq 0x5c3e4(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xcfa95
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfaa2
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0xcfa85
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_scenetype
static int valdec_scenetype(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{1, "directly photographed"}
	};
	lookup_str_and_append_to_ucstring(name_map, ITEMS_IN_ARRAY(name_map), vp->n, vr->s);
	return 1;
}

// Assembly:
pushq %rax
movq (%rdx), %rdi
cmpq $0x1, 0x18(%rsi)
leaq 0x6f7a7(%rip), %rax     # 0x13f26b
leaq 0x5c39e(%rip), %rsi     # 0x12be69
cmoveq %rax, %rsi
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_customrendered
static int valdec_customrendered(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "normal"}, {1, "custom"}
	};
	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 0xbd060(%rip), %r8      # 0x18cb50
leaq 0x5c372(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xcfb07
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfb14
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xcfaf7
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_exposuremode
static int valdec_exposuremode(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "auto"}, {1, "manual"}, {2, "auto bracket"}
	};
	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 0xbd037(%rip), %r8      # 0x18cb70
leaq 0x5c329(%rip), %rdx     # 0x12be69
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcfb50
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfb5d
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xcfb40
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_whitebalance
static int valdec_whitebalance(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "auto"}, {1, "manual"}
	};
	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 0xbd021(%rip), %r8      # 0x18cba0
leaq 0x5c2e3(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xcfb96
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfba3
addq $0x10, %rcx
cmpq $0x20, %rcx
jne 0xcfb86
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_scenecapturetype
static int valdec_scenecapturetype(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "standard"}, {1, "landscape"}, {2, "portrait"}, {3, "night scene"}
	};
	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 0xbcffb(%rip), %r8      # 0x18cbc0
leaq 0x5c29d(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xcfbdc
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfbe9
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0xcfbcc
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_gaincontrol
static int valdec_gaincontrol(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "none"}, {1, "low gain up"}, {2, "high gain up"},
		{3, "low gain down"}, {4, "high gain down"}
	};
	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 0xbcff2(%rip), %r8      # 0x18cc00
leaq 0x5c254(%rip), %rdx     # 0x12be69
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcfc25
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfc32
addq $0x10, %rcx
cmpq $0x58, %rcx
jne 0xcfc15
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_contrast
static int valdec_contrast(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "normal"}, {1, "soft"}, {2, "hard"}
	};
	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 0xbd029(%rip), %r8      # 0x18cc80
leaq 0x5c20b(%rip), %rdx     # 0x12be69
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcfc6e
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfc7b
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xcfc5e
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_saturation
static int valdec_saturation(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "normal"}, {1, "low"}, {2, "high"}
	};
	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 0xbcfb0(%rip), %r8      # 0x18cc50
leaq 0x5c1c2(%rip), %rdx     # 0x12be69
cmpq %rax, -0x8(%rcx,%r8)
jne 0xcfcb7
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfcc4
addq $0x10, %rcx
cmpq $0x38, %rcx
jne 0xcfca7
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_subjectdistancerange
static int valdec_subjectdistancerange(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "unknown"}, {1, "macro"}, {2, "close"}, {3, "distant"}
	};
	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 0xbcf81(%rip), %r8      # 0x18ccb0
leaq 0x5c133(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xcfd46
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xcfd53
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0xcfd36
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: handler_jxr_pixelformat
static void handler_jxr_pixelformat(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	u64 n1, n2;

	if(tg->total_size != 16) return;
	n1 = dbuf_getu64be(c->infile, tg->val_offset);
	n2 = dbuf_getu64be(c->infile, tg->val_offset+8);
	de_dbg(c, "id: 0x%016"U64_FMTx"%016"U64_FMTx, n1, n2);
}

// Assembly:
cmpq $0x10, 0x30(%rdx)
jne 0xd01da
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x20(%rdx), %rsi
callq 0xef66e
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
callq 0xef66e
leaq 0x6f37b(%rip), %rsi     # 0x13f540
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: handler_dngprivatedata
static void handler_dngprivatedata(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	struct de_stringreaderdata *srd;
	i64 nbytes_to_scan;

	nbytes_to_scan = tg->total_size;
	if(nbytes_to_scan>128) nbytes_to_scan=128;

	srd = dbuf_read_string(c->infile, tg->val_offset, nbytes_to_scan, nbytes_to_scan,
		DE_CONVFLAG_STOP_AT_NUL, DE_ENCODING_ASCII);
	if(srd->found_nul) {
		de_dbg(c, "identifier: \"%s\"", ucstring_getpsz(srd->str));
	}
	de_destroy_stringreaderdata(c, srd);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdx), %rsi
movq 0x30(%rdx), %rax
movl $0x80, %ecx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movq 0x18(%rdi), %rdi
movq %rcx, %rdx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0xefe67
movq %rax, %r14
cmpl $0x0, 0x34(%rax)
je 0xd023c
movq 0x18(%r14), %rdi
callq 0xf74bd
leaq 0x64078(%rip), %rsi     # 0x1342a7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf00aa
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_profileembedpolicy
static int valdec_profileembedpolicy(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "allow copying"}, {1, "embed if used"}, {2, "embed never"}, {3, "no restrictions"}
	};
	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 0xbca6b(%rip), %r8      # 0x18ccf0
leaq 0x5bbdd(%rip), %rdx     # 0x12be69
cmpq %rax, (%rcx,%r8)
jne 0xd029c
movq 0x8(%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xd02a9
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0xd028c
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: valdec_dngcolorspace
static int valdec_dngcolorspace(deark *c, const struct valdec_params *vp, struct valdec_result *vr)
{
	static const struct int_and_str name_map[] = {
		{0, "unknown"}, {1, "gray gamma 2.2"}, {2, "sRGB"}, {3, "Adobe RGB"},
		{4, "ProPhoto RGB"}
	};
	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 0xbca62(%rip), %r8      # 0x18cd30
leaq 0x5bb94(%rip), %rdx     # 0x12be69
cmpq %rax, -0x8(%rcx,%r8)
jne 0xd02e5
movq (%rcx,%r8), %rsi
testq %rsi, %rsi
jne 0xd02f2
addq $0x10, %rcx
cmpq $0x58, %rcx
jne 0xd02d5
movq %rdx, %rsi
pushq %rax
movl $0x2, %edx
callq 0xf6a40
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: handler_bplist
static void handler_bplist(deark *c, lctx *d, const struct taginfo *tg, const struct tagnuminfo *tni)
{
	if(tg->total_size>=40 &&
		!dbuf_memcmp(c->infile, tg->val_offset, "bplist", 6))
	{
		de_dbg(c, "binary .plist at %"I64_FMT", len=%"I64_FMT, tg->val_offset, tg->total_size);
		de_dbg_indent(c, 1);
		fmtutil_handle_plist(c, c->infile, tg->val_offset, tg->total_size, NULL, 0x0);
		de_dbg_indent(c, -1);
	}
	else {
		handler_hexdump(c, d, tg, tni);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
cmpq $0x28, 0x30(%rdx)
jl 0xd0337
movq 0x18(%rbx), %rdi
movq 0x20(%r14), %rsi
leaq 0x699c1(%rip), %rdx     # 0x139cea
movl $0x6, %ecx
callq 0xf025e
testl %eax, %eax
je 0xd0363
movq 0x18(%rbx), %rsi
movq 0x20(%r14), %rdx
movq 0x30(%r14), %rcx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0xe975a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%r14), %rdx
movq 0x30(%r14), %rcx
leaq 0x6f23f(%rip), %rsi     # 0x13f5b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rsi
movq 0x20(%r14), %rdx
movq 0x30(%r14), %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf8390
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: decompress_strile_fax34
static void decompress_strile_fax34(deark *c, lctx *d, struct page_ctx *pg,
	struct decode_page_ctx *dctx)
{
	struct de_fax34_params fax34params;

	de_zeromem(&fax34params, sizeof(struct de_fax34_params));
	fax34params.image_width = dctx->strileset_width;
	fax34params.image_height = dctx->strileset_height;
	fax34params.tiff_cmpr_meth = (UI)pg->compression;
	fax34params.t4options = pg->t4options;
	fax34params.t6options = pg->t6options;
	fax34params.is_lsb = (pg->fill_order==2)?1:0;

	fmtutil_fax34_codectype1(c, &dctx->dcmpri, &dctx->dcmpro, &dctx->dres,
		 (void*)&fax34params);
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
movq $0x0, 0x20(%r8)
movq 0x58(%rcx), %rax
movq %rax, (%r8)
movq 0x50(%rcx), %rax
movq %rax, 0x8(%r8)
movl 0x1c(%rdx), %eax
movl %eax, 0x18(%r8)
movl 0x48(%rdx), %eax
movl %eax, 0x20(%r8)
movl 0x4c(%rdx), %eax
movl %eax, 0x24(%r8)
cmpl $0x2, 0x34(%rdx)
sete 0x1c(%r8)
leaq 0xe8(%rcx), %rsi
leaq 0x108(%rcx), %rdx
addq $0x120, %rcx            # imm = 0x120
callq 0xfe764
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: decompress_strile_lzw
static void decompress_strile_lzw(deark *c, lctx *d, struct page_ctx *pg,
	struct decode_page_ctx *dctx)
{
	struct de_lzw_params delzwp;

	if(dctx->dfctx) {
		de_dfilter_destroy(dctx->dfctx);
		dctx->dfctx = NULL;
		// TODO: Make the LZW decoder support DE_DFILTER_COMMAND_REINITIALIZE
	}

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt =  (pg->is_old_lzw)?DE_LZWFMT_TIFFOLD:DE_LZWFMT_TIFFNEW;
	delzwp.max_code_size = 12;

	dctx->dfctx = de_dfilter_create(c, dfilter_lzw_codec, (void*)&delzwp, &dctx->dcmpro, &dctx->dres);

	de_dfilter_addslice(dctx->dfctx, dctx->dcmpri.f, dctx->dcmpri.pos, dctx->dcmpri.len);
	de_dfilter_finish(dctx->dfctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
movq 0xe0(%rcx), %rdi
testq %rdi, %rdi
je 0xd06e5
callq 0xfa8d8
movq $0x0, 0xe0(%rbx)
xorl %eax, %eax
movq %rsp, %rdx
movl %eax, 0x10(%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
cmpb $0x1, 0x98(%r15)
adcl $0x5, %eax
movl %eax, (%rdx)
movl $0xc, 0xc(%rdx)
leaq 0x108(%rbx), %rcx
leaq 0x120(%rbx), %r8
leaq 0x325ef(%rip), %rsi     # 0x102d0b
movq %r14, %rdi
callq 0xfa829
movq %rax, 0xe0(%rbx)
movq 0xe8(%rbx), %rsi
movq 0xf0(%rbx), %rdx
movq 0xf8(%rbx), %rcx
movq %rax, %rdi
callq 0xfa908
movq 0xe0(%rbx), %rdi
callq 0xfa8cc
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: decompress_strile_packbits
static void decompress_strile_packbits(deark *c, lctx *d, struct page_ctx *pg,
	struct decode_page_ctx *dctx)
{
	if(dctx->dfctx) {
		de_dfilter_command(dctx->dfctx, DE_DFILTER_COMMAND_REINITIALIZE, 0);
	}
	else {
		dctx->dfctx = de_dfilter_create(c, dfilter_packbits_codec, NULL,
			&dctx->dcmpro, &dctx->dres);
	}

	de_dfilter_addslice(dctx->dfctx, dctx->dcmpri.f, dctx->dcmpri.pos, dctx->dcmpri.len);
	de_dfilter_finish(dctx->dfctx);
}

// Assembly:
pushq %rbx
movq %rcx, %rbx
movq 0xe0(%rcx), %rax
testq %rax, %rax
je 0xd07b3
movq %rax, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xfa8af
jmp 0xd07d6
leaq 0x108(%rbx), %rcx
leaq 0x120(%rbx), %r8
leaq 0x2a2ac(%rip), %rsi     # 0xfaa74
xorl %edx, %edx
callq 0xfa829
movq %rax, 0xe0(%rbx)
movq 0xe0(%rbx), %rdi
movq 0xe8(%rbx), %rsi
movq 0xf0(%rbx), %rdx
movq 0xf8(%rbx), %rcx
callq 0xfa908
movq 0xe0(%rbx), %rdi
popq %rbx
jmp 0xfa8cc
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: alloc_striledata
static int alloc_striledata(deark *c, struct page_ctx *pg, i64 nstriles)
{
	if(nstriles<1) nstriles = 1;
	if(pg->strile_count >= nstriles) return 1;
	if(nstriles>DE_TIFF_MAX_STRILES) return 0;
	pg->strile_data = de_reallocarray(c, pg->strile_data, pg->strile_count, sizeof(struct strile_data_struct), nstriles);
	pg->strile_count = nstriles;
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
cmpq $0x2, %rdx
movl $0x1, %r14d
cmovgeq %rdx, %r14
movq 0xb0(%rsi), %rdx
movl $0x1, %eax
cmpq %r14, %rdx
jge 0xd085f
xorl %eax, %eax
cmpq $0x10000, %rcx          # imm = 0x10000
jg 0xd085f
movq %rsi, %rbx
movq 0xb8(%rsi), %rsi
movl $0x10, %ecx
movq %r14, %r8
callq 0xea2ba
movq %rax, 0xb8(%rbx)
movq %r14, 0xb0(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: detect_lzw_version
static void detect_lzw_version(deark *c, lctx *d, struct page_ctx *pg)
{
	u8 buf[2];

	if(pg->strile_count<1) return;
	// The first LZW code is supposed to be a clear code (=256; 9 bits). If it is
	// LSB-first, presumably this is the old LZW version.
	// So old version should start: 00000000 xxxxxxx1
	// And new version:             10000000 0xxxxxxx
	de_read(buf, pg->strile_data[0].pos, 2);
	if(buf[0]==0x00 && (buf[1]&0x01)) {
		pg->is_old_lzw = 1;
	}
	de_dbg(c, "lzw version: %s", pg->is_old_lzw?"old":"new");
}

// Assembly:
cmpq $0x0, 0xb0(%rsi)
jle 0xd0af4
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0xb8(%rsi), %rax
movq (%rax), %rdx
leaq 0xe(%rsp), %r15
movl $0x2, %ecx
movq %r15, %rsi
callq 0xeeee8
cmpb $0x0, (%r15)
jne 0xd0ac0
testb $0x1, 0xf(%rsp)
je 0xd0ac0
movb $0x1, 0x98(%r14)
cmpb $0x0, 0x98(%r14)
leaq 0x4d77e(%rip), %rax     # 0x11e24d
leaq 0x699f8(%rip), %rdx     # 0x13a4ce
cmoveq %rax, %rdx
leaq 0x6ed10(%rip), %rsi     # 0x13f7f1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: preprocess_fillorder_lsb
static void preprocess_fillorder_lsb(deark *c, lctx *d, struct page_ctx *pg,
	struct decode_page_ctx *dctx)
{
	if(pg->fill_order!=2) return;

	// FillOrder=LSB is ambiguous in general, but we allow it in some special cases.
	if(pg->compression==CMPR_NONE && pg->samples_per_pixel==1 && pg->bits_per_sample==1) {
		dctx->need_to_reverse_bits = 1;
		return;
	}

	if((pg->compression>=2 && pg->compression<=4) || pg->compression==32771) {
		return; // Fax compression - LSB is ok.
	}
	if(pg->compression==CMPR_LZW && pg->is_old_lzw) {
		// We detected that the LZW data in this image uses LSB bit order, so
		// this is probably ok.
		return;
	}

	if(pg->samples_per_pixel==1 && pg->bits_per_sample==4 &&
		(pg->compression==CMPR_NONE || pg->compression==CMPR_LZW))
	{
		// Many examples in the "FM Towns: Free Software Collection" items at
		// <http://discmaster.textfiles.com/cd-rom/>.

		detiff_warn(c, d, pg, "Ambiguous FillOrder for this image type");
		if(d->fillorder_strategy==0 || d->fillorder_strategy==2) {
			dctx->need_to_reverse_nibbles = 1;
		}
		return;
	}

	detiff_warn(c, d, pg, "Unexpected FillOrder for this image type. Ignoring.");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, 0x34(%rdx)
jne 0xd0b3f
movq %rcx, %rbx
movq %rsi, %r14
movl 0x1c(%rdx), %eax
cmpl $0x1, %eax
jne 0xd0b22
cmpl $0x1, 0x2c(%rdx)
jne 0xd0b22
cmpl $0x1, 0x28(%rdx)
jne 0xd0b22
movb $0x1, 0xd1(%rbx)
jmp 0xd0b3f
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
jb 0xd0b3f
cmpl $0x8003, %eax           # imm = 0x8003
je 0xd0b3f
cmpl $0x5, %eax
jne 0xd0b47
cmpb $0x0, 0x98(%rdx)
je 0xd0b47
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x1, 0x2c(%rdx)
jne 0xd0b7e
cmpl $0x4, 0x28(%rdx)
jne 0xd0b7e
orl $0x4, %eax
cmpl $0x5, %eax
jne 0xd0b7e
leaq 0x6ec9f(%rip), %rcx     # 0x13f801
movq %r14, %rsi
xorl %eax, %eax
callq 0xcdc5c
movzbl 0x16(%r14), %eax
testb $-0x3, %al
jne 0xd0b3f
movb $0x1, 0xd2(%rbx)
jmp 0xd0b3f
leaq 0x6eca4(%rip), %rcx     # 0x13f829
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcdc5c
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: decompress_strileset
static int decompress_strileset(deark *c, lctx *d, struct page_ctx *pg,
	struct decode_page_ctx *dctx)
{
	UI sample_idx;
	int retval = 0;

	for(sample_idx=0; sample_idx<dctx->num_planes_to_decode; sample_idx++) {
		dctx->strile_idx = dctx->strileset_idx +(i64)sample_idx * dctx->striles_per_plane;
		retval = decompress_strile(c, d, pg, dctx, sample_idx);
		if(!retval) goto done;
	}
	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movl $0x1, %eax
cmpl $0x0, 0xc0(%rcx)
je 0xd0d8a
movq %rcx, %r14
movq %rdx, %r13
leaq 0x120(%rcx), %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
movq %rdx, 0x30(%rsp)
movq 0x28(%r14), %rcx
imulq %rbp, %rcx
addq 0x38(%r14), %rcx
movq %rcx, 0x68(%r14)
movq 0xb8(%r13), %rdx
shlq $0x4, %rcx
movq (%rdx,%rcx), %rax
movq %rax, 0xf0(%r14)
movq 0x8(%rdx,%rcx), %rdx
movq %rdx, 0xf8(%r14)
addq %rax, %rdx
movq 0xe8(%r14), %rcx
movq 0x18(%rcx), %rcx
cmpq %rcx, %rdx
jle 0xd0c28
subq %rax, %rcx
movq %rcx, 0xf8(%r14)
cmpq $0x0, 0xf8(%r14)
jns 0xd0c3d
movq $0x0, 0xf8(%r14)
movq 0x70(%r14,%rbp,8), %rax
movq %rax, 0x108(%r14)
movb $0x1, 0x110(%r14)
movq 0x50(%r14), %rax
imulq 0x60(%r14), %rax
movq %rax, 0x118(%r14)
movq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq 0x28(%rsp), %rcx
callq 0xfa6e0
movq 0xa8(%r13), %rax
testq %rax, %rax
je 0xd0c9d
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xd0c9d
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r13, %rdx
movq %r14, %rcx
callq *%rax
jmp 0xd0caa
movq 0x10(%rsp), %rdi
movq %r14, %rcx
callq 0xd05a8
movq 0x108(%r14), %rdi
callq 0xf0ea4
movl 0x120(%r14), %r15d
testl %r15d, %r15d
je 0xd0d13
movl 0x40(%r14), %eax
movl %eax, 0x1c(%rsp)
movl 0x48(%r14), %r12d
movl %r15d, %ebx
movq %r13, %r15
movq 0x10(%rsp), %r13
movq %r13, %rdi
movq 0x28(%rsp), %rsi
callq 0xfa6a8
movq %rax, (%rsp)
movq %r13, %rdi
movq %r15, %r13
movl %ebx, %r15d
movq 0x20(%rsp), %rsi
movq %r13, %rdx
leaq 0x6eb5b(%rip), %rcx     # 0x13f85d
movl 0x1c(%rsp), %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0xcdf34
jmp 0xd0d69
cmpb $0x0, 0xd2(%r14)
je 0xd0d69
movq 0x108(%r14), %rbx
movq %rbx, %rdi
callq 0xf0ea4
movq 0x18(%rbx), %r13
testq %r13, %r13
jle 0xd0d5c
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xef0d5
rolb $0x4, %al
movzbl %al, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf148e
incq %r12
cmpq %r12, %r13
jne 0xd0d38
movq %rbx, %rdi
callq 0xf0ea4
movq 0x30(%rsp), %r13
testl %r15d, %r15d
jne 0xd0d88
incq %rbp
movl 0xc0(%r14), %eax
cmpq %rax, %rbp
jb 0xd0bd9
movl $0x1, %eax
jmp 0xd0d8a
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tiff.c
// Function: set_image_density
static void set_image_density(deark *c, lctx *d, struct page_ctx *pg, de_finfo *fi)
{
	if(!pg->have_density) return;

	if(pg->orientation>=5 && pg->orientation<=8) {
		// For some orientations, the x dimension is the ImageLength dimension.
		fi->density.xdens = pg->density_ImageLength;
		fi->density.ydens = pg->density_ImageWidth;
	}
	else {
		fi->density.xdens = pg->density_ImageWidth;
		fi->density.ydens = pg->density_ImageLength;
	}
	if(pg->resolution_unit==1) {
		fi->density.code = DE_DENSITY_UNK_UNITS;
	}
	else if(pg->resolution_unit==2) {
		fi->density.code = DE_DENSITY_DPI;
	}
	else if(pg->resolution_unit==3) { // pixels/cm
		fi->density.xdens *= 2.54;
		fi->density.ydens *= 2.54;
		fi->density.code = DE_DENSITY_DPI;
	}
}

// Assembly:
cmpb $0x0, 0x14(%rdi)
je 0xd11c6
movl 0x20(%rdi), %eax
addl $-0x5, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x4, %eax
setae %cl
setb %dl
movsd 0x50(%rdi,%rdx,8), %xmm0
movsd %xmm0, 0x80(%rsi)
movsd 0x50(%rdi,%rcx,8), %xmm0
movsd %xmm0, 0x88(%rsi)
movl 0x44(%rdi), %eax
cmpl $0x3, %eax
je 0xd1193
cmpl $0x2, %eax
je 0xd11bf
cmpl $0x1, %eax
jne 0xd11c6
movl $0x1, 0x78(%rsi)
retq
movsd 0x6b405(%rip), %xmm0    # 0x13c5a0
movsd 0x80(%rsi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rsi)
mulsd 0x88(%rsi), %xmm0
movsd %xmm0, 0x88(%rsi)
movl $0x2, 0x78(%rsi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tim.c
// Function: de_module_tim
void de_module_tim(deark *c, struct deark_module_info *mi)
{
	mi->id = "tim";
	mi->desc = "PlayStation graphics";
	mi->run_fn = de_run_tim;
	mi->identify_fn = de_identify_tim;
}

// Assembly:
leaq 0x6e776(%rip), %rax     # 0x13f945
movq %rax, (%rsi)
leaq 0x6e770(%rip), %rax     # 0x13f949
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd11f4
movq %rax, 0x18(%rsi)
leaq 0x453(%rip), %rax       # 0xd1642
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tim.c
// Function: de_identify_tim
static int de_identify_tim(deark *c)
{
	i64 x;

	if(dbuf_memcmp(c->infile, 0, "\x10\x00\x00\x00", 4))
		return 0;

	x = de_getu32le(4);
	if(x<=3 || x==8 || x==9) {
		if(de_input_file_has_ext(c, "tim")) return 100;
		return 15;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x6e2ec(%rip), %rdx     # 0x13f940
xorl %ebx, %ebx
movl $0x4, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0xd16a8
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xef37e
cmpq $0x4, %rax
setge %cl
andq $-0x2, %rax
cmpq $0x8, %rax
setne %al
testb %al, %cl
jne 0xd16a8
leaq 0x6e2b4(%rip), %rsi     # 0x13f945
movq %r14, %rdi
callq 0xea936
testl %eax, %eax
movl $0xf, %eax
movl $0x64, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tivariable.c
// Function: de_module_tivariable
void de_module_tivariable(deark *c, struct deark_module_info *mi)
{
	mi->id = "tivariable";
	mi->desc = "TI calculator variable or picture file";
	mi->run_fn = de_run_tivariable;
	mi->identify_fn = de_identify_tivariable;
}

// Assembly:
leaq 0x6e426(%rip), %rax     # 0x13fae1
movq %rax, (%rsi)
leaq 0x6e427(%rip), %rax     # 0x13faec
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd16e0
movq %rax, 0x18(%rsi)
leaq 0x81(%rip), %rax        # 0xd175c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tivariable.c
// Function: de_run_tivariable
static void de_run_tivariable(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->fmt = identify_internal(c);

	if(!ti_ver_info_arr[d->fmt].decoder_fn) {
		de_err(c, "Unknown or unsupported TI variable file version");
		goto done;
	}

	de_declare_fmt(c, ti_ver_info_arr[d->fmt].description);
	ti_ver_info_arr[d->fmt].decoder_fn(c, d);

done:
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x18, %esi
callq 0xe969b
movq %rax, %r14
movq %rbx, %rdi
callq 0xd1779
movl %eax, 0x10(%r14)
cltq
leaq (%rax,%rax,2), %rax
leaq 0xbb672(%rip), %r15     # 0x18cd80
cmpq $0x0, 0x10(%r15,%rax,8)
je 0xd173b
leaq (%r15,%rax,8), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xeb6d6
movslq 0x10(%r14), %rax
leaq (%rax,%rax,2), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%r15,%rax,8)
jmp 0xd174c
leaq 0x6e3d1(%rip), %rsi     # 0x13fb13
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tivariable.c
// Function: identify_internal
static int identify_internal(deark *c)
{
	u8 buf[8];
	int i;

	de_read(buf, 0, 8);

	if(de_memcmp(buf, "**TI", 4)) return DE_FMT_NOT_TI;

	for(i=2; i<DE_FMT_COUNT; i++) {
		if(!de_memcmp(buf, ti_ver_info_arr[i].sig, 8)) {
			return i;
		}
	}
	return DE_FMT_UNKNOWN_TI;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
movq %rsp, %r14
movl $0x8, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
cmpl $0x49542a2a, (%r14)     # imm = 0x49542A2A
jne 0xd17cd
movl $0x2, %ebx
xorl %eax, %eax
leaq 0xbb5d4(%rip), %rcx     # 0x18cd80
movq (%rsp), %rdx
movq 0x30(%rax,%rcx), %rsi
cmpq (%rsi), %rdx
je 0xd17cd
incl %ebx
addq $0x18, %rax
cmpq $0xd8, %rax
jne 0xd17b0
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tivariable.c
// Function: do_ti92
static void do_ti92(deark *c, lctx *d)
{
	i64 pos;
	i64 numvars;
	i64 x;
	i64 i;

	// 0-7: signature
	// 8-9: 0x01 0x00
	// 10-17: default folder name
	// 18-57: comment

	numvars = de_getu16le(58);
	de_dbg(c, "number of variables/folders: %d", (int)numvars);
	if(!de_good_image_count(c, numvars)) goto done;

	pos = 60;
	for(i=0; i<numvars; i++) {
		do_ti92_var_table_entry(c, d, pos);
		pos+=16;
	}

	// Data section
	x = de_getu32le(pos);
	de_dbg(c, "reported file size: %d", (int)x);

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl $0x3a, %esi
callq 0xef1ca
movq %rax, %r15
leaq 0x6df6b(%rip), %rsi     # 0x13fde1
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf2509
testl %eax, %eax
je 0xd1f89
testq %r15, %r15
jle 0xd1f98
movl $0x3c, %r12d
movq %r12, %r13
movq %rbx, %rdi
leaq 0x6df4f(%rip), %rsi     # 0x13fe01
movl %r13d, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef37e
movq %rax, %rbp
movq 0x18(%rbx), %rdi
addq $0xc, %r12
movq %r12, %rsi
callq 0xef0d5
movzbl %al, %r14d
movq %rbx, %rdi
leaq 0x6df2e(%rip), %rsi     # 0x13fe17
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
cmpb $0x10, %r14b
jne 0xd1f76
movq %rbx, %rdi
leaq 0x4d164(%rip), %rsi     # 0x11f067
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
leaq 0x6dd89(%rip), %rsi     # 0x13fc9f
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
leaq 0x4(%rbp), %rsi
movq 0x18(%rbx), %rdi
callq 0xef169
movq %rbx, %rdi
leaq 0x6dd77(%rip), %rsi     # 0x13fcad
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0x6(%rbp), %rsi
callq 0xef169
movq (%rsp), %r14
movq %rax, 0x8(%r14)
movq 0x18(%rbx), %rdi
leaq 0x8(%rbp), %rsi
callq 0xef169
movq %rax, (%r14)
addq $0xa, %rbp
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0xd1fcb
addq $0x4, %r12
decq %r15
jne 0xd1ea5
addq $0x10, %r13
jmp 0xd1f9e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x3c, %r13d
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef37e
leaq 0x4e2f1(%rip), %rsi     # 0x1202a2
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/tivariable.c
// Function: do_bitmap
static int do_bitmap(deark *c, lctx *d, i64 pos)
{
	i64 rowspan;
	int retval = 0;

	de_dbg_dimensions(c, d->w, d->h);
	rowspan = (d->w+7)/8;

	if(pos+rowspan*d->h > c->infile->len) {
		de_err(c, "Unexpected end of file");
		goto done;
	}

	de_convert_and_write_image_bilevel(c->infile, pos, d->w, d->h, rowspan,
		DE_CVTF_WHITEISZERO, NULL, 0);
	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
callq 0xe9b05
movq (%r15), %rdx
leaq 0x7(%rdx), %rax
leaq 0xe(%rdx), %r8
testq %rax, %rax
cmovnsq %rax, %r8
movq 0x8(%r15), %rcx
sarq $0x3, %r8
movq %r8, %rax
imulq %rcx, %rax
addq %rbx, %rax
movq 0x18(%r14), %rdi
cmpq 0x18(%rdi), %rax
jle 0xd2029
leaq 0x40cea(%rip), %rsi     # 0x112d04
movq %r14, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9df7
movq %rbx, %rsi
movl $0x1, %r9d
pushq $0x0
pushq $0x0
callq 0xf30d9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/unsupported.c
// Function: de_module_unsupported
void de_module_unsupported(deark *c, struct deark_module_info *mi)
{
	mi->id = "unsupported";
	mi->desc = "Identify some unsupported formats";
	mi->run_fn = de_run_unsupported;
	mi->identify_fn = de_identify_unsupported;
	mi->flags |= DE_MODFLAG_HIDDEN | DE_MODFLAG_NOEXTRACT;
	mi->unique_id = 1;
}

// Assembly:
leaq 0x6de31(%rip), %rax     # 0x13fe80
movq %rax, (%rsi)
leaq 0x6de33(%rip), %rax     # 0x13fe8c
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xd207f
movq %rax, 0x18(%rsi)
leaq 0x6f(%rip), %rax        # 0xd20de
movq %rax, 0x20(%rsi)
orb $0x5, 0x30(%rsi)
movl $0x1, 0x34(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/vort.c
// Function: de_module_vort
void de_module_vort(deark *c, struct deark_module_info *mi)
{
	mi->id = "vort";
	mi->desc = "VORT ray tracer PIX image";
	mi->run_fn = de_run_vort;
	mi->identify_fn = de_identify_vort;
}

// Assembly:
leaq 0x6dcc9(%rip), %rax     # 0x140114
movq %rax, (%rsi)
leaq 0x6dcc4(%rip), %rax     # 0x140119
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd2470
movq %rax, 0x18(%rsi)
leaq 0x5cb(%rip), %rax       # 0xd2a36
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/vort.c
// Function: read_vlq
static i64 read_vlq(deark *c, i64 *fpos)
{
	i64 nlen;
	i64 k;
	i64 val;
	i64 pos = *fpos;

	nlen = (i64)de_getbyte_p(&pos);
	*fpos += 1+nlen;
	if(nlen>7) {
		return 0;
	}

	val = 0;
	for(k=0; k<nlen; k++) {
		val = (val<<8) | (i64)de_getbyte_p(&pos);
	}
	if(val<0) return 0;
	return val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x18(%rdi), %rdi
callq 0xef14d
movzbl %al, %r15d
movq (%r14), %rax
addq %r15, %rax
incq %rax
movq %rax, (%r14)
cmpb $0x7, %r15b
jbe 0xd2a96
xorl %eax, %eax
jmp 0xd2ac5
xorl %r12d, %r12d
testq %r15, %r15
je 0xd2abc
movq %rsp, %r14
shlq $0x8, %r12
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %eax
orq %rax, %r12
decq %r15
jne 0xd2aa1
xorl %eax, %eax
testq %r12, %r12
cmovgq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/vort.c
// Function: decode_simple_item
static void decode_simple_item(deark *c, lctx *d,
	const struct obj_type_info_struct *oti,
	i64 pos, i64 dlen, i64 val)
{
	if(oti->full_type==VORT_V_IMAGE) {
		switch(oti->primitive_type) {
		case VORT_I_ADDR: d->image_data_pos = val; break;
		case VORT_I_IMWIDTH: d->image_width = val; break;
		case VORT_I_IMHEIGHT: d->image_height = val; break;
		case VORT_I_IMDEPTH: d->reported_image_depth = val; break;
		case VORT_I_ALPHA: d->image_alpha_flag = 1; break;
		case VORT_I_COLORMAP: d->image_colormap_addr = val; break;
		case VORT_I_RLE_CODED: d->rle_flag = 1; break;
		}
	}
	else if(oti->full_type==VORT_V_COLORMAP) {
		switch(oti->primitive_type) {
		case VORT_C_ADDR: d->colormap_pos = val; break;
		case VORT_C_SIZE: d->colormap_size = val; break;
		}
	}
}

// Assembly:
movzbl 0x4(%rdx), %eax
cmpl $0x3, %eax
je 0xd2e32
cmpl $0x1, %eax
jne 0xd2e48
movzbl 0x5(%rdx), %eax
cmpq $0xb, %rax
ja 0xd2e48
leaq 0x6d2b0(%rip), %rcx     # 0x1400d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r9, 0x8(%rsi)
retq
movzbl 0x5(%rdx), %eax
cmpl $0x1, %eax
je 0xd2e44
testl %eax, %eax
jne 0xd2e48
movq %r9, 0x28(%rsi)
retq
movq %r9, 0x30(%rsi)
retq
movq %r9, 0x38(%rsi)
retq
movq %r9, 0x10(%rsi)
retq
movb $0x1, 0x40(%rsi)
retq
movq %r9, 0x18(%rsi)
retq
movq %r9, 0x20(%rsi)
retq
movb $0x1, 0x41(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/wad.c
// Function: de_module_wad
void de_module_wad(deark *c, struct deark_module_info *mi)
{
	mi->id = "wad";
	mi->desc = "Doom WAD";
	mi->run_fn = de_run_wad;
	mi->identify_fn = de_identify_wad;
}

// Assembly:
leaq 0x6d4cc(%rip), %rax     # 0x1403a3
movq %rax, (%rsi)
leaq 0x6d4c6(%rip), %rax     # 0x1403a7
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd2efc
movq %rax, 0x18(%rsi)
leaq 0x281(%rip), %rax       # 0xd3178
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/wmf.c
// Function: de_module_wmf
void de_module_wmf(deark *c, struct deark_module_info *mi)
{
	mi->id = "wmf";
	mi->desc = "Windows Metafile";
	mi->desc2 = "extract bitmaps only";
	mi->run_fn = de_run_wmf;
	mi->identify_fn = de_identify_wmf;
}

// Assembly:
leaq 0x49298(%rip), %rax     # 0x11c467
movq %rax, (%rsi)
leaq 0x47e81(%rip), %rax     # 0x11b05a
movq %rax, 0x8(%rsi)
leaq 0x47e87(%rip), %rax     # 0x11b06b
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0xd31ff
movq %rax, 0x18(%rsi)
leaq 0x4d9(%rip), %rax       # 0xd36d3
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/wmf.c
// Function: de_identify_wmf
static int de_identify_wmf(deark *c)
{
	UI w0, w1, ver;
	i64 sz;
	int has_ext;

	w0 = (UI)de_getu16le(0);
	w1 = (UI)de_getu16le(2);
	if(w0==0xcdd7 && w1==0x9ac6) {
		return 100;
	}
	if(w1!=0x09) return 0;
	if(w0!=0x01 && w0!=0x02) return 0;
	ver = (UI)de_getu16le(4);
	if(ver!=0x0100 && ver!=0x0300) return 0;

	has_ext = de_input_file_has_ext(c, "wmf");
	if(has_ext) return 95;
	sz = de_getu32le(6) * 2;
	if(sz > c->infile->len || sz < 20) return 0;
	if(sz >= c->infile->len-8) return 70;
	return 14;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xef1ca
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xef1ca
movq %rax, %rcx
movl %r14d, %edx
xorl $0xcdd7, %edx           # imm = 0xCDD7
movl %ecx, %esi
xorl $0x9ac6, %esi           # imm = 0x9AC6
movl $0x64, %eax
orl %edx, %esi
je 0xd37aa
cmpl $0x9, %ecx
setne %al
addl $-0x3, %r14d
cmpl $-0x2, %r14d
setb %cl
orb %al, %cl
jne 0xd37a8
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xef1ca
andl $0xfffffdff, %eax       # imm = 0xFFFFFDFF
cmpl $0x100, %eax            # imm = 0x100
jne 0xd37a8
leaq 0x48d1a(%rip), %rsi     # 0x11c467
movq %rbx, %rdi
callq 0xea936
movl %eax, %ecx
movl $0x5f, %eax
testl %ecx, %ecx
jne 0xd37aa
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xef37e
leaq (%rax,%rax), %rcx
movq 0x18(%rbx), %rdx
movq 0x18(%rdx), %rdx
cmpq %rdx, %rcx
setg %sil
cmpq $0xa, %rax
setl %al
orb %sil, %al
movl $0x0, %eax
jne 0xd37aa
addq $-0x8, %rdx
cmpq %rdx, %rcx
movl $0xe, %ecx
movl $0x46, %eax
cmovll %ecx, %eax
jmp 0xd37aa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq