// File: /workspace/github_c_makefile_star2_O1/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 $0x98, %rsp
movl %ecx, %ebx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
cmpb $0x0, 0x13(%rsi)
je 0xf5c8b
cmpl $0x8, (%r15)
jne 0xf5c62
movl 0x4(%r15), %r14d
leal -0x21(%r14), %eax
cmpl $-0x20, %eax
jae 0xf5d58
xorl %edi, %edi
callq 0xf0b13
leaq 0x53bcc(%rip), %rsi     # 0x14983c
movq %r12, %rdi
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9df7
movl $0x28, %esi
movq %r12, %rdi
callq 0xe969b
movq %rax, %rbp
movq %r15, (%rax)
movq $-0x110001, %rax        # imm = 0xFFEEFFFF
addq 0x18(%r15), %rax
cmpq $-0x110000, %rax        # imm = 0xFFEF0000
jae 0xf5cb5
xorl %ebx, %ebx
jmp 0xf5ce5
movl (%r15), %edx
cmpl $0x200, %edx            # imm = 0x200
jg 0xf5cce
cmpl $0x201, 0x4(%r15)       # imm = 0x201
jl 0xf5e77
movl 0x4(%r15), %ecx
leaq 0x53b7c(%rip), %rsi     # 0x149855
xorl %ebx, %ebx
movq %r12, %rdi
xorl %eax, %eax
callq 0xe9df7
xorl %r15d, %r15d
movq $0x0, 0x28(%rsp)
xorl %r14d, %r14d
testq %r15, %r15
je 0xf5d10
movq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0xe9752
movq %r12, %rdi
movq %r15, %rsi
callq 0xe9752
movq %rbx, %rdi
callq 0xf28d4
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0xe9752
movq %r12, %rdi
movq %r14, %rsi
callq 0xe9752
movq 0x20(%rbp), %rsi
movq %r12, %rdi
callq 0xe9752
movq %r12, %rdi
movq %rbp, %rsi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9752
leaq 0x43521(%rip), %rsi     # 0x139280
movq %r12, 0x40(%rsp)
movq %r12, %rdi
movq %r13, %rdx
movl %ebx, %ecx
callq 0xf037a
movq %rax, %r12
movq %rax, %rdi
callq 0xf0e3f
movl $0x72b54a86, %esi       # imm = 0x72B54A86
movq %r12, %rdi
callq 0xf1629
movq %r12, %rdi
xorl %esi, %esi
callq 0xf1645
movl $0x20, %ebx
movl $0x20, %esi
movq %r12, %rdi
callq 0xf1645
movq %r12, %rdi
xorl %esi, %esi
callq 0xf1645
movq 0x18(%r15), %rsi
movq %r12, %rdi
callq 0xf1645
movq %r12, %rdi
movq %r14, %rsi
callq 0xf1645
movslq 0x4(%r15), %rsi
movq %r12, %rdi
callq 0xf1645
movslq (%r15), %rsi
movq %r12, %rdi
callq 0xf1645
cmpq $0x0, 0x18(%r15)
jle 0xf5e5e
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x20(%r15), %rax
movq (%rax,%rbx), %rsi
testq %rsi, %rsi
je 0xf5e20
movl -0x18(%rax,%rbx), %ecx
cmpl (%r15), %ecx
jne 0xf5e20
movl -0x14(%rax,%rbx), %ecx
cmpl 0x4(%r15), %ecx
jne 0xf5e20
cmpq $0x1, -0x8(%rax,%rbx)
jne 0xf5e20
movq %r12, %rdi
movq %r14, %rdx
callq 0xefb82
movb $0x1, %al
jmp 0xf5e25
xorl %eax, %eax
movb $0x1, %bpl
testb %al, %al
je 0xf5e36
incq %r13
addq $0x28, %rbx
cmpq 0x18(%r15), %r13
jl 0xf5de9
movq %r12, %rdi
callq 0xf0b13
testb %bpl, %bpl
movq 0x40(%rsp), %r12
jne 0xf5c69
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf0b13
leaq 0x53a02(%rip), %rsi     # 0x149880
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xea727
testl %eax, %eax
je 0xf5eb0
movq (%rbp), %rcx
cmpb $0x0, 0x11(%rcx)
je 0xf5ebe
testl %eax, %eax
jg 0xf5ea7
cmpb $0x0, 0x12(%rcx)
je 0xf6708
movl $0x1, 0x18(%rbp)
jmp 0xf5ebe
movq (%rbp), %rcx
cmpb $0x0, 0x10(%rcx)
je 0xf60be
leaq 0x539ca(%rip), %rsi     # 0x14988f
movq %r12, %rdi
callq 0xea6cb
testq %rax, %rax
je 0xf5eee
movq %rax, %rdi
callq 0xea786
cmpq $0x2, %rax
movl $0x1, %ecx
cmovgeq %rax, %rcx
movq %rcx, 0x30(%rsp)
jmp 0xf5ef8
movl $0x20, %eax
movq %rax, 0x30(%rsp)
movl $0x28, %esi
movq %r12, %rdi
callq 0xe969b
movq %rax, %r14
movq $-0x1, 0x8(%rax)
movq $0x10, 0x18(%rax)
movabsq $0x700000006, %rax      # imm = 0x700000006
movq %rax, (%r14)
movb $0x1, 0x11(%r14)
movl $0x10, %esi
movl $0x28, %edx
movq %r12, %rdi
callq 0xea259
movq %rax, 0x20(%r14)
movq 0x18(%r14), %rcx
testq %rcx, %rcx
jle 0xf5f81
movl (%r14), %edx
movl 0x4(%r14), %esi
addq $0x4, %rax
leaq 0x539a9(%rip), %rdi     # 0x149904
movl -0x4(%rdi), %r8d
movl %r8d, (%rax)
movl %edx, 0x4(%rax)
movl %esi, 0x8(%rax)
movq $0x1, 0x14(%rax)
movq %rdi, 0x1c(%rax)
addq $0x28, %rax
addq $0xc, %rdi
decq %rcx
jne 0xf5f5b
movq (%rbp), %rax
movq 0x18(%rax), %rsi
movl $0x4, %edx
movq %r12, %rdi
callq 0xea259
movq %rax, 0x20(%rbp)
cmpl $0x0, 0x18(%rbp)
movq %rbp, 0x20(%rsp)
movq %r13, 0x88(%rsp)
movq %r14, 0x50(%rsp)
movl %ebx, 0x84(%rsp)
je 0xf6095
movl $0x2000, %esi           # imm = 0x2000
movq %r12, %rdi
callq 0xe969b
movq %rax, %r15
movq (%rbp), %rax
cmpq $0x0, 0x18(%rax)
jle 0xf60d0
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x20(%rax), %rbp
leaq (%rbx,%rbp), %rdi
callq 0xf5982
testl %eax, %eax
je 0xf6027
movl 0x4(%rbp,%rbx), %edx
cmpq $0xffff, %rdx           # imm = 0xFFFF
ja 0xf602e
movl %edx, %eax
shrl $0x3, %eax
movl %edx, %ecx
andb $0x7, %cl
movzbl (%r15,%rax), %esi
movl %esi, %edi
btsl %ecx, %edi
movb %dil, (%r15,%rax)
movl %edx, %eax
andl $0x7, %eax
btl %eax, %esi
setb %al
jmp 0xf6030
movq 0x20(%rsp), %rbp
jmp 0xf607e
xorl %eax, %eax
movq 0x20(%rsp), %rbp
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
je 0xf604b
testb %al, %al
jne 0xf604b
movq 0x20(%rbp), %rax
movl %edx, (%rax,%r13,4)
jmp 0xf607e
testb %al, %al
je 0xf6063
movq %r12, %rdi
leaq 0x53852(%rip), %rsi     # 0x1498ab
movl %r13d, %ecx
xorl %eax, %eax
callq 0xe93cf
cmpq $0x21fd, %r14           # imm = 0x21FD
jg 0xf607e
leal 0xfde00(%r14), %eax
movq 0x20(%rbp), %rcx
movl %eax, (%rcx,%r13,4)
incq %r14
incq %r13
movq (%rbp), %rax
addq $0x28, %rbx
cmpq 0x18(%rax), %r13
jl 0xf5fe4
jmp 0xf60d0
movq (%rbp), %rdx
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
jle 0xf60cd
movq 0x20(%rdx), %rdx
xorl %r15d, %r15d
xorl %esi, %esi
movl (%rdx), %edi
movl %edi, (%rax,%rsi,4)
incq %rsi
addq $0x28, %rdx
cmpq %rsi, %rcx
jne 0xf60ab
jmp 0xf60d0
cmpb $0x0, 0x11(%rcx)
jne 0xf5e8f
jmp 0xf5ebe
xorl %r15d, %r15d
movq %r12, %rdi
movq %r15, %rsi
callq 0xe9752
movq $0x10ffff, 0x8(%rbp)    # imm = 0x10FFFF
movq $0x0, 0x10(%rbp)
movq (%rbp), %rax
movq 0x18(%rax), %r14
testq %r14, %r14
jle 0xf613f
movq 0x20(%rax), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0xf5982
testl %eax, %eax
je 0xf6133
movq 0x20(%rbp), %rax
movl (%rax,%r15,4), %ecx
cmpl $0xfffffff, %ecx        # imm = 0xFFFFFFF
je 0xf6133
incq 0x10(%rbp)
cmpl 0x8(%rbp), %ecx
jge 0xf6127
movl %ecx, 0x8(%rbp)
movl (%rax,%r15,4), %eax
cmpl 0xc(%rbp), %eax
jle 0xf6133
movl %eax, 0xc(%rbp)
incq %r15
addq $0x28, %rbx
cmpq %r15, %r14
jne 0xf60ff
cmpq $0x0, 0x10(%rbp)
jle 0xf616d
movslq 0xc(%rbp), %rcx
movq %rcx, %rax
cqto
idivq 0x30(%rsp)
movq %rax, 0x60(%rsp)
leaq 0x1(%rax), %r13
cmpl $0x0, 0x18(%rbp)
movq 0x50(%rsp), %rdx
je 0xf6185
movslq (%rdx), %rax
jmp 0xf6194
xorl %ebx, %ebx
movq $0x0, 0x28(%rsp)
xorl %r14d, %r14d
movq 0x50(%rsp), %r15
jmp 0xf5cf4
movslq (%rdx), %rax
cmpl $0x3e8, %ecx            # imm = 0x3E8
jl 0xf66ff
leaq (%rax,%rax,4), %rax
movq %rax, 0x38(%rsp)
movslq 0x4(%rdx), %rax
movq %rax, 0x48(%rsp)
movl $0x10, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0xea259
movq %rax, 0x28(%rsp)
movl $0x10, %edx
movq %r12, %rdi
movq 0x30(%rsp), %rbx
movq %rbx, %rsi
callq 0xea259
movq %rax, %r14
movq $0x5, (%rax)
addq $0x10, %rax
decq %rbx
jne 0xf61d3
movq %r12, 0x40(%rsp)
movq (%rbp), %rax
cmpq $0x0, 0x18(%rax)
movq %r14, 0x58(%rsp)
jle 0xf62bc
leaq 0x5369d(%rip), %r15     # 0x1498a0
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x20(%rsp), %rcx
movq 0x20(%rcx), %rcx
movslq (%rcx,%rbp,4), %rbx
cmpq $0xfffffff, %rbx        # imm = 0xFFFFFFF
je 0xf62a3
movq 0x20(%rax), %rdi
addq %r12, %rdi
callq 0xf5982
testl %eax, %eax
je 0xf62a3
movq %rbx, %rax
cqto
idivq 0x30(%rsp)
movq %rdx, %rbx
movq %rax, %r14
testq %rax, %rax
js 0xf624e
cmpq 0x60(%rsp), %r14
jle 0xf625d
movq 0x40(%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xea0a6
shlq $0x4, %r14
movq 0x28(%rsp), %rax
movb $0x1, (%rax,%r14)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movslq 0x8(%rax,%r12), %rcx
movswq 0x14(%rax,%r12), %rdx
addq %rcx, %rdx
movswq 0x16(%rax,%r12), %rax
addq %rdx, %rax
shlq $0x4, %rbx
movq 0x58(%rsp), %r14
cmpq (%r14,%rbx), %rax
jle 0xf62a3
addq %r14, %rbx
movq %rax, (%rbx)
incq %rbp
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
addq $0x28, %r12
cmpq 0x18(%rax), %rbp
jl 0xf620d
movslq 0x4(%rax), %rax
movq %rax, 0x78(%rsp)
leaq 0x1(%rax), %rdx
cmpq $0x0, 0x60(%rsp)
js 0xf632c
movq 0x48(%rsp), %rax
leaq 0x6(%rax), %rcx
movq $-0x1, %rax
xorl %esi, %esi
movq 0x28(%rsp), %rdi
xorl %r8d, %r8d
movq 0x40(%rsp), %r12
movq 0x50(%rsp), %r15
cmpb $0x0, (%rdi)
je 0xf6318
testq %r8, %r8
jle 0xf630b
leaq 0x3(%rcx), %rax
cmpb $0x0, -0x10(%rdi)
cmoveq %rax, %rcx
movq %rcx, 0x8(%rdi)
addq %rdx, %rcx
incq %r8
movq %rsi, %rax
incq %rsi
addq $0x10, %rdi
cmpq %rsi, %r13
jne 0xf62f5
testq %r8, %r8
setle %cl
jmp 0xf633f
movq $-0x1, %rax
movb $0x1, %cl
movq 0x40(%rsp), %r12
movq 0x50(%rsp), %r15
testb %cl, %cl
je 0xf634f
xorl %ebx, %ebx
movq 0x20(%rsp), %rbp
jmp 0xf5cf4
movq %r13, 0x90(%rsp)
movq 0x38(%rsp), %rcx
addq $0x6, %rcx
leaq 0x8(%r14), %rsi
movq 0x30(%rsp), %rdi
movq %rcx, (%rsi)
movq -0x8(%rsi), %r8
addq %r8, %rcx
incq %rcx
addq $0x10, %rsi
decq %rdi
jne 0xf6369
movq 0x30(%rsp), %rcx
shlq $0x4, %rcx
movq -0x10(%r14,%rcx), %rsi
movq -0x8(%r14,%rcx), %rcx
addq %rcx, %rsi
incq %rsi
shlq $0x4, %rax
movq 0x28(%rsp), %rcx
addq 0x8(%rcx,%rax), %rdx
movq %r12, %rdi
movl $0x3, %ecx
callq 0xf2cab
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
movl $0x0, (%rsp)
movq %rax, 0x68(%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff202090, %r9d       # imm = 0xFF202090
callq 0xf3cb3
cmpq $0x0, 0x60(%rsp)
js 0xf6459
movq 0x58(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x70(%rsp)
xorl %ebp, %ebp
movq 0x78(%rsp), %r14
movq 0x68(%rsp), %r13
movq %rbp, %rax
shlq $0x4, %rax
movq 0x28(%rsp), %rcx
cmpb $0x0, (%rcx,%rax)
je 0xf644b
addq 0x28(%rsp), %rax
movq 0x8(%rax), %rbx
movq 0x70(%rsp), %r15
movq 0x30(%rsp), %r12
movq -0x8(%r15), %rcx
movq (%r15), %rsi
movl $0x0, (%rsp)
movq %r13, %rdi
movq %rbx, %rdx
movq %r14, %r8
movl $0xff7070a0, %r9d       # imm = 0xFF7070A0
callq 0xf3cb3
addq $0x10, %r15
decq %r12
jne 0xf6420
leaq 0x1(%rbp), %rax
cmpq 0x60(%rsp), %rbp
movq %rax, %rbp
jne 0xf63fb
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl (%rax), %ebp
addq $0x3, 0x48(%rsp)
movq 0x58(%rsp), %r14
addq $0x8, %r14
xorl %ebx, %ebx
movq 0x40(%rsp), %r12
movq 0x50(%rsp), %r15
movq 0x90(%rsp), %r13
cmpl $0xd, %ebp
setl %al
testb %bl, %al
jne 0xf64d0
movq -0x8(%r14), %rax
movq %rax, %r8
shrq $0x3f, %r8
addq %rax, %r8
sarq %r8
addq (%r14), %r8
movq 0x20(%rsp), %rax
cmpl $0x1, 0x18(%rax)
movl $0x5, %eax
sbbl $0x0, %eax
movl %eax, (%rsp)
movq %r12, %rdi
movq 0x68(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq 0x48(%rsp), %r9
callq 0xf677d
incq %rbx
addq $0x10, %r14
cmpq %rbx, 0x30(%rsp)
jne 0xf6486
cmpq $0x0, 0x60(%rsp)
js 0xf6558
addq $0x3, 0x38(%rsp)
movq 0x78(%rsp), %rax
leaq 0x2(%rax), %r14
movq 0x28(%rsp), %rbp
addq $0x8, %rbp
xorl %ebx, %ebx
cmpb $0x0, -0x8(%rbp)
je 0xf654a
movslq 0x4(%r15), %rax
addq %r14, %rax
movq %rax, %r9
shrq $0x3f, %r9
addq %rax, %r9
sarq %r9
addq (%rbp), %r9
xorl %eax, %eax
movq 0x20(%rsp), %rcx
cmpl $0x0, 0x18(%rcx)
setne %al
leal (%rax,%rax,2), %eax
movl %eax, (%rsp)
movq %r12, %rdi
movq 0x68(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq 0x38(%rsp), %r8
callq 0xf677d
addq 0x30(%rsp), %rbx
addq $0x10, %rbp
decq %r13
jne 0xf6500
movq 0x20(%rsp), %rbp
movq (%rbp), %rax
cmpq $0x0, 0x18(%rax)
movq 0x88(%rsp), %r14
movq 0x78(%rsp), %r13
jle 0xf66de
xorl %edx, %edx
movq 0x20(%rbp), %rcx
movslq (%rcx,%rdx,4), %rbx
cmpq $0xfffffff, %rbx        # imm = 0xFFFFFFF
je 0xf66cd
leaq (%rdx,%rdx,4), %rdi
shlq $0x3, %rdi
addq 0x20(%rax), %rdi
movq %rdx, 0x70(%rsp)
callq 0xf5982
movq 0x70(%rsp), %rdx
testl %eax, %eax
je 0xf66cd
movq %rbx, %rax
cqto
idivq 0x30(%rsp)
movq %rdx, %r14
movq %rax, %rbx
testq %rax, %rax
js 0xf65cf
cmpq 0x60(%rsp), %rbx
jle 0xf65e0
movq %r12, %rdi
leaq 0x532c7(%rip), %rsi     # 0x1498a0
xorl %eax, %eax
callq 0xea0a6
shlq $0x4, %r14
shlq $0x4, %rbx
movq 0x58(%rsp), %rax
movq 0x8(%rax,%r14), %rbp
movq 0x28(%rsp), %rax
movq 0x8(%rax,%rbx), %rax
movq %rax, 0x38(%rsp)
testl %r13d, %r13d
jle 0xf667c
movq 0x58(%rsp), %rax
movq (%rax,%r14), %rbx
movq $0x0, 0x48(%rsp)
testq %rbx, %rbx
movq 0x68(%rsp), %r15
jle 0xf6665
movq 0x38(%rsp), %rax
movq 0x48(%rsp), %r13
leaq (%rax,%r13), %r14
shrq %r13
xorl %r12d, %r12d
leaq (%r12,%rbp), %rsi
movl %r12d, %eax
shrl %eax
addl %r13d, %eax
xorl %ecx, %ecx
testb $0x1, %al
sete %cl
shll $0x4, %ecx
addl $0xb0, %ecx
movq %r15, %rdi
movq %r14, %rdx
callq 0xf2a4a
incq %r12
cmpq %r12, %rbx
jne 0xf6636
movq 0x48(%rsp), %rcx
incq %rcx
movq 0x78(%rsp), %r13
movq %rcx, 0x48(%rsp)
cmpq %r13, %rcx
jne 0xf6618
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movl $0x0, 0x10(%rsp)
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movl $0xff000000, (%rsp)     # imm = 0xFF000000
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rbx
movq %rbx, %rcx
movq %rbp, %r8
movq %rax, %rbp
movq 0x38(%rsp), %r9
callq 0xf5806
movq %rbx, %rdx
movq 0x40(%rsp), %r12
movq 0x88(%rsp), %r14
movq 0x50(%rsp), %r15
incq %rdx
movq (%rbp), %rax
cmpq 0x18(%rax), %rdx
jl 0xf657b
movq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl 0x84(%rsp), %edx
callq 0xf2917
movq 0x58(%rsp), %r14
jmp 0xf5cf4
leaq (%rax,%rax,2), %rax
jmp 0xf6198
cmpb $0x0, 0x10(%rcx)
jne 0xf5ebe
jmp 0xf5ea7