LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pack.c
// Function: de_run_pack
static void de_run_pack(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos = 0;
	dbuf *outf = NULL;

	d = de_malloc(c, sizeof(lctx));

	pos += 2;
	d->unc_size = de_getu32be_p(&pos);
	de_dbg(c, "uncompressed size: %"I64_FMT, d->unc_size);

	if(d->unc_size!=0) {
		d->ht = fmtutil_huffman_create_decoder(c, 257, 257);
		if(!read_tree(c, d, pos)) goto done;
		pos += d->tree_def_size;
	}

	outf = dbuf_create_output_file(c, "bin", NULL, 0);
	dbuf_enable_wbuffer(outf);

	if(d->unc_size!=0) {
		decode_file_data(c, d, pos, outf);
	}

done:
	dbuf_close(outf);
	if(d) {
		if(d->ht) {
			fmtutil_huffman_destroy_decoder(c, d->ht);
		}
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x110, %esi            # imm = 0x110
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1654b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq 0xb291d(%rip), %rsi     # 0x1c3b20
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x111258
movq -0x8(%rbp), %rdi
movl $0x101, %edx            # imm = 0x101
movq %rdx, %rsi
callq 0x188560
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x111350
cmpl $0x0, %eax
jne 0x111248
jmp 0x11129c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xaffa4(%rip), %rsi     # 0x1c1207
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x167b90
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x11129a
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x1115b0
jmp 0x11129c
movq -0x28(%rbp), %rdi
callq 0x1676a0
cmpq $0x0, -0x18(%rbp)
je 0x1112d5
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1112c8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x1886d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pack.c
// Function: de_identify_pack
static int de_identify_pack(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, "\x1f\x1e", 2)) {
		if(de_input_file_has_ext(c, ".z")) {
			return 100;
		}
		return 65;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xb28e2(%rip), %rdx     # 0x1c3be1
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x111335
movq -0x10(%rbp), %rdi
leaq 0xb28cb(%rip), %rsi     # 0x1c3be4
callq 0x15d180
cmpl $0x0, %eax
je 0x11132c
movl $0x64, -0x4(%rbp)
jmp 0x11133c
movl $0x41, -0x4(%rbp)
jmp 0x11133c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packit.c
// Function: de_module_packit
void de_module_packit(deark *c, struct deark_module_info *mi)
{
	mi->id = "packit";
	mi->desc = "PackIt";
	mi->run_fn = de_run_packit;
	mi->identify_fn = de_identify_packit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb2480(%rip), %rcx     # 0x1c3be7
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb2479(%rip), %rcx     # 0x1c3bee
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x1117a0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1cd(%rip), %rcx       # 0x111960
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packit.c
// Function: de_identify_packit
static int de_identify_packit(deark *c)
{
	u8 t;

	if(dbuf_memcmp(c->infile, 0, (const void*)"PMa", 3)) {
		return 0;
	}
	t = de_getbyte(3);
	if(t=='g' || t=='4') return 100;
	if(t>='1' && t<='7') return 35;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xb23f5(%rip), %rdx     # 0x1c3d74
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x111997
movl $0x0, -0x4(%rbp)
jmp 0x1119e9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x3, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x67, %eax
je 0x1119be
movzbl -0x11(%rbp), %eax
cmpl $0x34, %eax
jne 0x1119c7
movl $0x64, -0x4(%rbp)
jmp 0x1119e9
movzbl -0x11(%rbp), %eax
cmpl $0x31, %eax
jl 0x1119e2
movzbl -0x11(%rbp), %eax
cmpl $0x37, %eax
jg 0x1119e2
movl $0x23, -0x4(%rbp)
jmp 0x1119e9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packit.c
// Function: packit_destroy_pmd
static void packit_destroy_pmd(deark *c, struct packit_md *pmd)
{
	if(!pmd) return;
	dbuf_close(pmd->unc_data);
	de_destroy_stringreaderdata(c, pmd->fname);
	de_advfile_destroy(pmd->advf);
	de_free(c, pmd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x111a19
jmp 0x111a54
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x166830
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x17aaa0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packit.c
// Function: packit_scan_member_data
static void packit_scan_member_data(deark *c, struct packit_ctx *d,
	struct packit_md *pmd)
{
	u32 datarsrc_crc_reported;
	u32 datarsrc_crc_calc;

	if(pmd->rfork_pos + pmd->rfork_len + 2 > pmd->inf->len) {
		d->fatalerrflag = 1;
		d->need_errmsg = 1;
		goto done;
	}

	datarsrc_crc_reported = (u32)dbuf_getu16be(pmd->inf, pmd->rfork_pos +
		pmd->rfork_len);
	de_dbg(c, "data/resource crc (reported): 0x%04x", (UI)datarsrc_crc_reported);

	de_crcobj_reset(d->crco_datarsrc);
	de_crcobj_addslice(d->crco_datarsrc, pmd->inf, pmd->dfork_pos,
		pmd->dfork_len + pmd->rfork_len);
	datarsrc_crc_calc = de_crcobj_getval(d->crco_datarsrc);
	de_dbg(c, "data/resource crc (calculated): 0x%04x", (UI)datarsrc_crc_calc);
	if(datarsrc_crc_reported != datarsrc_crc_calc) {
		// TODO: Maybe should be a warning? Or nonfatal?
		de_err(c, "Bad data/resource CRC (reported 0x%04x, calculated 0x%04x)",
			(UI)datarsrc_crc_reported, (UI)datarsrc_crc_calc);
		d->fatalerrflag = 1;
		goto done;
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0xe0(%rcx), %rax
addq $0x2, %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x112200
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x1122ce
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0xd8(%rax), %rsi
movq -0x18(%rbp), %rax
addq 0xe0(%rax), %rsi
callq 0x1651d0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0xb1a8b(%rip), %rsi     # 0x1c3cbf
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x15f250
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0xd0(%rax), %rcx
movq -0x18(%rbp), %rax
addq 0xe0(%rax), %rcx
callq 0x15f500
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x15f340
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %edx
leaq 0xb1a48(%rip), %rsi     # 0x1c3ce4
movb $0x0, %al
callq 0x15b0d0
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x1122cc
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
leaq 0xb1a4f(%rip), %rsi     # 0x1c3d0b
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x1122ce
jmp 0x1122ce
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packit.c
// Function: packit_advfile_cbfn
static int packit_advfile_cbfn(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	struct packit_advfudata *u = (struct packit_advfudata*)advf->userdata;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		dbuf_copy(u->pmd->inf, u->pmd->dfork_pos, u->pmd->dfork_len, afp->outf);
	}
	else if(afp->whattodo == DE_ADVFILE_WRITERSRC) {
		dbuf_copy(u->pmd->inf, u->pmd->rfork_pos, u->pmd->rfork_len, afp->outf);
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x112692
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xd0(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x166070
jmp 0x1126d4
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x1126d2
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xd8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xe0(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x166070
jmp 0x1126d4
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkm.c
// Function: de_module_pkm
void de_module_pkm(deark *c, struct deark_module_info *mi)
{
	mi->id = "pkm";
	mi->desc = "PKM (GrafX2)";
	mi->run_fn = de_run_pkm;
	mi->identify_fn = de_identify_pkm;
	mi->help_fn = de_help_pkm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb1681(%rip), %rcx     # 0x1c3d78
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb1677(%rip), %rcx     # 0x1c3d7c
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x112740
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x39d(%rip), %rcx       # 0x112ac0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x3de(%rip), %rcx       # 0x112b10
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkm.c
// Function: pkm_decompress_image
static void pkm_decompress_image(deark *c, struct pkm_ctx *d, i64 pos1)
{
	i64 pos = pos1;
	i64 nbytes_dcmpr = 0;

	de_dbg(c, "compressed image at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	while(1) {
		u8 b;
		u8 b2;
		i64 count;

		if(nbytes_dcmpr >= d->unc_image_size) goto done; // Sufficient output
		if(pos >= c->infile->len) goto done; // No more input

		b = de_getbyte_p(&pos);
		if(b==d->pack_byte) {
			b2 = de_getbyte_p(&pos);
			count = (i64)de_getbyte_p(&pos);
			dbuf_write_run(d->unc_pixels, b2, count);
			nbytes_dcmpr += count;
		}
		else if(b==d->pack_word) {
			b2 = de_getbyte_p(&pos);
			count = de_getu16be_p(&pos);
			dbuf_write_run(d->unc_pixels, b2, count);
			nbytes_dcmpr += count;
		}
		else {
			dbuf_writebyte(d->unc_pixels, b);
			nbytes_dcmpr++;
		}
	}

done:
	de_dbg(c, "decompressed %"I64_FMT" bytes to %"I64_FMT, pos-pos1, nbytes_dcmpr);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xb10f6(%rip), %rsi     # 0x1c3e09
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jl 0x112d3b
jmp 0x112e49
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x112d52
jmp 0x112e49
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
cmpl %ecx, %eax
jne 0x112dc7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movb %al, -0x2a(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movb -0x2a(%rbp), %al
movq -0x38(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x112e44
movzbl -0x29(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jne 0x112e25
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movb %al, -0x2a(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movb -0x2a(%rbp), %al
movq -0x38(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x112e42
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movzbl -0x29(%rbp), %esi
callq 0x168380
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x112e44
jmp 0x112d28
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
subq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x8bee3(%rip), %rsi     # 0x19ed43
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkm.c
// Function: pkm_read_comment
static void pkm_read_comment(deark *c, struct pkm_ctx *d, i64 pos, i64 len)
{
	de_ucstring *s = NULL;
	s = ucstring_create(c);
	dbuf_read_to_ucstring(c->infile, pos, len, s, 0, d->input_encoding);
	de_dbg(c, "comment: \"%s\"", ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movl (%rax), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x8d75d(%rip), %rsi     # 0x1a064c
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkm.c
// Function: pkm_read_orig_screen_size
static void pkm_read_orig_screen_size(deark *c, struct pkm_ctx *d, i64 pos, i64 len)
{
	// TODO: Maybe this could be used to set the density, but I suspect it's
	// not reliable.
	if(len!=4) return;
	d->orig_w = de_getu16le(pos);
	d->orig_h = de_getu16le(pos+2);
	de_dbg(c, "original dimensions: %u"DE_CHAR_TIMES"%u", (UI)d->orig_w, (UI)d->orig_h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
je 0x112f31
jmp 0x112f93
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, %ecx
leaq 0xb0e4e(%rip), %rsi     # 0x1c3dda
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkm.c
// Function: pkm_read_back_color
static void pkm_read_back_color(deark *c, struct pkm_ctx *d, i64 pos, i64 len)
{
	if(len!=1) return;
	d->back_clr = de_getbyte(pos);
	d->has_back_clr = 1;
	de_dbg(c, "back color: 0x%02x", (UI)d->back_clr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
je 0x112fc1
jmp 0x112ffd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165060
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x39(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x39(%rax), %edx
leaq 0xb0e00(%rip), %rsi     # 0x1c3df6
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: de_module_pklite
void de_module_pklite(deark *c, struct deark_module_info *mi)
{
	mi->id = "pklite";
	mi->desc = "PKLITE-compressed EXE/COM";
	mi->run_fn = de_run_pklite;
	mi->identify_fn = de_identify_pklite;
	mi->help_fn = de_help_pklite;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb0e36(%rip), %rcx     # 0x1c3e5d
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb0e2f(%rip), %rcx     # 0x1c3e64
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x113070
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x19d(%rip), %rcx       # 0x1131f0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x20e(%rip), %rcx       # 0x113270
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: de_run_pklite
static void de_run_pklite(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	u8 buf[2];

	d = de_malloc(c, sizeof(lctx));
	d->host_ei = de_malloc(c, sizeof(struct fmtutil_exe_info));

	de_read(buf, 0, 2);
	if((buf[0]=='M' && buf[1]=='Z') || (buf[0]=='Z' && buf[1]=='M')) {
		do_pklite_exe(c, d);
	}
	else {
		do_pklite_com(c, d);
	}

	if(d) {
		if(d->errflag && !d->errmsg_handled) {
			de_err(c, "PKLITE decompression failed");
		}

		if(!d->is_com && d->raw_mode==0xff && d->dcmpr_ok && !d->wrote_exe) {
			de_info(c, "Note: Try \"-opt pklite:raw\" to decompress the raw data");
		}

		dbuf_close(d->hdr_for_dcmpr_file);
		dbuf_close(d->guest_reloc_table);
		dbuf_close(d->dcmpr_code);
		de_free(c, d->guest_ei);
		de_free(c, d->host_ei);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4f8, %esi            # imm = 0x4F8
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0xf0, %esi
callq 0x15b780
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
callq 0x164d10
movzbl -0x1a(%rbp), %eax
cmpl $0x4d, %eax
jne 0x1130df
movzbl -0x19(%rbp), %eax
cmpl $0x5a, %eax
je 0x1130f1
movzbl -0x1a(%rbp), %eax
cmpl $0x5a, %eax
jne 0x113100
movzbl -0x19(%rbp), %eax
cmpl $0x4d, %eax
jne 0x113100
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1132b0
jmp 0x11310d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1136b0
cmpq $0x0, -0x18(%rbp)
je 0x1131e1
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x113140
movq -0x18(%rbp), %rax
cmpb $0x0, 0x1(%rax)
jne 0x113140
movq -0x8(%rbp), %rdi
leaq 0xb0d45(%rip), %rsi     # 0x1c3e7e
movb $0x0, %al
callq 0x15bfb0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x5(%rax)
jne 0x113182
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0xff, %eax
jne 0x113182
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x113182
movq -0x18(%rbp), %rax
cmpb $0x0, 0x3(%rax)
jne 0x113182
movq -0x8(%rbp), %rdi
leaq 0xb0d1f(%rip), %rsi     # 0x1c3e9a
movb $0x0, %al
callq 0x15c0c0
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rdi
callq 0x1676a0
movq -0x18(%rbp), %rax
movq 0xd0(%rax), %rdi
callq 0x1676a0
movq -0x18(%rbp), %rax
movq 0xd8(%rax), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: de_identify_pklite
static int de_identify_pklite(deark *c)
{
	i64 verpos;

	if(c->infile->len>65280) return 0;
	if(detect_pklite_com_quick(c->infile, &verpos)) {
		if(pklite_com_has_copyright_string(c->infile, verpos)) {
			return 100;
		}
		// TODO: False positives may be possible. Maybe we should be more
		// discriminating.
		return 15;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x113217
movl $0x0, -0x4(%rbp)
jmp 0x11325c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x116f60
cmpl $0x0, %eax
je 0x113255
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x117680
cmpl $0x0, %eax
je 0x11324c
movl $0x64, -0x4(%rbp)
jmp 0x11325c
movl $0xf, -0x4(%rbp)
jmp 0x11325c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: do_read_reloc_table
static void do_read_reloc_table(deark *c, lctx *d)
{
	i64 reloc_tbl_len; // number of bytes available for encoded table

	d->guest_reloc_table = dbuf_create_membuf(c, 0, 0);

	reloc_tbl_len = d->cmpr_data_area_endpos - 8 - d->cmpr_data_endpos;

	if(d->dparams.extra_cmpr) {
		do_read_reloc_table_long(c, d, d->cmpr_data_endpos, reloc_tbl_len);
	}
	else {
		do_read_reloc_table_short(c, d, d->cmpr_data_endpos, reloc_tbl_len);
	}

	if(d->errflag) {
		de_err(c, "Failed to decode relocation table");
		d->errmsg_handled = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
subq $0x8, %rax
movq -0x10(%rbp), %rcx
subq 0x88(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0x114223
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdx
movq -0x18(%rbp), %rcx
callq 0x116420
jmp 0x11423f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdx
movq -0x18(%rbp), %rcx
callq 0x1166a0
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x114262
movq -0x8(%rbp), %rdi
leaq 0xb0221(%rip), %rsi     # 0x1c4474
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movb $0x1, 0x1(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: acquire_new_exe_header
static void acquire_new_exe_header(deark *c, lctx *d)
{
	int ret;

	d->guest_ei = de_malloc(c, sizeof(struct fmtutil_exe_info));
	d->hdr_for_dcmpr_file =  dbuf_create_membuf(c, 0, 0);
	dbuf_writeu16le(d->hdr_for_dcmpr_file, 0x5a4d); // "MZ"

	ret = read_orig_header(c, d);
	if(ret) goto done; // If success, we're done. Otherwise try other method.

	dbuf_truncate(d->hdr_for_dcmpr_file, 2);
	reconstruct_header(c, d);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0xf0, %esi
callq 0x15b780
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rdi
movl $0x5a4d, %esi           # imm = 0x5A4D
callq 0x168a10
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1168e0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1142e3
jmp 0x114305
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rdi
movl $0x2, %esi
callq 0x168900
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x116c20
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: info_bytes_to_version_struct
static void info_bytes_to_version_struct(UI ver_info, struct ver_info_struct *v)
{
	v->ver_num = ver_info & 0x0fff;
	de_snprintf(v->pklver_str, sizeof(v->pklver_str), "%u.%02u%s%s%s",
		(UI)(v->ver_num>>8), (UI)(v->ver_num&0xff),
		((ver_info&0x4000)?"/h":""),
		((ver_info&0x2000)?"/l":"/s"),
		((ver_info&0x1000)?"/e":""));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %ecx
andl $0xfff, %ecx            # imm = 0xFFF
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %ecx
shrl $0x8, %ecx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
andl $0xff, %r8d
movl -0x4(%rbp), %edx
andl $0x4000, %edx           # imm = 0x4000
leaq 0xbc693(%rip), %r9      # 0x1d0bd0
leaq 0xafac0(%rip), %rax     # 0x1c4004
cmpl $0x0, %edx
cmovneq %rax, %r9
movl -0x4(%rbp), %edx
andl $0x2000, %edx           # imm = 0x2000
leaq 0xafaaf(%rip), %r10     # 0x1c400a
leaq 0xafaa5(%rip), %rax     # 0x1c4007
cmpl $0x0, %edx
cmovneq %rax, %r10
movl -0x4(%rbp), %esi
andl $0x1000, %esi           # imm = 0x1000
leaq 0xbc657(%rip), %rax     # 0x1d0bd0
leaq 0xafa8d(%rip), %rdx     # 0x1c400d
cmpl $0x0, %esi
cmovneq %rdx, %rax
movl $0x28, %esi
leaq 0xafa63(%rip), %rdx     # 0x1c3ff6
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x15a980
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: descramble_decompressor
static void descramble_decompressor(deark *c, lctx *d)
{
	i64 startpos;
	i64 pos;
	UI this_word_scr;
	UI next_word_scr;
	UI this_word_dscr;

	if(!d->scrambled_decompressor || d->scrambled_word_count<1) {
		goto done;
	}
	de_dbg(c, "[descrambling]");

	if(d->pos_of_last_scrambled_word+2 > EPBYTES_LEN) {
		d->errflag = 1;
		goto done;
	}

	startpos = d->pos_of_last_scrambled_word+2-d->scrambled_word_count*2;
	if(startpos < 0) {
		d->errflag = 1;
		goto done;
	}

	this_word_scr = (UI)de_getu16le_direct(&d->epbytes[startpos]);

	for(pos=startpos; pos<=d->pos_of_last_scrambled_word; pos+=2) {
		if(pos==d->pos_of_last_scrambled_word) {
			next_word_scr = d->initial_key;
		}
		else {
			next_word_scr = (UI)de_getu16le_direct(&d->epbytes[pos+2]);
		}

		if(d->scramble_method==2) {
			this_word_dscr = (this_word_scr + next_word_scr) & 0xffff;
		}
		else {
			this_word_dscr = this_word_scr ^ next_word_scr;
		}

		de_writeu16le_direct(&d->epbytes[pos], (i64)this_word_dscr);
		this_word_scr = next_word_scr;
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x49(%rax)
je 0x114ee5
movq -0x10(%rbp), %rax
cmpq $0x1, 0x50(%rax)
jge 0x114eea
jmp 0x11500e
movq -0x8(%rbp), %rdi
leaq 0xaf292(%rip), %rsi     # 0x1c4187
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
addq $0x2, %rax
cmpq $0x3e8, %rax            # imm = 0x3E8
jle 0x114f1c
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x11500e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
addq $0x2, %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
shlq %rcx
subq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x114f4d
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x11500e
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq -0x18(%rbp), %rdi
callq 0x165260
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jg 0x11500c
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jne 0x114f98
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0x114fb6
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
movq -0x20(%rbp), %rax
addq $0x2, %rax
addq %rax, %rdi
callq 0x165260
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x4a(%rax), %eax
cmpl $0x2, %eax
jne 0x114fd3
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x2c(%rbp)
jmp 0x114fdc
movl -0x24(%rbp), %eax
xorl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x168990
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x114f6c
jmp 0x11500e
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: analyze_detect_obf_offsets
static void analyze_detect_obf_offsets(deark *c, lctx *d)
{
	i64 foundpos = 0;
	int ret;
	u8 has_obf_offsets = 0;

	if(!d->dparams.v120_cmpr) goto done;

	ret = pkl_search_match(d->epbytes, EPBYTES_LEN,
		d->decompr_pos+200, d->approx_end_of_decompressor,
		(const u8*)"\xac\x34?\x8a", 4, 0x3f,
		0, &foundpos);
	if(ret) {
		has_obf_offsets = 1;
		d->dparams.offset_xor_key = d->epbytes[foundpos+2];
	}

done:
	if(d->dparams.v120_cmpr) {
		de_dbg(c, "obfuscated offsets: %u", (UI)has_obf_offsets);
		if(has_obf_offsets) {
			de_dbg_indent(c, 1);
			de_dbg(c, "offsets key: 0x%02x", (UI)d->dparams.offset_xor_key);
			de_dbg_indent(c, -1);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movb $0x0, -0x1d(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1a(%rax)
jne 0x115a98
jmp 0x115b10
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
addq $0xc8, %rdx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
movl $0x3e8, %esi            # imm = 0x3E8
leaq 0xae838(%rip), %r8      # 0x1c42fe
movl $0x4, %r9d
xorl %eax, %eax
leaq -0x18(%rbp), %rax
movl $0x3f, (%rsp)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x115d30
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x115b0e
movb $0x1, -0x1d(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb 0x10e(%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1b(%rax)
jmp 0x115b10
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1a(%rax)
je 0x115b6e
movq -0x8(%rbp), %rdi
movzbl -0x1d(%rbp), %edx
leaq 0xae7da(%rip), %rsi     # 0x1c4303
movb $0x0, %al
callq 0x15b0d0
cmpb $0x0, -0x1d(%rbp)
je 0x115b6c
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x1b(%rax), %edx
leaq 0xae7c3(%rip), %rsi     # 0x1c431a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0x115b6e
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: analyze_detect_psp_sig
static void analyze_detect_psp_sig(deark *c, lctx *d)
{
	int ret;
	i64 foundpos;
	const u8 *pattern;

	if(d->decompr_pos==0 || d->approx_end_of_decompressor==0) {
		goto done;
	}

	// It's kind of overkill to always do this search, and always look for both
	// signatures. We could probably be much more discriminiating, e.g. by
	// by using the apparent correspondence to scramble_method. But we would
	// risk false negatives.

	pattern = (const u8*)"\xc7\x06\x5c\x00\x70\x6b"; // "pk"
	ret = pkl_search_match(d->epbytes, EPBYTES_LEN,
		d->decompr_pos, d->approx_end_of_decompressor,
		pattern, 6, 0x3f, 0, &foundpos);
	if(ret) {
		d->has_psp_sig = 1;
		d->psp_sig_type = 2;
		goto done;
	}

	pattern = (const u8*)"\xc7\x06\x5c\x00\x50\x4b"; // "PK"
	ret = pkl_search_match(d->epbytes, EPBYTES_LEN,
		d->decompr_pos, d->approx_end_of_decompressor,
		pattern, 6, 0x3f, 0, &foundpos);
	if(ret) {
		d->has_psp_sig = 1;
		d->psp_sig_type = 1;
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x115ba6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x115bab
jmp 0x115c89
leaq 0xaed32(%rip), %rax     # 0x1c48e4
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x28(%rbp), %r8
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x6, %r9d
xorl %eax, %eax
leaq -0x20(%rbp), %rax
movl $0x3f, (%rsp)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x115d30
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x115c1a
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $0x2, 0x9(%rax)
jmp 0x115c89
leaq 0xaecca(%rip), %rax     # 0x1c48eb
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x28(%rbp), %r8
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x6, %r9d
xorl %eax, %eax
leaq -0x20(%rbp), %rax
movl $0x3f, (%rsp)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x115d30
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x115c87
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x9(%rax)
jmp 0x115c89
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: pkl_search_match
static int pkl_search_match(const u8 *mem, i64 mem_len,
	i64 search_startpos, i64 search_endpos,
	const u8 *pattern, i64 pattern_len,
	u8 wildcard, UI flags, i64 *pfoundpos)
{
	i64 foundpos2;
	int ret;

	*pfoundpos = 0;

	if(pattern_len<1) return 0;
	if(search_startpos<0) search_startpos = 0;
	if(search_endpos>mem_len) search_endpos = mem_len;
	if(pattern_len > search_endpos-search_startpos) return 0;

	ret = de_memsearch_match(&mem[search_startpos], search_endpos-search_startpos,
		pattern, pattern_len, wildcard, &foundpos2);
	if(ret) {
		*pfoundpos = search_startpos + foundpos2;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movb 0x10(%rbp), %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq 0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x1, -0x38(%rbp)
jge 0x115d75
movl $0x0, -0x4(%rbp)
jmp 0x115df4
cmpq $0x0, -0x20(%rbp)
jge 0x115d84
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jle 0x115d96
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
subq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jle 0x115db0
movl $0x0, -0x4(%rbp)
jmp 0x115df4
movq -0x10(%rbp), %rdi
addq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
subq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq -0x40(%rbp), %r9
movzbl 0x10(%rbp), %r8d
callq 0x15f740
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x115dee
movq -0x20(%rbp), %rcx
addq -0x40(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: find_decompr_pos_beta
static void find_decompr_pos_beta(deark *c, lctx *d)
{
	if(pkl_memmatch(&d->epbytes[0x59],
		(const u8*)"\xf3\xa5\x2e\xa1????????\xcb\xfc", 14, '?', 0))
	{
		// small
		d->decompr_pos = 0x66;
	}
	else if(pkl_memmatch(&d->epbytes[0x5b],
		(const u8*)"\xf3\xa5\x85\xed????????????\xcb\xfc", 18, '?', 0))
	{
		// large
		d->decompr_pos = 0x6c;
	}
	else if(pkl_memmatch(&d->epbytes[0],
		(const u8*)"\x2e\x8c\x1e??\xfc\x8c\xc8\x2e\x2b\x06", 11, '?', 0))
	{
		// load-high
		d->decompr_pos = 0x5;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq $0x59, %rdi
leaq 0xae454(%rip), %rsi     # 0x1c427a
movl $0xe, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x115e4b
movq -0x10(%rbp), %rax
movq $0x66, 0x70(%rax)
jmp 0x115ebf
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq $0x5b, %rdi
leaq 0xae428(%rip), %rsi     # 0x1c4289
movl $0x12, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x115e86
movq -0x10(%rbp), %rax
movq $0x6c, 0x70(%rax)
jmp 0x115ebd
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
leaq 0xae404(%rip), %rsi     # 0x1c429c
movl $0xb, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x115ebb
movq -0x10(%rbp), %rax
movq $0x5, 0x70(%rax)
jmp 0x115ebd
jmp 0x115ebf
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: make_matchlengths_tree
static void make_matchlengths_tree(deark *c, struct decompr_internal_state *dctx)
{
	static const char *name = "match lengths";
	static const u16 matchlengthsdata_lg[24] = {
		0x2003,0x3000,0x4002,0x4003,0x4004,0x500a,0x500b,0x500c,
		0x601a,0x601b,0x703a,0x703b,0x703c,0x807a,0x807b,0x807c,
		0x90fa,0x90fb,0x90fc,0x90fd,0x90fe,0x90ff,0x601c,0x2002
	};
	static const u16 matchlengthsdata_sm[9] = {
		0x2000,0x3004,0x3005,0x400c,0x400d,0x400e,0x400f,0x3003,
		0x3002
	};
	static const u16 matchlengthsdata120_lg[21] = {
		0x2003,0x3000,0x4005,0x4006,0x5006,0x5007,0x6008,0x6009,
		0x7020,0x7021,0x7022,0x7023,0x8048,0x8049,0x804a,0x9096,
		0x9097,0x6013,0x2002,0x4007,0x5005
	};
	static const u16 matchlengthsdata120_sm[11] = {
		0x2003,0x3000,0x4004,0x4005,0x500e,0x601e,0x601f,0x4006,
		0x2002,0x4003,0x4002
	};

	if(dctx->dparams->large_cmpr) {
		if(dctx->dparams->v120_cmpr) {
			huffman_make_tree_from_u16array(c, &dctx->lengths_tree,
				matchlengthsdata120_lg, 21, name);
		}
		else {
			huffman_make_tree_from_u16array(c, &dctx->lengths_tree,
				matchlengthsdata_lg, 24, name);
		}
	}
	else {
		if(dctx->dparams->v120_cmpr) {
			huffman_make_tree_from_u16array(c, &dctx->lengths_tree,
				matchlengthsdata120_sm, 11, name);
		}
		else {
			huffman_make_tree_from_u16array(c, &dctx->lengths_tree,
				matchlengthsdata_sm, 9, name);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0x9(%rax)
je 0x115f48
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0xa(%rax)
je 0x115f22
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movq 0x10f991(%rip), %r8     # 0x2258a0
leaq 0xaea3a(%rip), %rdx     # 0x1c4950
movl $0x15, %ecx
callq 0x1162d0
jmp 0x115f46
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movq 0x10f96b(%rip), %r8     # 0x2258a0
leaq 0xae9c4(%rip), %rdx     # 0x1c4900
movl $0x18, %ecx
callq 0x1162d0
jmp 0x115fa2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0xa(%rax)
je 0x115f7c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movq 0x10f937(%rip), %r8     # 0x2258a0
leaq 0xaea10(%rip), %rdx     # 0x1c4980
movl $0xb, %ecx
callq 0x1162d0
jmp 0x115fa0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movq 0x10f911(%rip), %r8     # 0x2258a0
leaq 0xae99a(%rip), %rdx     # 0x1c4930
movl $0x9, %ecx
callq 0x1162d0
jmp 0x115fa2
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: make_offsets_tree
static void make_offsets_tree(deark *c, struct decompr_internal_state *dctx)
{
	static const char *name = "offsets";
	static const u16 offsetsdata[32] = {
		0x1001,0x4000,0x4001,0x5004,0x5005,0x5006,0x5007,0x6010,
		0x6011,0x6012,0x6013,0x6014,0x6015,0x6016,0x702e,0x702f,
		0x7030,0x7031,0x7032,0x7033,0x7034,0x7035,0x7036,0x7037,
		0x7038,0x7039,0x703a,0x703b,0x703c,0x703d,0x703e,0x703f
	};
	static const u16 offsetsdata120[32] = {
		0x1001,0x3000,0x5004,0x5005,0x5006,0x5007,0x6010,0x6011,
		0x6012,0x6013,0x6014,0x6015,0x702c,0x702d,0x702e,0x702f,
		0x7030,0x7031,0x7032,0x7033,0x7034,0x7035,0x7036,0x7037,
		0x7038,0x7039,0x703a,0x703b,0x703c,0x703d,0x703e,0x703f
	};

	if(dctx->dparams->v120_cmpr) {
		huffman_make_tree_from_u16array(c, &dctx->offsets_tree,
			offsetsdata120, 32, name);
	}
	else {
		huffman_make_tree_from_u16array(c, &dctx->offsets_tree,
			offsetsdata, 32, name);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0xa(%rax)
je 0x115ff4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
movq 0x10f8c7(%rip), %r8     # 0x2258a8
leaq 0xae9f8(%rip), %rdx     # 0x1c49e0
movl $0x20, %ecx
callq 0x1162d0
jmp 0x116018
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
movq 0x10f8a1(%rip), %r8     # 0x2258a8
leaq 0xae992(%rip), %rdx     # 0x1c49a0
movl $0x20, %ecx
callq 0x1162d0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: fill_bitbuf
static void fill_bitbuf(deark *c, struct decompr_internal_state *dctx)
{
	UI i;

	if(dctx->d->errflag) return;
	if(dctx->dcmpr_cur_ipos+2 > dctx->inf->len) {
		de_err(c, "Unexpected end of file during decompression");
		dctx->d->errflag = 1;
		dctx->d->errmsg_handled = 1;
		return;
	}

	for(i=0; i<2; i++) {
		u8 b;
		b = dbuf_getbyte_p(dctx->inf, &dctx->dcmpr_cur_ipos);
		de_bitbuf_lowlevel_add_byte(&dctx->bbll, b);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x116091
jmp 0x116115
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x2, %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x1160d4
movq -0x8(%rbp), %rdi
leaq 0xae370(%rip), %rsi     # 0x1c4426
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x1, 0x1(%rax)
jmp 0x116115
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jae 0x116115
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x165170
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movzbl -0x15(%rbp), %esi
callq 0x16a230
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1160db
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: pklite_getbit
static u8 pklite_getbit(deark *c, struct decompr_internal_state *dctx)
{
	u8 v;

	if(dctx->d->errflag) return 0;
	v = (u8)de_bitbuf_lowlevel_get_bits(&dctx->bbll, 1);

	if(dctx->bbll.nbits_in_bitbuf==0) {
		fill_bitbuf(c, dctx);
	}

	return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x116142
movb $0x0, -0x1(%rbp)
jmp 0x116174
movq -0x18(%rbp), %rdi
addq $0x30, %rdi
movl $0x1, %esi
callq 0x16a2a0
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jne 0x11616e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x116070
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: read_pklite_code_using_tree
static UI read_pklite_code_using_tree(deark *c, struct decompr_internal_state *dctx,
	struct fmtutil_huffman_decoder *ht)
{
	int ret;
	fmtutil_huffman_valtype val = 0;

	while(1) {
		u8 b;

		b = pklite_getbit(c, dctx);
		if(dctx->d->errflag) goto done;

		ret = fmtutil_huffman_decode_bit(ht->bk, ht->cursor, b, &val);
		if(ret==1) goto done; // finished the code
		if(ret!=2) {
			dctx->d->errflag = 1;
			goto done;
		}
	}
done:
	return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x116120
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x1161b9
jmp 0x1161f4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x20(%rbp), %rcx
movzbl -0x21(%rbp), %edx
callq 0x187ac0
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
jne 0x1161e0
jmp 0x1161f4
cmpl $0x2, -0x1c(%rbp)
je 0x1161f2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x1, (%rax)
jmp 0x1161f4
jmp 0x11619b
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: do_uncompressed_area
static void do_uncompressed_area(deark *c, struct decompr_internal_state *dctx,
	struct de_lz77buffer *ringbuf)
{
	i64 len;
	i64 i;

	dctx->has_uncompressed_area = 1;
	len = (i64)dbuf_getbyte_p(dctx->inf, &dctx->dcmpr_cur_ipos);
	de_dbg3(c, "uncompressed area at %"I64_FMT", len=%"I64_FMT, dctx->dcmpr_cur_ipos, len);

	// TODO: The only files with this feature that I have are registered copies of
	// PKZIP.EXE. When decompressed with, e.g., UNP, 9 additional seemingly-random
	// bytes of data appear out of nowhere before the uncompressed area. I don't
	// know what these bytes are for. They appear in the original file, but not in a
	// place that makes any sense.
	// I don't know whether this also happens in files made by the consumer versions
	// of PKLITE.
	// For now, we'll just write 9 dummy bytes here.
	for(i=0; i<9; i++) {
		de_lz77buffer_add_literal_byte(ringbuf, 0x00);
	}

	for(i=0; i<len; i++) {
		de_lz77buffer_add_literal_byte(ringbuf, dbuf_getbyte_p(dctx->inf, &dctx->dcmpr_cur_ipos));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x20(%rbp), %rcx
leaq 0xae203(%rip), %rsi     # 0x1c4452
movb $0x0, %al
callq 0x15b400
movq $0x0, -0x28(%rbp)
cmpq $0x9, -0x28(%rbp)
jge 0x11627e
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x178880
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x11625e
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x1162c7
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x165170
movq -0x30(%rbp), %rdi
movzbl %al, %esi
callq 0x178880
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x116286
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)