// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/rt11.c
// Function: rt11_filesystem_render
int rt11_filesystem_render(rt11_filesystem_t *_this) {

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

	if (rt11_filesystem_layout(_this))
		return error_code; // oversized

	if (_this->bootblock->data_size)
		stream_render(_this, _this->bootblock);
#ifdef DEFAULTBOOTLOADER
	else
	// volume not bootable
	stream_render(_this, _this->nobootblock);
#endif
	if (_this->monitor->data_size)
		stream_render(_this, _this->monitor);
	render_homeblock(_this);
	if (render_directory(_this))
		return error_code;
	render_file_data(_this);

	// modify DD[X].SYS
	rt11_filesystem_patch(_this);

	return ERROR_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq (%rdi), %rdi
movl 0x8(%r15), %edx
xorl %esi, %esi
callq 0x3220
movq 0x78(%r15), %rax
movl 0x10(%rax), %edx
testl %edx, %edx
je 0xf207
movw $0x0, (%rax)
cmpl $0x200, %edx            # imm = 0x200
jne 0xf244
movq 0x80(%r15), %rax
movl 0x10(%rax), %edx
testl %edx, %edx
je 0xf22b
movw $0x2, (%rax)
cmpl $0x801, %edx            # imm = 0x801
jb 0xf22b
leaq 0x7910(%rip), %rsi      # 0x16b39
jmp 0xf24b
movq %r15, %rdi
xorl %esi, %esi
callq 0xfc22
testl %eax, %eax
je 0xf26d
leaq 0xeff8(%rip), %rax      # 0x1e238
movl (%rax), %eax
jmp 0xf257
leaq 0x78c6(%rip), %rsi      # 0x16b11
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x9f73
testl %eax, %eax
je 0xf31f
leaq 0xefd2(%rip), %rax      # 0x1e238
movl (%rax), %eax
jmp 0xf681
movzwl 0x34(%r15), %eax
movzwl 0x64(%r15), %ecx
leal (%rax,%rcx,2), %edx
movw %dx, 0x1fd4(%r15)
movslq 0x8c(%r15), %rax
testq %rax, %rax
jle 0xf317
xorl %ecx, %ecx
movl $0x1ff, %esi            # imm = 0x1FF
movl $0x201, %edi            # imm = 0x201
movl %edx, %r8d
movq 0x90(%r15,%rcx,8), %r9
movw %dx, 0x7a(%r9)
movq 0x88(%r9), %r10
testq %r10, %r10
je 0xf2d4
movw %dx, (%r10)
movl $0x2, 0x4(%r10)
movl 0x10(%r10), %r8d
addl %edi, %r8d
shrl $0x9, %r8d
addl %edx, %r8d
movq 0x80(%r9), %r10
testq %r10, %r10
je 0xf2f2
movw %r8w, (%r10)
movl 0x10(%r10), %r10d
addl %esi, %r10d
shrl $0x9, %r10d
addl %r10d, %r8d
movzwl %dx, %edx
movl %r8d, %r10d
subl %edx, %r10d
movzwl 0x7c(%r9), %edx
cmpl %edx, %r10d
jne 0xf690
incq %rcx
movl %r8d, %edx
cmpq %rcx, %rax
jne 0xf2a1
movl %r8d, %edx
movw %dx, 0x1fd6(%r15)
movq 0x78(%r15), %rax
movl 0x10(%rax), %edx
testq %rdx, %rdx
je 0xf343
movzwl (%rax), %ecx
shll $0x9, %ecx
addq (%r15), %rcx
movl 0x4(%rax), %edi
addq %rcx, %rdi
movq 0x8(%rax), %rsi
callq 0x3340
movq 0x80(%r15), %rax
movl 0x10(%rax), %edx
testq %rdx, %rdx
je 0xf36a
movzwl (%rax), %ecx
shll $0x9, %ecx
addq (%r15), %rcx
movl 0x4(%rax), %edi
addq %rcx, %rdi
movq 0x8(%rax), %rsi
callq 0x3340
movl $0x200, %eax            # imm = 0x200
movq (%r15), %rdi
addq %rax, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x3220
cmpl $0x201, 0x8(%r15)       # imm = 0x201
jbe 0xf6af
movq (%r15), %rax
xorl %ecx, %ecx
movb %cl, 0x200(%rax)
movq (%r15), %rax
movb %cl, 0x201(%rax)
cmpl $0x203, 0x8(%r15)       # imm = 0x203
jbe 0xf6af
movq (%r15), %rax
movb $0x0, 0x202(%rax)
movq (%r15), %rax
movb $-0x10, 0x203(%rax)
cmpl $0x205, 0x8(%r15)       # imm = 0x205
jbe 0xf6af
movq (%r15), %rax
movb $-0x1, 0x204(%rax)
movq (%r15), %rax
movb $0xf, 0x205(%rax)
cmpl $0x3d3, 0x8(%r15)       # imm = 0x3D3
jbe 0xf6af
movl 0x30(%r15), %eax
movq (%r15), %rcx
movb %al, 0x3d2(%rcx)
movq (%r15), %rcx
movb %ah, 0x3d3(%rcx)
cmpl $0x3d5, 0x8(%r15)       # imm = 0x3D5
jbe 0xf6af
movzwl 0x34(%r15), %eax
movq (%r15), %rcx
movb %al, 0x3d4(%rcx)
movq (%r15), %rcx
movb %ah, 0x3d5(%rcx)
leaq 0x36(%r15), %rdi
callq 0xa9ec
cmpl $0x3d7, 0x8(%r15)       # imm = 0x3D7
jbe 0xf6af
movq (%r15), %rcx
movb %al, 0x3d6(%rcx)
movq (%r15), %rcx
movb %ah, 0x3d7(%rcx)
movl $0x3d8, %r14d           # imm = 0x3D8
addq (%r15), %r14
leaq 0x3a(%r15), %rdi
movl $0xc, %esi
movl $0x20, %edx
callq 0xa73a
movq %r14, %rdi
movq %rax, %rsi
callq 0x30c0
movl $0x3e4, %r14d           # imm = 0x3E4
addq (%r15), %r14
leaq 0x47(%r15), %rdi
movl $0xc, %esi
movl $0x20, %edx
callq 0xa73a
movq %r14, %rdi
movq %rax, %rsi
callq 0x30c0
movl $0x3f0, %r14d           # imm = 0x3F0
addq (%r15), %r14
leaq 0x54(%r15), %rdi
movl $0xc, %esi
movl $0x20, %edx
callq 0xa73a
movq %r14, %rdi
movq %rax, %rsi
callq 0x30c0
xorl %ecx, %ecx
xorl %ebx, %ebx
movq %r15, %rdi
movl %ebx, %esi
movl %ecx, %ebp
callq 0x1073f
movl %ebp, %ecx
movzwl %ax, %eax
addl %eax, %ecx
leal 0x2(%rbx), %eax
cmpl $0x1fc, %ebx            # imm = 0x1FC
movl %eax, %ebx
jb 0xf4d2
movw %cx, 0x62(%r15)
cmpl $0x3ff, 0x8(%r15)       # imm = 0x3FF
jbe 0xf6af
movq (%r15), %rax
movb %cl, 0x3fe(%rax)
movq (%r15), %rax
movb %ch, 0x3ff(%rax)
movzwl 0x68(%r15), %ecx
addl $0xe, %ecx
movl $0x3f6, %eax            # imm = 0x3F6
xorl %edx, %edx
divl %ecx
movl %eax, %ebp
addl $-0x3, %ebp
movl 0x8c(%r15), %eax
testl %eax, %eax
jle 0xf565
xorl %r14d, %r14d
movq 0x90(%r15,%r14,8), %rsi
movl %r14d, %eax
cltd
idivl %ebp
movl %edx, %ecx
leal 0x1(%rax), %edx
movq %r15, %rdi
callq 0x1080a
incq %r14
movslq 0x8c(%r15), %rax
cmpq %rax, %r14
jl 0xf53b
cltd
idivl %ebp
movl %edx, %ecx
leal 0x1(%rax), %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1080a
cmpl $0x0, 0x8c(%r15)
jle 0xf657
movl $0x201, %ebp            # imm = 0x201
xorl %r12d, %r12d
movq 0x90(%r15,%r12,8), %r13
movq 0x88(%r13), %rax
testq %rax, %rax
je 0xf61d
movl 0x10(%rax), %r14d
addl %ebp, %r14d
movl %r14d, %ebx
shrl $0x9, %ebx
movzwl %bx, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0xf5d6
leaq 0x2(%r13), %rsi
leaq 0x52(%r13), %rdx
leaq 0x76a0(%rip), %rdi      # 0x16c68
xorl %eax, %eax
callq 0xa2d7
movq 0x88(%r13), %rax
movq (%r15), %rcx
movzwl (%rax), %eax
shll $0x9, %eax
movb %bl, (%rcx,%rax)
shrl $0x11, %r14d
movq (%r15), %rax
movq 0x88(%r13), %rcx
movzwl (%rcx), %ecx
shll $0x9, %ecx
movb %r14b, 0x1(%rax,%rcx)
movq 0x88(%r13), %rax
movzwl (%rax), %ecx
shll $0x9, %ecx
addq (%r15), %rcx
movl 0x4(%rax), %edi
addq %rcx, %rdi
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x3340
movq 0x80(%r13), %rax
testq %rax, %rax
je 0xf644
movzwl (%rax), %ecx
shll $0x9, %ecx
addq (%r15), %rcx
movl 0x4(%rax), %edi
addq %rcx, %rdi
movq 0x8(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x3340
incq %r12
movslq 0x8c(%r15), %rax
cmpq %rax, %r12
jl 0xf58d
movzwl 0x6c(%r15), %edx
leaq 0x720c(%rip), %rsi      # 0x1686f
movq %r15, %rdi
callq 0xf6ce
movzwl 0x6c(%r15), %edx
leaq 0x71ff(%rip), %rsi      # 0x16876
movq %r15, %rdi
callq 0xf6ce
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x74c8(%rip), %rdi      # 0x16b5f
leaq 0x70e2(%rip), %rsi      # 0x16780
leaq 0x74ed(%rip), %rcx      # 0x16b92
movl $0x305, %edx            # imm = 0x305
callq 0x3200
leaq 0x6c5f(%rip), %rdi      # 0x16315
leaq 0x70c3(%rip), %rsi      # 0x16780
leaq 0x74fe(%rip), %rcx      # 0x16bc2
movl $0x79, %edx
callq 0x3200