LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_convert_and_write_image_bilevel2
void de_convert_and_write_image_bilevel2(dbuf *f, i64 fpos,
	i64 width, i64 height, i64 rowspan, unsigned int cvtflags,
	de_finfo *fi, unsigned int createflags)
{
	de_bitmap *img = NULL;
	deark *c = f->c;

	if(!de_good_image_dimensions(c, width, height)) return;
	img = de_bitmap_create2(c, width, rowspan*8, height, 1);
	de_convert_image_bilevel(f, fpos, rowspan, img, cvtflags);
	de_bitmap_write_to_file_finfo(img, fi, createflags | DE_CREATEFLAG_IS_BWIMG);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, 0x8(%rsp)
movq %rdi, %r13
movl 0x58(%rsp), %ebx
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rdi), %r12
movq %r12, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xe6be1
testl %eax, %eax
je 0xe7954
leaq (,%r15,8), %rdx
pushq $0x1
popq %r8
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rcx
callq 0xe746f
movq %rax, %r14
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movq %rax, %rcx
movl 0x4(%rsp), %r8d
callq 0xe77b7
orl $0x8, %ebx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebx, %edx
callq 0xe70ab
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe7084
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_read_palette_rgb
void de_read_palette_rgb(dbuf *f,
	i64 fpos, i64 num_entries, i64 entryspan,
	de_color *pal, i64 ncolors_in_pal,
	unsigned int flags)
{
	i64 k;

	if(num_entries > ncolors_in_pal) num_entries = ncolors_in_pal;
	for(k=0; k<num_entries; k++) {
		pal[k] = dbuf_getRGB(f, fpos + k*entryspan, flags);
		de_dbg_pal_entry(f->c, k, pal[k]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpq %r9, %rdx
cmovlq %rdx, %rbx
xorl %ebp, %ebp
testq %rbx, %rbx
cmovleq %rbp, %rbx
cmpq %rbp, %rbx
je 0xe79bb
movq %r13, %rdi
movq %r12, %rsi
movl 0x40(%rsp), %edx
callq 0xe45a4
movl %eax, (%r14,%rbp,4)
movq 0x8(%r13), %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0xdf23b
incq %rbp
addq %r15, %r12
jmp 0xe798d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_convert_image_paletted
void de_convert_image_paletted(dbuf *f, i64 fpos,
	i64 bpp, i64 rowspan, const de_color *pal,
	de_bitmap *img, unsigned int flags)
{
	i64 i, j;
	unsigned int palent;
	u8 mask;

	if(bpp!=1 && bpp!=2 && bpp!=4 && bpp!=8) return;
	if(!de_bitmap_good_dimensions(img, 0)) return;

	mask = (1U<<(UI)bpp)-1;

	for(j=0; j<img->height; j++) {
		i64 pos = fpos + j*rowspan;

		i = 0;

		while(1) {
			UI nbits_avail;
			u8 b = 0;

			b = dbuf_getbyte_p(f, &pos);
			nbits_avail = 8;

			while(nbits_avail >= (UI)bpp) {
				nbits_avail -= (UI)bpp;
				if(flags & 0x1) {
					palent = b & mask;
					b >>= (UI)bpp;
				}
				else {
					palent = (b >> nbits_avail) & mask;
				}
				de_bitmap_setpixel_rgba(img, i++, j, pal[palent]);
				if(i>=img->width) goto nextrow;
			}
		}
	nextrow:
		;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, 0x38(%rsp)
movq %rcx, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, 0x30(%rsp)
cmpq $0x8, %rdx
ja 0xe7dd2
movq %rdx, %r12
movl $0x116, %eax            # imm = 0x116
btq %rdx, %rax
jae 0xe7dd2
movq %r9, %rbx
movq %r9, %rdi
xorl %esi, %esi
callq 0xe6c2c
testl %eax, %eax
je 0xe7dd2
pushq $-0x1
popq %rax
movl %r12d, %ecx
shll %cl, %eax
notb %al
movl %eax, 0x14(%rsp)
movzbl %al, %eax
movl %eax, 0x10(%rsp)
movl %r12d, %eax
negl %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
cmpq 0x10(%rbx), %rax
jge 0xe7dd2
movq %rax, 0x18(%rsp)
imulq 0x28(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %r15d, %r15d
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xe3f2a
movl %eax, %ebp
pushq $0x8
popq %rcx
movl %ecx, %r14d
subl %r12d, %r14d
jb 0xe7d51
movzbl %bpl, %eax
movl 0x80(%rsp), %edx
testb $0x1, %dl
jne 0xe7d8b
addl 0xc(%rsp), %ecx
shrl %cl, %eax
andl 0x10(%rsp), %eax
movl %eax, %edx
jmp 0xe7d9b
movl %eax, %ecx
andb 0x14(%rsp), %cl
movzbl %cl, %edx
movl %r12d, %ecx
shrl %cl, %eax
movl %eax, %ebp
leaq 0x1(%r15), %r13
movl %edx, %eax
movq 0x38(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rdx
callq 0xe728c
movq %r13, %r15
movl %r14d, %ecx
cmpq 0x8(%rbx), %r13
jl 0xe7d68
movq 0x18(%rsp), %rax
incq %rax
jmp 0xe7d2f
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_convert_image_rgb
void de_convert_image_rgb(dbuf *f, i64 fpos,
	i64 rowspan, i64 pixelspan, de_bitmap *img, unsigned int flags)
{
	i64 i, j;
	de_color clr;

	for(j=0; j<img->height; j++) {
		for(i=0; i<img->width; i++) {
			clr = dbuf_getRGB(f, fpos + j*rowspan + i*pixelspan, flags);
			de_bitmap_setpixel_rgb(img, i, j, clr);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %rbp
xorl %r12d, %r12d
cmpq 0x10(%r14), %r12
jge 0xe7fd7
movq %r13, 0x10(%rsp)
xorl %ebx, %ebx
cmpq 0x8(%r14), %rbx
jge 0xe7fc8
movq %rbp, %rdi
movq %r13, %rsi
movl 0x4(%rsp), %edx
callq 0xe45a4
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0xe728c
incq %rbx
addq %r15, %r13
jmp 0xe7f9b
incq %r12
movq 0x10(%rsp), %r13
addq 0x8(%rsp), %r13
jmp 0xe7f8e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_flip
void de_bitmap_flip(de_bitmap *img)
{
	i64 i, j;
	i64 nr;

	nr = img->height/2;

	for(j=0; j<nr; j++) {
		i64 row1, row2;

		row1 = j;
		row2 = img->height-1-j;

		for(i=0; i<img->width; i++) {
			de_color tmp1, tmp2;

			tmp1 = de_bitmap_getpixel(img, i, row1);
			tmp2 = de_bitmap_getpixel(img, i, row2);
			if(tmp1==tmp2) continue;
			de_bitmap_setpixel_rgba(img, i, row2, tmp1);
			de_bitmap_setpixel_rgba(img, i, row1, tmp2);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
xorl %r15d, %r15d
testq %rax, %rax
cmovleq %r15, %rax
movq %rax, (%rsp)
cmpq (%rsp), %r15
je 0xe8077
movq %r15, %r12
notq %r12
addq 0x10(%rbx), %r12
xorl %r13d, %r13d
cmpq 0x8(%rbx), %r13
jge 0xe8072
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xe735f
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xe735f
cmpl %eax, %ebp
je 0xe806d
movl %eax, %r14d
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0xe728c
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq 0xe728c
incq %r13
jmp 0xe8021
incq %r15
jmp 0xe800e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_mirror
void de_bitmap_mirror(de_bitmap *img)
{
	i64 i, j;
	i64 nc;

	de_bitmap_apply_padding(img);
	nc = img->width/2;

	for(j=0; j<img->height; j++) {
		for(i=0; i<nc; i++) {
			i64 col1, col2;
			de_color tmp1, tmp2;

			col1 = i;
			col2 = img->width-1-i;

			tmp1 = de_bitmap_getpixel(img, col1, j);
			tmp2 = de_bitmap_getpixel(img, col2, j);
			if(tmp1==tmp2) continue;
			de_bitmap_setpixel_rgba(img, col2, j, tmp1);
			de_bitmap_setpixel_rgba(img, col1, j, tmp2);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rax
movq %rdi, (%rsp)
cmpq %rax, 0x18(%rdi)
je 0xe80aa
movq (%rsp), %rcx
movq %rax, 0x18(%rcx)
pushq $0x2
popq %rcx
cqto
idivq %rcx
xorl %r14d, %r14d
testq %rax, %rax
cmovleq %r14, %rax
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
cmpq 0x10(%rax), %r14
jge 0xe8152
pushq $-0x1
popq %r15
xorl %r12d, %r12d
cmpq %r12, 0x10(%rsp)
je 0xe814a
movq (%rsp), %rbx
movq 0x8(%rbx), %r13
addq %r15, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe735f
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rbx
movq %r14, %rdx
callq 0xe735f
cmpl %eax, %ebp
je 0xe813f
movl %eax, %r14d
movq %r15, 0x8(%rsp)
movq (%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0xe728c
movq %r15, %rdi
movq 0x8(%rsp), %r15
movq %r12, %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0xe728c
incq %r12
decq %r15
movq %rbx, %r14
jmp 0xe80d6
incq %r14
jmp 0xe80c1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_transpose
void de_bitmap_transpose(de_bitmap *img)
{
	i64 i, j;
	de_bitmap *imgtmp = NULL;

	de_bitmap_apply_padding(img);

	if(img->width == img->height) {
		bitmap_transpose_square(img);
		goto done;
	}

	imgtmp = de_bitmap_clone(img);

	de_bitmap_free_pixels(img);
	img->width = imgtmp->height;
	img->unpadded_width = imgtmp->height;
	img->height = imgtmp->width;

	for(j=0; j<img->height; j++) {
		for(i=0; i<img->width; i++) {
			de_color tmp1;

			tmp1 = de_bitmap_getpixel(imgtmp, j, i);
			de_bitmap_setpixel_rgba(img, i, j, tmp1);
		}
	}

done:
	if(imgtmp) de_bitmap_destroy(imgtmp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0xe817a
movq %rax, 0x18(%rbx)
cmpq 0x10(%rbx), %rax
jne 0xe81e8
xorl %r14d, %r14d
cmpq %rax, %r14
jge 0xe8289
xorl %r15d, %r15d
cmpq %r15, %r14
je 0xe81df
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xe735f
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xe735f
cmpl %eax, %ebp
je 0xe81da
movl %eax, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0xe728c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0xe728c
incq %r15
jmp 0xe818f
incq %r14
movq 0x10(%rbx), %rax
jmp 0xe8183
movq %rbx, %rdi
callq 0xe88c1
movq %rax, %r14
movq %rax, %rdi
callq 0xe7025
movq 0x30(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0xdfb45
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
movq %rax, %rdx
callq 0x181e0
movq %rbx, %rdi
callq 0xe7499
movq 0x10(%r14), %rax
movq %rax, 0x8(%rbx)
movq %rax, 0x18(%rbx)
movq 0x8(%r14), %rcx
movq %rcx, 0x10(%rbx)
xorl %r15d, %r15d
cmpq %rcx, %r15
jge 0xe8274
xorl %r12d, %r12d
cmpq %rax, %r12
jge 0xe826b
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xe735f
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq 0xe728c
incq %r12
movq 0x8(%rbx), %rax
jmp 0xe823f
incq %r15
movq 0x10(%rbx), %rcx
jmp 0xe8237
testq %r14, %r14
je 0xe8289
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe7084
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_rect
void de_bitmap_rect(de_bitmap *img,
	i64 xpos, i64 ypos, i64 width, i64 height,
	de_color clr, unsigned int flags)
{
	i64 i, j;

	for(j=0; j<height; j++) {
		for(i=0; i<width; i++) {
			de_bitmap_setpixel_rgba(img, xpos+i, ypos+j, clr);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
xorl %r15d, %r15d
testq %rcx, %rcx
cmovleq %r15, %rcx
movq %rcx, 0x18(%rsp)
movq %rdi, %rbp
testq %r8, %r8
cmovleq %r15, %r8
movq %r8, 0x20(%rsp)
cmpq 0x20(%rsp), %r15
je 0xe8305
movq 0x10(%rsp), %rax
leaq (%r15,%rax), %r12
movq 0x8(%rsp), %r13
movq 0x18(%rsp), %r14
subq $0x1, %r14
jb 0xe8300
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %ebx, %ecx
callq 0xe728c
incq %r13
jmp 0xe82e5
incq %r15
jmp 0xe82cb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_copy_rect
void de_bitmap_copy_rect(de_bitmap *srcimg, de_bitmap *dstimg,
	i64 srcxpos, i64 srcypos, i64 width, i64 height,
	i64 dstxpos, i64 dstypos, unsigned int flags)
{
	i64 i, j;
	de_color dst_clr, src_clr, clr;
	de_colorsample src_a;

	for(j=0; j<height; j++) {
		for(i=0; i<width; i++) {
			src_clr = de_bitmap_getpixel(srcimg, srcxpos+i, srcypos+j);
			if(!(flags&DE_BITMAPFLAG_MERGE)) {
				clr = src_clr;
			}
			else {
				src_a = DE_COLOR_A(src_clr);
				if(src_a>0) {
					// TODO: Support partial transparency (of both foreground and
					// background, ideally)
					clr = src_clr;
				}
				else {
					dst_clr = de_bitmap_getpixel(dstimg, dstxpos+i, dstypos+j);
					clr = dst_clr;
				}
			}
			de_bitmap_setpixel_rgba(dstimg, dstxpos+i, dstypos+j, clr);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
movq %rsi, %r13
movq %rdi, 0x28(%rsp)
xorl %ecx, %ecx
testq %r8, %r8
cmovleq %rcx, %r8
movq %r8, 0x10(%rsp)
testq %r9, %r9
cmovleq %rcx, %r9
movq %r9, 0x18(%rsp)
cmpq 0x18(%rsp), %rcx
je 0xe83e9
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq %rcx, 0x20(%rsp)
leaq (%rcx,%rax), %r12
movq 0x70(%rsp), %r14
movq (%rsp), %rbx
movq 0x10(%rsp), %rbp
subq $0x1, %rbp
jb 0xe83dc
movl 0x80(%rsp), %eax
movl %eax, %r15d
shrb %r15b
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq 0x30(%rsp), %rdx
callq 0xe735f
cmpl $0x1000000, %eax        # imm = 0x1000000
setb %cl
andb %r15b, %cl
cmpb $0x1, %cl
jne 0xe83c4
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xe735f
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0xe728c
incq %rbx
incq %r14
jmp 0xe8381
movq 0x20(%rsp), %rcx
incq %rcx
jmp 0xe834d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_apply_mask
void de_bitmap_apply_mask(de_bitmap *fg, de_bitmap *mask,
	unsigned int flags)
{
	i64 i, j;
	de_color clr;
	de_colorsample a;

	for(j=0; j<fg->height && j<mask->height; j++) {
		for(i=0; i<fg->width && i<mask->width; i++) {
			clr = de_bitmap_getpixel(mask, i, j);
			a = DE_COLOR_K(clr);
			if(flags&DE_BITMAPFLAG_WHITEISTRNS)
				a = 0xff-a;
			de_bitmap_setsample(fg, i, j, 3, a);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
andb $0x1, %bl
negb %bl
xorl %r12d, %r12d
pushq $0x3
popq %r13
cmpq 0x10(%r15), %r12
jge 0xe8463
cmpq 0x10(%r14), %r12
jge 0xe8463
xorl %ebp, %ebp
cmpq 0x8(%r15), %rbp
jge 0xe845e
cmpq 0x8(%r14), %rbp
jge 0xe845e
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0xe735f
shrl $0x10, %eax
xorb %bl, %al
movzbl %al, %r8d
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xe712a
incq %rbp
jmp 0xe8425
incq %r12
jmp 0xe8417
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_remove_alpha
void de_bitmap_remove_alpha(de_bitmap *img)
{
	i64 i, j;
	i64 k;

	if(img->bytes_per_pixel!=2 && img->bytes_per_pixel!=4) return;

	// Note that the format conversion is done in-place. The extra memory used
	// by the alpha channel is not de-allocated.
	for(j=0; j<img->height; j++) {
		for(i=0; i<img->width; i++) {
			for(k=0; k<(i64)img->bytes_per_pixel-1; k++) {
				img->bitmap[(j*img->width+i)*((i64)img->bytes_per_pixel-1) + k] =
					img->bitmap[(j*img->width+i)*(img->bytes_per_pixel) + k];
			}
		}
	}

	img->bytes_per_pixel--;
}

// Assembly:
movl 0x24(%rdi), %ecx
cmpl $0x4, %ecx
je 0xe847f
cmpl $0x2, %ecx
jne 0xe84d9
xorl %eax, %eax
cmpq 0x10(%rdi), %rax
jge 0xe84d4
xorl %edx, %edx
cmpq 0x8(%rdi), %rdx
jge 0xe84cf
xorl %esi, %esi
movslq %ecx, %r9
leaq -0x1(%r9), %r8
cmpq %r8, %rsi
jge 0xe84ca
movq 0x28(%rdi), %rcx
movq 0x8(%rdi), %r10
imulq %rax, %r10
addq %rdx, %r10
imulq %r10, %r9
addq %rcx, %r9
movb (%rsi,%r9), %r9b
imulq %r8, %r10
addq %rcx, %r10
movb %r9b, (%rsi,%r10)
incq %rsi
movl 0x24(%rdi), %ecx
jmp 0xe8491
incq %rdx
jmp 0xe8489
incq %rax
jmp 0xe8481
decl %ecx
movl %ecx, 0x24(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_optimize_alpha
void de_bitmap_optimize_alpha(de_bitmap *img, unsigned int flags)
{
	struct image_scan_opt_data optctx;

	if(img->bytes_per_pixel!=2 && img->bytes_per_pixel!=4) return;

	de_zeromem(&optctx, sizeof(struct image_scan_opt_data));
	scan_image(img, &optctx);

	if((flags&0x4) && !optctx.has_visible_pixels &&
		(optctx.has_only_invis_black_pixels || optctx.has_only_invis_white_pixels))
	{
		// No visible pixels, but the image is boring enough that it may be by
		// design, so don't remove the alpha channel.
		return;
	}

	if(optctx.has_trns && !optctx.has_visible_pixels && (flags&(0x1|0x4))) {
		if(flags&0x2) {
			de_warn(img->c, "Invisible image detected. Ignoring transparency.");
		}
	}
	else if(optctx.has_trns) {
		return;
	}

	// No meaningful transparency found.
	de_dbg3(img->c, "Removing alpha channel from image");

	de_bitmap_remove_alpha(img);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl 0x24(%rdi), %eax
cmpl $0x4, %eax
je 0xe84f4
cmpl $0x2, %eax
jne 0xe8556
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8580
testb $0x4, %bpl
sete %cl
movb 0x2(%r14), %al
testb %al, %al
setne %dl
orb %cl, %dl
jne 0xe8527
movb 0x5(%rsp), %cl
orb 0x4(%rsp), %cl
jne 0xe8556
movb 0x1(%rsp), %cl
testb $0x5, %bpl
je 0xe8552
testb %cl, %cl
je 0xe8552
testb %al, %al
jne 0xe8552
testb $0x2, %bpl
je 0xe855f
movq (%rbx), %rdi
leaq 0x53c35(%rip), %rsi     # 0x13c17e
xorl %eax, %eax
callq 0xdf05a
jmp 0xe855f
testb %cl, %cl
je 0xe855f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq (%rbx), %rdi
leaq 0x53c46(%rip), %rsi     # 0x13c1af
xorl %eax, %eax
callq 0xdea83
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xe8472
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_make_grayscale_palette
void de_make_grayscale_palette(de_color *pal, i64 num_entries, unsigned int flags)
{
	i64 k;
	u8 b;

	for(k=0; k<num_entries; k++) {
		b = (u8)(0.5+ (double)k * (255.0 / (double)(num_entries-1)));
		if(flags&0x1) b = 255-b;
		pal[k] = DE_MAKE_GRAY(b);
	}
}

// Assembly:
leaq -0x1(%rsi), %rax
cvtsi2sd %rax, %xmm1
movsd 0x21f8f(%rip), %xmm0    # 0x10a748
divsd %xmm1, %xmm0
andb $0x1, %dl
negb %dl
xorl %eax, %eax
testq %rsi, %rsi
cmovleq %rax, %rsi
movsd 0x21f6d(%rip), %xmm1    # 0x10a740
cmpq %rax, %rsi
je 0xe8802
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %ecx
xorb %dl, %cl
movzbl %cl, %ecx
imull $0x10101, %ecx, %ecx    # imm = 0x10101
orl $0xff000000, %ecx       # imm = 0xFF000000
movl %ecx, (%rdi,%rax,4)
incq %rax
jmp 0xe87d3
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_unpremultiply_alpha_samp
de_colorsample de_unpremultiply_alpha_samp(de_colorsample cval, de_colorsample a)
{
	if(a==0xff) {
		return cval;
	}
	if(a==0 || cval==0) {
		return 0;
	}
	if(cval>=a) {
		return 0xff;
	}
	return (de_colorsample)(0.5 + (double)cval / ((double)a/255.0));
}

// Assembly:
cmpl $0xff, %esi
je 0xe881e
testb %sil, %sil
sete %al
testb %dil, %dil
sete %cl
orb %al, %cl
je 0xe8821
xorl %eax, %eax
retq
movl %edi, %eax
retq
movb $-0x1, %al
cmpb %sil, %dil
jae 0xe881d
movzbl %dil, %eax
cvtsi2sd %eax, %xmm0
movzbl %sil, %eax
cvtsi2sd %eax, %xmm1
divsd 0x21f08(%rip), %xmm1    # 0x10a748
divsd %xmm1, %xmm0
addsd 0x21ef4(%rip), %xmm0    # 0x10a740
cvttsd2si %xmm0, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_unpremultiply_alpha_clr
de_color de_unpremultiply_alpha_clr(de_color clr)
{
	de_colorsample r, g, b, a;

	r = DE_COLOR_R(clr);
	g = DE_COLOR_G(clr);
	b = DE_COLOR_B(clr);
	a = DE_COLOR_A(clr);
	r = de_unpremultiply_alpha_samp(r, a);
	g = de_unpremultiply_alpha_samp(g, a);
	b = de_unpremultiply_alpha_samp(b, a);
	return DE_MAKE_RGBA(r, g, b, a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
shrl $0x10, %edi
movl %ebx, %ebp
shrl $0x8, %ebp
movl %ebx, %r14d
shrl $0x18, %r14d
movl $0xff, %r15d
andl %r15d, %edi
movl %r14d, %esi
callq 0xe8803
movl %eax, %r12d
andl %r15d, %ebp
movl %ebp, %edi
movl %r14d, %esi
callq 0xe8803
movl %eax, %ebp
andl %ebx, %r15d
movl %r15d, %edi
movl %r14d, %esi
callq 0xe8803
andl $0xff000000, %ebx       # imm = 0xFF000000
movzbl %r12b, %ecx
shll $0x10, %ecx
orl %ebx, %ecx
movzbl %bpl, %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl %al, %eax
orl %edx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-bitmap.c
// Function: de_bitmap_clone_noalloc
static de_bitmap *de_bitmap_clone_noalloc(de_bitmap *img1)
{
	de_bitmap *img2;

	img2 = de_bitmap_create_noinit(img1->c);
	de_memcpy(img2, img1, sizeof(de_bitmap));
	img2->bitmap = NULL;
	img2->bitmap_size = 0;
	return img2;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xe745e
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x30(%rbx), %xmm3
movups %xmm2, 0x20(%rax)
movups %xmm3, 0x30(%rax)
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: de_free_charctx_screens
void de_free_charctx_screens(deark *c, struct de_char_context *charctx)
{
	i64 pgnum;
	i64 j;

	if(!charctx || !charctx->screens) return;

	for(pgnum=0; pgnum<charctx->nscreens; pgnum++) {
		if(charctx->screens[pgnum]) {
			if(charctx->screens[pgnum]->cell_rows) {
				for(j=0; j<charctx->screens[pgnum]->height; j++) {
					de_free(c, charctx->screens[pgnum]->cell_rows[j]);
				}
				de_free(c, charctx->screens[pgnum]->cell_rows);
			}
			de_free(c, charctx->screens[pgnum]);
		}
	}
	de_free(c, charctx->screens);
	charctx->screens = NULL;
}

// Assembly:
testq %rsi, %rsi
je 0xe8997
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0xe898c
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x18(%rbx), %rsi
cmpq 0x10(%rbx), %r15
jge 0xe897f
movq (%rsi,%r15,8), %rsi
testq %rsi, %rsi
je 0xe897a
cmpq $0x0, 0x10(%rsi)
je 0xe8972
xorl %r12d, %r12d
movq 0x10(%rsi), %rax
cmpq 0x8(%rsi), %r12
jge 0xe895f
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0xded32
incq %r12
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
jmp 0xe893c
movq %r14, %rdi
movq %rax, %rsi
callq 0xded32
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0xded32
incq %r15
jmp 0xe891f
movq %r14, %rdi
callq 0xded32
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: de_destroy_charctx
void de_destroy_charctx(deark *c, struct de_char_context *charctx)
{
	if(!charctx) return;

	if(charctx->screens) {
		de_internal_err_fatal(c, "charctx");
	}
	de_free(c, charctx);
}

// Assembly:
testq %rsi, %rsi
je 0xe89d1
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x18(%rsi)
je 0xe89bf
leaq 0x53833(%rip), %rsi     # 0x13c1e8
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf4f0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: de_char_decide_output_format
void de_char_decide_output_format(deark *c, struct de_char_context *charctx)
{
	const char *s;

	if(charctx->outfmt_known) return;
	charctx->outfmt_known = 1;

	if(charctx->prefer_image_output)
		charctx->outfmt = 1;

	s = de_get_ext_option(c, "char:output");
	if(s) {
		if(!de_strcmp(s, "html")) {
			charctx->outfmt = 0;
		}
		else if(!de_strcmp(s, "image")) {
			charctx->outfmt = 1;
		}
	}
}

// Assembly:
cmpb $0x0, 0x5(%rsi)
je 0xe8a00
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb $0x1, 0x5(%rsi)
cmpb $0x0, (%rsi)
je 0xe8a17
movl $0x1, 0x8(%rbx)
leaq 0x537d2(%rip), %rsi     # 0x13c1f0
callq 0xdfa87
testq %rax, %rax
je 0xe8a5b
movq %rax, %r14
leaq 0x4a710(%rip), %rsi     # 0x133142
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0xe8a56
leaq 0x2f3af(%rip), %rsi     # 0x117df4
movq %r14, %rdi
callq 0x181a0
testl %eax, %eax
jne 0xe8a5b
pushq $0x1
popq %rax
jmp 0xe8a58
xorl %eax, %eax
movl %eax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: do_render_character
static void do_render_character(deark *c, struct de_char_context *charctx,
	struct charextractx *ectx, de_bitmap *img,
	i64 xpos, i64 ypos,
	i32 codepoint, int codepoint_is_unicode,
	u32 fgcol, u32 bgcol,
	unsigned int extra_flags)
{
	i64 xpos_in_pix, ypos_in_pix;
	u32 fgcol_rgb, bgcol_rgb;
	unsigned int flags;

	xpos_in_pix = xpos * ectx->char_width_in_pixels;
	ypos_in_pix = ypos * ectx->char_height_in_pixels;

	if(DE_IS_PAL_COLOR(fgcol))
		fgcol_rgb = charctx->pal[fgcol];
	else
		fgcol_rgb = fgcol;
	if(DE_IS_PAL_COLOR(bgcol))
		bgcol_rgb = charctx->pal[bgcol];
	else
		bgcol_rgb = bgcol;

	flags = extra_flags;
	if(ectx->vga_9col_mode) flags |= DE_PAINTFLAG_VGA9COL;

	if(codepoint_is_unicode) {
		de_font_paint_character_cp(c, img, ectx->font_to_use, codepoint,
			xpos_in_pix, ypos_in_pix, fgcol_rgb, bgcol_rgb, flags);
	}
	else {
		de_font_paint_character_idx(c, img, ectx->font_to_use, (i64)codepoint,
			xpos_in_pix, ypos_in_pix, fgcol_rgb, bgcol_rgb, flags);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x38(%rsp), %r11d
movl 0x30(%rsp), %r10d
cmpl $0xf, %r10d
ja 0xe982d
movl %r10d, %eax
movl 0x20(%rsi,%rax,4), %r10d
movl 0x40(%rsp), %r14d
movl 0x28(%rsp), %ebp
cmpl $0xf, %r11d
ja 0xe9844
movl %r11d, %eax
movl 0x20(%rsi,%rax,4), %r11d
movl 0x20(%rsp), %eax
imulq 0x38(%rdx), %r8
imulq 0x40(%rdx), %r9
movl %r14d, %ebx
orl $0x2, %ebx
cmpb $0x0, (%rdx)
cmovel %r14d, %ebx
movq 0x30(%rdx), %rdx
testl %ebp, %ebp
je 0xe987c
subq $0x8, %rsp
movq %rcx, %rsi
movl %eax, %ecx
pushq %rbx
pushq %r11
pushq %r10
callq 0xea01c
jmp 0xe9892
cltq
subq $0x8, %rsp
movq %rcx, %rsi
movq %rax, %rcx
pushq %rbx
pushq %r11
pushq %r10
callq 0xe9d2d
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: write_ucstring_to_html
static void write_ucstring_to_html(deark *c, const de_ucstring *s, dbuf *f)
{
	i64 i;
	i64 f_len;
	i64 len_at_last_linebreak;
	int prev_space = 0;
	i32 ch;

	if(!s) return;

	f_len = dbuf_get_length(f);
	len_at_last_linebreak = f_len;

	for(i=0; i<s->len; i++) {
		ch = s->str[i];

		// Don't let HTML collapse consecutive spaces
		// (this is not ideal, but it's better than nothing).
		if(ch==0x20) {
			if(prev_space) {
				ch = 0xa0; // nbsp
			}
			prev_space = 1;
		}
		else {
			prev_space = 0;
		}

		if(ch==0x0a) {
			dbuf_puts(f, "<br>\n");
			f_len = dbuf_get_length(f);
			len_at_last_linebreak = f_len;
		}
		else if(ch==0x20 && (f_len - len_at_last_linebreak > 70)) { // zzz
			// Low-quality attempt at word wrapping
			dbuf_puts(f, "\n");
			f_len = dbuf_get_length(f);
			len_at_last_linebreak = f_len;
		}
		else {
			de_write_codepoint_to_html(c, f, ch);
			f_len = dbuf_get_length(f);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testq %rsi, %rsi
je 0xe9948
movq %rdx, %rbx
movq %rsi, %r14
movq %rdx, %rdi
callq 0xe651f
xorl %ebp, %ebp
movq %rax, %r13
xorl %r12d, %r12d
cmpq 0x10(%r14), %rbp
jge 0xe9948
movq 0x8(%r14), %rcx
movl (%rcx,%rbp,4), %ecx
xorl %edx, %edx
testl %r12d, %r12d
setne %dl
shll $0x7, %edx
orl $0x20, %edx
xorl %r12d, %r12d
cmpl $0x20, %ecx
sete %r15b
cmovnel %ecx, %edx
cmpl $0x20, %edx
je 0xe9907
cmpl $0xa, %edx
jne 0xe992c
movq %rbx, %rdi
leaq 0x4aecb(%rip), %rsi     # 0x1347d0
jmp 0xe991a
subq %r13, %rax
cmpq $0x47, %rax
jl 0xe992c
movq %rbx, %rdi
leaq 0x1986d(%rip), %rsi     # 0x103187
callq 0xe5fe4
movq %rbx, %rdi
callq 0xe651f
movq %rax, %r13
jmp 0xe9940
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xe1fc7
movq %rbx, %rdi
callq 0xe651f
movb %r15b, %r12b
incq %rbp
jmp 0xe98c9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: output_css_color_block
static void output_css_color_block(deark *c, dbuf *ofile, u32 *pal,
	const char *selectorprefix, const char *prop, const u8 *used_flags)
{
	char tmpbuf[16];
	int i;

	for(i=0; i<16; i++) {
		if(!used_flags[i]) continue;
		de_color_to_css(pal[i], tmpbuf, sizeof(tmpbuf));
		dbuf_printf(ofile, " %s%c { %s: %s }\n", selectorprefix, de_get_hexchar(i),
			prop, tmpbuf);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x10(%rsp), %rbp
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0xe99c6
cmpb $0x0, (%rbx,%r14)
je 0xe99c1
movl (%r12,%r14,4), %edi
movq %rbp, %rsi
pushq $0x10
popq %rdx
callq 0xe1be6
movl %r14d, %edi
callq 0xe11b0
movsbl %al, %ecx
movq %r13, %rdi
leaq 0x52d39(%rip), %rsi     # 0x13c6e8
movq %r15, %rdx
movq 0x8(%rsp), %r8
movq %rbp, %r9
xorl %eax, %eax
callq 0xe5905
incq %r14
jmp 0xe997e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-char.c
// Function: print_header_item
static void print_header_item(deark *c, dbuf *ofile, const char *name_rawhtml, const de_ucstring *value)
{
	int k;

	dbuf_puts(ofile, "<td class=htc>");
	if(ucstring_isnonempty(value)) {
		dbuf_printf(ofile, "<span class=hn>%s:&nbsp; </span><span class=hv>", name_rawhtml);
		write_ucstring_to_html(c, value, ofile);
		dbuf_puts(ofile, "</span>");
	}
	else {
		// Placeholder
		for(k=0; k<20; k++) {
			de_write_codepoint_to_html(c, ofile, 0x00a0); // nbsp
		}
	}
	dbuf_puts(ofile, "</td>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x52d0a(%rip), %rsi     # 0x13c6fa
movq %rbx, %rdi
callq 0xe5fe4
movq %r15, %rdi
callq 0xeaf8a
testl %eax, %eax
je 0xe9a4c
leaq 0x52cfe(%rip), %rsi     # 0x13c709
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe5905
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe989b
leaq 0x52d3b(%rip), %rsi     # 0x13c768
movq %rbx, %rdi
callq 0xe5fe4
leaq 0x52cfd(%rip), %rsi     # 0x13c739
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe5fe4
pushq $0x14
popq %rbp
subl $0x1, %ebp
jb 0xe9a35
movq %r14, %rdi
movq %rbx, %rsi
movl $0xa0, %edx
callq 0xe1fc7
jmp 0xe9a4f
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-font.c
// Function: is_valid_char
static int is_valid_char(struct de_bitmap_font_char *ch)
{
	if(!ch) return 0;
	if(!ch->bitmap) return 0;
	if(ch->width<0 || ch->height<0) return 0;
	if(ch->extraspace_l<0 || ch->extraspace_r<0) return 0;
	if(ch->width==0 && (ch->extraspace_l>0 || ch->extraspace_r>0)) {
		// Allow 0-width character if extraspace makes that sensible.
		;
	}
	else if(ch->width<1 || ch->height<1) {
		return 0;
	}
	return 1;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0xea014
cmpq $0x0, 0x20(%rdi)
je 0xea014
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
js 0xea014
movl 0xc(%rdi), %edx
testl %edx, %edx
js 0xea014
movzwl 0x14(%rdi), %esi
testw %si, %si
js 0xea014
movzwl 0x16(%rdi), %edi
testw %di, %di
js 0xea014
testl %ecx, %ecx
je 0xea015
testl %edx, %edx
je 0xea014
pushq $0x1
popq %rax
retq
orw %si, %di
jne 0xea011
jmp 0xea014
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-font.c
// Function: de_font_paint_character_cp
void de_font_paint_character_cp(deark *c, de_bitmap *img,
	struct de_bitmap_font *font, i32 codepoint,
	i64 xpos, i64 ypos, de_color fgcol, de_color bgcol, unsigned int flags)
{
	i64 char_idx;

	char_idx = get_char_idx_by_cp(c, font, codepoint);
	if(char_idx<0) {
		if(font->index_of_replacement_char>=0) {
			char_idx = font->index_of_replacement_char;
		}
	}
	if(char_idx<0) {
		char_idx = get_char_idx_by_cp(c, font, '?');
	}
	if(char_idx<0 || char_idx>=font->num_chars) {
		return;
	}
	de_font_paint_character_idx(c, img, font, char_idx, xpos, ypos, fgcol, bgcol, flags);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdx, %rdi
movl %ecx, %esi
callq 0xea089
testq %rax, %rax
jns 0xea058
movq 0x8(%r15), %rax
testq %rax, %rax
jns 0xea058
pushq $0x3f
popq %rsi
movq %r15, %rdi
callq 0xea089
testq %rax, %rax
js 0xea07d
cmpq 0x18(%r15), %rax
jge 0xea07d
movq %r12, %rsi
movq %r15, %rdx
movq %rax, %rcx
movq %r14, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe9d2d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-font.c
// Function: get_char_idx_by_cp
static i64 get_char_idx_by_cp(deark *c, struct de_bitmap_font *font, i32 codepoint)
{
	i64 i;

	// TODO: Sometimes, a font has multiple characters that map to the same
	// codepoint. We should have a way to find the *best* such character,
	// which might not be the first one.

	for(i=0; i<font->num_chars; i++) {
		if(font->has_unicode_codepoints) {
			if(font->char_array[i].codepoint_unicode == codepoint)
				return i;
		}
		else {
			if(font->char_array[i].codepoint_nonunicode == codepoint)
				return i;
		}
	}
	return -1;
}

// Assembly:
movq 0x18(%rdi), %rdx
xorl %ecx, %ecx
testq %rdx, %rdx
cmovleq %rcx, %rdx
pushq $0x4
popq %r8
pushq $-0x1
popq %rax
cmpq %rcx, %rdx
je 0xea0c7
cmpb $0x0, 0x11(%rdi)
movq 0x20(%rdi), %r9
je 0xea0b4
cmpl %esi, (%r9,%r8)
jne 0xea0bb
jmp 0xea0c4
cmpl %esi, -0x4(%r9,%r8)
je 0xea0c4
incq %rcx
addq $0x28, %r8
jmp 0xea09d
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-font.c
// Function: de_font_decide_output_fmt
void de_font_decide_output_fmt(deark *c)
{
	const char *s;

	if(c->font_fmt_req) return;
	c->font_fmt_req = DE_FONTFMT_AUTO;
	s = de_get_ext_option(c, "font:output");
	if(s) {
		if(!de_strcmp(s, "font")) {
			c->font_fmt_req = DE_FONTFMT_FONT;
		}
		else if(!de_strcmp(s, "image")) {
			c->font_fmt_req = DE_FONTFMT_IMAGE;
		}
	}
}

// Assembly:
cmpb $0x0, 0xd5(%rdi)
je 0xeab37
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0xd5(%rdi)
leaq 0x51db4(%rip), %rsi     # 0x13c900
callq 0xdfa87
testq %rax, %rax
je 0xeab8b
movq %rax, %r14
leaq 0x3e918(%rip), %rsi     # 0x129478
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0xeab83
leaq 0x2d281(%rip), %rsi     # 0x117df4
movq %r14, %rdi
callq 0x181a0
testl %eax, %eax
jne 0xeab8b
movb $0x3, %al
jmp 0xeab85
movb $0x2, %al
movb %al, 0xd5(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-font.c
// Function: draw_number
static void draw_number(deark *c, de_bitmap *img,
	struct de_bitmap_font *dfont, i64 n, i64 xpos1, i64 ypos1,
	unsigned int flags)
{
	char buf[32];
	i64 len;
	i64 i;
	i64 xpos_start;
	i64 xpos, ypos;

	if(flags & DNFLAG_HEX) {
		if(flags & DNFLAG_LEADING_ZEROES)
			de_snprintf(buf, sizeof(buf), "%04X", (unsigned int)n);
		else
			de_snprintf(buf, sizeof(buf), "%X", (unsigned int)n);
	}
	else {
		de_snprintf(buf, sizeof(buf), "%u", (unsigned int)n);
	}
	len = (i64)de_strlen(buf);

	if(flags & DNFLAG_HCENTER)
		xpos_start = xpos1-(dfont->nominal_width*len)/2;
	else
		xpos_start = xpos1-dfont->nominal_width*len;

	// Make sure number doesn't go beyond the image
	if(xpos_start + dfont->nominal_width*len > img->width) {
		xpos_start = img->width - dfont->nominal_width*len;
	}

	for(i=len-1; i>=0; i--) {
		xpos = xpos_start + dfont->nominal_width*i;
		ypos = ypos1-dfont->nominal_height;
		de_font_paint_character_cp(c, img, dfont, buf[i], xpos, ypos,
			DE_MAKE_GRAY(255), 0, DE_PAINTFLAG_TRNSBKGD);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %r12
movq %rdx, %r14
movq %rsi, %r15
movl 0x60(%rsp), %ebp
testb $0x1, %bpl
jne 0xeabc0
leaq 0x1d826(%rip), %rdx     # 0x1083e4
jmp 0xeabd6
testb $0x2, %bpl
jne 0xeabcf
leaq 0x51df5(%rip), %rdx     # 0x13c9c2
jmp 0xeabd6
leaq 0x51de7(%rip), %rdx     # 0x13c9bd
movq %rsp, %rdi
pushq $0x20
popq %rsi
xorl %eax, %eax
callq 0xde40c
movq %rsp, %rdi
callq 0x180e0
movq %rax, %r13
movslq (%r14), %rcx
imulq %rax, %rcx
testb $0x4, %bpl
jne 0xeac03
subq %rcx, %r12
movq %r12, %rax
jmp 0xeac11
pushq $-0x2
popq %rsi
movq %rcx, %rax
cqto
idivq %rsi
addq %r12, %rax
movq 0x8(%r15), %rdx
movq %rdx, %r12
subq %rcx, %r12
addq %rax, %rcx
cmpq %rdx, %rcx
cmovleq %rax, %r12
decq %r13
leaq 0x1(%r13), %rax
testq %rax, %rax
jle 0xeac65
movslq (%r14), %r8
imulq %r13, %r8
addq %r12, %r8
movslq 0x4(%r14), %rax
movq %rbx, %r9
subq %rax, %r9
movsbl (%rsp,%r13), %ecx
subq $0x8, %rsp
movq %r15, %rsi
movq %r14, %rdx
pushq $0x1
pushq $0x0
pushq $-0x1
callq 0xea01c
addq $0x20, %rsp
jmp 0xeac25
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_truncate
void ucstring_truncate(de_ucstring *s, i64 newlen)
{
	if(!s) return;
	if(newlen<0) newlen=0;
	if(newlen<s->len) s->len = newlen;

	if(s->tmp_string) {
		// There's no requirement to free tmp_string here, but it's no
		// longer needed, and maybe it's nice to have a way to do it.
		de_free(s->c, s->tmp_string);
		s->tmp_string = NULL;
	}
}

// Assembly:
testq %rdi, %rdi
je 0xeacbf
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
testq %rsi, %rsi
cmovgq %rsi, %rax
cmpq 0x10(%rdi), %rax
jge 0xeaca8
movq %rax, 0x10(%rbx)
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xeacbe
movq (%rbx), %rdi
callq 0xded32
andq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_delete_prefix
void ucstring_delete_prefix(de_ucstring *s, i64 nchars)
{
	i64 i;
	i64 new_len;

	if(nchars<1) return;
	if(nchars >= s->len) {
		ucstring_empty(s);
		return;
	}

	new_len = s->len - nchars;
	for(i=0; i<new_len; i++) {
		s->str[i] = s->str[nchars+i];
	}
	ucstring_truncate(s, new_len);
}

// Assembly:
testq %rsi, %rsi
jle 0xead70
movq 0x10(%rdi), %rax
subq %rsi, %rax
jle 0xeac85
xorl %ecx, %ecx
testq %rax, %rax
movl $0x0, %edx
cmovgq %rax, %rdx
shlq $0x2, %rsi
cmpq %rcx, %rdx
je 0xead68
movq 0x8(%rdi), %r8
leaq (%r8,%rcx,4), %r9
movl (%rsi,%r9), %r9d
movl %r9d, (%r8,%rcx,4)
incq %rcx
jmp 0xead4e
movq %rax, %rsi
jmp 0xeac8c
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_ucstring
void ucstring_append_ucstring(de_ucstring *s1, const de_ucstring *s2)
{
	i64 i;

	if(!s2) return;
	// TODO: This could be done more efficiently.
	for(i=0; i<s2->len; i++) {
		ucstring_append_char(s1, s2->str[i]);
	}
}

// Assembly:
testq %rsi, %rsi
je 0xeada4
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
cmpq 0x10(%rbx), %r15
jge 0xead9f
movq 0x8(%rbx), %rax
movl (%rax,%r15,4), %esi
movq %r14, %rdi
callq 0xeada5
incq %r15
jmp 0xead84
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_char
void ucstring_append_char(de_ucstring *s, de_rune ch)
{
	i64 new_len;
	i64 new_alloc;

	if(s->len >= 100000000) {
		return;
	}
	new_len = s->len + 1;
	if(new_len > s->alloc) {
		new_alloc = s->alloc * 2;
		if(new_alloc<32) new_alloc=32;
		s->str = de_reallocarray(s->c, s->str, s->alloc, sizeof(i32), new_alloc);
		s->alloc = new_alloc;
	}

	s->str[s->len] = ch;
	s->len++;
}

// Assembly:
movq 0x10(%rdi), %rcx
cmpq $0x5f5e0ff, %rcx        # imm = 0x5F5E0FF
jg 0xeae06
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
cmpq %rdx, %rcx
jge 0xeadca
movq 0x8(%rbx), %rax
jmp 0xeadf8
leaq (%rdx,%rdx), %rax
cmpq $0x21, %rax
pushq $0x20
popq %r14
cmovgeq %rax, %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
pushq $0x4
popq %rcx
movq %r14, %r8
callq 0xdf6b6
movq %rax, 0x8(%rbx)
movq %r14, 0x18(%rbx)
movq 0x10(%rbx), %rcx
movl %ebp, (%rax,%rcx,4)
incq %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_sz
void ucstring_append_sz(de_ucstring *s, const char *sz, de_ext_encoding ee)
{
	i64 len;

	if(ee==DE_ENCODING_LATIN1) { // Fast path for this common case
		const u8 *sz_u8 = (const u8*)sz;

		while(*sz_u8) {
			ucstring_append_char(s, (de_rune)(*sz_u8));
			sz_u8++;
		}
		return;
	}

	len = (i64)de_strlen(sz);
	ucstring_append_bytes(s, (const u8*)sz, len, 0, ee);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x5, %edx
jne 0xeae65
movzbl (%rbx), %esi
testl %esi, %esi
je 0xeae86
movq %r14, %rdi
callq 0xeada5
incq %rbx
jmp 0xeae51
movl %edx, %ebp
movq %rbx, %rdi
callq 0x180e0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0xeb4a9
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_destroy
void ucstring_destroy(de_ucstring *s)
{
	deark *c;
	if(s) {
		c = s->c;
		de_free(c, s->str);
		de_free(c, s->tmp_string);
		de_free(c, s);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xeaf75
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
movq %r14, %rdi
callq 0xded32
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xded32
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_is_ascii
int ucstring_is_ascii(const de_ucstring *s)
{
	i64 i;
	for(i=0; i<s->len; i++) {
		if(s->str[i]<0 || s->str[i]>=0x80)
			return 0;
	}
	return 1;
}

// Assembly:
movq 0x10(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
cmovleq %rdx, %rcx
pushq $0x1
popq %rax
cmpq %rdx, %rcx
je 0xeb518
movq 0x8(%rdi), %rsi
cmpl $0x80, (%rsi,%rdx,4)
leaq 0x1(%rdx), %rdx
jb 0xeb500
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_count_utf8_bytes
i64 ucstring_count_utf8_bytes(de_ucstring *s)
{
	i64 i;
	i64 n = 0;
	if(!s) return n;
	for(i=0; i<s->len; i++) {
		if(s->str[i]<0 || s->str[i]>0xffff) n+=4;
		else if(s->str[i]<=0x7f) n+=1;
		else if(s->str[i]<=0x7ff) n+=2;
		else n+=3;
	}
	return n;
}

// Assembly:
testq %rdi, %rdi
je 0xeb573
movq 0x10(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
cmovleq %rdx, %rcx
pushq $0x4
popq %rsi
pushq $0x1
popq %r8
pushq $0x3
popq %r9
xorl %eax, %eax
cmpq %rdx, %rcx
je 0xeb575
movq 0x8(%rdi), %r10
movl (%r10,%rdx,4), %r11d
movq %rsi, %r10
cmpl $0xffff, %r11d          # imm = 0xFFFF
ja 0xeb56b
movq %r8, %r10
cmpl $0x80, %r11d
jb 0xeb56b
cmpl $0x800, %r11d           # imm = 0x800
movq %r9, %r10
sbbq $0x0, %r10
addq %r10, %rax
incq %rdx
jmp 0xeb538
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_write_as_utf8
void ucstring_write_as_utf8(deark *c, de_ucstring *s, dbuf *outf, int add_bom_if_needed)
{
	i64 i;

	if(add_bom_if_needed &&
		c->write_bom &&
		(s->len>0 && s->str[0]!=0xfeff) &&
		!ucstring_is_ascii(s))
	{
		// Write a BOM
		dbuf_write_uchar_as_utf8(outf, 0xfeff);
	}

	for(i=0; i<s->len; i++) {
		dbuf_write_uchar_as_utf8(outf, s->str[i]);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
testl %ecx, %ecx
je 0xeb5ba
cmpb $0x0, 0xcc(%rdi)
je 0xeb5ba
cmpq $0x0, 0x10(%r14)
jle 0xeb5ba
movq 0x8(%r14), %rax
cmpl $0xfeff, (%rax)         # imm = 0xFEFF
je 0xeb5ba
movq %r14, %rdi
callq 0xeb4f0
testl %eax, %eax
jne 0xeb5ba
movq %rbx, %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0xe1790
xorl %r15d, %r15d
cmpq 0x10(%r14), %r15
jge 0xeb5d8
movq 0x8(%r14), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0xe1790
incq %r15
jmp 0xeb5bd
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_getpsz_internal
static const char *ucstring_getpsz_internal(de_ucstring *s,
	int has_max, i64 max_bytes)
{
	i64 allocsize;

	if(!s) {
		if(has_max && max_bytes<6) return "";
		return "(null)";
	}

	if(has_max) {
		allocsize = max_bytes + 1;
	}
	else {
		// TODO: Calculating the proper allocsize could be difficult,
		// depending on how DE_CONVFLAG_MAKE_PRINTABLE is implemented.
		allocsize = s->len * 4 + 1 + 100;
	}

	if(s->tmp_string)
		de_free(s->c, s->tmp_string);
	s->tmp_string = de_malloc(s->c, allocsize);

	ucstring_to_sz(s, s->tmp_string, (size_t)allocsize, DE_CONVFLAG_MAKE_PRINTABLE, DE_ENCODING_UTF8);

	return s->tmp_string;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
testq %rdi, %rdi
je 0xeb802
movq %rdi, %rbx
testl %esi, %esi
je 0xeb820
incq %r14
jmp 0xeb82c
cmpq $0x6, %r14
leaq 0x4c453(%rip), %rax     # 0x137c60
leaq 0x512b6(%rip), %rcx     # 0x13caca
cmovgeq %rcx, %rax
testl %esi, %esi
cmoveq %rcx, %rax
jmp 0xeb864
movq 0x10(%rbx), %rax
leaq 0x65(,%rax,4), %r14
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xeb83d
movq (%rbx), %rdi
callq 0xded32
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xdecaf
movq %rax, 0x20(%rbx)
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
movl %ecx, %r8d
callq 0xeb5de
movq 0x20(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_create
struct de_strarray *de_strarray_create(deark *c, size_t max_elems)
{
	struct de_strarray *sa;
	sa = de_malloc(c, sizeof(struct de_strarray));
	sa->c = c;
	sa->max_elems = max_elems;
	return sa;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x28
popq %rsi
callq 0xdecaf
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_destroy
void de_strarray_destroy(struct de_strarray *sa)
{
	deark *c;

	if(!sa) return;
	c = sa->c;
	while(sa->count>0) {
		de_strarray_pop(sa);
	}
	de_free(c, sa->ss);
	de_free(c, sa);
}

// Assembly:
testq %rdi, %rdi
je 0xeb9bc
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
cmpq $0x0, 0x10(%rbx)
je 0xeb99e
movq %rbx, %rdi
callq 0xeb9bd
jmp 0xeb98d
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xded32
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_pop
int de_strarray_pop(struct de_strarray *sa)
{
	if(sa->count<1) return 0;
	ucstring_destroy(sa->ss[sa->count-1]);
	sa->ss[sa->count-1] = NULL;
	sa->count--;
	return 1;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xeb9f2
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %rdi
callq 0xeaf3c
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
andq $0x0, -0x8(%rcx,%rax,8)
decq %rax
movq %rax, 0x10(%rbx)
pushq $0x1
popq %rax
popq %rbx
retq
xorl %eax, %eax
retq