// File: /workspace/github_c_makefile_star2_O3/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, %r13
movl 0x4c(%rdi), %ebp
movl $0x804, %edi            # imm = 0x804
addq 0x90(%r13), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x3220
cmpw $0x0, 0x50(%r13)
je 0xc92b
xorl %eax, %eax
movq 0x90(%r13), %rcx
movb $0x1, 0x804(%rcx,%rax)
incq %rax
movzwl 0x50(%r13), %ecx
cmpq %rcx, %rax
jb 0xc90f
movq 0x80(%r13), %rax
cmpl $0x0, 0x10(%rax)
je 0xc946
movzwl 0x48(%r13), %ecx
movw %cx, (%rax)
movw $0x1, %cx
jmp 0xc948
xorl %ecx, %ecx
movw %cx, 0x2(%rax)
movq 0x88(%r13), %rax
movl 0x10(%rax), %ecx
testl %ecx, %ecx
je 0xc96d
addl $0x1ff, %ecx            # imm = 0x1FF
shrl $0x9, %ecx
movzwl 0x4a(%r13), %edx
movw %dx, (%rax)
jmp 0xc96f
xorl %ecx, %ecx
movw %cx, 0x2(%rax)
movzwl 0x32(%r13), %ecx
movq 0x90(%r13), %rax
testl %ecx, %ecx
je 0xc9b2
movzwl 0x30(%r13), %edx
movl %ecx, %esi
xorl %edi, %edi
leal (%rdx,%rdi), %r8d
movzwl %r8w, %r8d
movb $0x1, 0x804(%rax,%r8)
movq 0x90(%r13), %rax
movw %r8w, 0x4(%rax,%rdi,2)
incq %rdi
cmpq %rdi, %rsi
jne 0xc98c
movl %ecx, (%rax)
movl 0x58(%r13), %ecx
cmpl $0x2, %ecx
je 0xc9fd
cmpl $0x1, %ecx
jne 0xca1c
movq 0x98(%r13), %rcx
movl $0x2, (%rcx)
movslq 0x34(%r13), %rdx
movw %dx, 0x4(%rcx)
movzwl 0x38(%r13), %esi
movw %si, 0x6(%rcx)
movb $0x1, %cl
movb %cl, 0x804(%rax,%rdx)
movq 0x90(%r13), %rax
movslq 0x38(%r13), %rdx
movb %cl, 0x804(%rax,%rdx)
jmp 0xca2a
movq 0x98(%r13), %rcx
movl $0x1, (%rcx)
movslq 0x34(%r13), %rdx
movw %dx, 0x4(%rcx)
movb $0x1, 0x804(%rax,%rdx)
jmp 0xca2a
leaq 0x987a(%rip), %rdi      # 0x1629d
xorl %eax, %eax
callq 0xa2d7
movl 0xa8(%r13), %eax
movl %eax, %ecx
addl $0x1b, %ecx
movslq %ecx, %rcx
imulq $-0x6db6db6d, %rcx, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %ecx, %eax
addl $0x1b, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x4, %eax
addl %ecx, %eax
movzwl 0x2e(%r13), %ecx
cmpl %ecx, %eax
cmovbel %ecx, %eax
movq 0xa0(%r13), %rcx
movl %eax, (%rcx)
testl %eax, %eax
je 0xcab2
movzwl 0x2c(%r13), %ecx
movl %eax, %esi
xorl %edx, %edx
movzwl 0x2e(%r13), %edi
cmpq %rdi, %rdx
jae 0xcab4
leaq (%rcx,%rdx), %rdi
movq 0x90(%r13), %r8
movzwl %di, %edi
movb $0x1, 0x804(%r8,%rdi)
movq 0xa0(%r13), %r8
movw %di, 0x4(%r8,%rdx,2)
incq %rdx
cmpq %rdx, %rsi
jne 0xca73
movzwl 0x50(%r13), %eax
movl %eax, %ecx
jmp 0xcaf2
xorl %edx, %edx
movzwl 0x50(%r13), %ecx
cmpl %eax, %edx
jae 0xcaf0
movl %edx, %edx
movl %eax, %eax
movq 0x90(%r13), %rsi
movzwl %cx, %edi
movb $0x1, 0x804(%rsi,%rdi)
incl %ecx
movq 0xa0(%r13), %rsi
movw %di, 0x4(%rsi,%rdx,2)
incq %rdx
cmpq %rdx, %rax
jne 0xcac1
movzwl 0x50(%r13), %eax
jmp 0xcaf2
movl %ecx, %eax
cmpw %ax, %cx
cmoval %ecx, %eax
movl 0xa8(%r13), %edx
testl %edx, %edx
jle 0xcbad
xorl %ecx, %ecx
movl $0x1fd, %esi            # imm = 0x1FD
movl $0x80808081, %edi       # imm = 0x80808081
movq 0xb0(%r13,%rcx,8), %r14
movl 0x884(%r14), %r8d
addl %esi, %r8d
movq %r8, %r15
imulq %rdi, %r15
shrq $0x28, %r15
cmpl $0x1fe, %r8d            # imm = 0x1FE
jb 0xcb93
movl %r15d, %r9d
movzwl %ax, %r10d
xorl %r8d, %r8d
cmpq $0x800, %r8             # imm = 0x800
je 0xcbf8
leaq (%r10,%r8), %r11
movzwl %r11w, %ebx
movl 0x4c(%r13), %edx
cmpl %ebx, %edx
jbe 0xcc21
movq 0x90(%r13), %rdx
movzwl %r11w, %r11d
movb $0x1, 0x804(%rdx,%r11)
movw %r11w, 0x4(%r14,%r8,2)
incq %r8
cmpq %r8, %r9
jne 0xcb43
movl 0xa8(%r13), %edx
addl %eax, %r8d
movl %r8d, %eax
movw %r15w, 0x880(%r14)
movl %r15d, (%r14)
incq %rcx
movslq %edx, %r8
cmpq %r8, %rcx
jl 0xcb13
movzwl %ax, %eax
movl 0x4c(%r13), %ecx
cmpl %eax, %ecx
jbe 0xcc3f
shll $0x9, %ebp
movl 0x8(%r13), %edx
cmpl %edx, %ebp
jbe 0xcc5a
leaq 0x901b(%rip), %rsi      # 0x15bed
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movl $0x200, %r8d            # imm = 0x200
movl %ebp, %r9d
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9f73
leaq 0x808(%r14), %rdx
leaq 0x858(%r14), %rcx
leaq 0x96ab(%rip), %rsi      # 0x162b8
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movl $0x800, %r8d            # imm = 0x800
xorl %eax, %eax
callq 0x9f73
jmp 0xcc34
leaq 0x96bf(%rip), %rsi      # 0x162e7
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
xorl %eax, %eax
callq 0x9f73
movw %r15w, 0x880(%r14)
movl %r15d, (%r14)
leaq 0x115f2(%rip), %rax     # 0x1e238
movl (%rax), %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rdi
xorl %esi, %esi
callq 0x3220
movq 0x80(%r13), %rax
movzwl (%rax), %edi
shll $0x9, %edi
addq (%r13), %rdi
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x3340
movq 0x88(%r13), %rax
movzwl (%rax), %edi
shll $0x9, %edi
addq (%r13), %rdi
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x3340
movq 0x90(%r13), %rsi
movq %r13, %rdi
callq 0xe512
cmpl $0x0, 0x4c(%r13)
movq %r13, 0x38(%rsp)
je 0xcd93
xorl %r15d, %r15d
movq 0x38(%rsp), %rbx
movq %r13, %rcx
movzwl %r15w, %r13d
imull $0x8889, %r13d, %eax    # imm = 0x8889
shrl $0x19, %eax
imull $0xfffffc40, %eax, %r12d # imm = 0xFFFFFC40
movq 0x90(%rcx), %rcx
movzwl 0x4(%rcx,%rax,2), %r14d
addw %r15w, %r12w
jne 0xcd3e
movzwl %ax, %ecx
incl %ecx
movzwl %r14w, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0xe562
movq %rbx, %rdi
movl %ebp, %esi
movl $0x2, %edx
movl $0x3c, %ecx
callq 0xe562
movq 0x90(%rbx), %rax
movzwl 0x4(%rax), %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xe562
movq 0x90(%rbx), %rcx
cmpb $0x0, 0x804(%rcx,%r13)
movq 0x38(%rsp), %r13
je 0xcd82
movl %r12d, %eax
shrl $0x4, %eax
addb $0x4, %al
movzbl %al, %ebp
movzwl %r14w, %r14d
movq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0xe4d2
andb $0xf, %r12b
btsl %r12d, %eax
movzwl %ax, %ecx
movq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0xe562
incl %r15d
movzwl %r15w, %eax
cmpl %eax, 0x4c(%r13)
ja 0xccc6
movq 0x98(%r13), %rsi
movq %r13, %rdi
callq 0xe512
movl 0x58(%r13), %eax
cmpl $0x2, %eax
je 0xceaf
cmpl $0x1, %eax
jne 0xd008
movq 0x98(%r13), %rax
cmpl $0x2, (%rax)
jne 0xd33d
movzwl 0x54(%r13), %ecx
movzwl 0x4(%rax), %ebp
movq %r13, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0xe562
movq 0x90(%r13), %rax
movzwl 0x4(%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xe562
movq 0x90(%r13), %rax
movslq (%rax), %r14
cmpq $0xfb, %r14
jg 0xd37b
testl %r14d, %r14d
jle 0xce3f
xorl %r15d, %r15d
leal 0x3(%r15), %eax
movq 0x90(%r13), %rcx
movzwl 0x4(%rcx,%r15,2), %ecx
movzbl %al, %edx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
incq %r15
cmpq %r15, %r14
jne 0xce19
addb $0x3, %r14b
movzbl %r14b, %edx
movq %r13, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xe562
movq 0x98(%r13), %rax
movzwl 0x6(%rax), %ebp
movq %r13, %rdi
movl %ebp, %esi
movl $0x1, %edx
movl $0x101, %ecx            # imm = 0x101
callq 0xe562
movq 0xa0(%r13), %rax
movzwl 0x4(%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0x3, %edx
movl $0x9, %ecx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0x4, %edx
jmp 0xcfff
movq 0x98(%r13), %rax
cmpl $0x1, (%rax)
jne 0xd35c
movzwl 0x4(%rax), %ebp
movq 0xa0(%r13), %rax
movzwl 0x4(%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0xe562
movq 0xa0(%r13), %rax
movzwl (%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xe562
movq 0x90(%r13), %rax
movzwl 0x4(%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xe562
movq 0x90(%r13), %rax
movzwl (%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x4, %edx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0x5, %edx
movl %ebp, %ecx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0x6, %edx
xorl %ecx, %ecx
callq 0xe562
movzwl 0x4c(%r13), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x7, %edx
callq 0xe562
movzwl 0x50(%r13), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x8, %edx
callq 0xe562
movzwl 0x54(%r13), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0x9, %edx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0xe562
movq 0x88(%r13), %rax
movzwl (%rax), %ecx
movq %r13, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0xc, %edx
xorl %ecx, %ecx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0xd, %edx
xorl %ecx, %ecx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0xe, %edx
xorl %ecx, %ecx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0xf, %edx
xorl %ecx, %ecx
callq 0xe562
movq %r13, %rdi
movl %ebp, %esi
movl $0x10, %edx
xorl %ecx, %ecx
callq 0xe562
jmp 0xd016
leaq 0x928e(%rip), %rdi      # 0x1629d
xorl %eax, %eax
callq 0xa2d7
movq 0xa0(%r13), %rsi
movq %r13, %rdi
callq 0xe512
cmpl $0x0, 0xa8(%r13)
jle 0xd2d9
xorl %ecx, %ecx
leaq 0x60(%rsp), %r12
xorl %ebx, %ebx
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, %rbp # imm = 0x24924925
shrq $0x20, %rbp
addw 0x2c(%r13), %bp
movq %rdx, 0x50(%rsp)
movq 0xb0(%r13,%rdx,8), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0xe512
leaq 0x808(%r15), %rsi
movq %rsi, 0x48(%rsp)
movl $0x3, %edx
movq %r12, %rdi
callq 0x30a0
movb $0x0, 0x63(%rsp)
movq %rbx, 0x58(%rsp)
addb %bl, %r14b
leal 0x1(%r14), %ebx
movq %r12, %rdi
callq 0xa9ec
movzwl %bp, %ebp
movzbl %bl, %edx
movzwl %ax, %ecx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
movq 0x48(%rsp), %rdi
callq 0x3190
cmpq $0x3, %rax
ja 0xd0e0
movb $0x0, 0x60(%rsp)
jmp 0xd0f4
leaq 0x80b(%r15), %rsi
movl $0x3, %edx
movq %r12, %rdi
callq 0x30a0
movb $0x0, 0x63(%rsp)
leal 0x2(%r14), %ebx
movq %r12, %rdi
callq 0xa9ec
movzbl %bl, %edx
movzwl %ax, %ecx
movq 0x38(%rsp), %r13
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
leal 0x3(%r14), %ebx
leaq 0x858(%r15), %rdi
callq 0xa9ec
movzbl %bl, %edx
movzwl %ax, %ecx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
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 0xacf9
movzbl %bl, %edx
movzwl %ax, %ecx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
leal 0x5(%r14), %eax
movzbl %al, %edx
movq %r13, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xe562
leal 0x6(%r14), %eax
movzwl 0x4(%r15), %ecx
movzbl %al, %edx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
leal 0x7(%r14), %eax
movzwl (%r15), %ecx
movzbl %al, %edx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
movl (%r15), %eax
decl %eax
movzwl 0x4(%r15,%rax,2), %ecx
leal 0x8(%r14), %eax
movzbl %al, %edx
movq %r13, %rdi
movl %ebp, %esi
callq 0xe562
addb $0x9, %r14b
movzbl %r14b, %edx
movq %r13, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xe562
movq 0x50(%rsp), %rdx
incq %rdx
movslq 0xa8(%r13), %rax
movq 0x58(%rsp), %rbx
addb $0x9, %bl
movq 0x40(%rsp), %rcx
incl %ecx
cmpq %rax, %rdx
jl 0xd03e
testl %eax, %eax
jle 0xd2d9
xorl %edx, %edx
movq 0x38(%rsp), %rcx
movq %rdx, 0x40(%rsp)
movq 0xb0(%rcx,%rdx,8), %r12
movl 0x884(%r12), %r13d
cmpl $0x0, (%r12)
je 0xd2b7
movq 0x888(%r12), %r14
xorl %ebp, %ebp
testl %r13d, %r13d
je 0xd2e0
movzwl 0x4(%r12,%rbp,2), %eax
movq 0x38(%rsp), %rcx
movq (%rcx), %rcx
shll $0x9, %eax
leaq (%rcx,%rax), %rdi
addq $0x2, %rdi
movl $0x1fe, %eax            # imm = 0x1FE
cmpl %eax, %r13d
movl $0x1fe, %ebx            # imm = 0x1FE
cmovll %r13d, %ebx
movslq %ebx, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x3340
addq %r15, %r14
movl 0x884(%r12), %eax
addq 0x888(%r12), %rax
cmpq %rax, %r14
ja 0xd2ff
subl %ebx, %r13d
incq %rbp
movl (%r12), %eax
cmpq %rax, %rbp
jb 0xd24f
testl %r13d, %r13d
jne 0xd31e
movq 0x40(%rsp), %rdx
incq %rdx
movq 0x38(%rsp), %rcx
movslq 0xa8(%rcx), %rax
cmpq %rax, %rdx
jl 0xd229
xorl %eax, %eax
jmp 0xcc48
leaq 0x910c(%rip), %rdi      # 0x163f3
leaq 0x889b(%rip), %rsi      # 0x15b89
leaq 0x910a(%rip), %rcx      # 0x163ff
movl $0x38a, %edx            # imm = 0x38A
callq 0x3200
leaq 0x9133(%rip), %rdi      # 0x16439
leaq 0x887c(%rip), %rsi      # 0x15b89
leaq 0x90eb(%rip), %rcx      # 0x163ff
movl $0x395, %edx            # imm = 0x395
callq 0x3200
leaq 0x9132(%rip), %rdi      # 0x16457
leaq 0x885d(%rip), %rsi      # 0x15b89
leaq 0x90cc(%rip), %rcx      # 0x163ff
movl $0x397, %edx            # imm = 0x397
callq 0x3200
leaq 0x9040(%rip), %rdi      # 0x16384
leaq 0x883e(%rip), %rsi      # 0x15b89
leaq 0x9053(%rip), %rcx      # 0x163a5
movl $0x32d, %edx            # imm = 0x32D
callq 0x3200
leaq 0x906f(%rip), %rdi      # 0x163d2
leaq 0x881f(%rip), %rsi      # 0x15b89
leaq 0x9034(%rip), %rcx      # 0x163a5
movl $0x342, %edx            # imm = 0x342
callq 0x3200
leaq 0x9048(%rip), %rdi      # 0x163ca
leaq 0x8800(%rip), %rsi      # 0x15b89
leaq 0x9015(%rip), %rcx      # 0x163a5
movl $0x334, %edx            # imm = 0x334
callq 0x3200