LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: get_fmt_info_by_id
static const struct bsave_fmt_arr_item *get_fmt_info_by_id(UI fmt_id)
{
	size_t k;

	for(k=0; k<DE_ARRAYCOUNT(bsave_fmt_arr); k++) {
		if(bsave_fmt_arr[k].fmt_id==fmt_id) {
			return &bsave_fmt_arr[k];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0xd, -0x18(%rbp)
jae 0x4cf47
movq -0x18(%rbp), %rcx
leaq 0x1c896f(%rip), %rax    # 0x215880
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x4cf37
movq -0x18(%rbp), %rcx
leaq 0x1c8956(%rip), %rax    # 0x215880
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x4cf4f
jmp 0x4cf39
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x4ceff
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_cga2_4
static void detect_cga2_4(deark *c, lctx *d, int *confidence)
{
	if(d->load_addr!=0xb8000) return;
	if(d->data_size==16384 || d->data_size==16383) {
		confidence[FMT_CGA4] = 10;
		confidence[FMT_CGA2] = 8;
	}
	else if(d->data_size==16000) {
		confidence[FMT_CGA4] = 4;
		confidence[FMT_CGA2] = 3;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xb8000, 0x8(%rax)     # imm = 0xB8000
je 0x4cf7f
jmp 0x4cfd9
movq -0x10(%rbp), %rax
cmpq $0x4000, 0x10(%rax)     # imm = 0x4000
je 0x4cf9b
movq -0x10(%rbp), %rax
cmpq $0x3fff, 0x10(%rax)     # imm = 0x3FFF
jne 0x4cfb3
movq -0x18(%rbp), %rax
movl $0xa, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x8, 0x8(%rax)
jmp 0x4cfd9
movq -0x10(%rbp), %rax
cmpq $0x3e80, 0x10(%rax)     # imm = 0x3E80
jne 0x4cfd7
movq -0x18(%rbp), %rax
movl $0x4, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x3, 0x8(%rax)
jmp 0x4cfd9
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_mcga4
static void detect_mcga4(deark *c, lctx *d, int *confidence)
{
	if(d->load_addr==0xa0000 && d->data_size==64000) {
		confidence[FMT_MCGA] = 10;
	}
	else if(d->data_size==64000) {
		confidence[FMT_MCGA] = 4;
	}
	else if(d->load_addr==0xa0000 && d->data_size==65000) {
		confidence[FMT_MCGA] = 6;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xa0000, 0x8(%rax)     # imm = 0xA0000
jne 0x4d018
movq -0x10(%rbp), %rax
cmpq $0xfa00, 0x10(%rax)     # imm = 0xFA00
jne 0x4d018
movq -0x18(%rbp), %rax
movl $0xa, 0x14(%rax)
jmp 0x4d05d
movq -0x10(%rbp), %rax
cmpq $0xfa00, 0x10(%rax)     # imm = 0xFA00
jne 0x4d033
movq -0x18(%rbp), %rax
movl $0x4, 0x14(%rax)
jmp 0x4d05b
movq -0x10(%rbp), %rax
cmpl $0xa0000, 0x8(%rax)     # imm = 0xA0000
jne 0x4d059
movq -0x10(%rbp), %rax
cmpq $0xfde8, 0x10(%rax)     # imm = 0xFDE8
jne 0x4d059
movq -0x18(%rbp), %rax
movl $0x6, 0x14(%rax)
jmp 0x4d05b
jmp 0x4d05d
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_wh2_4
static void detect_wh2_4(deark *c, lctx *d, int *confidence)
{
	i64 n;
	i64 n_diff;
	int base_quality = 0;

	if(d->metrics.maybe_bitsperrow==0 || d->metrics.maybe_nrows==0) return;

	// Ideally, n would equal d->data_size;
	n = 4 + d->metrics.maybe_bytesperrow * d->metrics.maybe_nrows;
	n_diff = d->data_size - n;

	if(BSAVE_HDRSIZE + n > c->infile->len) return;
	if(n_diff<0) return;

	if(n_diff<=1) {
		base_quality = 7;
	}
	else if(n_diff<=8) {
		base_quality = 6;
	}
	else if(n_diff<=128) {
		base_quality = 3;
	}

	if((d->metrics.maybe_bitsperrow%2)!=0) {
		// bits/row is odd, so it can't be WH4.
		confidence[FMT_WH2] = 2 + base_quality;
	}
	else {
		confidence[FMT_WH4] = 2 + base_quality;
		confidence[FMT_WH2] = 1 + base_quality;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x440(%rax)
je 0x4d093
movq -0x10(%rbp), %rax
cmpq $0x0, 0x448(%rax)
jne 0x4d098
jmp 0x4d164
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x448(%rcx), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x7, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x4d0e2
jmp 0x4d164
cmpq $0x0, -0x28(%rbp)
jge 0x4d0eb
jmp 0x4d164
cmpq $0x1, -0x28(%rbp)
jg 0x4d0fb
movl $0x7, -0x2c(%rbp)
jmp 0x4d120
cmpq $0x8, -0x28(%rbp)
jg 0x4d10b
movl $0x6, -0x2c(%rbp)
jmp 0x4d11e
cmpq $0x80, -0x28(%rbp)
jg 0x4d11c
movl $0x3, -0x2c(%rbp)
jmp 0x4d11e
jmp 0x4d120
movq -0x10(%rbp), %rax
movq 0x440(%rax), %rax
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x4d14a
movl -0x2c(%rbp), %ecx
addl $0x2, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x4d164
movl -0x2c(%rbp), %ecx
addl $0x2, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_wh256
static void detect_wh256(deark *c, lctx *d, int *confidence)
{
	i64 n;
	i64 n_diff;
	int base_quality = 0;

	if(d->metrics.maybe_bitsperrow==0 || d->metrics.maybe_nrows==0) return;
	if((d->metrics.maybe_bitsperrow%8)!=0) return;

	n = 4 + d->metrics.maybe_bytesperrow * d->metrics.maybe_nrows;
	n_diff = d->data_size - n;

	if(BSAVE_HDRSIZE + n > c->infile->len) return;
	if(n_diff<0) return;

	if(n_diff<=1) {
		base_quality = 5;
	}
	else if(n_diff<=8) {
		base_quality = 3;
	}
	else if(n_diff<=128) {
		base_quality = 1;
	}

	confidence[FMT_WH256] = 2 + base_quality;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x440(%rax)
je 0x4d1a3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x448(%rax)
jne 0x4d1a8
jmp 0x4d25a
movq -0x10(%rbp), %rax
movq 0x440(%rax), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x4d1c8
jmp 0x4d25a
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x448(%rcx), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x7, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x4d20f
jmp 0x4d25a
cmpq $0x0, -0x28(%rbp)
jge 0x4d218
jmp 0x4d25a
cmpq $0x1, -0x28(%rbp)
jg 0x4d228
movl $0x5, -0x2c(%rbp)
jmp 0x4d24d
cmpq $0x8, -0x28(%rbp)
jg 0x4d238
movl $0x3, -0x2c(%rbp)
jmp 0x4d24b
cmpq $0x80, -0x28(%rbp)
jg 0x4d249
movl $0x1, -0x2c(%rbp)
jmp 0x4d24b
jmp 0x4d24d
movl -0x2c(%rbp), %ecx
addl $0x2, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_wh16
static void detect_wh16(deark *c, lctx *d, int *confidence)
{
	i64 n;
	i64 n_diff;
	i64 bytesperplane;
	int base_quality = 0;

	if(d->metrics.maybe_bitsperrow==0 || d->metrics.maybe_nrows==0) return;

	bytesperplane = d->metrics.maybe_bytesperrow * d->metrics.maybe_nrows;
	n = 4 +  bytesperplane*4;
	n_diff = d->data_size - n;

	if(BSAVE_HDRSIZE + n > c->infile->len) return;
	if(n_diff<0) return;

	if(n_diff<=1) {
		base_quality = 7;
	}
	else if(n_diff<=16) {
		base_quality = 5;
	}
	else if(n_diff < 3*bytesperplane) {
		base_quality = 4;
	}
	else {
		base_quality = 2;
	}
	confidence[FMT_WH16] = 1 + base_quality;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x440(%rax)
je 0x4d293
movq -0x10(%rbp), %rax
cmpq $0x0, 0x448(%rax)
jne 0x4d298
jmp 0x4d343
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x448(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
shlq $0x2, %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x7, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x4d2eb
jmp 0x4d343
cmpq $0x0, -0x28(%rbp)
jge 0x4d2f4
jmp 0x4d343
cmpq $0x1, -0x28(%rbp)
jg 0x4d304
movl $0x7, -0x34(%rbp)
jmp 0x4d336
cmpq $0x10, -0x28(%rbp)
jg 0x4d314
movl $0x5, -0x34(%rbp)
jmp 0x4d334
movq -0x28(%rbp), %rax
imulq $0x3, -0x30(%rbp), %rcx
cmpq %rcx, %rax
jge 0x4d32b
movl $0x4, -0x34(%rbp)
jmp 0x4d332
movl $0x2, -0x34(%rbp)
jmp 0x4d334
jmp 0x4d336
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_char
static void detect_char(deark *c, lctx *d, int *confidence)
{
	if(d->load_addr==0xb8000) {
		if(d->data_size==4000 || d->data_size==4096) {
			confidence[FMT_CHAR] = 5;
			return;
		}
		else if(d->data_size==3840) {
			confidence[FMT_CHAR] = 5;
			return;
		}
		else if(d->data_size>=8144 && (d->data_size%4096)==4048) {
			confidence[FMT_CHAR] = 4;
			return;
		}
	}

	if(d->load_offset==0xc000) {
		if(d->data_size==4096) {
			confidence[FMT_CHAR] = 6;
			return;
		}
		else if(d->data_size==2048) {
			confidence[FMT_CHAR] = 4;
			return;
		}
	}

	if(d->load_segment==0xb800) {
		if(d->data_size==4096) {
			confidence[FMT_CHAR] = 4;
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xb8000, 0x8(%rax)     # imm = 0xB8000
jne 0x4d3f7
movq -0x10(%rbp), %rax
cmpq $0xfa0, 0x10(%rax)      # imm = 0xFA0
je 0x4d38d
movq -0x10(%rbp), %rax
cmpq $0x1000, 0x10(%rax)     # imm = 0x1000
jne 0x4d39d
movq -0x18(%rbp), %rax
movl $0x5, 0x4(%rax)
jmp 0x4d467
movq -0x10(%rbp), %rax
cmpq $0xf00, 0x10(%rax)      # imm = 0xF00
jne 0x4d3bb
movq -0x18(%rbp), %rax
movl $0x5, 0x4(%rax)
jmp 0x4d467
movq -0x10(%rbp), %rax
cmpq $0x1fd0, 0x10(%rax)     # imm = 0x1FD0
jl 0x4d3f1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl $0x1000, %ecx           # imm = 0x1000
cqto
idivq %rcx
cmpq $0xfd0, %rdx            # imm = 0xFD0
jne 0x4d3f1
movq -0x18(%rbp), %rax
movl $0x4, 0x4(%rax)
jmp 0x4d467
jmp 0x4d3f3
jmp 0x4d3f5
jmp 0x4d3f7
movq -0x10(%rbp), %rax
cmpl $0xc000, 0x4(%rax)      # imm = 0xC000
jne 0x4d43e
movq -0x10(%rbp), %rax
cmpq $0x1000, 0x10(%rax)     # imm = 0x1000
jne 0x4d41f
movq -0x18(%rbp), %rax
movl $0x6, 0x4(%rax)
jmp 0x4d467
movq -0x10(%rbp), %rax
cmpq $0x800, 0x10(%rax)      # imm = 0x800
jne 0x4d43a
movq -0x18(%rbp), %rax
movl $0x4, 0x4(%rax)
jmp 0x4d467
jmp 0x4d43c
jmp 0x4d43e
movq -0x10(%rbp), %rax
cmpl $0xb800, (%rax)         # imm = 0xB800
jne 0x4d467
movq -0x10(%rbp), %rax
cmpq $0x1000, 0x10(%rax)     # imm = 0x1000
jne 0x4d465
movq -0x18(%rbp), %rax
movl $0x4, 0x4(%rax)
jmp 0x4d467
jmp 0x4d467
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_cga16
static void detect_cga16(deark *c, lctx *d, int *confidence)
{
	struct detect_cga16_struct dtctx;

	if(d->load_addr!=0xb8000) return;
	if(d->data_size!=16000 && d->data_size!=16384) return;

	de_zeromem(&dtctx, sizeof(struct detect_cga16_struct));
	dbuf_buffered_read(c->infile, BSAVE_HDRSIZE, 16000, detect_cga16_cbfn, (void*)&dtctx);
	if(dtctx.flag0==0) {
		if(dtctx.flag1) {
			confidence[FMT_CGA16] = 12;
		}
		else {
			confidence[FMT_CGA16] = 5;
		}
	}
}

// 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
cmpl $0xb8000, 0x8(%rax)     # imm = 0xB8000
je 0x4d493
jmp 0x4d50c
movq -0x10(%rbp), %rax
cmpq $0x3e80, 0x10(%rax)     # imm = 0x3E80
je 0x4d4b1
movq -0x10(%rbp), %rax
cmpq $0x4000, 0x10(%rax)     # imm = 0x4000
je 0x4d4b1
jmp 0x4d50c
leaq -0x24(%rbp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x19140
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x7, %esi
movl $0x3e80, %edx           # imm = 0x3E80
leaq 0x186(%rip), %rcx       # 0x4d660
leaq -0x24(%rbp), %r8
callq 0x166260
movzbl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x4d50c
cmpb $0x0, -0x1b(%rbp)
je 0x4d4ff
movq -0x18(%rbp), %rax
movl $0xc, 0x10(%rax)
jmp 0x4d50a
movq -0x18(%rbp), %rax
movl $0x5, 0x10(%rax)
jmp 0x4d50c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_2_4col
static void detect_2_4col(deark *c, lctx *d, int *confidence)
{
	int q1 = 0;

	if(d->data_size<80) return;
	if((d->data_size%80)==0) q1 = 2;
	else if(d->data_size==16384) q1 = 1;
	if(q1==0) return;
	confidence[FMT_2COL] = q1;
	confidence[FMT_4COL] = confidence[FMT_2COL] + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x50, 0x10(%rax)
jge 0x4d544
jmp 0x4d59f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl $0x50, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x4d565
movl $0x2, -0x1c(%rbp)
jmp 0x4d57c
movq -0x10(%rbp), %rax
cmpq $0x4000, 0x10(%rax)     # imm = 0x4000
jne 0x4d57a
movl $0x1, -0x1c(%rbp)
jmp 0x4d57c
cmpl $0x0, -0x1c(%rbp)
jne 0x4d584
jmp 0x4d59f
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_pal256
static void detect_pal256(deark *c, lctx *d, int *confidence)
{
	int q1 = 0;

	if(d->data_size!=768) return;
	if(d->load_addr==0xb8000 || d->load_addr==0xa0000) return;
	if(d->load_addr==0) q1 = 12;
	confidence[FMT_PAL256] = 1 + q1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x300, 0x10(%rax)      # imm = 0x300
je 0x4d617
jmp 0x4d651
movq -0x10(%rbp), %rax
cmpl $0xb8000, 0x8(%rax)     # imm = 0xB8000
je 0x4d631
movq -0x10(%rbp), %rax
cmpl $0xa0000, 0x8(%rax)     # imm = 0xA0000
jne 0x4d633
jmp 0x4d651
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x4d644
movl $0xc, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x34(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bsave.c
// Function: detect_cga16_cbfn
static int detect_cga16_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	struct detect_cga16_struct *ctx = (struct detect_cga16_struct*)brctx->userdata;
	i64 k;

	for(k=0; k<buf_len; k++) {
		if(ctx->flag0) break;
		if(((brctx->offset+k)%2)==0) { // Even-numbered byte
			if(buf[k]==0xdd) ctx->count1++;
			else if(buf[k]==0xde) ctx->count2++;
			else ctx->flag0 = 1;
		}
		else { // Odd-numbered (color) byte.
			// We want to make sure there is a color byte that isn't one of the
			// special screen codes.
			if(ctx->flag1==0 && buf[k]!=0xdd && buf[k]!=0xde) {
				ctx->flag1 = 1;
			}
		}
	}

	return (ctx->flag0) ? 0 : 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x4d75a
movq -0x20(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x4d6a0
jmp 0x4d75a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x28(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x4d70a
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xdd, %eax
jne 0x4d6dc
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x4d708
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xde, %eax
jne 0x4d6fe
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x4d706
movq -0x20(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0x4d708
jmp 0x4d747
movq -0x20(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x0, %eax
jne 0x4d745
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xdd, %eax
je 0x4d745
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xde, %eax
je 0x4d745
movq -0x20(%rbp), %rax
movb $0x1, 0x9(%rax)
jmp 0x4d747
jmp 0x4d749
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4d683
movq -0x20(%rbp), %rax
movzbl 0x8(%rax), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/aldus.c
// Function: de_module_aldus_inst
void de_module_aldus_inst(deark *c, struct deark_module_info *mi)
{
	mi->id = "aldus_inst";
	mi->desc = "Aldus LZW and PKZP";
	mi->run_fn = de_run_aldus_inst;
	mi->identify_fn = de_identify_aldus_inst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x157409(%rip), %rcx    # 0x1a4ba0
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x157406(%rip), %rcx    # 0x1a4bab
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x4d7d0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x8d(%rip), %rcx        # 0x4d850
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/aldus.c
// Function: de_run_aldus_inst
static void de_run_aldus_inst(deark *c, de_module_params *mparams)
{
	u8 b;

	b = de_getbyte(6);
	if(b=='L') {
		de_declare_fmt(c, "Aldus LZW");
		aldus_main(c, mparams, 1);
	}
	else {
		de_declare_fmt(c, "Aldus PKZP");
		aldus_main(c, mparams, 2);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x4c, %eax
jne 0x4d822
movq -0x8(%rbp), %rdi
leaq 0x1573b5(%rip), %rsi    # 0x1a4bbe
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x4d8f0
jmp 0x4d844
movq -0x8(%rbp), %rdi
leaq 0x15739b(%rip), %rsi    # 0x1a4bc8
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2, %edx
callq 0x4d8f0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/aldus.c
// Function: de_identify_aldus_inst
static int de_identify_aldus_inst(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, (const u8*)"ALDUS ", 6)) return 0;

	if(!dbuf_memcmp(c->infile, 6, (const u8*)"PKZP  2.", 8))
		return 100;
	if(!dbuf_memcmp(c->infile, 6, (const u8*)"LZW   1.", 8))
		return 100;
	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 0x15752f(%rip), %rdx    # 0x1a4d9e
movl $0x6, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x4d887
movl $0x0, -0x4(%rbp)
jmp 0x4d8e6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %esi
leaq 0x15750a(%rip), %rdx    # 0x1a4da5
movl $0x8, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x4d8b3
movl $0x64, -0x4(%rbp)
jmp 0x4d8e6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %esi
leaq 0x1574e7(%rip), %rdx    # 0x1a4dae
movl $0x8, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x4d8df
movl $0x64, -0x4(%rbp)
jmp 0x4d8e6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/aldus.c
// Function: read_timestamp
static void read_timestamp(deark *c, lctx *d)
{
	i64 n;
	struct de_timestamp *ts;
	char timestamp_buf[64];

	ts = &d->advf->mainfork.fi->timestamp[DE_TIMESTAMPIDX_MODIFY];

	if(d->fmtcode==2) {
		n = de_getu32le(54);
		// Best guess is the epoch is the beginning of Dec. 30, 1899.
		// But this could very well be wrong.
		n -= (i64)86400*(70*365 + 17 + 2);
		if(n<=0) return;
		de_unix_time_to_timestamp(n, ts, 0);
	}
	else if(d->fmtcode==1 && !d->has_4cc_codes) {
		n = de_geti32le(54);
		if(n<=0) return;
		de_unix_time_to_timestamp(n, ts, 0);
	}
	else if(d->fmtcode==1 && d->has_4cc_codes) {
		n = de_getu32be(68);
		if(n<=0x01000000) return;
		de_mac_time_to_timestamp(n, ts);
	}
	else {
		return;
	}

	de_timestamp_to_string(ts, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "timestamp: %s", timestamp_buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x4de48
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x36, %esi
callq 0x165540
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movabsq $0x83ad2180, %rcx       # imm = 0x83AD2180
subq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jg 0x4de34
jmp 0x4df05
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x15d530
jmp 0x4dedb
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x4de8e
movq -0x10(%rbp), %rax
cmpb $0x0, 0xa(%rax)
jne 0x4de8e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x36, %esi
callq 0x165600
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jg 0x4de7d
jmp 0x4df05
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x15d530
jmp 0x4ded9
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x4ded5
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %eax
cmpl $0x0, %eax
je 0x4ded5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x44, %esi
callq 0x165470
movq %rax, -0x18(%rbp)
cmpq $0x1000000, -0x18(%rbp) # imm = 0x1000000
jg 0x4dec6
jmp 0x4df05
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15d720
jmp 0x4ded7
jmp 0x4df05
jmp 0x4ded9
jmp 0x4dedb
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq 0x156d49(%rip), %rsi    # 0x1a4c47
movb $0x0, %al
callq 0x15b0d0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/aldus.c
// Function: read_typecreator_codes
static void read_typecreator_codes(deark *c, lctx *d, i64 pos)
{
	dbuf_read_fourcc(c->infile, pos, &d->filetype, 4, 0x0);
	de_dbg(c, "filetype: '%s'", d->filetype.id_dbgstr);
	de_memcpy(d->advf->typecode, d->filetype.bytes, 4);
	d->advf->has_typecode = 1;

	dbuf_read_fourcc(c->infile, pos+4, &d->creator, 4, 0x0);
	de_dbg(c, "creator: '%s'", d->creator.id_dbgstr);
	de_memcpy(d->advf->creatorcode, d->creator.bytes, 4);
	d->advf->has_creatorcode = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x30, %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x30, %rdx
addq $0x10, %rdx
leaq 0x1527ab(%rip), %rsi    # 0x1a0707
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x30(%rcx), %ecx
movl %ecx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movb $0x1, 0x7b(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x10(%rbp), %rdx
addq $0x60, %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x60, %rdx
addq $0x10, %rdx
leaq 0x171d72(%rip), %rsi    # 0x1bfd32
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x60(%rcx), %ecx
movl %ecx, 0x94(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movb $0x1, 0x7c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/aldus.c
// Function: my_advfile_cbfn
static int my_advfile_cbfn(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	lctx *d = (lctx*)advf->userdata;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		decompress_fork(c, d, &d->dfork, afp->outf);
	}
	else if(afp->whattodo == DE_ADVFILE_WRITERSRC) {
		decompress_fork(c, d, &d->rfork, 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 0x4e47b
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0xd0, %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x4e4f0
jmp 0x4e4a6
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x4e4a4
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x90, %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x4e4f0
jmp 0x4e4a6
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/adex.c
// Function: de_module_adex
void de_module_adex(deark *c, struct deark_module_info *mi)
{
	mi->id = "adex";
	mi->desc = "ADEX IMG/RLE";
	mi->run_fn = de_run_adex;
	mi->identify_fn = de_identify_adex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x156680(%rip), %rcx    # 0x1a4db7
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x156677(%rip), %rcx    # 0x1a4dbc
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x4e770
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x42d(%rip), %rcx       # 0x4eb90
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/adex.c
// Function: de_identify_adex
static int de_identify_adex(deark *c)
{
	u8 b;

	if((u32)de_getu32be(0)!=0x50494354U) return 0; // "PICT"
	b = de_getbyte(4);
	if(b!=0 && b!=1) return 0;
	b = de_getbyte(5);
	if(b!=4 && b!=8) return 0;
	return 65;
}

// 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
callq 0x165470
cmpl $0x50494354, %eax       # imm = 0x50494354
je 0x4ebbd
movl $0x0, -0x4(%rbp)
jmp 0x4ec24
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x4ebed
movzbl -0x11(%rbp), %eax
cmpl $0x1, %eax
je 0x4ebed
movl $0x0, -0x4(%rbp)
jmp 0x4ec24
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x5, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x4, %eax
je 0x4ec1d
movzbl -0x11(%rbp), %eax
cmpl $0x8, %eax
je 0x4ec1d
movl $0x0, -0x4(%rbp)
jmp 0x4ec24
movl $0x41, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/adex.c
// Function: adex_decompress_rle
static int adex_decompress_rle(deark *c, struct adexctx *d, i64 pos1, dbuf *outf)
{
	i64 nbytes_written = 0;
	int retval = 0;
	i64 pos = pos1;
	i64 nbytes_this_row = 0;

	while(1) {
		i64 count;
		i64 k;
		u8 buf[2];

		if(nbytes_written >= d->expected_imgsize) break;
		if(pos > c->infile->len) {
			goto done;
		}
		if(nbytes_this_row > d->rowspan) {
			goto done;
		}

		count = de_getu16le_p(&pos);
		de_read(buf, pos, 2);
		pos += 2;

		if(count==0) { // end-of-row marker
			if(nbytes_this_row != d->rowspan) {
				goto done;
			}
			nbytes_this_row = 0;
		}
		else {
			for(k=0; k<count; k++) {
				dbuf_write(outf, buf, 2);
			}
			nbytes_written += 2*count;
			nbytes_this_row += 2*count;
		}
	}
	retval = 1;

done:
	if(!retval) {
		de_err(c, "RLE decompression failed");
	}
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jl 0x4ec7a
jmp 0x4ed55
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x4ec91
jmp 0x4ed5c
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jle 0x4eca4
jmp 0x4ed5c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x52(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl $0x2, %ecx
callq 0x164d10
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x4ed00
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
je 0x4ecf6
jmp 0x4ed5c
movq $0x0, -0x40(%rbp)
jmp 0x4ed50
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0x4ed32
movq -0x20(%rbp), %rdi
leaq -0x52(%rbp), %rsi
movl $0x2, %edx
callq 0x166170
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x4ed08
movq -0x48(%rbp), %rax
shlq %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
shlq %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x4ec67
movl $0x1, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x4ed74
movq -0x8(%rbp), %rdi
leaq 0x1560ab(%rip), %rsi    # 0x1a4e18
movb $0x0, %al
callq 0x15bfb0
movl -0x2c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/adex.c
// Function: convert_image_pal4_lsb
static void convert_image_pal4_lsb(dbuf *f, i64 fpos,
	i64 rowspan, const de_color *pal, de_bitmap *img)
{
	i64 i, j;

	for(j=0; j<img->height; j++) {
		for(i=0; i<rowspan; i++) {
			UI palent;
			u8 x;

			x = dbuf_getbyte(f, fpos+rowspan*j+i);
			palent = x & 0x0f;
			de_bitmap_setpixel_rgba(img, i*2, j, pal[palent]);
			palent = x >> 4;
			de_bitmap_setpixel_rgba(img, i*2+1, j, pal[palent]);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x4ee64
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x4ee51
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq -0x38(%rbp), %rax
addq %rax, %rsi
addq -0x30(%rbp), %rsi
callq 0x165060
movb %al, -0x3d(%rbp)
movzbl -0x3d(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
shlq %rsi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
callq 0x16b350
movzbl -0x3d(%rbp), %eax
sarl $0x4, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
shlq %rsi
addq $0x1, %rsi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
callq 0x16b350
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x4edbe
jmp 0x4ee53
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4eda4
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: de_module_cab
void de_module_cab(deark *c, struct deark_module_info *mi)
{
	mi->id = "cab";
	mi->desc = "Microsoft Cabinet (CAB)";
	mi->run_fn = de_run_cab;
	mi->identify_fn = de_identify_cab;
	mi->flags |= DE_MODFLAG_WARNPARSEONLY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x155fbd(%rip), %rcx    # 0x1a4e44
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x155fb3(%rip), %rcx    # 0x1a4e48
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x4eed0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x8d(%rip), %rcx        # 0x4ef40
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: de_run_cab
static void de_run_cab(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	if(!do_CFHEADER(c, d)) goto done;
	do_CFFOLDERs(c, d);
	do_CFFILEs(c, d);

done:
	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 $0x48, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4ef90
cmpl $0x0, %eax
jne 0x4ef0e
jmp 0x4ef28
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4f610
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4f740
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: do_CFFOLDERs
static void do_CFFOLDERs(deark *c, lctx *d)
{
	i64 pos = d->CFHEADER_len;
	i64 i;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	if(d->cFolders<1) goto done;
	de_dbg(c, "CFFOLDER section at %d, nfolders=%d", (int)pos, (int)d->cFolders);

	de_dbg_indent(c, 1);
	for(i=0; i<d->cFolders; i++) {
		i64 bytes_consumed = 0;

		if(pos>=c->infile->len) break;
		de_dbg(c, "CFFOLDER[%d] at %d", (int)i, (int)pos);
		de_dbg_indent(c, 1);
		if(!do_one_CFFOLDER(c, d, i, pos, &bytes_consumed)) {
			goto done;
		}
		de_dbg_indent(c, -1);
		pos += bytes_consumed;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rax
cmpq $0x1, 0x18(%rax)
jge 0x4f649
jmp 0x4f728
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
leaq 0x155944(%rip), %rsi    # 0x1a4fa8
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x4f726
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x4f6af
jmp 0x4f726
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movl %eax, %ecx
leaq 0x155906(%rip), %rsi    # 0x1a4fcc
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x30(%rbp), %r8
callq 0x4f870
cmpl $0x0, %eax
jne 0x4f6fb
jmp 0x4f728
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4f681
jmp 0x4f728
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: do_CFFILEs
static void do_CFFILEs(deark *c, lctx *d)
{
	i64 pos = d->coffFiles;
	i64 i;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	if(d->cFiles<1) goto done;
	de_dbg(c, "CFFILE section at %d, nfiles=%d", (int)pos, (int)d->cFiles);
	de_dbg_indent(c, 1);
	for(i=0; i<d->cFiles; i++) {
		i64 bytes_consumed = 0;

		if(pos>=c->infile->len) break;
		de_dbg(c, "CFFILE[%d] at %d", (int)i, (int)pos);
		de_dbg_indent(c, 1);
		if(!do_one_CFFILE(c, d, pos, &bytes_consumed)) {
			goto done;
		}
		de_dbg_indent(c, -1);
		pos += bytes_consumed;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rax
cmpq $0x1, 0x20(%rax)
jge 0x4f779
jmp 0x4f854
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %ecx
leaq 0x15598d(%rip), %rsi    # 0x1a5121
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x4f852
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x4f7df
jmp 0x4f852
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movl %eax, %ecx
leaq 0x15594b(%rip), %rsi    # 0x1a5141
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x4fe00
cmpl $0x0, %eax
jne 0x4f827
jmp 0x4f854
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4f7b1
jmp 0x4f854
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: get_cmpr_type_name
static const char *get_cmpr_type_name(unsigned int n)
{
	const char *name;

	switch(n) {
	case 0: name="none"; break;
	case 1: name="MSZIP"; break;
	case 2: name="Quantum"; break;
	case 3: name="LZX"; break;
	default: name="?"; break;
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x4faec
movq -0x18(%rbp), %rax
leaq 0x155385(%rip), %rcx    # 0x1a4e34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x14cc4e(%rip), %rax    # 0x19c70d
movq %rax, -0x10(%rbp)
jmp 0x4faf7
leaq 0x1555a9(%rip), %rax    # 0x1a5075
movq %rax, -0x10(%rbp)
jmp 0x4faf7
leaq 0x1555a2(%rip), %rax    # 0x1a507b
movq %rax, -0x10(%rbp)
jmp 0x4faf7
leaq 0x15559d(%rip), %rax    # 0x1a5083
movq %rax, -0x10(%rbp)
jmp 0x4faf7
leaq 0x16813a(%rip), %rax    # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: do_CFDATA_for_one_CFFOLDER
static void do_CFDATA_for_one_CFFOLDER(deark *c, lctx *d, struct folder_info *fldi)
{
	i64 i;
	int saved_indent_level;
	i64 pos = fldi->coffCabStart;

	de_dbg_indent_save(c, &saved_indent_level);
	if(fldi->cCFData<1) goto done;
	de_dbg(c, "CFDATA blocks for CFFOLDER[%d], at %d, #=%d", (int)fldi->folder_idx,
		(int)fldi->coffCabStart, (int)fldi->cCFData);
	de_dbg_indent(c, 1);

	for(i=0; i<fldi->cCFData; i++) {
		i64 bytes_consumed = 0;

		if(pos>=c->infile->len) goto done;
		de_dbg(c, "CFDATA[%d] for CFFOLDER[%d], at %d", (int)i,
			(int)fldi->folder_idx, (int)pos);
		de_dbg_indent(c, 1);
		if(!do_one_CFDATA(c, d, fldi, pos, &bytes_consumed)) {
			goto done;
		}
		de_dbg_indent(c, -1);
		pos += bytes_consumed;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// 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 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x18(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0x4fb3d
jmp 0x4fc37
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %r8d
leaq 0x155521(%rip), %rsi    # 0x1a5087
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x4fc35
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x4fbb4
jmp 0x4fc37
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %eax, %r8d
leaq 0x1554de(%rip), %rsi    # 0x1a50b3
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x4fc50
cmpl $0x0, %eax
jne 0x4fc0a
jmp 0x4fc37
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4fb83
jmp 0x4fc37
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cab.c
// Function: get_special_folder_name
static const char *get_special_folder_name(i64 n)
{
	const char *name;
	switch(n) {
	case 0xfffd: name="CONTINUED_FROM_PREV"; break;
	case 0xfffe: name="CONTINUED_TO_NEXT"; break;
	case 0xffff: name="CONTINUED_PREV_AND_NEXT"; break;
	default: name="?"; break;
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
subq $0xfffd, %rax           # imm = 0xFFFD
je 0x50146
jmp 0x5012a
movq -0x18(%rbp), %rax
subq $0xfffe, %rax           # imm = 0xFFFE
je 0x50153
jmp 0x50138
movq -0x18(%rbp), %rax
subq $0xffff, %rax           # imm = 0xFFFF
je 0x50160
jmp 0x5016d
leaq 0x1550a1(%rip), %rax    # 0x1a51ee
movq %rax, -0x10(%rbp)
jmp 0x50178
leaq 0x1550a8(%rip), %rax    # 0x1a5202
movq %rax, -0x10(%rbp)
jmp 0x50178
leaq 0x1550ad(%rip), %rax    # 0x1a5214
movq %rax, -0x10(%rbp)
jmp 0x50178
leaq 0x167ab9(%rip), %rax    # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cardfile.c
// Function: de_module_cardfile
void de_module_cardfile(deark *c, struct deark_module_info *mi)
{
	mi->id = "cardfile";
	mi->desc = "Windows Cardfile address book";
	mi->run_fn = de_run_cardfile;
	mi->identify_fn = de_identify_cardfile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x15509a(%rip), %rcx    # 0x1a5231
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x155095(%rip), %rcx    # 0x1a523a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x501d0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x24d(%rip), %rcx       # 0x50410
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cardfile.c
// Function: de_identify_cardfile
static int de_identify_cardfile(deark *c)
{
	int fmt;

	fmt = detect_crd_fmt(c);
	if(fmt!=0) {
		return 80;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x50450
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x50437
movl $0x50, -0x4(%rbp)
jmp 0x5043e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cardfile.c
// Function: detect_crd_fmt
static int detect_crd_fmt(deark *c)
{
	u8 buf[4];
	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "MGC", 3)) return DE_CRDFMT_MGC;
	if(!de_memcmp(buf, "RRG", 3)) return DE_CRDFMT_RRG;
	if(!de_memcmp(buf, "DKO", 3)) return DE_CRDFMT_DKO;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x14(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
callq 0x164d10
leaq -0x14(%rbp), %rdi
leaq 0x154dd7(%rip), %rsi    # 0x1a5258
movl $0x3, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x50499
movl $0x1, -0x4(%rbp)
jmp 0x504e6
leaq -0x14(%rbp), %rdi
leaq 0x154dc1(%rip), %rsi    # 0x1a5265
movl $0x3, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x504bc
movl $0x2, -0x4(%rbp)
jmp 0x504e6
leaq -0x14(%rbp), %rdi
leaq 0x154db9(%rip), %rsi    # 0x1a5280
movl $0x3, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x504df
movl $0x3, -0x4(%rbp)
jmp 0x504e6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cardfile.c
// Function: do_carddata_rrg
static void do_carddata_rrg(deark *c, lctx *d, struct page_ctx *pg)
{
	unsigned int flags;
	int ret;
	i64 text_len;
	i64 pos = pg->datapos;

	flags = (unsigned int)de_getu16le_p(&pos);
	de_dbg(c, "flags: %u", flags);
	if(flags) {
		i64 bytes_consumed = 0;
		ret = do_object_rrg(c, d, pg, pos, &bytes_consumed);
		if(!ret || bytes_consumed<1) {
			de_warn(c, "card #%d: Failed to parse OLE object; any text on this card "
				"cannot be processed.", (int)pg->cardnum);
			goto done;
		}
		pos += bytes_consumed;
	}

	text_len = de_getu16le_p(&pos);
	de_dbg(c, "text length: %d", (int)text_len);
	if(pos+text_len > pg->data_endpos) {
		de_err(c, "card #%d: Malformed data segment", (int)pg->cardnum);
		goto done;
	}
	if(text_len!=0) {
		do_text(c, d, pg, pos, text_len);
	}

done:
	;
}

// 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 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x180812(%rip), %rsi    # 0x1d10a4
movb $0x0, %al
callq 0x15b0d0
cmpl $0x0, -0x1c(%rbp)
je 0x508fc
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x50b40
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x508d0
cmpq $0x1, -0x38(%rbp)
jge 0x508f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
leaq 0x154a7e(%rip), %rsi    # 0x1a5362
movb $0x0, %al
callq 0x15bc10
jmp 0x5097a
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x154a91(%rip), %rsi    # 0x1a53b3
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0x50958
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
leaq 0x154a74(%rip), %rsi    # 0x1a53c3
movb $0x0, %al
callq 0x15bfb0
jmp 0x5097a
cmpq $0x0, -0x28(%rbp)
je 0x50978
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x50da0
jmp 0x5097a
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cardfile.c
// Function: do_text
static void do_text(deark *c, lctx *d, struct page_ctx *pg,
	i64 text_pos, i64 text_len)
{
	de_finfo *fi_text = NULL;

	if(text_len<1) goto done;

	if(c->extract_level>=2) {
		fi_text = de_finfo_create(c);
		if(c->filenames_from_file)
			de_finfo_set_name_from_ucstring(c, fi_text, pg->name, 0);

		do_extract_text_data(c, d, fi_text, text_pos, text_len);
	}
	else {
		do_dbg_text_data(c, d, text_pos, text_len);
	}

done:
	de_finfo_destroy(c, fi_text);
}

// 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 %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x1, -0x28(%rbp)
jge 0x50dcd
jmp 0x50e3d
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jl 0x50e26
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0xd0(%rax)
je 0x50e0b
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x50e50
jmp 0x50e3b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x50ef0
jmp 0x50e3d
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x15d260
addq $0x30, %rsp
popq %rbp
retq