// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %rbx
cmpl $-0x1, %esi
je 0x10400
cmpl $-0x2, %esi
je 0x10386
cmpl $-0x3, %esi
jne 0x1046d
movl $0x4d554c, 0x25d20(%rip) # imm = 0x4D554C
movl $0x4c4f5624, 0x25d13(%rip) # imm = 0x4C4F5624
movl $0x464e49, 0x25d59(%rip) # imm = 0x464E49
movl $0x1, 0x25dd1(%rip)     # 0x35d84
xorl %edi, %edi
callq 0x3360
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, 0x2605c(%rip)     # 0x36050
leaq 0x26055(%rip), %r14     # 0x36050
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x6d8c(%rip), %rsi      # 0x16d96
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x25c99(%rip), %rdx     # 0x35cb2
leaq 0x25ce2(%rip), %rcx     # 0x35d02
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
incl %r13d
leaq 0x6478(%rip), %rsi      # 0x164b4
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 0x3530
addq $0x10, %rsp
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x30(%rbx), %edx
leaq 0x6d53(%rip), %rsi      # 0x16dc7
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x34(%rbx), %edx
leaq 0x6d4a(%rip), %rsi      # 0x16dde
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x36(%rbx), %rdx
leaq 0x6d6b(%rip), %rsi      # 0x16e1f
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x3a(%rbx), %rdx
leaq 0x6d5f(%rip), %rsi      # 0x16e33
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x47(%rbx), %rdx
leaq 0x6d4e(%rip), %rsi      # 0x16e42
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x54(%rbx), %rdx
leaq 0x6d3e(%rip), %rsi      # 0x16e52
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x6c(%rbx), %ecx
leaq 0x6d2e(%rip), %rsi      # 0x16e61
movq %r15, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x68(%rbx), %edx
leaq 0x6d3f(%rip), %rsi      # 0x16e97
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
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 0x6d50(%rip), %rsi      # 0x16ede
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x66(%rbx), %edx
leaq 0x6d89(%rip), %rsi      # 0x16f37
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x1fd4(%rbx), %edx
leaq 0x6da1(%rip), %rsi      # 0x16f72
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
cmpl $0x0, 0x8c(%rbx)
jle 0x102f1
leaq 0x642c(%rip), %r15      # 0x16626
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 0x3530
movq %r14, %rdi
movq %r12, %rsi
callq 0x3510
movq 0x88(%rbp), %rax
testq %rax, %rax
je 0x10267
movl 0x10(%rax), %ecx
movzwl (%rax), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r12, %rdi
leaq 0x6d43(%rip), %rsi      # 0x16f94
movl %ecx, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r12, %rsi
callq 0x3510
jmp 0x10286
movq %r14, %rdi
callq 0x3190
movabsq $0x66657270206f4e20, %rcx # imm = 0x66657270206F4E20
movq %rcx, (%rax,%r14)
movl $0x2e7869, 0x8(%rax,%r14) # imm = 0x2E7869
movq 0x80(%rbp), %rax
testq %rax, %rax
je 0x102c0
movl 0x10(%rax), %ecx
movzwl (%rax), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r12, %rdi
leaq 0x6391(%rip), %rsi      # 0x1663b
movl %ecx, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r12, %rsi
callq 0x3510
jmp 0x102de
movq %r14, %rdi
callq 0x3190
movabsq $0x61746164206f4e20, %rcx # imm = 0x61746164206F4E20
movq %rcx, (%rax,%r14)
movw $0x2e, 0x8(%rax,%r14)
incq %r13
movslq 0x8c(%rbx), %rax
cmpq %rax, %r13
jl 0x10202
movq %r14, %rdi
callq 0x3190
movw $0xa, (%rax,%r14)
movw $0x0, 0x25cd7(%rip)     # 0x35fe0
xorps %xmm0, %xmm0
movups %xmm0, 0x25cd1(%rip)    # 0x35fe4
movb $0x0, 0x25cda(%rip)     # 0x35ff4
movq %r14, 0x25cc7(%rip)     # 0x35fe8
movq %r14, %rdi
callq 0x3190
movl %eax, 0x25cc1(%rip)     # 0x35ff0
andl $-0x80, %eax
cmpl $0x14880, %eax          # imm = 0x14880
jae 0x1049d
leaq 0x25c9c(%rip), %rax     # 0x35fe0
movq %rax, 0x259e5(%rip)     # 0x35d30
leaq 0x2595e(%rip), %r14     # 0x35cb0
movb 0x88(%rbx), %al
movb %al, 0x25ce6(%rip)      # 0x36044
xorps %xmm0, %xmm0
movups %xmm0, 0x259e0(%rip)    # 0x35d48
movups %xmm0, 0x259e9(%rip)    # 0x35d58
movups %xmm0, 0x259f2(%rip)    # 0x35d68
movq $0x0, 0x259f7(%rip) # 0x35d78
jmp 0x10488
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xa508
testl %eax, %eax
jne 0x10488
movw $0x49, 0x259df(%rip)    # 0x35d8e
movl $0x4e4f4d24, 0x259d1(%rip) # imm = 0x4E4F4D24
movl $0x524f54, 0x25a17(%rip) # imm = 0x524F54
movq 0x80(%rbx), %rax
movq %rax, 0x25a37(%rip)     # 0x35e08
xorps %xmm0, %xmm0
movaps %xmm0, 0x25a45(%rip)    # 0x35e20
movaps %xmm0, 0x25a4e(%rip)    # 0x35e30
movaps %xmm0, 0x25a57(%rip)    # 0x35e40
movq $0x0, 0x25a5c(%rip) # 0x35e50
leaq 0x2598d(%rip), %r14     # 0x35d88
jmp 0x10488
movq 0x78(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xa508
testl %eax, %eax
jne 0x10488
movw $0x54, 0x25a44(%rip)    # 0x35e66
movl $0x4f4f4224, 0x25a36(%rip) # imm = 0x4F4F4224
movl $0x4b4c42, 0x25a7c(%rip) # imm = 0x4B4C42
movq 0x78(%rbx), %rax
movq %rax, 0x25a9f(%rip)     # 0x35ee0
xorps %xmm0, %xmm0
movups %xmm0, 0x25aad(%rip)    # 0x35ef8
movups %xmm0, 0x25ab6(%rip)    # 0x35f08
movups %xmm0, 0x25abf(%rip)    # 0x35f18
movq $0x0, 0x25ac4(%rip) # 0x35f28
leaq 0x259f5(%rip), %r14     # 0x35e60
jmp 0x10488
testl %esi, %esi
js 0x10485
cmpl %esi, 0x8c(%rbx)
jle 0x10485
movl %esi, %eax
movq 0x90(%rbx,%rax,8), %r14
jmp 0x10488
xorl %r14d, %r14d
movq %r14, %rax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6b36(%rip), %rdi      # 0x16fda
leaq 0x62d5(%rip), %rsi      # 0x16780
leaq 0x6b56(%rip), %rcx      # 0x17008
movl $0x468, %edx            # imm = 0x468
callq 0x3200