LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: de_run_fnt
static void de_run_fnt(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->input_encoding_req = de_get_input_encoding(c, NULL, DE_ENCODING_UNKNOWN);

	if(!do_read_header(c, d)) goto done;
	read_face_name(c, d);

	if(d->is_vector) {
		de_err(c, "This is a vector font. Not supported.");
		goto done;
	}

	if(d->dfType & 0x4) {
		de_err(c, "This type of font is not supported (dfType=0x%04x)", d->dfType);
		goto done;
	}

	if(!do_read_char_table(c, d)) goto done;

	do_make_image(c, d);
done:
	if(d) {
		de_finfo_destroy(c, d->fi);
		de_free(c, d->char_table);
		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 $0x98, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6e680
cmpl $0x0, %eax
jne 0x6e559
jmp 0x6e5cf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6eb80
movq -0x18(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
je 0x6e584
movq -0x8(%rbp), %rdi
leaq 0x13c3e4(%rip), %rsi    # 0x1aa95f
movb $0x0, %al
callq 0x15bfb0
jmp 0x6e5cf
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6e5ae
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x13c3e0(%rip), %rsi    # 0x1aa985
movb $0x0, %al
callq 0x15bfb0
jmp 0x6e5cf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6ecc0
cmpl $0x0, %eax
jne 0x6e5c2
jmp 0x6e5cf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6eef0
cmpq $0x0, -0x18(%rbp)
je 0x6e608
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rsi
callq 0x15d260
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: de_identify_fnt
static int de_identify_fnt(deark *c)
{
	i64 ver;

	// TODO: Better format detection.
	if(de_input_file_has_ext(c, "fnt")) {
		ver = de_getu16le(0);
		if(ver==0x0100 || ver==0x0200 || ver==0x0300)
			return 10;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x13a957(%rip), %rsi    # 0x1a8f7e
callq 0x15d180
cmpl $0x0, %eax
je 0x6e66f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x100, -0x18(%rbp)     # imm = 0x100
je 0x6e664
cmpq $0x200, -0x18(%rbp)     # imm = 0x200
je 0x6e664
cmpq $0x300, -0x18(%rbp)     # imm = 0x300
jne 0x6e66d
movl $0xa, -0x4(%rbp)
jmp 0x6e676
jmp 0x6e66f
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/fnt.c
// Function: read_face_name
static void read_face_name(deark *c, lctx *d)
{
	de_ucstring *s = NULL;

	if(d->dfFace<1) return;

	de_dbg(c, "face name at %"I64_FMT, d->dfFace);
	de_dbg_indent(c, 1);

	// The facename is terminated with a NUL byte.
	// There seems to be no defined limit to its length, but Windows font face
	// names traditionally have to be quite short.
	s = ucstring_create(c);
	dbuf_read_to_ucstring(c->infile, d->dfFace, 64, s, DE_CONVFLAG_STOP_AT_NUL,
		DE_ENCODING_ASCII);

	de_dbg(c, "face name: \"%s\"", ucstring_getpsz_d(s));

	if(!c->filenames_from_file) goto done;

	if(!d->fi) d->fi = de_finfo_create(c);
	ucstring_printf(s, DE_ENCODING_LATIN1, "-%u", d->dfPoints);
	de_finfo_set_name_from_ucstring(c, d->fi, s, 0);

done:
	de_dbg_indent(c, -1);
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x70(%rax)
jge 0x6eba8
jmp 0x6ecad
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq 0x13bf3d(%rip), %rsi    # 0x1aaaf8
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rsi
movq -0x18(%rbp), %rcx
movl $0x40, %edx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x172650
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0x13bee6(%rip), %rsi    # 0x1aab09
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpb $0x0, 0xd0(%rax)
jne 0x6ec39
jmp 0x6ec96
movq -0x10(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x6ec5e
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %ecx
movl $0x5, %esi
leaq 0x13a30d(%rip), %rdx    # 0x1a8f82
movb $0x0, %al
callq 0x171660
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x18(%rbp), %rdi
callq 0x171750
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: do_create_char_table_v1
static void do_create_char_table_v1(deark *c, lctx *d)
{
	i64 k;

	for(k=0; k<d->num_chars_stored; k++) {
		d->char_table[k].pixel_width = (int)d->dfPixWidth;
		d->char_table[k].v1_pixel_offset = d->dfPixWidth * k;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jge 0x6f26d
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
imulq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6f214
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: do_read_char_table_v1
static void do_read_char_table_v1(deark *c, lctx *d)
{
	i64 k;
	i64 pos;
	i64 next_char_offset;

	for(k=0; k<d->num_chars_stored; k++) {
		pos = d->char_table_pos + d->char_entry_size*k;
		d->char_table[k].v1_pixel_offset = de_getu16le(pos);
		next_char_offset = de_getu16le(pos+2);
		d->char_table[k].pixel_width = (int)(next_char_offset - d->char_table[k].v1_pixel_offset);
		if(d->char_table[k].pixel_width<0) d->char_table[k].pixel_width=0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jge 0x6f361
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
imulq -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rcx
subq 0x8(%rcx), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jge 0x6f34e
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movl $0x0, (%rax)
jmp 0x6f350
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6f288
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: do_read_char_table_v23
static void do_read_char_table_v23(deark *c, lctx *d)
{
	i64 k;
	i64 pos;

	for(k=0; k<d->num_chars_stored; k++) {
		pos = d->char_table_pos + d->char_entry_size*k;
		d->char_table[k].pixel_width = (int)de_getu16le(pos);
		if(d->char_entry_size==6) {
			d->char_table[k].v23_data_pos = de_getu32le(pos+2);
		}
		else {
			d->char_table[k].v23_data_pos = de_getu16le(pos+2);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jge 0x6f453
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
imulq -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x6, 0x20(%rax)
jne 0x6f414
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x2, %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
jmp 0x6f440
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imulq $0x18, -0x18(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
jmp 0x6f442
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6f388
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: get_char_bitmap_v1
static void get_char_bitmap_v1(deark *c, lctx *d,
	struct char_table_entry *cte, struct de_bitmap_font_char *ch)
{
	i64 row;

	ch->rowspan = ((i64)cte->pixel_width+7)/8;
	if(d->char_height * ch->rowspan > 32768) return;
	ch->bitmap = de_malloc(c, d->char_height * ch->rowspan);

	for(row=0; row<d->char_height; row++) {
		i64 k;

		for(k=0; k<(i64)cte->pixel_width; k++){
			u8 b;
			b = de_get_bits_symbol(c->infile, 1, d->dfBitsOffset + row*d->dfWidthBytes,
				cte->v1_pixel_offset+k);
			if(b) {
				ch->bitmap[row*ch->rowspan + k/8] |= 1<<(7-k%8);
			}
		}
	}
}

// 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 -0x18(%rbp), %rax
movslq (%rax), %rax
addq $0x7, %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
imulq 0x18(%rcx), %rax
cmpq $0x8000, %rax           # imm = 0x8000
jle 0x6f686
jmp 0x6f79f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rax
imulq 0x18(%rax), %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x6f79f
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jge 0x6f78c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq 0x30(%rcx), %rax
addq %rax, %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0x16b8d0
movb %al, -0x31(%rbp)
cmpb $0x0, -0x31(%rbp)
je 0x6f779
movq -0x30(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movl $0x7, %eax
subq %rdx, %rax
movl %eax, %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
imulq 0x18(%rax), %rcx
movq -0x30(%rbp), %rax
movl $0x8, %edi
cqto
idivq %rdi
movq %rax, %rdx
movq -0x40(%rbp), %rax
addq %rdx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0x6f77b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6f6cd
jmp 0x6f78e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x6f6b3
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fnt.c
// Function: get_char_bitmap_v23
static void get_char_bitmap_v23(deark *c, lctx *d,
	struct char_table_entry *cte, struct de_bitmap_font_char *ch)
{
	i64 num_tiles;
	i64 tile;
	i64 row;

	num_tiles = ((i64)cte->pixel_width+7)/8;
	ch->rowspan = num_tiles;
	if(d->char_height * num_tiles > 32768) return;
	ch->bitmap = de_malloc(c, d->char_height * num_tiles);

	for(row=0; row<d->char_height; row++) {
		for(tile=0; tile<num_tiles; tile++) {
			ch->bitmap[row * ch->rowspan + tile] =
				de_getbyte(cte->v23_data_pos + tile*d->char_height + row);
		}
	}
}

// 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 -0x18(%rbp), %rax
movslq (%rax), %rax
addq $0x7, %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
imulq -0x28(%rbp), %rax
cmpq $0x8000, %rax           # imm = 0x8000
jle 0x6f807
jmp 0x6f8b8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
imulq -0x28(%rbp), %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x6f8b8
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x6f8a5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq 0x10(%rcx), %rax
addq %rax, %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rsi
imulq 0x18(%rsi), %rcx
addq -0x30(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6f846
jmp 0x6f8a7
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6f830
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemfont.c
// Function: de_module_gemfont
void de_module_gemfont(deark *c, struct deark_module_info *mi)
{
	mi->id = "gemfont";
	mi->desc = "GEM bitmap font";
	mi->run_fn = de_run_gemfont;
	mi->identify_fn = de_identify_gemfont;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13b309(%rip), %rcx    # 0x1aabe0
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x13b303(%rip), %rcx    # 0x1aabe8
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x6f910
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1dd(%rip), %rcx       # 0x6fae0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemfont.c
// Function: de_identify_gemfont
static int de_identify_gemfont(deark *c)
{
	int has_usual_lm;
	i64 fdoffs, fwidth, fheight, eofd;

	if(!de_input_file_has_ext(c, "fnt") &&
		!de_input_file_has_ext(c, "gft"))
	{
		return 0;
	}

	has_usual_lm = !dbuf_memcmp(c->infile, 62, "UUUU", 4);
	fdoffs = de_getu32le(76);
	if(fdoffs<88) return 0;
	fwidth = de_getu16le(80);
	fheight = de_getu16le(82);
	if(fwidth<1 || fheight<1) return 0;
	eofd = fdoffs + fwidth*fheight; // end of font data
	if(eofd > c->infile->len) return 0;
	if(eofd==c->infile->len && has_usual_lm) return 100;
	if(eofd==c->infile->len) return 70;
	if(has_usual_lm) return 25;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x139487(%rip), %rsi    # 0x1a8f7e
callq 0x15d180
cmpl $0x0, %eax
jne 0x6fb22
movq -0x10(%rbp), %rdi
leaq 0x13b27f(%rip), %rsi    # 0x1aad8b
callq 0x15d180
cmpl $0x0, %eax
jne 0x6fb22
movl $0x0, -0x4(%rbp)
jmp 0x6fc40
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x3e, %esi
leaq 0x13b259(%rip), %rdx    # 0x1aad8f
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4c, %esi
callq 0x165540
movq %rax, -0x20(%rbp)
cmpq $0x58, -0x20(%rbp)
jge 0x6fb79
movl $0x0, -0x4(%rbp)
jmp 0x6fc40
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x50, %esi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x52, %esi
callq 0x165280
movq %rax, -0x30(%rbp)
cmpq $0x1, -0x28(%rbp)
jl 0x6fbb3
cmpq $0x1, -0x30(%rbp)
jge 0x6fbbf
movl $0x0, -0x4(%rbp)
jmp 0x6fc40
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
imulq -0x30(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x6fbee
movl $0x0, -0x4(%rbp)
jmp 0x6fc40
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x6fc0f
cmpl $0x0, -0x14(%rbp)
je 0x6fc0f
movl $0x64, -0x4(%rbp)
jmp 0x6fc40
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x6fc2a
movl $0x46, -0x4(%rbp)
jmp 0x6fc40
cmpl $0x0, -0x14(%rbp)
je 0x6fc39
movl $0x19, -0x4(%rbp)
jmp 0x6fc40
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemfont.c
// Function: do_face_name
static void do_face_name(deark *c, lctx *d)
{
	de_ucstring *name = NULL;

	name = ucstring_create(c);
	dbuf_read_to_ucstring(c->infile, 4, 32, name, DE_CONVFLAG_STOP_AT_NUL,
		DE_ENCODING_ASCII);
	de_dbg(c, "face name: \"%s\"", ucstring_getpsz_d(name));
	if(!c->filenames_from_file) goto done;

	ucstring_strip_trailing_spaces(name);
	ucstring_printf(name, DE_ENCODING_LATIN1, "-%d", (int)d->face_size);
	d->fi = de_finfo_create(c);
	de_finfo_set_name_from_ucstring(c, d->fi, name, 0);

done:
	ucstring_destroy(name);
}

// 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
callq 0x1711d0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x20, %edx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x172650
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0x13a731(%rip), %rsi    # 0x1aab09
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpb $0x0, 0xd0(%rax)
jne 0x703ee
jmp 0x70443
movq -0x18(%rbp), %rdi
callq 0x171360
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movl $0x5, %esi
leaq 0x1353dd(%rip), %rdx    # 0x1a57ee
movb $0x0, %al
callq 0x171660
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x18(%rbp), %rdi
callq 0x171750
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemmeta.c
// Function: de_module_gemmeta
void de_module_gemmeta(deark *c, struct deark_module_info *mi)
{
	mi->id = "gemmeta";
	mi->desc = "GEM VDI Metafile";
	mi->run_fn = de_run_gemmeta;
	mi->identify_fn = de_identify_gemmeta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13a94a(%rip), %rcx    # 0x1aadc1
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x13a944(%rip), %rcx    # 0x1aadc9
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x704b0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x13d(%rip), %rcx       # 0x705e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemmeta.c
// Function: de_run_gemmeta
static void de_run_gemmeta(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 hdrlen_words;
	i64 version;
	i64 imgflag;
	i64 bytesused;

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

	pos = 0;
	hdrlen_words = de_getu16le(pos+2);
	de_dbg(c, "header length: %d words", (int)hdrlen_words);
	version = de_getu16le(pos+4);
	de_dbg(c, "version number: %d", (int)version);
	// TODO: Read more header fields.
	imgflag = de_getu16le(pos+28);
	de_dbg(c, "image flag: %d", (int)imgflag);

	pos += hdrlen_words*2;

	while(1) {
		if(pos >= c->infile->len) break;
		if(!do_record(c, d, pos, &bytesused)) break;
		if(bytesused<=0) break;
		pos += bytesused;
	}
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x13a8ce(%rip), %rsi    # 0x1aadda
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x1549f5(%rip), %rsi    # 0x1c4f32
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x1c, %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x13a884(%rip), %rsi    # 0x1aadf2
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
shlq %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x70598
jmp 0x705cb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x70630
cmpl $0x0, %eax
jne 0x705b4
jmp 0x705cb
cmpq $0x0, -0x40(%rbp)
jg 0x705bd
jmp 0x705cb
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x70584
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemmeta.c
// Function: find_opcode_info
static const struct opcode_info *find_opcode_info(i64 opcode)
{
	i64 i;

	for(i=0; opcode_info_arr[i].name!=NULL; i++) {
		if(opcode_info_arr[i].opcode == opcode) {
			return &opcode_info_arr[i];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x1a72a9(%rip), %rax    # 0x217ae0
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x70883
leaq 0x1a7293(%rip), %rax    # 0x217ae0
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzwl (%rax), %eax
cmpq -0x10(%rbp), %rax
jne 0x70873
leaq 0x1a727b(%rip), %rax    # 0x217ae0
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x7088b
jmp 0x70875
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x70830
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/gemmeta.c
// Function: do_opcode_5
static void do_opcode_5(deark *c, lctx *d, struct opcode_data *op)
{
	i64 sub_opcode_id;
	const char *name;

	if(op->func_id!=99) return;
	if(op->intin_count<1) return;
	sub_opcode_id = de_getu16le(op->intin_pos);

	switch(sub_opcode_id) {
	case 10: name="Start Group"; break;
	case 11: name="End Group"; break;
	case 49: name="Set No Line Style"; break;
	case 50: name="Set Attribute Shadow On"; break;
	case 51: name="Set Attribute Shadow Off"; break;
	case 80: name="Start Draw Area Type Primitive"; break;
	case 81: name="End Draw Area Type Primitive"; break;
	default:
		if(sub_opcode_id>100) {
			name="for developer use";
		}
		else {
			name="?";
		}
	}

	de_dbg(c, "sub-opcode id: %d (%s)", (int)sub_opcode_id, name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x63, 0x20(%rax)
je 0x708c4
jmp 0x709dd
movq -0x18(%rbp), %rax
cmpq $0x1, 0x30(%rax)
jge 0x708d4
jmp 0x709dd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x165280
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
subq $0xa, %rax
je 0x70945
jmp 0x708fd
movq -0x30(%rbp), %rax
subq $0xb, %rax
je 0x70952
jmp 0x70909
movq -0x30(%rbp), %rax
subq $0x31, %rax
je 0x7095f
jmp 0x70915
movq -0x30(%rbp), %rax
subq $0x32, %rax
je 0x7096c
jmp 0x70921
movq -0x30(%rbp), %rax
subq $0x33, %rax
je 0x70979
jmp 0x7092d
movq -0x30(%rbp), %rax
subq $0x50, %rax
je 0x70986
jmp 0x70939
movq -0x30(%rbp), %rax
subq $0x51, %rax
je 0x70993
jmp 0x709a0
leaq 0x13a6eb(%rip), %rax    # 0x1ab037
movq %rax, -0x28(%rbp)
jmp 0x709c1
leaq 0x13a6ea(%rip), %rax    # 0x1ab043
movq %rax, -0x28(%rbp)
jmp 0x709c1
leaq 0x13a6e7(%rip), %rax    # 0x1ab04d
movq %rax, -0x28(%rbp)
jmp 0x709c1
leaq 0x13a6ec(%rip), %rax    # 0x1ab05f
movq %rax, -0x28(%rbp)
jmp 0x709c1
leaq 0x13a6f7(%rip), %rax    # 0x1ab077
movq %rax, -0x28(%rbp)
jmp 0x709c1
leaq 0x13a703(%rip), %rax    # 0x1ab090
movq %rax, -0x28(%rbp)
jmp 0x709c1
leaq 0x13a715(%rip), %rax    # 0x1ab0af
movq %rax, -0x28(%rbp)
jmp 0x709c1
cmpq $0x64, -0x20(%rbp)
jle 0x709b4
leaq 0x13a71e(%rip), %rax    # 0x1ab0cc
movq %rax, -0x28(%rbp)
jmp 0x709bf
leaq 0x147272(%rip), %rax    # 0x1b7c2d
movq %rax, -0x28(%rbp)
jmp 0x709c1
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rcx
leaq 0x13a708(%rip), %rsi    # 0x1ab0de
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemmeta.c
// Function: do_opcode_11
static void do_opcode_11(deark *c, lctx *d, struct opcode_data *op)
{
	const char *name;

	switch(op->func_id) {
	case 1: name="Bar"; break;
	case 2: name="Arc"; break;
	case 3: name="Pie"; break;
	case 4: name="Circle"; break;
	case 5: name="Ellipse"; break;
	case 6: name="Elliptical arc"; break;
	case 7: name="Elliptical Pie"; break;
	case 8: name="Rounded rectangle"; break;
	case 9: name="Filled rounded rectangle"; break;
	case 10: name="Jutified graphic text"; break;
	default: name="?"; break;
	}

	de_dbg(c, "function: %s", name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
decq %rax
movq %rax, -0x28(%rbp)
subq $0x9, %rax
ja 0x70ab6
movq -0x28(%rbp), %rax
leaq 0x13a36c(%rip), %rcx    # 0x1aad94
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x13a6bd(%rip), %rax    # 0x1ab0f5
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x1477a0(%rip), %rax    # 0x1b81e8
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a6c5(%rip), %rax    # 0x1ab11a
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a697(%rip), %rax    # 0x1ab0f9
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x136c93(%rip), %rax    # 0x1a7702
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a684(%rip), %rax    # 0x1ab100
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a686(%rip), %rax    # 0x1ab10f
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a688(%rip), %rax    # 0x1ab11e
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a68d(%rip), %rax    # 0x1ab130
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x13a699(%rip), %rax    # 0x1ab149
movq %rax, -0x20(%rbp)
jmp 0x70ac1
leaq 0x147170(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x13a68f(%rip), %rsi    # 0x1ab15f
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemras.c
// Function: de_module_gemraster
void de_module_gemraster(deark *c, struct deark_module_info *mi)
{
	mi->id = "gemraster";
	mi->id_alias[0] = "gemras";
	mi->desc = "GEM VDI Bit Image, a.k.a. GEM Raster";
	mi->run_fn = de_run_gemraster;
	mi->identify_fn = de_identify_gemraster;
	mi->help_fn = de_help_gemraster;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13a681(%rip), %rcx    # 0x1ab178
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x13a67d(%rip), %rcx    # 0x1ab182
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
leaq 0x13a675(%rip), %rcx    # 0x1ab189
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2d(%rip), %rcx        # 0x70b50
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x51e(%rip), %rcx       # 0x71050
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x72f(%rip), %rcx       # 0x71270
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemras.c
// Function: set_density
static void set_density(deark *c, lctx *d, de_finfo *fi)
{
	if(d->pixwidth>1 && d->pixheight>1) {
		fi->density.code = DE_DENSITY_DPI;
		fi->density.xdens = d->dens_x;
		fi->density.ydens = d->dens_y;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x40(%rax)
jle 0x71e5b
movq -0x10(%rbp), %rax
cmpq $0x1, 0x48(%rax)
jle 0x71e5b
movq -0x18(%rbp), %rax
movl $0x2, 0x78(%rax)
movq -0x10(%rbp), %rax
movsd 0x50(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x80(%rax)
movq -0x10(%rbp), %rax
movsd 0x58(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x88(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemras.c
// Function: make_pal256_revbits
static void make_pal256_revbits(deark *c, lctx *d)
{
	size_t i;

	for(i=0; i<256; i++) {
		u8 x;

		x = reverse_bits_in_byte((u8)(255-i));
		d->pal[i] = DE_MAKE_GRAY(x);
		de_dbg_pal_entry(c, (i64)i, d->pal[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x100, -0x18(%rbp)     # imm = 0x100
jae 0x722c5
movl $0xff, %eax
subq -0x18(%rbp), %rax
movzbl %al, %edi
callq 0x722d0
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %edx
shll $0x10, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movzbl -0x19(%rbp), %eax
shll $0x8, %eax
orl %eax, %edx
movzbl -0x19(%rbp), %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl %edx, 0x70(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x70(%rax,%rcx,4), %edx
callq 0x15bf00
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x72258
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemras.c
// Function: reverse_bits_in_byte
static u8 reverse_bits_in_byte(u8 b1)
{
	UI i;
	u8 b2 = 0;

	for(i=0; i<8; i++) {

		b2 <<= 1;
		b2 |= (b1 & 0x1);
		b1 >>= 1;
	}
	return b2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movb $0x0, -0x9(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x8, -0x8(%rbp)
jae 0x72318
movzbl -0x9(%rbp), %eax
shll %eax
movb %al, -0x9(%rbp)
movzbl -0x1(%rbp), %ecx
andl $0x1, %ecx
movzbl -0x9(%rbp), %eax
orl %ecx, %eax
movb %al, -0x9(%rbp)
movzbl -0x1(%rbp), %eax
sarl %eax
movb %al, -0x1(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x722e5
movb -0x9(%rbp), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemras.c
// Function: hdrlen_seems_ok
static int hdrlen_seems_ok(deark *c, struct gemras_id *id)
{
	if(id->hdrlen<8 || (i64)id->hdrlen*2>c->infile->len) {
		return 0;
	}

	if(id->hdrlen<=59) return 1;

	// Header lengths (in words) for XIMG w/ 1 to 8 bits/pixel are probably
	// 11 + 3*2^(bpp): 17, 23, 35, 59, 107, 203, 395, 779.
	switch(id->hdrlen) {
	case 107: case 203: case 395: case 779:
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jb 0x7234e
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
shlq %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x72357
movl $0x0, -0x4(%rbp)
jmp 0x723af
movq -0x18(%rbp), %rax
cmpl $0x3b, 0x4(%rax)
ja 0x7236a
movl $0x1, -0x4(%rbp)
jmp 0x723af
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x6b, %eax
je 0x7239f
jmp 0x7237b
movl -0x1c(%rbp), %eax
subl $0xcb, %eax
je 0x7239f
jmp 0x72387
movl -0x1c(%rbp), %eax
subl $0x18b, %eax            # imm = 0x18B
je 0x7239f
jmp 0x72393
movl -0x1c(%rbp), %eax
subl $0x30b, %eax            # imm = 0x30B
jne 0x723a8
jmp 0x7239f
movl $0x1, -0x4(%rbp)
jmp 0x723af
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gemras.c
// Function: has_sane_density
static int has_sane_density(struct gemras_id *id)
{
	if(id->pixwidth==0 && id->pixheight==0) return 1;
	if(id->pixwidth==1 && id->pixheight==1) return 1;

	// Assume dpi should be at least ~20.
	if(id->pixwidth>1300 || id->pixheight>1300) return 0;

	// Assume dpi should be at most ~1200
	if(id->pixwidth<20 || id->pixheight<20) return 0;

	if(id->pixwidth*3 < id->pixheight) return 0;
	if(id->pixheight*3 < id->pixwidth) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x723e8
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x723e8
movl $0x1, -0x4(%rbp)
jmp 0x72480
movq -0x10(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x72405
movq -0x10(%rbp), %rax
cmpl $0x1, 0x14(%rax)
jne 0x72405
movl $0x1, -0x4(%rbp)
jmp 0x72480
movq -0x10(%rbp), %rax
cmpl $0x514, 0x10(%rax)      # imm = 0x514
ja 0x7241f
movq -0x10(%rbp), %rax
cmpl $0x514, 0x14(%rax)      # imm = 0x514
jbe 0x72428
movl $0x0, -0x4(%rbp)
jmp 0x72480
movq -0x10(%rbp), %rax
cmpl $0x14, 0x10(%rax)
jb 0x7243c
movq -0x10(%rbp), %rax
cmpl $0x14, 0x14(%rax)
jae 0x72445
movl $0x0, -0x4(%rbp)
jmp 0x72480
movq -0x10(%rbp), %rax
imull $0x3, 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jae 0x7245f
movl $0x0, -0x4(%rbp)
jmp 0x72480
movq -0x10(%rbp), %rax
imull $0x3, 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x72479
movl $0x0, -0x4(%rbp)
jmp 0x72480
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: de_module_gif
void de_module_gif(deark *c, struct deark_module_info *mi)
{
	mi->id = "gif";
	mi->desc = "GIF image";
	mi->run_fn = de_run_gif;
	mi->identify_fn = de_identify_gif;
	mi->help_fn = de_help_gif;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x1391b9(%rip), %rcx    # 0x1ab660
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1391af(%rip), %rcx    # 0x1ab664
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x724f0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3fd(%rip), %rcx       # 0x728d0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x46e(%rip), %rcx       # 0x72950
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: de_identify_gif
static int de_identify_gif(deark *c)
{
	u8 buf[6];

	de_read(buf, 0, 6);
	if(!de_memcmp(buf, "GIF87a", 6)) return 100;
	if(!de_memcmp(buf, "GIF89a", 6)) return 100;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x16(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x6, %ecx
callq 0x164d10
leaq -0x16(%rbp), %rdi
leaq 0x139397(%rip), %rsi    # 0x1abc98
movl $0x6, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x72919
movl $0x64, -0x4(%rbp)
jmp 0x72943
leaq -0x16(%rbp), %rdi
leaq 0x13937b(%rip), %rsi    # 0x1abc9f
movl $0x6, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x7293c
movl $0x64, -0x4(%rbp)
jmp 0x72943
movl $0x0, -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/gif.c
// Function: do_read_header
static int do_read_header(deark *c, lctx *d, i64 pos)
{
	de_ucstring *ver = NULL;

	de_dbg(c, "header at %d", (int)pos);
	de_dbg_indent(c, 1);
	ver = ucstring_create(c);
	dbuf_read_to_ucstring(c->infile, pos+3, 3, ver, 0, DE_ENCODING_ASCII);
	de_dbg(c, "version: \"%s\"", ucstring_getpsz(ver));
	de_dbg_indent(c, -1);
	ucstring_destroy(ver);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0x1525c1(%rip), %rsi    # 0x1c4f8e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x3, %rsi
movq -0x20(%rbp), %rcx
movl $0x3, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172500
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x14a431(%rip), %rsi    # 0x1bce66
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x20(%rbp), %rdi
callq 0x171750
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_read_global_color_table
static int do_read_global_color_table(deark *c, lctx *d, i64 pos, i64 *bytesused)
{
	if(!d->has_global_color_table) return 1;
	de_dbg(c, "global color table at %d", (int)pos);

	de_dbg_indent(c, 1);
	do_read_color_table(c, d, pos, d->global_color_table_size, d->global_ct);
	de_dbg_indent(c, -1);

	*bytesused = 3*d->global_color_table_size;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x72d5b
movl $0x1, -0x4(%rbp)
jmp 0x72dc7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x138a45(%rip), %rsi    # 0x1ab7b1
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %r8
addq $0x38, %r8
callq 0x73430
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x18(%rbp), %rax
imulq $0x3, 0x30(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_after_trailer
static void do_after_trailer(deark *c, lctx *d, i64 pos1)
{
	i64 extra_bytes_at_eof;
	u8 first_byte;

	extra_bytes_at_eof = c->infile->len - pos1;
	if(extra_bytes_at_eof<=0) return;

	// If all extra bytes are 0x00, or all are 0x1a, don't report it.
	first_byte = de_getbyte(pos1);
	if(first_byte==0x00 || first_byte==0x1a) {
		i64 i;
		u8 flag = 0;

		for(i=1; i<extra_bytes_at_eof; i++) {
			if(de_getbyte(pos1+i)!=first_byte) {
				flag = 1;
				break;
			}
		}
		if(!flag) return;
	}

	de_info(c, "Note: %"I64_FMT" bytes of unidentified data found at end "
		"of file (starting at %"I64_FMT").", extra_bytes_at_eof, pos1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jg 0x73344
jmp 0x733da
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165060
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x0, %eax
je 0x7336a
movzbl -0x21(%rbp), %eax
cmpl $0x1a, %eax
jne 0x733c0
movb $0x0, -0x31(%rbp)
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x733b6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq -0x30(%rbp), %rsi
callq 0x165060
movzbl %al, %eax
movzbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
je 0x733a6
movb $0x1, -0x31(%rbp)
jmp 0x733b6
jmp 0x733a8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x73376
cmpb $0x0, -0x31(%rbp)
jne 0x733be
jmp 0x733da
jmp 0x733c0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x138878(%rip), %rsi    # 0x1abc4b
movb $0x0, %al
callq 0x15c0c0
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_comment_extension
static void do_comment_extension(deark *c, lctx *d, i64 pos1)
{
	struct comment_ext_ctx ctx;
	i64 pos = pos1;

	de_zeromem(&ctx, sizeof(struct comment_ext_ctx));
	ctx.s = ucstring_create(c);
	if(c->extract_level>=2) {
		ctx.outf = dbuf_create_output_file(c, "comment.txt", NULL, DE_CREATEFLAG_IS_AUX);
	}

	do_read_subblocks_p(c, d, c->infile, callback_for_comment_ext, (void*)&ctx, &pos);

	de_dbg(c, "comment: \"%s\"", ucstring_getpsz_d(ctx.s));

	dbuf_close(ctx.outf);
	ucstring_destroy(ctx.s);
}

// 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, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jl 0x73923
movq -0x8(%rbp), %rdi
leaq 0x13093f(%rip), %rsi    # 0x1a4250
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x166c60
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0xd76(%rip), %rcx       # 0x746b0
leaq -0x28(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0x73ce0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x12cce6(%rip), %rsi    # 0x1a064c
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x1676a0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_framename_extension
static void do_framename_extension(deark *c, lctx *d, i64 pos1)
{
	struct comment_ext_ctx ctx;
	i64 pos = pos1;

	de_zeromem(&ctx, sizeof(struct comment_ext_ctx));
	ctx.s = ucstring_create(c);

	do_read_subblocks_p(c, d, c->infile, callback_for_comment_ext, (void*)&ctx, &pos);

	de_dbg(c, "frame name: \"%s\"", ucstring_getpsz_d(ctx.s));
	ucstring_destroy(ctx.s);
}

// 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, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0xa80(%rip), %rcx       # 0x746b0
leaq -0x28(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0x73ce0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x137e67(%rip), %rsi    # 0x1abac3
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_read_subblocks_p
static void do_read_subblocks_p(deark *c, lctx *d, dbuf *inf,
	subblock_callback_fn_type cbfn, void *userdata, i64 *ppos)
{
	struct subblock_reader_data sbrd;
	int eof_flag = 0;

	de_zeromem(&sbrd, sizeof(struct subblock_reader_data));
	sbrd.userdata = userdata;
	sbrd.inf = inf;

	while(1) {
		sbrd.subblkpos = *ppos;

		if(*ppos >= inf->len) {
			on_unexpected_eof(c, d);
			*ppos = inf->len;
			return;
		}
		sbrd.reported_dlen = (i64)de_getbyte_p(ppos);

		sbrd.dpos = *ppos;

		if(sbrd.dpos + sbrd.reported_dlen > inf->len) {
			eof_flag = 1;
			sbrd.dlen = inf->len - sbrd.dpos;
		}
		else {
			sbrd.dlen = sbrd.reported_dlen;
		}

		*ppos += sbrd.dlen;

		if(sbrd.dlen>0 || !eof_flag) {
			cbfn(c, d, &sbrd);
		}

		if(eof_flag) {
			on_unexpected_eof(c, d);
			*ppos = inf->len;
			return;
		}

		if(sbrd.reported_dlen==0) break;
		sbrd.subblock_idx++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x6c(%rbp)
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x19140
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jl 0x73d64
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x72dd0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x73e25
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jle 0x73db2
movl $0x1, -0x6c(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
subq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x73dba
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
cmpq $0x0, -0x38(%rbp)
jg 0x73dd5
cmpl $0x0, -0x6c(%rbp)
jne 0x73de7
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq *%rax
cmpl $0x0, -0x6c(%rbp)
je 0x73e0b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x72dd0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x73e25
cmpq $0x0, -0x48(%rbp)
jne 0x73e14
jmp 0x73e25
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x73d27
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: callback_for_plaintext_ext
static void callback_for_plaintext_ext(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct plaintext_ext_ctx *ctx = (struct plaintext_ext_ctx*)sbrd->userdata;

	if(sbrd->subblock_idx==0) {
		// The first sub-block is the header
		do_plaintext_ext_header(c, d, ctx, sbrd->inf, sbrd->dpos, sbrd->dlen);
	}
	else {
		if(ctx->header_ok && sbrd->dlen>0) {
			do_plaintext_ext_textsubblock(c, d, ctx, sbrd->inf, sbrd->dpos, sbrd->dlen);
		}
	}
}

// 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 (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x73e85
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %r8
movq -0x18(%rbp), %rax
movq 0x30(%rax), %r9
callq 0x73ed0
jmp 0x73ec4
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x73ec2
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jle 0x73ec2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %r8
movq -0x18(%rbp), %rax
movq 0x30(%rax), %r9
callq 0x74270
jmp 0x73ec4
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)