LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x10(%rdi), %rax
cmpq $0x2, %rax
jl 0xf3a1a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
sarq %rcx
movq %rcx, (%rsp)
xorl %r14d, %r14d
cmpq $0x0, 0x8(%rbx)
jle 0xf3a03
movq %r14, %r15
notq %r15
addq 0x10(%rbx), %r15
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xf2bd3
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xf2bd3
cmpl %eax, %ebp
je 0xf39fa
movl %eax, %r13d
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0xf2b02
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %r13d, %ecx
callq 0xf2b02
incq %r12
cmpq 0x8(%rbx), %r12
jl 0xf39b4
incq %r14
cmpq (%rsp), %r14
jne 0xf39a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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 $0x28, %rsp
movq %rdi, %r13
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, 0x18(%rdi)
je 0xf3a44
movq 0x10(%rsp), %rax
movq %rax, 0x18(%r13)
cmpq $0x0, 0x10(%r13)
jle 0xf3b0b
movq 0x10(%rsp), %rax
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
sarq %rcx
movq %rcx, 0x20(%rsp)
movq $0x0, 0x8(%rsp)
movq %r13, 0x18(%rsp)
cmpq $0x2, 0x10(%rsp)
jl 0xf3af4
movq $-0x1, %rbx
xorl %r15d, %r15d
movq 0x8(%r13), %r12
addq %rbx, %r12
movq %r13, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0xf2bd3
movl %eax, %ebp
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xf2bd3
cmpl %eax, %ebp
je 0xf3ae2
movl %eax, %r13d
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %r12
movq %r12, %rdx
movl %ebp, %ecx
callq 0xf2b02
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %r13d, %ecx
callq 0xf2b02
incq %r15
decq %rbx
cmpq %r15, 0x20(%rsp)
movq 0x18(%rsp), %r13
jne 0xf3a86
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x10(%r13), %rcx
jl 0xf3a74
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0xf3b36
movq %rax, 0x18(%rbx)
movq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jne 0xf3bb2
xorl %r14d, %r14d
testq %rcx, %rcx
jle 0xf3c89
xorl %r15d, %r15d
testq %r15, %r15
je 0xf3ba4
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xf2bd3
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xf2bd3
cmpl %eax, %ebp
je 0xf3b9c
movl %eax, %r13d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0xf2b02
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0xf2b02
incq %r12
cmpq %r12, %r15
jne 0xf3b56
incq %r15
cmpq 0x10(%rbx), %r15
jl 0xf3b4e
jmp 0xf3c89
movq (%rbx), %r15
movl $0x40, %esi
movq %r15, %rdi
callq 0xe969b
movq %rax, %r14
movq %r15, (%rax)
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)
movq %rax, %rdi
callq 0xf27b5
movq 0x30(%r14), %rdi
movq 0x30(%rbx), %rsi
callq 0xea792
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
movq %rax, %rdx
callq 0x181e0
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0xf3c2b
movq (%rbx), %rdi
callq 0xe9752
movq $0x0, 0x28(%rbx)
movq $0x0, 0x30(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x8(%rbx)
movq %rax, 0x18(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
jle 0xf3c89
xorl %r15d, %r15d
cmpq $0x0, 0x8(%rbx)
jle 0xf3c80
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xf2bd3
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq 0xf2b02
incq %r12
cmpq 0x8(%rbx), %r12
jl 0xf3c59
incq %r15
cmpq 0x10(%rbx), %r15
jl 0xf3c4f
testq %r14, %r14
je 0xf3ca4
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf28d4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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
movq %rcx, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %r8, 0x20(%rsp)
testq %r8, %r8
jle 0xf3d20
movl %r9d, %ebx
movq %rdi, %rbp
xorl %r14d, %r14d
cmpq $0x0, 0x8(%rsp)
jle 0xf3d16
movq 0x18(%rsp), %rax
leaq (%r14,%rax), %r12
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %r15
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %ebx, %ecx
callq 0xf2b02
incq %r13
decq %r15
jne 0xf3cfe
incq %r14
cmpq 0x20(%rsp), %r14
jne 0xf3ce3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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 %r8, 0x8(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0x28(%rsp)
movq %r9, 0x20(%rsp)
testq %r9, %r9
jle 0xf3e0d
movq %rsi, %r13
movq $0x0, (%rsp)
cmpq $0x0, 0x8(%rsp)
jle 0xf3df7
movq 0x18(%rsp), %rax
movq (%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
leaq (%rcx,%rax), %r12
movq 0x10(%rsp), %rbx
movq 0x70(%rsp), %r14
movq 0x8(%rsp), %rbp
movl 0x80(%rsp), %eax
movl %eax, %r15d
shrb %r15b
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq 0x30(%rsp), %rdx
callq 0xf2bd3
cmpl $0x1000000, %eax        # imm = 0x1000000
setb %cl
andb %r15b, %cl
cmpb $0x1, %cl
jne 0xf3ddc
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf2bd3
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0xf2b02
incq %r14
incq %rbx
decq %rbp
jne 0xf3d9f
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq 0x20(%rsp), %rcx
jne 0xf3d6a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/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:
cmpq $0x0, 0x10(%rdi)
jle 0xf3e97
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
andb $0x1, %bl
negb %bl
xorl %r12d, %r12d
cmpq 0x10(%r14), %r12
jge 0xf3e8e
cmpq $0x0, 0x8(%r15)
jle 0xf3e85
xorl %r13d, %r13d
cmpq 0x8(%r14), %r13
jge 0xf3e85
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xf2bd3
shrl $0x10, %eax
xorb %bl, %al
movzbl %al, %r8d
movl $0x3, %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xf299c
incq %r13
cmpq 0x8(%r15), %r13
jl 0xf3e4c
incq %r12
cmpq 0x10(%r15), %r12
jl 0xf3e3c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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), %eax
cmpl $0x4, %eax
je 0xf3ea5
cmpl $0x2, %eax
jne 0xf3f10
cmpq $0x0, 0x10(%rdi)
jle 0xf3f0d
xorl %eax, %eax
cmpq $0x0, 0x8(%rdi)
jle 0xf3f04
xorl %ecx, %ecx
movslq 0x24(%rdi), %rdx
cmpq $0x2, %rdx
jl 0xf3efb
leaq -0x1(%rdx), %r8
xorl %esi, %esi
movq 0x28(%rdi), %r9
movq 0x8(%rdi), %r10
imulq %rax, %r10
addq %rcx, %r10
imulq %r10, %rdx
addq %r9, %rdx
movb (%rsi,%rdx), %dl
imulq %r8, %r10
addq %r9, %r10
movb %dl, (%rsi,%r10)
incq %rsi
movslq 0x24(%rdi), %rdx
leaq -0x1(%rdx), %r8
cmpq %r8, %rsi
jl 0xf3ec7
incq %rcx
cmpq 0x8(%rdi), %rcx
jl 0xf3eb7
incq %rax
cmpq 0x10(%rdi), %rax
jl 0xf3eae
decl 0x24(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf3f2b
cmpl $0x2, %eax
jne 0xf3f8d
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf3fb7
testb $0x4, %bpl
sete %cl
movb 0x2(%r14), %al
testb %al, %al
setne %dl
orb %cl, %dl
jne 0xf3f5e
movb 0x5(%rsp), %cl
orb 0x4(%rsp), %cl
jne 0xf3f8d
movb 0x1(%rsp), %cl
testb $0x5, %bpl
je 0xf3f89
testb %cl, %cl
je 0xf3f89
testb %al, %al
jne 0xf3f89
testb $0x2, %bpl
je 0xf3f96
movq (%rbx), %rdi
leaq 0x55136(%rip), %rsi     # 0x1490b6
xorl %eax, %eax
callq 0xe9b27
jmp 0xf3f96
testb %cl, %cl
je 0xf3f96
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq (%rbx), %rdi
leaq 0x55147(%rip), %rsi     # 0x1490e7
xorl %eax, %eax
callq 0xe9461
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xf3e98
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rsi, %rsi
jle 0xf424d
leaq -0x1(%rsi), %rax
cvtsi2sd %rax, %xmm1
movsd 0x234ce(%rip), %xmm0    # 0x1176d8
divsd %xmm1, %xmm0
andb $0x1, %dl
negb %dl
xorl %eax, %eax
movsd 0x234b3(%rip), %xmm1    # 0x1176d0
xorps %xmm2, %xmm2
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
cmpq %rax, %rsi
jne 0xf421d
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf4269
testb %sil, %sil
sete %al
testb %dil, %dil
sete %cl
orb %al, %cl
je 0xf426c
xorl %eax, %eax
retq
movl %edi, %eax
retq
movb $-0x1, %al
cmpb %sil, %dil
jae 0xf4268
movzbl %dil, %eax
cvtsi2sd %eax, %xmm0
movzbl %sil, %eax
cvtsi2sd %eax, %xmm1
divsd 0x2344d(%rip), %xmm1    # 0x1176d8
divsd %xmm1, %xmm0
addsd 0x23439(%rip), %xmm0    # 0x1176d0
cvttsd2si %xmm0, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl %edi, %esi
shrl $0x10, %esi
movl %edi, %edx
shrl $0x8, %edx
movl %edi, %eax
shrl $0x18, %eax
cmpl $0xff, %eax
jne 0xf42b6
movl %esi, %ecx
jmp 0xf42fd
cmpl $0x1000000, %edi        # imm = 0x1000000
setb %cl
testb %sil, %sil
sete %r8b
orb %cl, %r8b
je 0xf42cf
xorl %ecx, %ecx
jmp 0xf42fd
movb $-0x1, %cl
cmpb %al, %sil
jae 0xf42fd
movzbl %sil, %ecx
cvtsi2sd %ecx, %xmm0
movzbl %al, %ecx
cvtsi2sd %ecx, %xmm1
divsd 0x233eb(%rip), %xmm1    # 0x1176d8
divsd %xmm1, %xmm0
addsd 0x233d7(%rip), %xmm0    # 0x1176d0
cvttsd2si %xmm0, %ecx
cmpl $0xff, %eax
jne 0xf4308
movl %edx, %esi
jmp 0xf4354
cmpl $0x1000000, %edi        # imm = 0x1000000
setb %sil
testb %dl, %dl
sete %r8b
orb %sil, %r8b
je 0xf4321
xorl %esi, %esi
jmp 0xf4354
movb $-0x1, %sil
cmpb %al, %dl
jae 0xf4354
movzbl %dl, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movzbl %al, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd 0x23394(%rip), %xmm1    # 0x1176d8
divsd %xmm1, %xmm0
addsd 0x23380(%rip), %xmm0    # 0x1176d0
cvttsd2si %xmm0, %esi
cmpl $0xff, %eax
jne 0xf435f
movl %edi, %edx
jmp 0xf43ac
cmpl $0x1000000, %edi        # imm = 0x1000000
setb %dl
testb %dil, %dil
sete %r8b
orb %dl, %r8b
je 0xf4378
xorl %edx, %edx
jmp 0xf43ac
movb $-0x1, %dl
cmpb %al, %dil
jae 0xf43ac
movzbl %dil, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movzbl %al, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd 0x2333c(%rip), %xmm1    # 0x1176d8
divsd %xmm1, %xmm0
addsd 0x23328(%rip), %xmm0    # 0x1176d0
cvttsd2si %xmm0, %edx
andl $0xff000000, %edi       # imm = 0xFF000000
movzbl %cl, %eax
shll $0x10, %eax
orl %edi, %eax
movzbl %sil, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl %dl, %eax
orl %ecx, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0xf448d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0xf4482
movq %rdi, %r14
cmpq $0x0, 0x10(%rbx)
jle 0xf446e
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0xf4465
cmpq $0x0, 0x10(%rax)
je 0xf4455
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpq $0x0, 0x8(%rax)
jle 0xf4449
xorl %r12d, %r12d
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0xe9752
incq %r12
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpq 0x8(%rax), %r12
jl 0xf4428
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0xe9752
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0xe9752
incq %r15
cmpq 0x10(%rbx), %r15
jl 0xf4402
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0xe9752
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf44c7
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x18(%rsi)
je 0xf44b5
leaq 0x54c6d(%rip), %rsi     # 0x149118
movq %r14, %rdi
xorl %eax, %eax
callq 0xea0a6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf44f6
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb $0x1, 0x5(%rsi)
cmpb $0x0, (%rsi)
je 0xf450d
movl $0x1, 0x8(%rbx)
leaq 0x54c0c(%rip), %rsi     # 0x149120
callq 0xea6cb
testq %rax, %rax
je 0xf4553
movq %rax, %r14
leaq 0x4bb8a(%rip), %rsi     # 0x1400b2
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0xf454e
leaq 0x30889(%rip), %rsi     # 0x124dc4
movq %r14, %rdi
callq 0x181a0
testl %eax, %eax
jne 0xf4553
movl $0x1, %eax
jmp 0xf4550
xorl %eax, %eax
movl %eax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf52f6
movl %r10d, %eax
movl 0x20(%rsi,%rax,4), %r10d
movl 0x40(%rsp), %r14d
movl 0x28(%rsp), %ebp
cmpl $0xf, %r11d
ja 0xf530d
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 0xf5345
subq $0x8, %rsp
movq %rcx, %rsi
movl %eax, %ecx
pushq %rbx
pushq %r11
pushq %r10
callq 0xf5b35
jmp 0xf535b
cltq
subq $0x8, %rsp
movq %rcx, %rsi
movq %rax, %rcx
pushq %rbx
pushq %r11
pushq %r10
callq 0xf5806
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf541c
movq %rdx, %rbx
movq %rsi, %r14
movq %rdx, %rdi
callq 0xf1d13
cmpq $0x0, 0x10(%r14)
jle 0xf541c
movq %rax, %rbp
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x8(%r14), %rcx
movl (%rcx,%r12,4), %ecx
xorl %edx, %edx
testl %r13d, %r13d
setne %dl
shll $0x7, %edx
orl $0x20, %edx
xorl %r13d, %r13d
cmpl $0x20, %ecx
sete %r15b
cmovnel %ecx, %edx
cmpl $0x20, %edx
je 0xf53d7
cmpl $0xa, %edx
jne 0xf53fc
movq %rbx, %rdi
leaq 0x4c36b(%rip), %rsi     # 0x141740
jmp 0xf53ea
subq %rbp, %rax
cmpq $0x47, %rax
jl 0xf53fc
movq %rbx, %rdi
leaq 0x1adb1(%rip), %rsi     # 0x11019b
callq 0xf16f0
movq %rbx, %rdi
callq 0xf1d13
movq %rax, %rbp
jmp 0xf5410
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xed0ce
movq %rbx, %rdi
callq 0xf1d13
movb %r15b, %r13b
incq %r12
cmpq 0x10(%r14), %r12
jl 0xf539e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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
cmpb $0x0, (%rbx,%r14)
je 0xf5491
movl (%r12,%r14,4), %edi
movq %rbp, %rsi
movl $0x10, %edx
callq 0xeccaa
movl %r14d, %edi
callq 0xec1b8
movsbl %al, %ecx
movq %r13, %rdi
leaq 0x54199(%rip), %rsi     # 0x149618
movq %r15, %rdx
movq 0x8(%rsp), %r8
movq %rbp, %r9
xorl %eax, %eax
callq 0xf0ec4
incq %r14
cmpq $0x10, %r14
jne 0xf5452
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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 0x54166(%rip), %rsi     # 0x14962a
movq %rbx, %rdi
callq 0xf16f0
movq %r15, %rdi
callq 0xf6c00
testl %eax, %eax
je 0xf550b
leaq 0x5415a(%rip), %rsi     # 0x149639
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xf0ec4
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xf5364
leaq 0x54197(%rip), %rsi     # 0x149698
movq %rbx, %rdi
callq 0xf16f0
jmp 0xf5524
movl $0x14, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl $0xa0, %edx
callq 0xed0ce
decl %ebp
jne 0xf5510
leaq 0x5413e(%rip), %rsi     # 0x149669
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf16f0
// File: /workspace/github_c_makefile_star2_O1/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 0xf59d5
cmpq $0x0, 0x20(%rdi)
je 0xf59d5
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
js 0xf59d5
movl 0xc(%rdi), %edx
testl %edx, %edx
js 0xf59d5
movzwl 0x14(%rdi), %esi
testw %si, %si
js 0xf59d5
movzwl 0x16(%rdi), %edi
testw %di, %di
js 0xf59d5
testl %ecx, %ecx
sete %r8b
orw %si, %di
setne %sil
testb %sil, %r8b
jne 0xf59d0
testl %ecx, %ecx
sete %cl
testl %edx, %edx
sete %dl
orb %cl, %dl
jne 0xf59d5
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-font.c
// Function: paint_character_internal
static void paint_character_internal(deark *c, de_bitmap *img,
	struct de_bitmap_font_char *ch,
	i64 xpos, i64 ypos, u32 fgcol, unsigned int flags)
{
	i64 i, j;
	i64 num_x_pixels_to_paint;
	int vga9col_flag = 0;

	num_x_pixels_to_paint = (i64)ch->width;
	if((flags&DE_PAINTFLAG_VGA9COL) && ch->width==8) {
		vga9col_flag = 1;
		num_x_pixels_to_paint = 9;
	}

	for(j=0; j<ch->height; j++) {
		i64 j_src;

		j_src = j;
		if(flags&DE_PAINTFLAG_TOPHALF) {
			j_src = j/2;
		}
		else if(flags&DE_PAINTFLAG_BOTTOMHALF) {
			j_src = (ch->height+j)/2;
		}

		for(i=0; i<num_x_pixels_to_paint; i++) {
			i64 i_src; // -1 = No source position
			int is_fg = 0;
			u8 x;

			i_src = i;
			if(flags&DE_PAINTFLAG_LEFTHALF) {
				i_src = i/2;
			}
			else if(flags&DE_PAINTFLAG_RIGHTHALF) {
				i_src = (num_x_pixels_to_paint+i)/2;
			}

			if(i_src==8 && vga9col_flag) {
				// Manufacture a column 8.
				if(ch->codepoint_nonunicode>=0xb0 && ch->codepoint_nonunicode<=0xdf) {
					i_src = 7; // Make this pixel a duplicate of the one in col #7.
				}
				else {
					i_src = -1; // Make this pixel a background pixel.
				}
			}

			if(i_src>=0 && i_src<ch->width) {
				x = ch->bitmap[j_src*ch->rowspan + i_src/8];
				if(x & (1<<(7-i_src%8))) {
					is_fg = 1;
				}
			}

			if(is_fg) {
				u32 clr = fgcol;

				de_bitmap_setpixel_rgba(img, xpos+i, ypos+j, clr);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebx
movl %r8d, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movl 0x8(%rsi), %eax
cltq
movl %ebx, %ecx
shrb %cl
cmpl $0x8, %eax
sete %bpl
andb %cl, %bpl
movl $0x9, %r15d
cmoveq %rax, %r15
movslq 0xc(%rsi), %rax
testq %rax, %rax
jle 0xf5b26
movq %rsi, %r12
xorl %ecx, %ecx
xorb $0x1, %bpl
movl $0xffffff50, %esi       # imm = 0xFFFFFF50
movq %rcx, %r13
testb $0x10, %bl
jne 0xf5a52
testb $0x20, %bl
je 0xf5a55
addq %rcx, %rax
movq %rax, %r13
shrq $0x3f, %r13
addq %rax, %r13
sarq %r13
jmp 0xf5a55
shrq %r13
movq %rcx, 0x10(%rsp)
testq %r15, %r15
jle 0xf5b10
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
movq %r14, %rax
testb $0x4, %bl
jne 0xf5a89
testb $0x8, %bl
je 0xf5a8c
leaq (%r15,%r14), %rax
shrq %rax
cmpq $0x8, %rax
setne %cl
orb %bpl, %cl
jne 0xf5aae
movl (%r12), %eax
addl %esi, %eax
cmpl $0x30, %eax
movl $0x0, %eax
adcq $-0x1, %rax
orq $0x7, %rax
testq %rax, %rax
js 0xf5b04
movslq 0x8(%r12), %rcx
cmpq %rcx, %rax
jge 0xf5b04
movq 0x18(%r12), %rcx
imulq %r13, %rcx
movq %rax, %rdx
shrq $0x3, %rdx
addq 0x20(%r12), %rcx
movzbl (%rdx,%rcx), %ecx
notb %al
movzbl %al, %eax
andl $0x7, %eax
btl %eax, %ecx
jae 0xf5b04
movq 0x28(%rsp), %rax
leaq (%rax,%r14), %rsi
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl 0xc(%rsp), %ecx
callq 0xf2b02
movl $0xffffff50, %esi       # imm = 0xFFFFFF50
incq %r14
cmpq %r14, %r15
jne 0xf5a78
movq 0x10(%rsp), %rcx
incq %rcx
movslq 0xc(%r12), %rax
cmpq %rax, %rcx
jl 0xf5a33
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/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 0xf5bab
testq %rax, %rax
jns 0xf5b63
movq 0x8(%r15), %rcx
testq %rcx, %rcx
cmovnsq %rcx, %rax
testq %rax, %rax
jns 0xf5b75
movq %r15, %rdi
movl $0x3f, %esi
callq 0xf5bab
testq %rax, %rax
js 0xf5b9f
cmpq 0x18(%r15), %rax
jge 0xf5b9f
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 0xf5806
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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), %rcx
movq $-0x1, %rax
testq %rcx, %rcx
jle 0xf5beb
movb 0x11(%rdi), %dl
xorl %r8d, %r8d
xorl %r9d, %r9d
testb %dl, %dl
je 0xf5bd5
movq 0x20(%rdi), %r10
cmpl %esi, 0x4(%r10,%r8)
jne 0xf5bdf
jmp 0xf5bec
movq 0x20(%rdi), %r10
cmpl %esi, (%r10,%r8)
je 0xf5bec
incq %r9
addq $0x28, %r8
cmpq %r9, %rcx
jne 0xf5bc4
retq
movq %r9, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf6721
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0xd5(%rdi)
leaq 0x530fa(%rip), %rsi     # 0x149830
callq 0xea6cb
testq %rax, %rax
je 0xf6775
movq %rax, %r14
leaq 0x3fc64(%rip), %rsi     # 0x1363ae
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0xf676d
leaq 0x2e667(%rip), %rsi     # 0x124dc4
movq %r14, %rdi
callq 0x181a0
testl %eax, %eax
jne 0xf6775
movb $0x3, %al
jmp 0xf676f
movb $0x2, %al
movb %al, 0xd5(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf67aa
leaq 0x1ec1c(%rip), %rdx     # 0x1153c4
jmp 0xf67c0
testb $0x2, %bpl
jne 0xf67b9
leaq 0x5313b(%rip), %rdx     # 0x1498f2
jmp 0xf67c0
leaq 0x5312d(%rip), %rdx     # 0x1498ed
movq %rsp, %rdi
movl $0x20, %esi
xorl %eax, %eax
callq 0xe8d67
movq %rsp, %rdi
callq 0x180e0
movq %rax, %r13
movslq (%r14), %rax
imulq %r13, %rax
testb $0x4, %bpl
jne 0xf67ec
subq %rax, %r12
jmp 0xf67fc
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
sarq %rcx
subq %rcx, %r12
movslq (%r14), %rax
imulq %r13, %rax
movq 0x8(%r15), %rcx
movq %rcx, %rbp
subq %rax, %rbp
addq %r12, %rax
cmpq %rcx, %rax
cmovleq %r12, %rbp
testq %r13, %r13
jle 0xf6861
decq %r13
movslq (%r14), %r8
imulq %r13, %r8
addq %rbp, %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 0xf5b35
addq $0x20, %rsp
leaq -0x1(%r13), %rax
incq %r13
cmpq $0x1, %r13
movq %rax, %r13
jg 0xf681f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-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 0xf68c0
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
testq %rsi, %rsi
cmovgq %rsi, %rax
cmpq 0x10(%rdi), %rax
jge 0xf68a6
movq %rax, 0x10(%rbx)
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xf68bf
movq (%rbx), %rdi
callq 0xe9752
movq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf6961
movq %rsi, %rax
movq 0x10(%rdi), %rsi
subq %rax, %rsi
jle 0xf6962
jle 0xf688a
movq 0x8(%rdi), %rcx
movq %rsi, %rdx
movl (%rcx,%rax,4), %r8d
movl %r8d, (%rcx)
addq $0x4, %rcx
decq %rdx
jne 0xf694c
jmp 0xf688a
retq
xorl %esi, %esi
jmp 0xf688a
// File: /workspace/github_c_makefile_star2_O1/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 0xf69a1
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x10(%rsi)
jle 0xf699c
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movl (%rax,%r15,4), %esi
movq %r14, %rdi
callq 0xf69a2
incq %r15
cmpq 0x10(%rbx), %r15
jl 0xf6983
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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), %rax
cmpq $0x5f5e0ff, %rax        # imm = 0x5F5E0FF
jg 0xf6a04
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
cmpq %rdx, %rax
jl 0xf69ee
leaq (%rdx,%rdx), %rax
cmpq $0x21, %rax
movl $0x20, %r14d
cmovgeq %rax, %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movl $0x4, %ecx
movq %r14, %r8
callq 0xea2ba
movq %rax, 0x8(%rbx)
movq %r14, 0x18(%rbx)
movq 0x8(%rbx), %rax
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_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x5, %edx
jne 0xf6a76
movb (%rbx), %al
testb %al, %al
je 0xf6aa3
incq %rbx
movzbl %al, %esi
movq %r14, %rdi
callq 0xf69a2
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0xf6a60
jmp 0xf6aa3
movl %edx, %ebp
movq %rbx, %rdi
callq 0x180e0
movq %rax, %r15
movq %rsp, %r12
movq %r12, %rdi
movl %ebp, %esi
callq 0xec207
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0xf6c10
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_clone
de_ucstring *ucstring_clone(const de_ucstring *src)
{
	de_ucstring *dst;

	if(!src) return NULL;
	dst = ucstring_create(src->c);
	ucstring_append_ucstring(dst, src);
	return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xf6ba4
movq %rdi, %rbx
movq (%rdi), %r15
movl $0x28, %esi
movq %r15, %rdi
callq 0xe969b
movq %rax, %r14
movq %r15, (%rax)
cmpq $0x0, 0x10(%rbx)
jle 0xf6ba7
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movl (%rax,%r15,4), %esi
movq %r14, %rdi
callq 0xf69a2
incq %r15
cmpq 0x10(%rbx), %r15
jl 0xf6b89
jmp 0xf6ba7
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf6be9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
movq %r14, %rdi
callq 0xe9752
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xe9752
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf71f4
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
jle 0xf71f4
movq 0x8(%rdi), %rdx
xorl %eax, %eax
xorl %esi, %esi
movl (%rdx,%rsi,4), %r8d
movl $0x4, %edi
cmpl $0xffff, %r8d           # imm = 0xFFFF
ja 0xf71e8
movl $0x1, %edi
cmpl $0x80, %r8d
jl 0xf71e8
xorl %edi, %edi
cmpl $0x800, %r8d            # imm = 0x800
setl %dil
xorq $0x3, %rdi
addq %rdi, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0xf71b7
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf7252
cmpb $0x0, 0xcc(%rdi)
je 0xf7252
movq 0x10(%r14), %rax
testq %rax, %rax
jle 0xf7252
movq 0x8(%r14), %rcx
cmpl $0xfeff, (%rcx)         # imm = 0xFEFF
je 0xf7252
decq %rax
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
cmpl $0x7f, %esi
ja 0xf723d
leaq 0x1(%rdx), %rdi
cmpq %rdx, %rax
movq %rdi, %rdx
jne 0xf7229
cmpl $0x80, %esi
jb 0xf7252
movq %rbx, %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0xec81c
cmpq $0x0, 0x10(%r14)
jle 0xf7275
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0xec81c
incq %r15
cmpq 0x10(%r14), %r15
jl 0xf725c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf74db
movq %rdi, %rbx
testl %esi, %esi
je 0xf74f9
incq %r14
jmp 0xf7505
cmpq $0x6, %r14
leaq 0x4d6ea(%rip), %rax     # 0x144bd0
leaq 0x5250d(%rip), %rcx     # 0x1499fa
cmovgeq %rcx, %rax
testl %esi, %esi
cmoveq %rcx, %rax
jmp 0xf7542
movq 0x10(%rbx), %rax
leaq 0x65(,%rax,4), %r14
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xf7516
movq (%rbx), %rdi
callq 0xe9752
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xe969b
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
movl $0x2, %ecx
movl $0x2, %r8d
callq 0xf727b
movq 0x20(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x28, %esi
callq 0xe969b
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf76c7
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
cmpq $0x0, 0x10(%rbx)
je 0xf76a9
movq %rbx, %rdi
callq 0xf76c8
jmp 0xf7698
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xe9752
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf7702
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %rdi
callq 0xf6bb0
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movq $0x0, -0x8(%rcx,%rax,8)
decq %rax
movq %rax, 0x10(%rbx)
movl $0x1, %eax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_push
int de_strarray_push(struct de_strarray *sa, de_ucstring *s)
{
	deark *c = sa->c;
	size_t newidx = sa->count;

	if(sa->count >= sa->max_elems) return 0;
	if(newidx >= sa->num_alloc) {
		size_t old_num_alloc = sa->num_alloc;
		sa->num_alloc *= 2;
		if(sa->num_alloc<8) sa->num_alloc=8;
		sa->ss = de_reallocarray(c, sa->ss, old_num_alloc, sizeof(de_ucstring*),
			sa->num_alloc);
	}
	sa->ss[newidx] = ucstring_clone(s);
	sa->count++;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r15
xorl %eax, %eax
cmpq 0x8(%rdi), %r15
jae 0xf7768
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
cmpq %rdx, %r15
jb 0xf774f
movq (%rbx), %rdi
leaq (%rdx,%rdx), %r8
cmpq $0x9, %r8
movl $0x8, %eax
cmovbq %rax, %r8
movq %r8, 0x18(%rbx)
movq 0x20(%rbx), %rsi
movl $0x8, %ecx
callq 0xea2ba
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0xf6b5c
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq 0x10(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq