// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/rt11.c
// Function: rt11_filesystem_file_get
rt11_file_t *rt11_filesystem_file_get(rt11_filesystem_t *_this, int fileidx) {
	rt11_file_t *result = NULL;
	static rt11_file_t buff[3]; // buffer for bootblock, monitor, volinfo
	if (fileidx == -3) {
		result = &buff[0];
		strcpy(result->filnam, RT11_VOLUMEINFO_FILNAM);
		strcpy(result->ext, RT11_VOLUMEINFO_EXT);
		result->fixed = 1; // can not be deleted on shared dir
		rt11_filesystem_render_volumeinfo(_this, result);
		memset(&result->date, 0, sizeof(result->date));
	} else if (fileidx == -2
			&& !is_memset(_this->monitor->data, 0, _this->monitor->data_size)) {
		result = &buff[1];
		strcpy(result->filnam, RT11_MONITOR_FILNAM);
		strcpy(result->ext, RT11_MONITOR_EXT);
		result->data = _this->monitor;
		memset(&result->date, 0, sizeof(result->date));
	} else if (fileidx == -1
			&& !is_memset(_this->bootblock->data, 0, _this->bootblock->data_size)) {
		result = &buff[2];
		strcpy(result->filnam, RT11_BOOTBLOCK_FILNAM);
		strcpy(result->ext, RT11_BOOTBLOCK_EXT);
		result->data = _this->bootblock;
		memset(&result->date, 0, sizeof(result->date));
	} else if (fileidx >= 0 && fileidx < _this->file_count) {
		result = _this->file[fileidx];
	} else
		result = NULL;
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movl %esi, %ebp
movq %rdi, %rbx
cmpl $-0x1, %esi
je 0x10441
cmpl $-0x2, %ebp
je 0x1041f
cmpl $-0x3, %ebp
jne 0x10457
movl $0x4d554c, 0x25c97(%rip) # imm = 0x4D554C
movl $0x4c4f5624, 0x25c8a(%rip) # imm = 0x4C4F5624
movl $0x464e49, 0x25cd0(%rip) # imm = 0x464E49
movl $0x1, 0x25d48(%rip)     # 0x35d94
xorl %edi, %edi
callq 0x3370
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
callq 0x3070
movl (%rax), %ecx
movq %rcx, 0x8(%rsp)
movl 0x4(%rax), %ecx
movq %rcx, 0x10(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x4(%rsp)
movl 0xc(%rax), %r12d
movl 0x10(%rax), %r13d
movl $0x76c, %ebp            # imm = 0x76C
addl 0x14(%rax), %ebp
movb $0x0, 0x25fd3(%rip)     # 0x36060
leaq 0x25fcc(%rip), %r14     # 0x36060
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x6c5b(%rip), %rsi      # 0x16cfe
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x25c10(%rip), %rdx     # 0x35cc2
leaq 0x25c59(%rip), %rcx     # 0x35d12
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
incl %r13d
leaq 0x6347(%rip), %rsi      # 0x1641c
movq %r15, %rdi
movl %ebp, %edx
movl %r13d, %ecx
movl %r12d, %r8d
movl 0x4(%rsp), %r9d
xorl %eax, %eax
pushq 0x8(%rsp)
pushq 0x18(%rsp)
callq 0x3540
addq $0x10, %rsp
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x30(%rbx), %edx
leaq 0x6c22(%rip), %rsi      # 0x16d2f
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x34(%rbx), %edx
leaq 0x6c19(%rip), %rsi      # 0x16d46
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
leaq 0x36(%rbx), %rdx
leaq 0x6c3a(%rip), %rsi      # 0x16d87
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
leaq 0x3a(%rbx), %rdx
leaq 0x6c2e(%rip), %rsi      # 0x16d9b
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
leaq 0x47(%rbx), %rdx
leaq 0x6c1d(%rip), %rsi      # 0x16daa
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
leaq 0x54(%rbx), %rdx
leaq 0x6c0d(%rip), %rsi      # 0x16dba
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x6c(%rbx), %ecx
leaq 0x6bfd(%rip), %rsi      # 0x16dc9
movq %r15, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x68(%rbx), %edx
leaq 0x6c0e(%rip), %rsi      # 0x16dff
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x68(%rbx), %ecx
addl $0xe, %ecx
movl $0x3f6, %eax            # imm = 0x3F6
xorl %edx, %edx
divl %ecx
leal -0x3(%rax), %edx
movzwl 0x64(%rbx), %ecx
imull %ecx, %edx
leaq 0x6c1f(%rip), %rsi      # 0x16e46
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x66(%rbx), %edx
leaq 0x6c58(%rip), %rsi      # 0x16e9f
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x1fd4(%rbx), %edx
leaq 0x6c70(%rip), %rsi      # 0x16eda
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
cmpl $0x0, 0x8c(%rbx)
jle 0x1038a
leaq 0x62fb(%rip), %r15      # 0x1658e
leaq 0x20(%rsp), %r12
xorl %r13d, %r13d
movq 0x90(%rbx,%r13,8), %rbp
leaq 0x2(%rbp), %rcx
leaq 0x52(%rbp), %r8
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r12, %rsi
callq 0x3520
movq 0x88(%rbp), %rax
testq %rax, %rax
je 0x10300
movl 0x10(%rax), %ecx
movzwl (%rax), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r12, %rdi
leaq 0x6c12(%rip), %rsi      # 0x16efc
movl %ecx, %edx
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r12, %rsi
callq 0x3520
jmp 0x1031f
movq %r14, %rdi
callq 0x31a0
movabsq $0x66657270206f4e20, %rcx # imm = 0x66657270206F4E20
movq %rcx, (%rax,%r14)
movl $0x2e7869, 0x8(%rax,%r14) # imm = 0x2E7869
movq 0x80(%rbp), %rax
testq %rax, %rax
je 0x10359
movl 0x10(%rax), %ecx
movzwl (%rax), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r12, %rdi
leaq 0x6260(%rip), %rsi      # 0x165a3
movl %ecx, %edx
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r12, %rsi
callq 0x3520
jmp 0x10377
movq %r14, %rdi
callq 0x31a0
movabsq $0x61746164206f4e20, %rcx # imm = 0x61746164206F4E20
movq %rcx, (%rax,%r14)
movw $0x2e, 0x8(%rax,%r14)
incq %r13
movslq 0x8c(%rbx), %rax
cmpq %rax, %r13
jl 0x1029b
movq %r14, %rdi
callq 0x31a0
movw $0xa, (%rax,%r14)
movw $0x0, 0x25c4e(%rip)     # 0x35ff0
xorps %xmm0, %xmm0
movups %xmm0, 0x25c48(%rip)    # 0x35ff4
movb $0x0, 0x25c51(%rip)     # 0x36004
movq %r14, 0x25c3e(%rip)     # 0x35ff8
movq %r14, %rdi
callq 0x31a0
movl %eax, 0x25c38(%rip)     # 0x36000
andl $-0x80, %eax
cmpl $0x14880, %eax          # imm = 0x14880
jae 0x10534
leaq 0x25c13(%rip), %rax     # 0x35ff0
movq %rax, 0x2595c(%rip)     # 0x35d40
leaq 0x258d5(%rip), %rax     # 0x35cc0
movb 0x88(%rbx), %cl
movb %cl, 0x25c5d(%rip)      # 0x36054
xorps %xmm0, %xmm0
movups %xmm0, 0x25957(%rip)    # 0x35d58
movups %xmm0, 0x25960(%rip)    # 0x35d68
movups %xmm0, 0x25969(%rip)    # 0x35d78
movq $0x0, 0x2596e(%rip) # 0x35d88
jmp 0x10522
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %esi, %esi
callq 0xa525
testl %eax, %eax
je 0x104cd
cmpl $-0x1, %ebp
jne 0x10457
movq 0x78(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %esi, %esi
callq 0xa525
testl %eax, %eax
je 0x10479
testl %ebp, %ebp
js 0x10472
cmpl %ebp, 0x8c(%rbx)
jle 0x10472
movl %ebp, %eax
movq 0x90(%rbx,%rax,8), %rax
jmp 0x10522
xorl %eax, %eax
jmp 0x10522
movw $0x54, 0x259f4(%rip)    # 0x35e76
movl $0x4f4f4224, 0x259e6(%rip) # imm = 0x4F4F4224
movl $0x4b4c42, 0x25a2c(%rip) # imm = 0x4B4C42
movq 0x78(%rbx), %rax
movq %rax, 0x25a4f(%rip)     # 0x35ef0
xorps %xmm0, %xmm0
movups %xmm0, 0x25a5d(%rip)    # 0x35f08
movups %xmm0, 0x25a66(%rip)    # 0x35f18
movups %xmm0, 0x25a6f(%rip)    # 0x35f28
movq $0x0, 0x25a74(%rip) # 0x35f38
leaq 0x259a5(%rip), %rax     # 0x35e70
jmp 0x10522
movw $0x49, 0x258c8(%rip)    # 0x35d9e
movl $0x4e4f4d24, 0x258ba(%rip) # imm = 0x4E4F4D24
movl $0x524f54, 0x25900(%rip) # imm = 0x524F54
movq 0x80(%rbx), %rax
movq %rax, 0x25920(%rip)     # 0x35e18
xorps %xmm0, %xmm0
movaps %xmm0, 0x2592e(%rip)    # 0x35e30
movaps %xmm0, 0x25937(%rip)    # 0x35e40
movaps %xmm0, 0x25940(%rip)    # 0x35e50
movq $0x0, 0x25945(%rip) # 0x35e60
leaq 0x25876(%rip), %rax     # 0x35d98
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6a07(%rip), %rdi      # 0x16f42
leaq 0x61a6(%rip), %rsi      # 0x166e8
leaq 0x6a27(%rip), %rcx      # 0x16f70
movl $0x468, %edx            # imm = 0x468
callq 0x3210