// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-font.c
// Function: de_font_bitmap_font_write
void de_font_bitmap_font_write(deark *c, struct de_bitmap_font *font, de_finfo *fi,
	UI createflags)
{
	u8 to_psf = 0;

	// The font struct isn't really the right place for this flag, but for now,
	// it will do.
	if(font->force_fontfile_output) {
		to_psf = 1;
	}

	if(to_psf) {
		// PSF is adequate for fixed-width PC screen fonts, but even there, I'm
		// not necessarily that fond of it. This is all subject to change.
		bitmap_font_to_psf(c, font, fi, createflags);
	}
	else {
		bitmap_font_to_image(c, font, fi, createflags);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %r14d
movq %rsi, %rbx
movq %rdi, %rbp
cmpb $0x0, 0x13(%rsi)
je 0xea159
cmpl $0x8, (%rbx)
jne 0xea12c
movl 0x4(%rbx), %r15d
leal -0x21(%r15), %eax
cmpl $-0x20, %eax
jae 0xea1c5
xorl %r14d, %r14d
movq %r14, %rdi
callq 0xe5591
leaq 0x527ce(%rip), %rsi     # 0x13c90c
movq %rbp, %rdi
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdf2a5
movq %rdx, 0x78(%rsp)
pushq $0x28
popq %rsi
movq %rbp, %rdi
callq 0xdecaf
movq %rax, %r15
movq %rbx, (%rax)
movq $-0x110001, %rax        # imm = 0xFFEEFFFF
addq 0x18(%rbx), %rax
cmpq $-0x110000, %rax        # imm = 0xFFEF0000
jae 0xea187
xorl %r14d, %r14d
jmp 0xea1bb
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl $0x201, %eax            # imm = 0x201
cmpl %eax, %edx
setge %sil
cmpl %eax, %ecx
setge %al
orb %sil, %al
cmpb $0x1, %al
jne 0xea299
leaq 0x52777(%rip), %rsi     # 0x13c925
xorl %r14d, %r14d
movq %rbp, %rdi
xorl %eax, %eax
callq 0xdf2a5
xorl %r13d, %r13d
xorl %ebx, %ebx
jmp 0xeaacf
movq %rbp, %rdi
pushq $0x20
popq %r12
leaq 0x4213d(%rip), %rsi     # 0x12c310
movl %r14d, %ecx
callq 0xe4e62
movq %rax, %r14
movq %rax, %rdi
callq 0xe589c
movl $0x72b54a86, %esi       # imm = 0x72B54A86
movq %r14, %rdi
callq 0xe5f65
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
callq 0xe5f7f
movq %r14, %rdi
movq %r12, %rsi
callq 0xe5f7f
movq %r14, %rdi
xorl %esi, %esi
callq 0xe5f7f
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0xe5f7f
movq %r14, %rdi
movq %r15, %rsi
callq 0xe5f7f
movslq 0x4(%rbx), %rsi
movq %r14, %rdi
callq 0xe5f7f
movslq (%rbx), %rsi
movq %r14, %rdi
callq 0xe5f7f
cmpq 0x18(%rbx), %r13
jge 0xea5bc
movq 0x20(%rbx), %rax
movq (%rax,%r12), %rsi
testq %rsi, %rsi
je 0xea12f
movl -0x18(%rax,%r12), %ecx
cmpl (%rbx), %ecx
jne 0xea12f
movl -0x14(%rax,%r12), %ecx
cmpl 0x4(%rbx), %ecx
jne 0xea12f
cmpq $0x1, -0x8(%rax,%r12)
jne 0xea12f
movq %r14, %rdi
movq %r15, %rdx
callq 0xe46ba
incq %r13
addq $0x28, %r12
jmp 0xea243
leaq 0x526b0(%rip), %rsi     # 0x13c950
pushq $-0x1
popq %rdx
movq %rbp, %rdi
callq 0xdfae5
movq (%r15), %rcx
testl %eax, %eax
je 0xea2be
cmpb $0x0, 0x11(%rcx)
je 0xea2dc
testl %eax, %eax
jg 0xea2d4
jmp 0xea2ca
cmpb $0x0, 0x10(%rcx)
jne 0xea2dc
cmpb $0x0, 0x11(%rcx)
je 0xea2dc
cmpb $0x0, 0x12(%rcx)
je 0xeab1e
movl $0x1, 0x18(%r15)
leaq 0x5267c(%rip), %rsi     # 0x13c95f
movq %rbp, %rdi
callq 0xdfa87
testq %rax, %rax
je 0xea30a
movq %rax, %rdi
callq 0xdfb3b
cmpq $0x2, %rax
pushq $0x1
popq %rcx
cmovgeq %rax, %rcx
movq %rcx, 0x28(%rsp)
jmp 0xea312
pushq $0x20
popq %rax
movq %rax, 0x28(%rsp)
movq %rbp, %rdi
callq 0xe9d18
movq %rax, %rbx
movq $0x10, 0x18(%rax)
movabsq $0x700000006, %rax      # imm = 0x700000006
movq %rax, (%rbx)
movb $0x1, 0x11(%rbx)
pushq $0x10
popq %rsi
pushq $0x28
popq %rdx
movq %rbp, %rdi
callq 0xdf66f
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rdx
xorl %ecx, %ecx
testq %rdx, %rdx
cmovgq %rdx, %rcx
addq $0x20, %rax
leaq 0x52674(%rip), %rdx     # 0x13c9d4
subq $0x1, %rcx
jb 0xea388
movl -0x4(%rdx), %esi
movl %esi, -0x1c(%rax)
movq (%rbx), %rsi
movq %rsi, -0x18(%rax)
movq $0x1, -0x8(%rax)
movq %rdx, (%rax)
addq $0x28, %rax
addq $0xc, %rdx
jmp 0xea360
movq %rbx, 0x50(%rsp)
movq (%r15), %rax
movq 0x18(%rax), %rsi
pushq $0x4
popq %rdx
movq %rbp, %rdi
callq 0xdf66f
movq %rax, 0x20(%r15)
cmpl $0x0, 0x18(%r15)
movq %r15, 0x20(%rsp)
movl %r14d, 0x74(%rsp)
je 0xea567
movl $0x2000, %esi           # imm = 0x2000
movq %rbp, %r15
movq %rbp, %rdi
callq 0xdecaf
movq %rax, %rbx
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rax), %r13
jge 0xea480
movq 0x20(%rax), %rbp
leaq (%r14,%rbp), %rdi
callq 0xe9fdb
testl %eax, %eax
je 0xea474
movl 0x4(%rbp,%r14), %edx
cmpq $0xffff, %rdx           # imm = 0xFFFF
ja 0xea43c
movl %edx, %eax
shrl $0x3, %eax
movl %edx, %ecx
andb $0x7, %cl
movzbl (%rbx,%rax), %esi
movl %esi, %edi
btsl %ecx, %edi
movb %dil, (%rbx,%rax)
movl %edx, %eax
andl $0x7, %eax
btl %eax, %esi
jae 0xea467
movq %r15, %rdi
leaq 0x5254b(%rip), %rsi     # 0x13c97b
movl %r13d, %ecx
xorl %eax, %eax
callq 0xde9f1
jmp 0xea444
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
jne 0xea467
cmpq $0x21fd, %r12           # imm = 0x21FD
jg 0xea474
leal 0xfde00(%r12), %eax
movq 0x20(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl %eax, (%rcx,%r13,4)
incq %r12
jmp 0xea474
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movl %edx, (%rax,%r13,4)
incq %r13
addq $0x28, %r14
jmp 0xea3d4
movq %r15, %rbp
movq 0x20(%rsp), %r15
movq %rbp, 0x30(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xded32
movq $0x10ffff, 0x8(%r15)    # imm = 0x10FFFF
andq $0x0, 0x10(%r15)
movq (%r15), %rax
movq %rax, 0x38(%rsp)
movq 0x18(%rax), %r14
xorl %r15d, %r15d
testq %r14, %r14
cmovleq %r15, %r14
movl $0x10ffff, %ebx         # imm = 0x10FFFF
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq %r13, %r14
je 0xea531
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rdi
addq %r15, %rdi
callq 0xe9fdb
testl %eax, %eax
je 0xea4f6
movq 0x20(%rsp), %rdx
movq 0x20(%rdx), %rcx
movl (%rcx,%r13,4), %eax
cmpl $0xfffffff, %eax        # imm = 0xFFFFFFF
jne 0xea507
movl %ebp, %ecx
movl %ebx, %eax
incq %r13
addq $0x28, %r15
movl %ecx, %ebp
movl %eax, %ebx
jmp 0xea4c8
incq %r12
movq %r12, 0x10(%rdx)
cmpl %ebx, %eax
jge 0xea51b
movl %eax, 0x8(%rdx)
movl (%rcx,%r13,4), %ecx
jmp 0xea51f
movl %eax, %ecx
movl %ebx, %eax
cmpl %ebp, %ecx
jle 0xea52d
movq 0x20(%rsp), %rdx
movl %ecx, 0xc(%rdx)
jmp 0xea4fa
movl %ebp, %ecx
jmp 0xea4fa
testq %r12, %r12
jle 0xea599
movslq %ebp, %rax
cqto
idivq 0x28(%rsp)
movq %rax, 0x58(%rsp)
leaq 0x1(%rax), %rsi
movq 0x20(%rsp), %r15
cmpl $0x0, 0x18(%r15)
movq 0x30(%rsp), %r14
je 0xea5d5
movq 0x50(%rsp), %rcx
movslq (%rcx), %rax
jmp 0xea5e9
movq (%r15), %rcx
movq 0x18(%rcx), %rdx
xorl %ebx, %ebx
testq %rdx, %rdx
cmovleq %rbx, %rdx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rdi, %rdx
je 0xea488
movq 0x20(%rcx), %r8
movl (%r8,%rsi), %r8d
movl %r8d, (%rax,%rdi,4)
incq %rdi
addq $0x28, %rsi
jmp 0xea57b
xorl %ebx, %ebx
movq $0x0, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x30(%rsp), %rbp
movq 0x20(%rsp), %r15
jmp 0xeaaa9
movq %r14, %rdi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe5591
movq 0x50(%rsp), %rcx
movslq (%rcx), %rax
cmpl $0x3e8, %ebp            # imm = 0x3E8
jl 0xeab15
leaq (%rax,%rax,4), %rax
movq %rax, 0x38(%rsp)
movslq 0x4(%rcx), %rax
movq %rax, 0x60(%rsp)
pushq $0x10
popq %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0xdf66f
movq %rax, 0x40(%rsp)
movq %r14, %rdi
movq 0x28(%rsp), %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf66f
movq %rax, %rcx
subq $0x1, %r14
jb 0xea637
movq $0x5, (%rcx)
addq $0x10, %rcx
jmp 0xea624
movq %rax, 0x48(%rsp)
movq (%r15), %r13
leaq 0x5232a(%rip), %rbx     # 0x13c970
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpq 0x18(%r13), %rbp
jge 0xea6fc
movq 0x20(%r15), %rax
movslq (%rax,%rbp,4), %r14
cmpq $0xfffffff, %r14        # imm = 0xFFFFFFF
je 0xea6f0
movq 0x20(%r13), %rdi
addq %r12, %rdi
callq 0xe9fdb
testl %eax, %eax
je 0xea6f0
movq %r14, %rax
cqto
idivq 0x28(%rsp)
movq %rdx, %r15
movq %rax, %r14
testq %rax, %rax
js 0xea696
cmpq 0x58(%rsp), %r14
jle 0xea6ad
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xdf4f0
movq 0x20(%rsp), %rax
movq (%rax), %r13
shlq $0x4, %r14
movq 0x40(%rsp), %rax
movb $0x1, (%rax,%r14)
movq 0x20(%r13), %rax
movslq 0x8(%rax,%r12), %rcx
movswq 0x14(%rax,%r12), %rdx
addq %rcx, %rdx
movswq 0x16(%rax,%r12), %rax
addq %rdx, %rax
shlq $0x4, %r15
movq 0x48(%rsp), %rcx
cmpq (%rcx,%r15), %rax
jle 0xea6eb
addq %rcx, %r15
movq %rax, (%r15)
movq 0x20(%rsp), %r15
incq %rbp
addq $0x28, %r12
jmp 0xea64b
movq 0x60(%rsp), %rax
leaq 0x6(%rax), %rcx
movslq 0x4(%r13), %rax
movq %rax, %r12
leaq 0x1(%rax), %rdx
pushq $-0x1
popq %rax
xorl %esi, %esi
movq 0x40(%rsp), %r9
movq %r9, %rdi
xorl %r8d, %r8d
movq 0x30(%rsp), %rbp
cmpq 0x58(%rsp), %r8
jg 0xea758
cmpb $0x0, (%rdi)
je 0xea74f
testq %rsi, %rsi
jle 0xea742
leaq 0x3(%rcx), %rax
cmpb $0x0, -0x10(%rdi)
cmoveq %rax, %rcx
movq %rcx, 0x8(%rdi)
addq %rdx, %rcx
incq %rsi
movq %r8, %rax
incq %r8
addq $0x10, %rdi
jmp 0xea725
testq %rsi, %rsi
jle 0xeaaa7
movq 0x38(%rsp), %rcx
addq $0x6, %rcx
movq 0x48(%rsp), %rsi
addq $0x8, %rsi
movq 0x28(%rsp), %rdi
subq $0x1, %rdi
jb 0xea791
movq %rcx, (%rsi)
movq -0x8(%rsi), %r8
addq %r8, %rcx
incq %rcx
addq $0x10, %rsi
jmp 0xea778
movq 0x28(%rsp), %rcx
shlq $0x4, %rcx
movq 0x48(%rsp), %r14
movq -0x10(%r14,%rcx), %rsi
movq -0x8(%r14,%rcx), %rcx
addq %rcx, %rsi
incq %rsi
shlq $0x4, %rax
addq 0x8(%r9,%rax), %rdx
pushq $0x3
popq %rcx
movq %rbp, %rdi
callq 0xe7437
movq %rax, %rbx
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
andl $0x0, (%rsp)
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff202090, %r9d       # imm = 0xFF202090
callq 0xe8292
leaq 0x8(%r14), %rax
movq %rax, 0x68(%rsp)
cmpq 0x58(%rsp), %r15
jg 0xea84d
movq %r15, %rax
shlq $0x4, %rax
movq 0x40(%rsp), %rcx
cmpb $0x0, (%rcx,%rax)
je 0xea848
addq 0x40(%rsp), %rax
movq 0x8(%rax), %r14
movq 0x28(%rsp), %r13
movq 0x68(%rsp), %rbp
subq $0x1, %r13
jb 0xea848
movq -0x8(%rbp), %rcx
movq (%rbp), %rsi
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %r8
movl $0xff7070a0, %r9d       # imm = 0xFF7070A0
callq 0xe8292
addq $0x10, %rbp
jmp 0xea81c
incq %r15
jmp 0xea7f0
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl (%rax), %ebp
addq $0x3, 0x60(%rsp)
movq 0x48(%rsp), %r14
addq $0x8, %r14
xorl %r15d, %r15d
pushq $0x5
popq %r13
cmpq %r15, 0x28(%rsp)
je 0xea8c6
cmpl $0xd, %ebp
setl %al
testb %r15b, %al
jne 0xea8bd
movq -0x8(%r14), %rax
cqto
pushq $0x2
popq %rcx
idivq %rcx
addq (%r14), %rax
movq 0x20(%rsp), %rcx
cmpl $0x1, 0x18(%rcx)
movl %r13d, %ecx
sbbl $0x0, %ecx
movl %ecx, (%rsp)
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq 0x50(%rsp), %rdx
movq %r15, %rcx
movq %rax, %r8
movq 0x60(%rsp), %r9
callq 0xeab93
incq %r15
addq $0x10, %r14
jmp 0xea86d
addq $0x3, 0x38(%rsp)
leaq 0x2(%r12), %r13
movq 0x40(%rsp), %rbp
addq $0x8, %rbp
xorl %r15d, %r15d
xorl %r14d, %r14d
cmpq 0x58(%rsp), %r14
jg 0xea942
cmpb $0x0, -0x8(%rbp)
je 0xea934
movq 0x50(%rsp), %r8
movslq 0x4(%r8), %rax
addq %r13, %rax
cqto
pushq $0x2
popq %rcx
idivq %rcx
addq (%rbp), %rax
xorl %ecx, %ecx
movq 0x20(%rsp), %rdx
cmpl $0x0, 0x18(%rdx)
setne %cl
leal (%rcx,%rcx,2), %ecx
movl %ecx, (%rsp)
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r8, %rdx
movq %r15, %rcx
movq 0x38(%rsp), %r8
movq %rax, %r9
callq 0xeab93
incq %r14
addq 0x28(%rsp), %r15
addq $0x10, %rbp
jmp 0xea8e0
xorl %eax, %eax
testq %r12, %r12
cmovleq %rax, %r12
movq %r12, 0x60(%rsp)
xorl %r12d, %r12d
movq 0x30(%rsp), %rbp
movq 0x20(%rsp), %r15
movq (%r15), %rax
cmpq 0x18(%rax), %r12
jge 0xeaa94
movq 0x20(%r15), %rcx
movslq (%rcx,%r12,4), %r14
cmpq $0xfffffff, %r14        # imm = 0xFFFFFFF
je 0xeaa8c
imulq $0x28, %r12, %rdi
addq 0x20(%rax), %rdi
callq 0xe9fdb
testl %eax, %eax
je 0xeaa8c
movq %r12, 0x80(%rsp)
movq %r14, %rax
cqto
idivq 0x28(%rsp)
movq %rdx, %r12
movq %rax, %r14
testq %rax, %rax
js 0xea9b8
cmpq 0x58(%rsp), %r14
jle 0xea9cb
movq 0x30(%rsp), %rdi
leaq 0x51fac(%rip), %rsi     # 0x13c970
xorl %eax, %eax
callq 0xdf4f0
shlq $0x4, %r12
movq 0x48(%rsp), %rax
movq (%rax,%r12), %r15
movq 0x8(%rax,%r12), %r12
shlq $0x4, %r14
movq 0x40(%rsp), %rax
movq 0x8(%rax,%r14), %rax
movq %rax, 0x68(%rsp)
testq %r15, %r15
movl $0x0, %eax
cmovleq %rax, %r15
xorl %r13d, %r13d
cmpq 0x60(%rsp), %r13
je 0xeaa53
movq 0x68(%rsp), %rax
leaq (%rax,%r13), %r14
movq %r13, 0x38(%rsp)
shrq %r13
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0xeaa49
leaq (%r12,%rbp), %rsi
movl %ebp, %eax
shrl %eax
addl %r13d, %eax
xorl %ecx, %ecx
testb $0x1, %al
sete %cl
shll $0x4, %ecx
addl $0xb0, %ecx
movq %rbx, %rdi
movq %r14, %rdx
callq 0xe71da
incq %rbp
jmp 0xeaa19
movq 0x38(%rsp), %r13
incq %r13
jmp 0xea9ff
movq 0x20(%rsp), %r15
movq (%r15), %rdx
andl $0x0, 0x10(%rsp)
orl $-0x1, 0x8(%rsp)
movl $0xff000000, (%rsp)     # imm = 0xFF000000
movq %rbx, %rsi
movq 0x80(%rsp), %rcx
movq %r12, %r8
movq %rcx, %r12
movq 0x68(%rsp), %r9
callq 0xe9d2d
movq 0x30(%rsp), %rbp
incq %r12
jmp 0xea95d
movq %rbx, %rdi
movq 0x78(%rsp), %rsi
movl 0x74(%rsp), %edx
callq 0xe70ab
jmp 0xeaaa9
xorl %ebx, %ebx
movq 0x50(%rsp), %r14
movq 0x20(%r14), %rsi
movq %rbp, %rdi
callq 0xded32
movq %rbp, %rdi
movq %r14, %rsi
callq 0xded32
movq 0x48(%rsp), %r14
movq 0x40(%rsp), %r13
movq %rbx, %rdi
callq 0xe7084
movq %rbp, %rdi
movq %r13, %rsi
callq 0xded32
movq %rbp, %rdi
movq %r14, %rsi
callq 0xded32
movq 0x20(%r15), %rsi
movq %rbp, %rdi
callq 0xded32
movq %rbp, %rdi
movq %r15, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xded32
leaq (%rax,%rax,2), %rax
jmp 0xea5ed
cmpb $0x0, 0x10(%rcx)
jne 0xea2dc
jmp 0xea2d4