LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/rm.c
// Function: de_module_rm
void de_module_rm(deark *c, struct deark_module_info *mi)
{
	mi->id = "rm";
	mi->desc = "RealMedia";
	mi->run_fn = de_run_rm;
	mi->identify_fn = de_identify_rm;
}

// Assembly:
leaq 0x3680b(%rip), %rax     # 0x11b04a
movq %rax, (%rsi)
leaq 0x60b54(%rip), %rax     # 0x14539d
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xe4864
movq %rax, 0x18(%rsi)
leaq 0x60e(%rip), %rax       # 0xe4e6d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/reko.c
// Function: de_module_reko
void de_module_reko(deark *c, struct deark_module_info *mi)
{
	mi->id = "reko";
	mi->desc = "REKO cardset";
	mi->run_fn = de_run_reko;
	mi->identify_fn = de_identify_reko;
	mi->help_fn = de_help_reko;
}

// Assembly:
leaq 0x605f0(%rip), %rax     # 0x14548b
movq %rax, (%rsi)
leaq 0x605eb(%rip), %rax     # 0x145490
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xe4ecb
movq %rax, 0x18(%rsi)
leaq 0x11cf(%rip), %rax      # 0xe608a
movq %rax, 0x20(%rsi)
leaq 0x11d8(%rip), %rax      # 0xe609e
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/reko.c
// Function: de_module_wizsolitaire
void de_module_wizsolitaire(deark *c, struct deark_module_info *mi)
{
	mi->id = "wizsolitaire";
	mi->desc = "Wiz Solitaire deck";
	mi->run_fn = de_run_wizsolitaire;
	mi->identify_fn = de_identify_wizsolitaire;
}

// Assembly:
leaq 0x5f3ea(%rip), %rax     # 0x14549d
movq %rax, (%rsi)
leaq 0x5f3ed(%rip), %rax     # 0x1454aa
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xe60d8
movq %rax, 0x18(%rsi)
leaq 0x30c(%rip), %rax       # 0xe63df
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/reko.c
// Function: reko_fmt_from_sig
static u8 reko_fmt_from_sig(deark *c)
{
	u8 buf[8];

	de_read(buf, 0, sizeof(buf));

	if(!de_memcmp(buf, (const void*)"REKO", 4)) {
		// Just to screen out text files, I think we can assume the high byte
		// of the cardsize field is 0.
		if(de_getbyte(8) == 0) {
			return RKFMT_AMIGA;
		}
	}
	if(!de_memcmp(buf, (const void*)"PCREKO", 6)) {
		if(buf[6]=='D' && buf[7]==0x20) return RKFMT_RKP8;
		if(buf[6]==0 && buf[7]==0) return RKFMT_RKP16;
	}
	if(!de_memcmp(buf, (const void*)"PCRKP\0", 6)) {
		return RKFMT_RKP24;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rsp, %r14
movl $0x8, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
cmpl $0x4f4b4552, (%r14)     # imm = 0x4F4B4552
jne 0xe643d
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0xef0d5
testb %al, %al
je 0xe6495
movl $0x45524350, %eax       # imm = 0x45524350
xorl (%rsp), %eax
movzwl 0x4(%rsp), %ecx
xorl $0x4f4b, %ecx           # imm = 0x4F4B
orl %eax, %ecx
je 0xe6472
movl $0x4b524350, %eax       # imm = 0x4B524350
xorl (%rsp), %eax
movzwl 0x4(%rsp), %ecx
xorl $0x50, %ecx
xorl %edx, %edx
orl %eax, %ecx
movl $0x6, %eax
cmovnel %edx, %eax
jmp 0xe6497
movb 0x6(%rsp), %cl
movb 0x7(%rsp), %dl
movl %ecx, %esi
xorb $0x44, %sil
movl %edx, %edi
xorb $0x20, %dil
movb $0x4, %al
orb %sil, %dil
je 0xe6497
movb $0x5, %al
orb %dl, %cl
jne 0xe6454
jmp 0xe6497
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/reko.c
// Function: set_reko_card_filename
static void set_reko_card_filename(deark *c, i64 idx_of_first_main_card,
	i64 cardidx, de_finfo *fi)
{
	static const char *cnames = "a23456789tjqk";
	static const char *snames = "cdhs";
	char nbuf[16];

	if(cardidx>=idx_of_first_main_card && cardidx<idx_of_first_main_card+52) {
		nbuf[0] = cnames[(cardidx-idx_of_first_main_card)/4];
		nbuf[1] = snames[(cardidx-idx_of_first_main_card)%4];
		nbuf[2] = '\0';
	}
	else if(cardidx==0) {
		de_strlcpy(nbuf, "back", sizeof(nbuf));
	}
	else {
		de_strlcpy(nbuf, "other", sizeof(nbuf));
	}

	de_finfo_set_name_from_sz(c, fi, nbuf, 0, DE_ENCODING_LATIN1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %rdx, %rax
subq %rsi, %rax
setge %cl
addq $0x34, %rsi
cmpq %rdx, %rsi
setg %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0xe6504
leaq 0x5f0e1(%rip), %rcx     # 0x1455b1
leaq 0x3(%rax), %rdx
testq %rax, %rax
cmovnsq %rax, %rdx
movq %rdx, %rsi
sarq $0x2, %rsi
movb (%rsi,%rcx), %cl
movb %cl, (%rsp)
andq $-0x4, %rdx
subq %rdx, %rax
leaq 0x5f0c9(%rip), %rcx     # 0x1455bf
movb (%rcx,%rax), %al
movb %al, 0x1(%rsp)
movb $0x0, 0x2(%rsp)
jmp 0xe6526
testq %rdx, %rdx
je 0xe6512
leaq 0x65d9d(%rip), %rsi     # 0x14c2ad
jmp 0xe6519
leaq 0x5f0ab(%rip), %rsi     # 0x1455c4
movq %rsp, %rdi
movl $0x10, %edx
callq 0xe8ded
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xeac7c
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/sgiimage.c
// Function: de_module_sgiimage
void de_module_sgiimage(deark *c, struct deark_module_info *mi)
{
	mi->id = "sgiimage";
	mi->desc = "SGI image";
	mi->run_fn = de_run_sgiimage;
	mi->identify_fn = de_identify_sgiimage;
}

// Assembly:
leaq 0x5f1d4(%rip), %rax     # 0x14571f
movq %rax, (%rsi)
leaq 0x5f1d3(%rip), %rax     # 0x145728
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xe6570
movq %rax, 0x18(%rsi)
leaq 0x735(%rip), %rax       # 0xe6ca0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/sgiimage.c
// Function: de_identify_sgiimage
static int de_identify_sgiimage(deark *c)
{
	UI n;

	if(c->infile->len<513) return 0;

	n = (UI)de_getu16be(0); // MAGIC
	if(n!=474) return 0;

	n = (UI)de_getbyte(2); // "STORAGE"
	if(n>1) return 0;

	n = (UI)de_getbyte(3); // "BPC"
	if(n<1 || n>2) return 0;

	n = (UI)de_getu16be(4); // "DIMENSION"
	// Only 1-3 are legal, but we allow 0-4 because this field is confusing
	// and underspecified.
	if(n>4) return 0;

	n = (UI)de_getu16be(10); // "ZSIZE"
	// Allow 0 because this field may be unused for some image types.
	if(n>4) return 0;

	return 60;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0x201, 0x18(%rdi)      # imm = 0x201
jl 0xe6d1b
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef169
cmpl $0x1da, %eax            # imm = 0x1DA
jne 0xe6d1b
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xef0d5
cmpb $0x1, %al
ja 0xe6d1b
movq 0x18(%r14), %rdi
movl $0x3, %esi
callq 0xef0d5
addb $-0x3, %al
cmpb $-0x2, %al
jb 0xe6d1b
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xef169
cmpl $0x4, %eax
ja 0xe6d1b
movq 0x18(%r14), %rdi
movl $0xa, %esi
callq 0xef169
xorl %ecx, %ecx
cmpl $0x5, %eax
movl $0x3c, %ebx
cmovael %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/sgiimage.c
// Function: sgiimage_decode_image
static void sgiimage_decode_image(deark *c, struct sgiimage_ctx *d,
	dbuf *inf, i64 pos1, de_bitmap *img, de_bitmap *imglo)
{
	i64 pos = pos1;
	i64 pn;
	i64 i, j;

	for(pn=0; pn<d->num_channels; pn++) {
		i64 samplenum;

		if(d->has_alpha && pn==(d->num_channels-1))
			samplenum = 3;
		else
			samplenum = pn;

		for(j=0; j<d->height; j++) {
			for(i=0; i<d->width; i++) {
				UI s;

				s = sgiimage_getsample_p(d, inf, &pos);

				if(imglo) {
					de_bitmap_setsample(img, i, j, samplenum, (de_colorsample)(s>>8));
					de_bitmap_setsample(imglo, i, j, samplenum, (s&0xff));
				}
				else {
					de_bitmap_setsample(img, i, j, samplenum, (de_colorsample)s);
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x10(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x30(%rdi), %rax
testq %rax, %rax
jle 0xe6e51
movq %r8, %rbx
movq %rdi, %r13
xorl %ecx, %ecx
decq %rax
cmpq %rax, %rcx
movq %rcx, %rdx
movl $0x3, %eax
cmoveq %rax, %rdx
cmpb $0x0, 0x39(%r13)
movq %rcx, 0x20(%rsp)
cmoveq %rcx, %rdx
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x28(%r13)
jle 0xe6e3c
movq $0x0, 0x8(%rsp)
cmpq $0x0, 0x20(%r13)
jle 0xe6e25
xorl %r14d, %r14d
movq %r13, %rdi
movq 0x28(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xe6e60
movl %eax, %r15d
testq %rbx, %rbx
je 0xe6dfd
movl %r15d, %r8d
shrl $0x8, %r8d
movl $0xff, %eax
andl %eax, %r8d
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rbp
movq %rbp, %rdx
movq 0x18(%rsp), %r12
movq %r12, %rcx
callq 0xf299c
movl $0xff, %eax
andl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movl %r15d, %r8d
jmp 0xe6e13
movzbl %r15b, %r8d
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0xf299c
incq %r14
cmpq 0x20(%r13), %r14
jl 0xe6d9e
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x28(%r13), %rcx
jl 0xe6d90
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x30(%r13), %rax
cmpq %rax, %rcx
jl 0xe6d57
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/sgiimage.c
// Function: sgiimage_getsample_p
static UI sgiimage_getsample_p(struct sgiimage_ctx *d, dbuf *f, i64 *ppos)
{
	UI s;

	if(d->bytes_per_sample==2) {
		s = (UI)dbuf_getu16be_p(f, ppos);
	}
	else {
		s = dbuf_getbyte_p(f, ppos);
	}
	return s;
}

// Assembly:
pushq %rax
cmpl $0x2, 0x8(%rdi)
jne 0xe6e74
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xef193
jmp 0xe6e82
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xef14d
movzbl %al, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/storyboard.c
// Function: de_module_storyboard
void de_module_storyboard(deark *c, struct deark_module_info *mi)
{
	mi->id = "storyboard";
	mi->desc = "Storyboard PIC/CAP";
	mi->run_fn = de_run_storyboard;
	mi->identify_fn = de_identify_storyboard;
}

// Assembly:
leaq 0x5ea95(%rip), %rax     # 0x145920
movq %rax, (%rsi)
leaq 0x5ea96(%rip), %rax     # 0x14592b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xe6eb0
movq %rax, 0x18(%rsi)
leaq 0xe97(%rip), %rax       # 0xe7d42
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/storyboard.c
// Function: de_identify_storyboard
static int de_identify_storyboard(deark *c)
{
	u8 b[6];
	int has_ext;

	de_read(b, 0, sizeof(b));

	if(!de_memcmp(b, (const void*)"EP_CAP", 6)) {
		return 100;
	}

	if(c->infile->len<1856) return 0;
	if(b[2]!=0xc1) return 0;
	if(b[0]!=0x00 && b[0]!=0x54) return 0;

	has_ext = de_input_file_has_ext(c, "pic") ||
		de_input_file_has_ext(c, "cap");

	if(b[1]==0x84) {
		if(b[3]==0x01 || b[3]==0x03 || b[3]==0x07 || b[3]==0x08) {
			return has_ext ? 90 : 50;
		}
	}
	else if(b[1]==0x85 || b[1]==0x86) {
		return has_ext ? 51 : 11;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
leaq 0xa(%rsp), %r15
movl $0x6, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xeeee8
movl $0x435f5045, %eax       # imm = 0x435F5045
xorl (%r15), %eax
movzwl 0x4(%r15), %ecx
xorl $0x5041, %ecx           # imm = 0x5041
orl %eax, %ecx
je 0xe7e04
movq 0x18(%r14), %rax
cmpq $0x740, 0x18(%rax)      # imm = 0x740
jl 0xe7e23
cmpb $-0x3f, 0xc(%rsp)
jne 0xe7e23
movzbl 0xa(%rsp), %eax
cmpl $0x54, %eax
je 0xe7dae
testl %eax, %eax
jne 0xe7e23
leaq 0x4e028(%rip), %rsi     # 0x135ddd
movq %r14, %rdi
callq 0xea936
movb $0x1, %cl
testl %eax, %eax
jne 0xe7dd7
leaq 0x5dcac(%rip), %rsi     # 0x145a76
movq %r14, %rdi
callq 0xea936
testl %eax, %eax
setne %cl
movb 0xb(%rsp), %al
cmpb $-0x7c, %al
jne 0xe7e0b
movzbl 0xd(%rsp), %eax
cmpl $0x8, %eax
ja 0xe7e23
movl $0x18a, %edx            # imm = 0x18A
btl %eax, %edx
jae 0xe7e23
testb %cl, %cl
movl $0x5a, %eax
movl $0x32, %ebx
cmovnel %eax, %ebx
jmp 0xe7e23
movl $0x64, %ebx
jmp 0xe7e23
addb $0x7b, %al
testb %cl, %cl
movl $0x33, %ecx
movl $0xb, %edx
cmovnel %ecx, %edx
xorl %ebx, %ebx
cmpb $0x2, %al
cmovbl %edx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/xwd.c
// Function: de_module_xwd
void de_module_xwd(deark *c, struct deark_module_info *mi)
{
	mi->id = "xwd";
	mi->desc = "X-Windows screen dump";
	mi->run_fn = de_run_xwd;
	mi->identify_fn = de_identify_xwd;
}

// Assembly:
leaq 0x5dab5(%rip), %rax     # 0x145aa0
movq %rax, (%rsi)
leaq 0x5daaf(%rip), %rax     # 0x145aa4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xe8010
movq %rax, 0x18(%rsi)
leaq 0xb7e(%rip), %rax       # 0xe8b89
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/xwd.c
// Function: de_identify_xwd
static int de_identify_xwd(deark *c)
{
	int has_ext = 0;
	i64 hdrsize;
	i64 cmapn;
	UI n;

	// TODO: Identification could be improved.

	n = (UI)de_getu32be(4); // version
	if (n!=7) return 0;

	hdrsize = (UI)de_getu32be(0);
	if(hdrsize<100 || hdrsize>500) return 0;

	n = (UI)de_getu32be(8); // pixfmt
	if(n>2) return 0;

	n = (UI)de_getu32be(12); // depth
	if(n<1 || n>32) return 0;

	cmapn = de_getu32be(76);
	if(cmapn>512) return 0;
	if(hdrsize + 12*cmapn > c->infile->len) return 0;

	has_ext = de_input_file_has_ext(c, "xwd");
	if(has_ext) return 100;
	return 75;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movl $0x4, %esi
callq 0xef32a
xorl %ebx, %ebx
cmpl $0x7, %eax
jne 0xe8c38
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef32a
movl %eax, %r15d
leaq -0x1f5(%r15), %rax
cmpq $-0x191, %rax           # imm = 0xFE6F
jb 0xe8c38
movq 0x18(%r14), %rdi
movl $0x8, %esi
callq 0xef32a
cmpl $0x2, %eax
ja 0xe8c38
movq 0x18(%r14), %rdi
movl $0xc, %esi
callq 0xef32a
addl $-0x21, %eax
cmpl $-0x20, %eax
jb 0xe8c38
movq 0x18(%r14), %rdi
movl $0x4c, %esi
callq 0xef32a
cmpq $0x200, %rax            # imm = 0x200
jg 0xe8c38
leaq (%rax,%rax,2), %rax
leaq (%r15,%rax,4), %rax
movq 0x18(%r14), %rcx
cmpq 0x18(%rcx), %rax
jg 0xe8c38
leaq 0x5ce7f(%rip), %rsi     # 0x145aa0
movq %r14, %rdi
callq 0xea936
testl %eax, %eax
movl $0x4b, %eax
movl $0x64, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/xwd.c
// Function: find_cmap_and_image
static void find_cmap_and_image(deark *c, lctx *d)
{
	u8 need_cmap_warning = 0;
	i64 size1, size2;
	i64 avail_size;

	d->cmap_num_entries = (i64)d->hf[HF_CMAP_NUM_ENTRIES];
	d->cmap_size_in_bytes = d->cmap_num_entries * 12;

	// It's critical that we know exactly how many entries are in the colormap.
	// Sometimes its in one field, sometimes in another, and it's not clear
	// how to tell which.

	// We hope these two fields are the same.
	if(d->hf[HF_CMAP_NUM_ENTRIES] == d->hf[HF_NCOLORS]) goto done;

	if(d->hf[HF_NCOLORS] > d->hf[HF_CMAP_NUM_ENTRIES]) {
		// I haven't seen this happen.
		goto done;
	}

	// d->hf[HF_NCOLORS] < d->hf[HF_CMAP_NUM_ENTRIES]

	size1 = (i64)d->hf[HF_NCOLORS] * 12; // Note, size1 is smaller than size2
	size2 = (i64)d->hf[HF_CMAP_NUM_ENTRIES] * 12;
	avail_size = c->infile->len - d->expected_image_size - d->cmap_pos;

	if(size2==avail_size) {
		goto done;
	}
	if(size1==avail_size) {
		d->cmap_num_entries = (i64)d->hf[HF_NCOLORS];
		goto done;
	}
	if(size2>avail_size && size1<avail_size) {
		d->cmap_num_entries = (i64)d->hf[HF_NCOLORS];
		need_cmap_warning = 1;
		goto done;
	}

	need_cmap_warning = 1;

done:
	if(need_cmap_warning) {
		de_warn(c, "Can't reliably locate the image. Might not be decoded correctly.");
	}
	d->cmap_size_in_bytes = d->cmap_num_entries * 12;
	d->imgpos = d->cmap_pos + d->cmap_size_in_bytes;
	d->actual_image_size = c->infile->len - d->imgpos;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4c(%rsi), %edx
movl 0x50(%rsi), %eax
movq %rdx, 0x78(%rsi)
movq %rdx, %rcx
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rcx, 0x80(%rsi)
cmpl %edx, %eax
jae 0xe8cc4
movq 0x18(%r14), %rdx
movq 0x18(%rdx), %rdx
movq 0x90(%rbx), %rsi
addq 0x70(%rbx), %rsi
subq %rsi, %rdx
cmpq %rdx, %rcx
je 0xe8cc4
leaq (,%rax,4), %rsi
leaq (%rsi,%rsi,2), %rsi
cmpq %rdx, %rsi
jne 0xe8c9c
movq %rax, 0x78(%rbx)
jmp 0xe8cc4
cmpq %rdx, %rcx
setg %cl
cmpq %rdx, %rsi
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xe8cb3
movq %rax, 0x78(%rbx)
leaq 0x5cf99(%rip), %rsi     # 0x145c53
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9b27
movq 0x78(%rbx), %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x80(%rbx)
addq 0x70(%rbx), %rax
movq %rax, 0x88(%rbx)
movq 0x18(%r14), %rcx
movq 0x18(%rcx), %rcx
subq %rax, %rcx
movq %rcx, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_strlcpy
void de_strlcpy(char *dst, const char *src, size_t dstlen)
{
	size_t n;
	n = de_strlen(src);
	if(n>dstlen-1) n=dstlen-1;
	de_memcpy(dst, src, n);
	dst[n]='\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x180e0
decq %rbx
cmpq %rbx, %rax
cmovbq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x181e0
movb $0x0, (%r15,%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_strcasecmp_internal
static int de_strcasecmp_internal(const char *a, const char *b,
	int has_n, size_t n)
{
	size_t k = 0;

	while(1) {
		unsigned char a1, b1;

		if(has_n && (k>=n)) break;
		a1 = (unsigned char)a[k];
		b1 = (unsigned char)b[k];
		if(a1==0 && b1==0) break;
		if(a1>='A' && a1<='Z') a1 += 32;
		if(b1>='A' && b1<='Z') b1 += 32;
		if(a1<b1) return -1;
		if(a1>b1) return 1;
		k++;
	}
	return 0;
}

// Assembly:
pushq %rbx
xorl %r8d, %r8d
testl %edx, %edx
sete %r9b
cmpq %rcx, %r8
setb %r10b
orb %r9b, %r10b
movl $0x3, %r9d
cmpb $0x1, %r10b
jne 0xe8eb3
movb (%rdi,%r8), %r11b
movb (%rsi,%r8), %r10b
movl %r11d, %ebx
orb %r10b, %bl
je 0xe8eb3
leal -0x41(%r11), %r9d
movzbl %r11b, %ebx
orb $0x20, %r11b
cmpb $0x1a, %r9b
movzbl %r11b, %r9d
cmovael %ebx, %r9d
leal -0x41(%r10), %r11d
movzbl %r10b, %ebx
orb $0x20, %r10b
cmpb $0x1a, %r11b
movzbl %r10b, %r10d
cmovael %ebx, %r10d
cmpb %r10b, %r9b
jae 0xe8e9e
movl $0x1, %r9d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xe8eb3
movl $0x1, %r9d
jbe 0xe8ead
movl $0x1, %eax
jmp 0xe8eb3
incq %r8
xorl %r9d, %r9d
testl %r9d, %r9d
je 0xe8e30
cmpl $0x3, %r9d
jne 0xe8ec4
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_vdbg_internal
static void de_vdbg_internal(deark *c, const char *fmt, va_list ap)
{
	char bars_and_spaces[128];
	size_t bpos;
	int nspaces;
	int nbars;
	const char *dprefix = "DEBUG: ";

	if(c) {
		if(c->dprefix) dprefix = c->dprefix;

		nbars = c->module_nesting_level - 1;
		if(nbars>10) nbars=10;

		nspaces = c->dbg_indent_amount;
		if(nspaces>50) nspaces=50;
	}
	else {
		nbars = 0;
		nspaces = 0;
	}

	bpos = 0;
	while(nbars>0) {
		// One or more vertical lines, to indicate module nesting
		bars_and_spaces[bpos++] = '\xe2'; // U+2502 Box drawings light vertical
		bars_and_spaces[bpos++] = '\x94';
		bars_and_spaces[bpos++] = '\x82';
		nbars--;
	}
	while(nspaces>0) {
		bars_and_spaces[bpos++] = ' ';
		nspaces--;
	}
	bars_and_spaces[bpos] = '\0';

	de_printf(c, DE_MSGTYPE_DEBUG, "%s%s", dprefix, bars_and_spaces);
	de_vprintf(c, DE_MSGTYPE_DEBUG, fmt, ap);
	de_puts(c, DE_MSGTYPE_DEBUG, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdi, %rdi
je 0xe9311
movq 0x120(%rbx), %rax
testq %rax, %rax
leaq 0x5ccf1(%rip), %r12     # 0x145fd9
cmovneq %rax, %r12
movl 0x10(%rbx), %ecx
movl 0xc8(%rbx), %edx
cmpl $0xb, %ecx
movl $0xb, %eax
cmovll %ecx, %eax
decl %eax
cmpl $0x32, %edx
movl $0x32, %r13d
cmovll %edx, %r13d
jmp 0xe931d
leaq 0x5ccc1(%rip), %r12     # 0x145fd9
xorl %r13d, %r13d
xorl %eax, %eax
testl %eax, %eax
jle 0xe933d
incl %eax
xorl %ebp, %ebp
movw $0x94e2, (%rsp,%rbp)    # imm = 0x94E2
movb $-0x7e, 0x2(%rsp,%rbp)
addq $0x3, %rbp
decl %eax
cmpl $0x1, %eax
jg 0xe9325
jmp 0xe933f
xorl %ebp, %ebp
testl %r13d, %r13d
jle 0xe935e
leaq (%rsp,%rbp), %rdi
movl %r13d, %edx
movl $0x20, %esi
callq 0x18140
decl %r13d
addq %r13, %rbp
incq %rbp
movb $0x0, (%rsp,%rbp)
leaq 0x5cc94(%rip), %rdx     # 0x145ffd
movq %rsp, %r8
movq %rbx, %rdi
movl $0x3, %esi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe917a
leaq 0x80(%rsp), %r12
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x109878
movq %rbx, %rdi
movl $0x3, %esi
movq %r12, %rdx
callq 0xe8edf
leaq 0x26deb(%rip), %rdx     # 0x11019b
movq %rbx, %rdi
movl $0x3, %esi
callq 0xe8edf
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_render_hexbytes_from_mem
char *de_render_hexbytes_from_mem(const u8 *inbytes, i64 ilen,
	char *outbuf, size_t outbuf_len)
{
	i64 inpos;
	size_t outpos = 0;

	if(ilen<1) goto done;
	if(ilen > (i64)(outbuf_len/3)) {
		ilen = (i64)(outbuf_len/3);
	}

	for(inpos = 0; inpos<ilen; inpos++) {
		if(inpos>0) outbuf[outpos++] = ' ';
		outbuf[outpos++] = de_get_hexchar((int)(inbytes[inpos]/16));
		outbuf[outpos++] = de_get_hexchar((int)(inbytes[inpos]%16));
	}

done:
	outbuf[outpos] = '\0';
	return outbuf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
testq %rsi, %rsi
jle 0xe95d0
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
movq %rcx, %rax
mulq %rdx
movq %rdx, %r15
shrq %r15
cmpq %rsi, %r15
cmovgeq %rsi, %r15
cmpq $0x3, %rcx
jae 0xe95d5
xorl %r12d, %r12d
jmp 0xe961a
movq %rdi, %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
testq %r13, %r13
je 0xe95eb
movb $0x20, (%rbx,%r12)
incq %r12
movzbl (%r14,%r13), %edi
shrl $0x4, %edi
callq 0xec1b8
movb %al, (%rbx,%r12)
movzbl (%r14,%r13), %edi
andl $0xf, %edi
callq 0xec1b8
movb %al, 0x1(%rbx,%r12)
addq $0x2, %r12
incq %r13
cmpq %r13, %r15
jne 0xe95de
movb $0x0, (%rbx,%r12)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_render_hexbytes_from_dbuf
char *de_render_hexbytes_from_dbuf(dbuf *inf, i64 pos, i64 ilen,
	char *outbuf, size_t outbuf_len)
{
	u8 *inbuf = 0;

	if(ilen>1024) ilen = 1024;
	inbuf = de_malloc(inf->c, ilen);

	dbuf_read(inf, inbuf, pos, ilen);
	(void)de_render_hexbytes_from_mem(inbuf, ilen, outbuf, outbuf_len);
	de_free(inf->c, inbuf);
	return outbuf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl $0x400, %r13d           # imm = 0x400
cmpq %r13, %rdx
cmovlq %rdx, %r13
movq 0x8(%rdi), %rdi
movq %r13, %rsi
callq 0xe969b
movq %rax, %rbp
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0xeeee8
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xe959c
movq %rbp, %rdi
callq 0x18030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_malloc
void *de_malloc(deark *c, i64 n)
{
	void *m;

	if(n==0) n=1;
	if(n<0 || n>DE_MAX_MALLOC) {
		de_err(c,"Out of memory (%"I64_FMT" bytes requested)", n);
		de_fatalerror(c);
		// NOTREACHED
		n = 1;
	}

	while(1) {
		m = calloc((size_t)n, 1);
		if(m) return m;

		de_err(c, "Memory allocation failed (%"I64_FMT" bytes)", n);
		de_fatalerror(c);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x1, %rsi
movq %rsi, %r14
adcq $0x0, %r14
cmpq $0x1dcd6501, %rsi       # imm = 0x1DCD6501
jb 0xe96f1
leaq 0x5c7a0(%rip), %rsi     # 0x145e5e
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9df7
testq %rbx, %rbx
je 0xe96e1
movq 0x118(%rbx), %rax
testq %rax, %rax
je 0xe96e1
movq %rbx, %rdi
callq *%rax
movl $0x1, %edi
callq 0x109cd7
movl $0x1, %r14d
movl $0x1, %esi
movq %r14, %rdi
callq 0x18190
testq %rax, %rax
jne 0xe974c
leaq 0x5c778(%rip), %r15     # 0x145e82
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9df7
testq %rbx, %rbx
je 0xe9730
movq 0x118(%rbx), %rax
testq %rax, %rax
je 0xe9730
movq %rbx, %rdi
callq *%rax
movl $0x1, %edi
callq 0x109cd7
movl $0x1, %esi
movq %r14, %rdi
callq 0x18190
testq %rax, %rax
je 0xe970a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_dbg_hexdump
void de_dbg_hexdump(deark *c, dbuf *f, i64 pos1,
	i64 nbytes_avail, i64 max_nbytes_to_dump,
	const char *prefix1, unsigned int flags)
{
	struct hexdump_ctx hctx;

	hctx.flags = flags;
	hctx.prefix = (prefix1) ? prefix1 : "data";
	hctx.printlinefn = hexdump_printline_dbg;

	de_hexdump_internal(c, &hctx, f, pos1, nbytes_avail, max_nbytes_to_dump);
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %r8, %rax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movl 0x130(%rsp), %r10d
testq %r9, %r9
leaq 0x50822(%rip), %r11     # 0x139fa1
cmovneq %r9, %r11
movq %rsp, %rsi
movl %r10d, 0x10(%rsi)
movq %r11, (%rsi)
leaq 0x14(%rip), %r9         # 0xe97a8
movq %r9, 0x18(%rsi)
movq %rax, %r9
callq 0xe97ba
addq $0x128, %rsp            # imm = 0x128
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_hexdump2
void de_hexdump2(deark *c, dbuf *f, i64 pos1, i64 nbytes_avail,
	i64 max_nbytes_to_dump, unsigned int flags)
{
	struct hexdump_ctx hctx;

	hctx.flags = flags | 0x2;
	hctx.prefix = NULL;
	hctx.printlinefn = hexdump_printline_ext;
	de_hexdump_internal(c, &hctx, f, pos1, nbytes_avail, max_nbytes_to_dump);
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %r8, %rax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
orl $0x2, %r9d
movq %rsp, %rsi
movl %r9d, 0x10(%rsi)
movq $0x0, (%rsi)
leaq 0x14(%rip), %r9         # 0xe9af1
movq %r9, 0x18(%rsi)
movq %rax, %r9
callq 0xe97ba
addq $0x128, %rsp            # imm = 0x128
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_get_colorsample_code
char *de_get_colorsample_code(deark *c, de_color clr, char *csamp,
	size_t csamplen)
{
	unsigned int r, g, b;

	if(csamplen<8) {
		csamp[0]='\0';
		return csamp;
	}

	r = (unsigned int)DE_COLOR_R(clr);
	g = (unsigned int)DE_COLOR_G(clr);
	b = (unsigned int)DE_COLOR_B(clr);

	// Only the low 4 bits are significant. We add 16 so that the bits can't
	// all be 0; since we can't have NUL bytes in this NUL-terminated string.
	// Also, it's nice if the values are all <= 127, to make them UTF-8
	// compatible.
	csamp[0] = '\x03'; // refer to DE_CODEPOINT_RGBSAMPLE
	csamp[1] = 16 + (r>>4)%16;
	csamp[2] = 16 + r%16;
	csamp[3] = 16 + (g>>4)%16;
	csamp[4] = 16 + g%16;
	csamp[5] = 16 + (b>>4)%16;
	csamp[6] = 16 + b%16;
	csamp[7] = '\0';
	return csamp;
}

// Assembly:
movq %rdx, %rax
cmpq $0x8, %rcx
jb 0xe9c1a
movl %esi, %ecx
shrl $0x10, %ecx
movl %esi, %edx
shrl $0x8, %edx
movb $0x3, (%rax)
movl %esi, %edi
shrl $0x14, %edi
andb $0xf, %dil
orb $0x10, %dil
movb %dil, 0x1(%rax)
andb $0xf, %cl
orb $0x10, %cl
movb %cl, 0x2(%rax)
movl %esi, %ecx
shrl $0xc, %ecx
andb $0xf, %cl
orb $0x10, %cl
movb %cl, 0x3(%rax)
andb $0xf, %dl
orb $0x10, %dl
movb %dl, 0x4(%rax)
movl %esi, %ecx
shrb $0x4, %cl
orb $0x10, %cl
movb %cl, 0x5(%rax)
andb $0xf, %sil
orb $0x10, %sil
movb %sil, 0x6(%rax)
leaq 0x7(%rax), %rdx
movb $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_dbg_pal_entry2
void de_dbg_pal_entry2(deark *c, i64 idx, de_color clr,
	const char *txt_before, const char *txt_in, const char *txt_after)
{
	int r,g,b,a;
	char astr[32];
	char csamp[16];

	if(c->debug_level<2) return;
	if(!txt_before) txt_before="";
	if(!txt_in) txt_in="";
	if(!txt_after) txt_after="";
	r = (int)DE_COLOR_R(clr);
	g = (int)DE_COLOR_G(clr);
	b = (int)DE_COLOR_B(clr);
	a = (int)DE_COLOR_A(clr);
	if(a!=0xff) {
		de_snprintf(astr, sizeof(astr), ",A=%d", a);
	}
	else {
		astr[0] = '\0';
	}

	de_get_colorsample_code(c, clr, csamp, sizeof(csamp));
	de_dbg2(c, "pal[%3d] = %s(%3d,%3d,%3d%s%s)%s%s", (int)idx, txt_before,
		r, g, b, astr, txt_in, csamp, txt_after);
}

// Assembly:
cmpl $0x2, (%rdi)
jl 0xe9d67
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rdx
testq %rcx, %rcx
leaq 0x5c0f2(%rip), %rax     # 0x145d40
cmoveq %rax, %r15
testq %r8, %r8
cmoveq %rax, %rbx
testq %r9, %r9
cmoveq %rax, %r14
movl %r12d, %ebp
shrl $0x10, %ebp
movl $0xff, %eax
movl %ebp, %r8d
andl %eax, %r8d
movl %r12d, %r13d
shrl $0x8, %r13d
movl %r13d, %r9d
andl %eax, %r9d
movl %r12d, %ecx
andl %eax, %ecx
movq %rcx, 0x18(%rsp)
movl %r12d, %ecx
shrl $0x18, %ecx
cmpl %eax, %ecx
jne 0xe9c99
movb $0x0, 0x20(%rsp)
jmp 0xe9cd7
movq %rdx, 0x10(%rsp)
leaq 0x5c152(%rip), %rdx     # 0x145df7
movq %rdi, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x20, %esi
xorl %eax, %eax
movl %r8d, 0x4(%rsp)
movl %r9d, (%rsp)
callq 0xe8d67
movl (%rsp), %r9d
movl 0x4(%rsp), %r8d
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %r10
movb $0x3, (%r10)
movl %r12d, %eax
shrl $0x14, %eax
andb $0xf, %al
orb $0x10, %al
movb %al, 0x1(%r10)
andb $0xf, %bpl
orb $0x10, %bpl
movb %bpl, 0x2(%r10)
movl %r12d, %eax
shrl $0xc, %eax
andb $0xf, %al
orb $0x10, %al
movb %al, 0x3(%r10)
andb $0xf, %r13b
orb $0x10, %r13b
movb %r13b, 0x4(%r10)
movl %r12d, %eax
shrb $0x4, %al
orb $0x10, %al
movb %al, 0x5(%r10)
andb $0xf, %r12b
orb $0x10, %r12b
movb %r12b, 0x6(%r10)
movb $0x0, 0x7(%r10)
subq $0x8, %rsp
leaq 0x28(%rsp), %r11
leaq 0x5c0bc(%rip), %rsi     # 0x145dfd
movq %r15, %rcx
xorl %eax, %eax
pushq %r14
pushq %r10
pushq %rbx
pushq %r11
pushq 0x40(%rsp)
callq 0xe93cf
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_verr
void de_verr(deark *c, const char *fmt, va_list ap)
{
	if(c) {
		c->error_count++;
	}

	de_puts(c, DE_MSGTYPE_ERROR, "Error: ");
	de_vprintf(c, DE_MSGTYPE_ERROR, fmt, ap);
	de_puts(c, DE_MSGTYPE_ERROR, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdi, %rdi
je 0xe9d9a
incl 0x48(%rbx)
leaq 0x5c07f(%rip), %rdx     # 0x145e20
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe8edf
movq %rsp, %r12
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x109878
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0xe8edf
leaq 0x263c0(%rip), %rdx     # 0x11019b
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe8edf
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_vwarn
void de_vwarn(deark *c, const char *fmt, va_list ap)
{
	if(!c->show_warnings) return;
	de_puts(c, DE_MSGTYPE_WARNING, "Warning: ");
	de_vprintf(c, DE_MSGTYPE_WARNING, fmt, ap);
	de_puts(c, DE_MSGTYPE_WARNING, "\n");
}

// Assembly:
cmpl $0x0, 0xc4(%rdi)
je 0xe9ef4
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5bf86(%rip), %rdx     # 0x145e28
movl $0x1, %esi
callq 0xe8edf
movq %rsp, %r12
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x109878
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0xe8edf
leaq 0x262c2(%rip), %rdx     # 0x11019b
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8edf
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_info
void de_info(deark *c, const char *fmt, ...)
{
	va_list ap;

	if(!c->show_infomessages) return;
	va_start(ap, fmt);
	de_vprintf(c, DE_MSGTYPE_MESSAGE, fmt, ap);
	va_end(ap);
	de_puts(c, DE_MSGTYPE_MESSAGE, "\n");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xe9f4e
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x0, 0xc0(%rdi)
je 0xe9fb8
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %r10, %rdx
callq 0x109878
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xe8edf
leaq 0x261ed(%rip), %rdx     # 0x11019b
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe8edf
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_msg
void de_msg(deark *c, const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	de_vprintf(c, DE_MSGTYPE_MESSAGE, fmt, ap);
	va_end(ap);
	de_puts(c, DE_MSGTYPE_MESSAGE, "\n");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xea023
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %r10, %rdx
callq 0x109878
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xe8edf
leaq 0x2612c(%rip), %rdx     # 0x11019b
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe8edf
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_internal_err_fatal
void de_internal_err_fatal(deark *c, const char *fmt, ...)
{
	va_list ap;

	de_puts(c, DE_MSGTYPE_ERROR, "Internal error: ");
	va_start(ap, fmt);
	de_vprintf(c, DE_MSGTYPE_ERROR, fmt, ap);
	va_end(ap);
	de_puts(c, DE_MSGTYPE_ERROR, "\n");
	de_fatalerror(c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0xea108
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x5bd23(%rip), %rdx     # 0x145e32
movl $0x2, %esi
callq 0xe8edf
movq %rsp, %rcx
movq %r15, 0x10(%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %r14, %rdx
callq 0x109878
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0xe8edf
leaq 0x26033(%rip), %rdx     # 0x11019b
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe8edf
testq %rbx, %rbx
je 0xea18b
movq 0x118(%rbx), %rax
testq %rax, %rax
je 0xea18b
movq %rbx, %rdi
callq *%rax
movl $0x1, %edi
callq 0x109cd7
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_mallocarray
void *de_mallocarray(deark *c, i64 nmemb, size_t membsize)
{
	if(nmemb>DE_MAX_MALLOC || nmemb<0 || membsize>DE_MAX_MALLOC) {
		de_err(c, "Out of memory");
		de_fatalerror(c);
		// NOTREACHED
		return de_malloc(c, 1);
	}

	return de_malloc(c, nmemb*(i64)membsize);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1dcd6501, %eax       # imm = 0x1DCD6501
cmpq %rax, %rsi
setb %cl
cmpq %rax, %rdx
setb %al
testb %al, %cl
jne 0xea2aa
leaq 0x5bbd7(%rip), %rsi     # 0x145e50
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
testq %rbx, %rbx
je 0xea299
movq 0x118(%rbx), %rax
testq %rax, %rax
je 0xea299
movq %rbx, %rdi
callq *%rax
movl $0x1, %edi
callq 0x109cd7
movl $0x1, %edx
jmp 0xea2ae
imulq %rsi, %rdx
movq %rbx, %rdi
movq %rdx, %rsi
popq %rbx
jmp 0xe969b
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_reallocarray
void *de_reallocarray(deark *c, void *m, i64 oldnmemb, size_t membsize,
	i64 newnmemb)
{
	if(newnmemb>DE_MAX_MALLOC || newnmemb<0 || oldnmemb<0 || membsize>DE_MAX_MALLOC) {
		de_err(c, "Out of memory");
		de_fatalerror(c);
		// NOTREACHED
		return de_malloc(c, 1);
	}

	return de_realloc(c, m,
		oldnmemb*(i64)membsize,
		newnmemb*(i64)membsize);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x1dcd6500, %rcx       # imm = 0x1DCD6500
ja 0xea2e9
testq %rdx, %rdx
js 0xea2e9
cmpq $0x1dcd6501, %r8        # imm = 0x1DCD6501
jae 0xea2e9
imulq %rcx, %rdx
imulq %rcx, %r8
movq %rbx, %rdi
movq %r8, %rcx
popq %rbx
jmp 0xea328
leaq 0x5bb60(%rip), %rsi     # 0x145e50
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
testq %rbx, %rbx
je 0xea310
movq 0x118(%rbx), %rax
testq %rax, %rax
je 0xea310
movq %rbx, %rdi
callq *%rax
movl $0x1, %edi
callq 0x109cd7
movl $0x1, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xe969b
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_realloc
void *de_realloc(deark *c, void *oldmem, i64 oldsize, i64 newsize)
{
	void *newmem;

	if(!oldmem) {
		return de_malloc(c, newsize);
	}

	newmem = realloc(oldmem, (size_t)newsize);
	if(!newmem) {
		de_err(c, "Memory reallocation failed (%"I64_FMT" bytes)", newsize);
		free(oldmem);
		de_fatalerror(c);
		// NOTREACHED
		return de_malloc(c, newsize);
	}

	if(oldsize<newsize) {
		// zero out any newly-allocated bytes
		de_zeromem(&((u8*)newmem)[oldsize], (size_t)(newsize-oldsize));
	}

	return newmem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xea3b3
movq %rdx, %r12
movq %rsi, %r15
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x18250
testq %rax, %rax
je 0xea377
movq %rax, %r13
subq %r12, %rbx
jle 0xea36a
movq %r13, %rdi
addq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x18140
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x5bb29(%rip), %rsi     # 0x145ea7
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe9df7
movq %r15, %rdi
callq 0x18030
testq %r14, %r14
je 0xea3a9
movq 0x118(%r14), %rax
testq %rax, %rax
je 0xea3a9
movq %r14, %rdi
callq *%rax
movl $0x1, %edi
callq 0x109cd7
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe969b
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_get_module_idx_by_id
int de_get_module_idx_by_id(deark *c, const char *module_id)
{
	int i;
	int k;

	if(!module_id) return -1;

	for(i=0; i<c->num_modules; i++) {
		if(!de_strcmp(c->module_info[i].id, module_id)) {
			return i;
		}
		for(k=0; k<DE_MAX_MODULE_ALIASES; k++) {
			if(!c->module_info[i].id_alias[k]) break;
			if(!de_strcmp(c->module_info[i].id_alias[k], module_id)) {
				return i;
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0xea47a
movslq 0x1a8(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jle 0xea47a
movq %rsi, %r14
movq 0x1b0(%rdi), %r15
leaq 0x38(%r15), %rbp
xorl %r12d, %r12d
leaq (%r12,%r12,8), %rax
movq (%r15,%rax,8), %rdi
movq %r14, %rsi
callq 0x181a0
testl %eax, %eax
je 0xea477
xorl %r13d, %r13d
movq (%rbp,%r13,8), %rdi
testq %rdi, %rdi
je 0xea468
movq %r14, %rsi
callq 0x181a0
testl %eax, %eax
je 0xea477
incq %r13
cmpq $0x1, %r13
je 0xea449
incq %r12
addq $0x48, %rbp
cmpq (%rsp), %r12
jne 0xea432
jmp 0xea47a
movl %r12d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_run_module
int de_run_module(deark *c, struct deark_module_info *mi, de_module_params *mparams,
	enum de_moddisp_enum moddisp)
{
	enum de_moddisp_enum old_moddisp;
	struct de_detection_data_struct *old_detection_data;
	struct de_mp_data *old_mp_data;

	if(!mi) return 0;
	if(!mi->run_fn) {
		if(moddisp==DE_MODDISP_EXPLICIT) {
			de_err(c, "Module '%s' is disabled", mi->id);
		}
		else { // presumably DE_MODDISP_INTERNAL
			de_dbg(c, "[module '%s' is disabled]", mi->id);
		}
		return 0;
	}
	// Note that c->module_nesting_level is 0 when we are not in a module,
	// 1 when in the top-level module, 2 for a first-level submodule, etc.
	if(c->module_nesting_level >= 1+DE_MAX_SUBMODULE_NESTING_LEVEL) {
		de_err(c, "Max module nesting level exceeded");
		return 0;
	}

	old_moddisp = c->module_disposition;
	c->module_disposition = moddisp;
	old_detection_data = c->detection_data;
	if(c->module_nesting_level > 0) {
		c->detection_data = NULL;
	}

	old_mp_data = c->mp_data;
	if(c->module_nesting_level > 0) {
		c->mp_data = NULL;
	}

	if(c->module_nesting_level>0 && c->debug_level>=3) {
		de_dbg3(c, "[using %s module]", mi->id);
	}
	c->module_nesting_level++;
	mi->run_fn(c, mparams);
	c->module_nesting_level--;
	c->module_disposition = old_moddisp;
	c->detection_data = old_detection_data;
	c->mp_data = old_mp_data;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xea4ec
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0xea4f3
movl 0x10(%rbx), %eax
cmpl $0xb, %eax
jl 0xea510
leaq 0x5ba25(%rip), %rsi     # 0x145f00
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0xea587
xorl %ebp, %ebp
jmp 0xea587
movq (%r14), %rdx
cmpl $0x2, %ecx
jne 0xea574
leaq 0x5b9cc(%rip), %rsi     # 0x145ece
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0xea587
movq %rdx, %r15
movl 0x24(%rbx), %ebp
movl %ecx, 0x24(%rbx)
movq 0x28(%rbx), %r12
testl %eax, %eax
jle 0xea529
movq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %r13
testl %eax, %eax
jle 0xea552
movq $0x0, 0x30(%rbx)
cmpl $0x3, (%rbx)
jl 0xea552
movq (%r14), %rdx
leaq 0x5b9da(%rip), %rsi     # 0x145f22
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
incl 0x10(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%r14)
decl 0x10(%rbx)
movl %ebp, 0x24(%rbx)
movq %r12, 0x28(%rbx)
movq %r13, 0x30(%rbx)
movl $0x1, %ebp
jmp 0xea587
leaq 0x5b96b(%rip), %rsi     # 0x145ee6
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_run_module_by_id
int de_run_module_by_id(deark *c, const char *id, de_module_params *mparams)
{
	struct deark_module_info *module_to_use;

	module_to_use = de_get_module_by_id(c, id);
	if(!module_to_use) {
		de_err(c, "Unknown or unsupported format \"%s\"", id);
		return 0;
	}

	return de_run_module(c, module_to_use, mparams, DE_MODDISP_INTERNAL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0xea3fc
testl %eax, %eax
js 0xea5c2
movl %eax, %eax
leaq (%rax,%rax,8), %rsi
shlq $0x3, %rsi
addq 0x1b0(%r14), %rsi
jmp 0xea5c4
xorl %esi, %esi
testq %rsi, %rsi
je 0xea5de
movq %r14, %rdi
movq %r15, %rdx
movl $0x3, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xea4af
leaq 0x5b94f(%rip), %rsi     # 0x145f34
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe9df7
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_run_module_by_id_on_slice
int de_run_module_by_id_on_slice(deark *c, const char *id, de_module_params *mparams,
	dbuf *f, i64 pos, i64 len)
{
	dbuf *old_ifile;
	int ret;

	old_ifile = c->infile;

	if(pos==0 && len==f->len) {
		// Optimization: We don't need a subfile in this case
		c->infile = f;
		ret = de_run_module_by_id(c, id, mparams);
	}
	else {
		c->infile = dbuf_open_input_subfile(f, pos, len);
		ret = de_run_module_by_id(c, id, mparams);
		dbuf_close(c->infile);
	}

	c->infile = old_ifile;
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %r12
testq %r8, %r8
jne 0xea630
cmpq %r9, 0x18(%rcx)
jne 0xea630
movq %rcx, 0x18(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xea598
movl %eax, %ebp
jmp 0xea65b
movq %rcx, %rdi
movq %r8, %rsi
movq %r9, %rdx
callq 0xf1988
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xea598
movl %eax, %ebp
movq 0x18(%rbx), %rdi
callq 0xf0b13
movq %r12, 0x18(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_run_module_by_id_on_slice2
int de_run_module_by_id_on_slice2(deark *c, const char *id, const char *codes,
	dbuf *f, i64 pos, i64 len)
{
	de_module_params *mparams = NULL;
	int ret;

	mparams = de_malloc(c, sizeof(de_module_params));
	mparams->in_params.codes = codes;
	ret = de_run_module_by_id_on_slice(c, id, mparams, f, pos, len);
	de_free(c, mparams);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movl $0x70, %esi
callq 0xe969b
movq %rax, %rbx
movq %r12, (%rax)
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r15, %rcx
movq %r14, %r8
movq (%rsp), %r9
callq 0xea5fa
movl %eax, %ebp
movq %rbx, %rdi
callq 0x18030
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_get_ext_option
const char *de_get_ext_option(deark *c, const char *name)
{
	int i;

	for(i=0; i<c->num_ext_options; i++) {
		if(!de_strcmp(c->ext_option[i].name, name)) {
			return c->ext_option[i].val;
		}
	}
	return NULL; // Option name not found.
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x1b8(%rdi), %r12
testq %r12, %r12
jle 0xea70e
movq %rsi, %r15
movq %rdi, %r14
shlq $0x4, %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
movq 0x1c0(%r14,%r13), %rdi
movq %r15, %rsi
callq 0x181a0
testl %eax, %eax
je 0xea712
addq $0x10, %r13
cmpq %r13, %r12
jne 0xea6ef
jmp 0xea71a
xorl %ebx, %ebx
jmp 0xea71a
movq 0x1c8(%r14,%r13), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_get_ext_option_bool
int de_get_ext_option_bool(deark *c, const char *name, int defaultval)
{
	const char *val;

	val = de_get_ext_option(c, name);
	if(!val) return defaultval;
	if(val[0]=='\0' || val[0]=='1' || val[0]=='y' || val[0]=='Y' ||
		val[0]=='t' || val[0]=='T')
	{
		return 1;
	}
	if(val[0]=='0' || val[0]=='n' || val[0]=='N' || val[0]=='f' ||
		val[0]=='F')
	{
		return 0;
	}
	return defaultval;
}

// Assembly:
pushq %rbx
movl %edx, %ebx
callq 0xea6cb
testq %rax, %rax
je 0xea779
movzbl (%rax), %ecx
movl $0x1, %eax
cmpl $0x45, %ecx
jle 0xea76b
addl $-0x46, %ecx
cmpl $0x33, %ecx
ja 0xea779
movabsq $0x10100000101, %rdx    # imm = 0x10100000101
btq %rcx, %rdx
jb 0xea77d
movabsq $0x8400000084000, %rdx  # imm = 0x8400000084000
btq %rcx, %rdx
jb 0xea77f
jmp 0xea779
testl %ecx, %ecx
je 0xea77f
cmpl $0x30, %ecx
je 0xea77d
cmpl $0x31, %ecx
je 0xea77f
movl %ebx, %eax
jmp 0xea77f
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-util.c
// Function: de_pad_to_n
i64 de_pad_to_n(i64 x, i64 n)
{
	i64 r;
	if(n<2)
		return x;
	r = x%n;
	if(r==0)
		return x;
	return x - r + n;
}

// Assembly:
cmpq $0x2, %rsi
jl 0xea827
movq %rdi, %rax
cqto
idivq %rsi
testq %rdx, %rdx
je 0xea827
addq %rdi, %rsi
subq %rdx, %rsi
movq %rsi, %rdi
movq %rdi, %rax
retq