// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_render
int xxdp_filesystem_render(xxdp_filesystem_t *_this) {
	int file_idx;
	unsigned needed_size = (int) _this->blockcount * XXDP_BLOCKSIZE;

	// calc blocklists and sizes
	if (xxdp_filesystem_layout(_this))
		return error_code; // overflow

	if (needed_size > _this->image_size)
		// more bytes needed than image provides. Expand?
		return error_set(ERROR_FILESYSTEM_OVERFLOW,
				"Image only %d bytes large, filesystem needs %d *%d = %d.", _this->image_size,
				_this->blockcount, XXDP_BLOCKSIZE, needed_size);

	// format media, all 0's
	memset(_this->image_data, 0, _this->image_size);

	render_multiblock(_this, _this->bootblock);
	render_multiblock(_this, _this->monitor);

	render_bitmap(_this);
	render_mfd(_this);
	render_ufd(_this);

	// read data for all user files
	for (file_idx = 0; file_idx < _this->file_count; file_idx++)
		render_file_data(_this, _this->file[file_idx]);
	return ERROR_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movl 0x4c(%rdi), %eax
movl %eax, 0x48(%rsp)
movl $0x804, %edi            # imm = 0x804
addq 0x90(%rbx), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x3230
movq %rbx, %r10
cmpw $0x0, 0x50(%rbx)
je 0xc9d8
xorl %eax, %eax
movq 0x90(%r10), %rcx
movb $0x1, 0x804(%rcx,%rax)
incq %rax
movzwl 0x50(%r10), %ecx
cmpq %rcx, %rax
jb 0xc9bc
movq 0x80(%r10), %rax
cmpl $0x0, 0x10(%rax)
je 0xc9f5
movw $0x1, 0x2(%rax)
movzwl 0x48(%r10), %ecx
movw %cx, (%rax)
jmp 0xc9fb
movw $0x0, 0x2(%rax)
movq 0x88(%r10), %rax
movl 0x10(%rax), %ecx
testl %ecx, %ecx
je 0xca1c
addl $0x1ff, %ecx            # imm = 0x1FF
shrl $0x9, %ecx
movzwl 0x4a(%r10), %edx
movw %dx, (%rax)
jmp 0xca1e
xorl %ecx, %ecx
movw %cx, 0x2(%rax)
movzwl 0x32(%r10), %eax
testl %eax, %eax
je 0xca5f
movzwl 0x30(%r10), %ecx
movl %eax, %edx
xorl %esi, %esi
leal (%rcx,%rsi), %edi
movq 0x90(%r10), %r8
movzwl %di, %edi
movb $0x1, 0x804(%r8,%rdi)
movq 0x90(%r10), %r8
movw %di, 0x4(%r8,%rsi,2)
incq %rsi
cmpq %rsi, %rdx
jne 0xca34
movq 0x90(%r10), %rcx
movl %eax, (%rcx)
movl 0x58(%r10), %eax
cmpl $0x2, %eax
movq %r10, 0x38(%rsp)
je 0xcab6
cmpl $0x1, %eax
jne 0xcad5
movq 0x98(%r10), %rax
movl $0x2, (%rax)
movslq 0x34(%r10), %rdx
movw %dx, 0x4(%rax)
movzwl 0x38(%r10), %esi
movw %si, 0x6(%rax)
movb $0x1, %al
movb %al, 0x804(%rcx,%rdx)
movq 0x90(%r10), %rcx
movslq 0x38(%r10), %rdx
movb %al, 0x804(%rcx,%rdx)
jmp 0xcae8
movq 0x98(%r10), %rax
movl $0x1, (%rax)
movslq 0x34(%r10), %rdx
movw %dx, 0x4(%rax)
movb $0x1, 0x804(%rcx,%rdx)
jmp 0xcae8
leaq 0x9729(%rip), %rdi      # 0x16205
xorl %eax, %eax
callq 0xa2ef
movq 0x38(%rsp), %r10
movl 0xa8(%r10), %eax
movl %eax, %ecx
addl $0x1b, %ecx
movslq %ecx, %rcx
imulq $-0x6db6db6d, %rcx, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
addl $0x1b, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
sarl $0x4, %ecx
addl %eax, %ecx
movzwl 0x2e(%r10), %eax
cmpl %eax, %ecx
cmovbel %eax, %ecx
movq 0xa0(%r10), %rax
movl %ecx, (%rax)
movl %ecx, %eax
testl %ecx, %ecx
je 0xcb6b
movzwl 0x2c(%r10), %esi
xorl %edx, %edx
movzwl 0x2e(%r10), %edi
cmpq %rdi, %rdx
jae 0xcb6d
leaq (%rsi,%rdx), %rdi
movq 0x90(%r10), %r8
movzwl %di, %edi
movb $0x1, 0x804(%r8,%rdi)
movq 0xa0(%r10), %r8
movw %di, 0x4(%r8,%rdx,2)
incq %rdx
cmpq %rdx, %rax
jne 0xcb31
movl %ecx, %edx
jmp 0xcb6d
xorl %edx, %edx
movzwl 0x50(%r10), %ebp
cmpl %ecx, %edx
jae 0xcba0
movl %edx, %ecx
movq 0x90(%r10), %rdx
movzwl %bp, %esi
movb $0x1, 0x804(%rdx,%rsi)
incl %ebp
movq 0xa0(%r10), %rdx
movw %si, 0x4(%rdx,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0xcb78
movl 0x50(%r10), %eax
cmpw %ax, %bp
cmovbel %eax, %ebp
cmpl $0x0, 0xa8(%r10)
jle 0xccb5
xorl %ecx, %ecx
movq %rcx, 0x50(%rsp)
movq 0xb0(%r10,%rcx,8), %r14
movl 0x884(%r14), %eax
movl $0x1fd, %ecx            # imm = 0x1FD
addl %ecx, %eax
movq %rax, %rdx
movl $0x80808081, %ecx       # imm = 0x80808081
imulq %rcx, %rdx
shrq $0x28, %rdx
movb $0x1, %cl
cmpl $0x1fe, %eax            # imm = 0x1FE
movq %rdx, 0x40(%rsp)
jb 0xcc89
leaq 0x808(%r14), %r12
leaq 0x858(%r14), %r13
movl %edx, %r15d
xorl %ebx, %ebx
xorl %eax, %eax
cmpq $0x800, %rbx            # imm = 0x800
jb 0xcc36
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
leaq 0x95ff(%rip), %rsi      # 0x16220
movq %r12, %rdx
movq %r13, %rcx
movl $0x800, %r8d            # imm = 0x800
xorl %eax, %eax
callq 0x9f8f
jmp 0xcc6e
movzwl %bp, %ecx
movl 0x4c(%r10), %edx
cmpl %ecx, %edx
jbe 0xcc5b
movq 0x90(%r10), %rdx
movb $0x1, 0x804(%rdx,%rcx)
leal 0x1(%rcx), %ebp
movw %cx, 0x4(%r14,%rbx,2)
jmp 0xcc78
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
leaq 0x95e8(%rip), %rsi      # 0x1624f
xorl %eax, %eax
callq 0x9f8f
movq 0x38(%rsp), %r10
movl $0x1, %eax
incq %rbx
testl %eax, %eax
sete %cl
cmpq %r15, %rbx
jae 0xcc89
testl %eax, %eax
je 0xcc0c
movq 0x40(%rsp), %rax
movw %ax, 0x880(%r14)
movl %eax, (%r14)
testb %cl, %cl
je 0xccfe
movq 0x50(%rsp), %rcx
incq %rcx
movslq 0xa8(%r10), %rax
cmpq %rax, %rcx
jl 0xcbba
movzwl %bp, %eax
cmpl %eax, 0x4c(%r10)
jbe 0xccfe
movl 0x48(%rsp), %r9d
shll $0x9, %r9d
movl 0x8(%r10), %edx
cmpl %edx, %r9d
jbe 0xcd0c
movl 0x4c(%r10), %ecx
leaq 0x8e7a(%rip), %rsi      # 0x15b55
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movl $0x200, %r8d            # imm = 0x200
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9f8f
leaq 0x11543(%rip), %rax     # 0x1e248
movl (%rax), %eax
jmp 0xd3b7
movq (%r10), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x3230
movq 0x38(%rsp), %rax
movq 0x80(%rax), %rax
movzwl (%rax), %edi
shll $0x9, %edi
movq 0x38(%rsp), %rcx
addq (%rcx), %rdi
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x3350
movq 0x38(%rsp), %rax
movq 0x88(%rax), %rax
movzwl (%rax), %edi
shll $0x9, %edi
movq 0x38(%rsp), %rcx
addq (%rcx), %rdi
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x3350
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rsi
movq 0x38(%rsp), %rdi
callq 0xe596
movq 0x38(%rsp), %rdi
cmpl $0x0, 0x4c(%rdi)
je 0xce63
movw $0x1, %r12w
movl $0x88888889, %r13d      # imm = 0x88888889
movl %r15d, %eax
imulq %r13, %rax
shrq $0x29, %rax
movq 0x90(%rdi), %rcx
imull $0x3c0, %eax, %edx      # imm = 0x3C0
movzwl 0x4(%rcx,%rax,2), %ebp
subl %edx, %r15d
jne 0xce04
incl %eax
movzwl %ax, %ecx
movl %ebp, %esi
movl $0x1, %edx
callq 0xe5e3
movq 0x38(%rsp), %rdi
movl %ebp, %esi
movl $0x2, %edx
movl $0x3c, %ecx
callq 0xe5e3
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rax
movzwl 0x4(%rax), %ecx
movq 0x38(%rsp), %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xe5e3
movq 0x38(%rsp), %rdi
leal -0x1(%r12), %eax
movq 0x90(%rdi), %rcx
movzwl %ax, %eax
cmpb $0x0, 0x804(%rcx,%rax)
je 0xce52
movl %r15d, %eax
shrl $0x4, %eax
addb $0x4, %al
movzbl %al, %r14d
movl %ebp, %esi
movl %r14d, %edx
callq 0xe556
andb $0xf, %r15b
btsl %r15d, %eax
movzwl %ax, %ecx
movq 0x38(%rsp), %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe5e3
movq 0x38(%rsp), %rdi
movzwl %r12w, %r15d
incl %r12d
cmpl %r15d, 0x4c(%rdi)
ja 0xcd95
movq 0x98(%rdi), %rsi
callq 0xe596
movq 0x38(%rsp), %rbx
movl 0x58(%rbx), %eax
cmpl $0x2, %eax
je 0xcf8a
cmpl $0x1, %eax
jne 0xd0e0
movq 0x98(%rbx), %rax
cmpl $0x2, (%rax)
jne 0xd426
movzwl 0x54(%rbx), %ecx
movzwl 0x4(%rax), %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0xe5e3
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rax
movzwl 0x4(%rax), %ecx
movq 0x38(%rsp), %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xe5e3
movq 0x38(%rsp), %rdi
movq 0x90(%rdi), %rax
movslq (%rax), %rbx
cmpq $0xfb, %rbx
jg 0xd464
testl %ebx, %ebx
jle 0xcf1c
xorl %r14d, %r14d
leal 0x3(%r14), %eax
movq 0x90(%rdi), %rcx
movzwl 0x4(%rcx,%r14,2), %ecx
movzbl %al, %edx
movl %ebp, %esi
callq 0xe5e3
movq 0x38(%rsp), %rdi
incq %r14
cmpq %r14, %rbx
jne 0xcef4
addb $0x3, %bl
movzbl %bl, %edx
movl %ebp, %esi
xorl %ecx, %ecx
movq %rdi, %rbx
callq 0xe5e3
movq 0x98(%rbx), %rax
movzwl 0x6(%rax), %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
movl $0x101, %ecx            # imm = 0x101
callq 0xe5e3
movq 0xa0(%rbx), %rax
movzwl 0x4(%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0x3, %edx
movl $0x9, %ecx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0x4, %edx
jmp 0xd0d7
movq 0x98(%rbx), %rax
cmpl $0x1, (%rax)
jne 0xd445
movzwl 0x4(%rax), %ebp
movq 0xa0(%rbx), %rax
movzwl 0x4(%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0xe5e3
movq 0xa0(%rbx), %rax
movzwl (%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xe5e3
movq 0x90(%rbx), %rax
movzwl 0x4(%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xe5e3
movq 0x90(%rbx), %rax
movzwl (%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x4, %edx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0x5, %edx
movl %ebp, %ecx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0x6, %edx
xorl %ecx, %ecx
callq 0xe5e3
movzwl 0x4c(%rbx), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x7, %edx
callq 0xe5e3
movzwl 0x50(%rbx), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x8, %edx
callq 0xe5e3
movzwl 0x54(%rbx), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x9, %edx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0xe5e3
movq 0x88(%rbx), %rax
movzwl (%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0xc, %edx
xorl %ecx, %ecx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0xd, %edx
xorl %ecx, %ecx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0xe, %edx
xorl %ecx, %ecx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0xf, %edx
xorl %ecx, %ecx
callq 0xe5e3
movq %rbx, %rdi
movl %ebp, %esi
movl $0x10, %edx
xorl %ecx, %ecx
callq 0xe5e3
jmp 0xd0ee
leaq 0x911e(%rip), %rdi      # 0x16205
xorl %eax, %eax
callq 0xa2ef
movq 0xa0(%rbx), %rsi
movq %rbx, %rdi
callq 0xe596
cmpl $0x0, 0xa8(%rbx)
movq %rbx, %rdi
jle 0xd2ff
xorl %ecx, %ecx
leaq 0x60(%rsp), %r13
xorl %r12d, %r12d
xorl %edx, %edx
movq %rcx, 0x40(%rsp)
movl %ecx, %eax
shrl $0x2, %eax
imulq $0x24924925, %rax, %r14 # imm = 0x24924925
shrq $0x20, %r14
shlb $0x2, %r14b
movl %edx, %eax
shrl $0x2, %eax
imulq $0x24924925, %rax, %rbx # imm = 0x24924925
shrq $0x20, %rbx
addw 0x2c(%rdi), %bx
movq %rdx, 0x48(%rsp)
movq 0xb0(%rdi,%rdx,8), %r15
movq %r15, %rsi
callq 0xe596
leaq 0x808(%r15), %rsi
movq %rsi, 0x58(%rsp)
movl $0x3, %edx
movq %r13, %rdi
callq 0x30a0
movb $0x0, 0x63(%rsp)
movq %r12, 0x50(%rsp)
addb %r12b, %r14b
movq %r13, %r12
leal 0x1(%r14), %r13d
movq %r12, %rdi
callq 0xaa53
movzwl %bx, %ebp
movzbl %r13b, %edx
movzwl %ax, %ecx
movq 0x38(%rsp), %rdi
movl %ebp, %esi
callq 0xe5e3
movq 0x58(%rsp), %rdi
callq 0x31a0
cmpq $0x3, %rax
ja 0xd1bd
movb $0x0, 0x60(%rsp)
jmp 0xd1d1
leaq 0x80b(%r15), %rsi
movl $0x3, %edx
movq %r12, %rdi
callq 0x30a0
movq %r12, %r13
movb $0x0, 0x63(%rsp)
leal 0x2(%r14), %ebx
movq %r12, %rdi
callq 0xaa53
movzbl %bl, %edx
movzwl %ax, %ecx
movq 0x38(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
callq 0xe5e3
leal 0x3(%r14), %ebx
leaq 0x858(%r15), %rdi
callq 0xaa53
movzbl %bl, %edx
movzwl %ax, %ecx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe5e3
leal 0x4(%r14), %ebx
movq 0x8c0(%r15), %rax
movq %rax, 0x30(%rsp)
movups 0x890(%r15), %xmm0
movups 0x8a0(%r15), %xmm1
movups 0x8b0(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0xad5f
movzbl %bl, %edx
movzwl %ax, %ecx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe5e3
leal 0x5(%r14), %eax
movzbl %al, %edx
movq %r12, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xe5e3
leal 0x6(%r14), %eax
movzwl 0x4(%r15), %ecx
movzbl %al, %edx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe5e3
leal 0x7(%r14), %eax
movzwl (%r15), %ecx
movzbl %al, %edx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe5e3
movl (%r15), %eax
decl %eax
movzwl 0x4(%r15,%rax,2), %ecx
leal 0x8(%r14), %eax
movzbl %al, %edx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe5e3
addb $0x9, %r14b
movzbl %r14b, %edx
movq %r12, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xe5e3
movq %r12, %rdi
movq 0x48(%rsp), %rdx
incq %rdx
movslq 0xa8(%r12), %rax
movq 0x50(%rsp), %r12
addb $0x9, %r12b
movq 0x40(%rsp), %rcx
incl %ecx
cmpq %rax, %rdx
jl 0xd119
cmpl $0x0, 0xa8(%rdi)
jle 0xd3b5
xorl %ecx, %ecx
movq %rcx, 0x40(%rsp)
movq 0xb0(%rdi,%rcx,8), %r13
movl 0x884(%r13), %r12d
cmpl $0x0, (%r13)
je 0xd398
movq 0x888(%r13), %r14
xorl %ebx, %ebx
testl %r12d, %r12d
je 0xd3c9
movzwl 0x4(%r13,%rbx,2), %eax
movq (%rdi), %rcx
shll $0x9, %eax
leaq (%rcx,%rax), %rdi
addq $0x2, %rdi
movl $0x1fe, %eax            # imm = 0x1FE
cmpl %eax, %r12d
movl $0x1fe, %ebp            # imm = 0x1FE
cmovll %r12d, %ebp
movslq %ebp, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x3350
addq %r15, %r14
movl 0x884(%r13), %eax
addq 0x888(%r13), %rax
cmpq %rax, %r14
ja 0xd3e8
subl %ebp, %r12d
incq %rbx
movl (%r13), %eax
cmpq %rax, %rbx
movq 0x38(%rsp), %rdi
jb 0xd332
testl %r12d, %r12d
jne 0xd407
movq 0x40(%rsp), %rcx
incq %rcx
movslq 0xa8(%rdi), %rax
cmpq %rax, %rcx
jl 0xd30e
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8f8b(%rip), %rdi      # 0x1635b
leaq 0x871a(%rip), %rsi      # 0x15af1
leaq 0x8f89(%rip), %rcx      # 0x16367
movl $0x38a, %edx            # imm = 0x38A
callq 0x3210
leaq 0x8fb2(%rip), %rdi      # 0x163a1
leaq 0x86fb(%rip), %rsi      # 0x15af1
leaq 0x8f6a(%rip), %rcx      # 0x16367
movl $0x395, %edx            # imm = 0x395
callq 0x3210
leaq 0x8fb1(%rip), %rdi      # 0x163bf
leaq 0x86dc(%rip), %rsi      # 0x15af1
leaq 0x8f4b(%rip), %rcx      # 0x16367
movl $0x397, %edx            # imm = 0x397
callq 0x3210
leaq 0x8ebf(%rip), %rdi      # 0x162ec
leaq 0x86bd(%rip), %rsi      # 0x15af1
leaq 0x8ed2(%rip), %rcx      # 0x1630d
movl $0x32d, %edx            # imm = 0x32D
callq 0x3210
leaq 0x8eee(%rip), %rdi      # 0x1633a
leaq 0x869e(%rip), %rsi      # 0x15af1
leaq 0x8eb3(%rip), %rcx      # 0x1630d
movl $0x342, %edx            # imm = 0x342
callq 0x3210
leaq 0x8ec7(%rip), %rdi      # 0x16332
leaq 0x867f(%rip), %rsi      # 0x15af1
leaq 0x8e94(%rip), %rcx      # 0x1630d
movl $0x334, %edx            # imm = 0x334
callq 0x3210