// File: /workspace/github_c_makefile_star2_O2/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 0xf31f
cmpl $-0x2, %esi
je 0xf2a8
cmpl $-0x3, %esi
jne 0xf390
movl $0x4d554c, 0x26d5a(%rip) # imm = 0x4D554C
movl $0x4c4f5624, 0x26d4d(%rip) # imm = 0x4C4F5624
movl $0x464e49, 0x26d93(%rip) # imm = 0x464E49
movl $0x1, 0x26e0b(%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, 0x27096(%rip)     # 0x36050
leaq 0x2708f(%rip), %r14     # 0x36050
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x6d7a(%rip), %rsi      # 0x15d4a
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x26cd3(%rip), %rdx     # 0x35cb2
leaq 0x26d1c(%rip), %rcx     # 0x35d02
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
incl %r13d
leaq 0x6465(%rip), %rsi      # 0x15467
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
popq %rcx
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x30(%rbx), %edx
leaq 0x6d43(%rip), %rsi      # 0x15d7b
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x34(%rbx), %edx
leaq 0x6d3a(%rip), %rsi      # 0x15d92
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x36(%rbx), %rdx
leaq 0x6d5b(%rip), %rsi      # 0x15dd3
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x3a(%rbx), %rdx
leaq 0x6d4f(%rip), %rsi      # 0x15de7
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x47(%rbx), %rdx
leaq 0x6d3e(%rip), %rsi      # 0x15df6
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x54(%rbx), %rdx
leaq 0x6d2e(%rip), %rsi      # 0x15e06
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x6c(%rbx), %ecx
leaq 0x6d1e(%rip), %rsi      # 0x15e15
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 0x6d2f(%rip), %rsi      # 0x15e4b
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 0x6d40(%rip), %rsi      # 0x15e92
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x66(%rbx), %edx
leaq 0x6d79(%rip), %rsi      # 0x15eeb
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x1fd4(%rbx), %edx
leaq 0x6d91(%rip), %rsi      # 0x15f26
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x6428(%rip), %r12      # 0x155d9
xorl %r13d, %r13d
movslq 0x8c(%rbx), %rax
cmpq %rax, %r13
jge 0xf3b3
movq 0x90(%rbx,%r13,8), %rbp
leaq 0x2(%rbp), %rcx
leaq 0x52(%rbp), %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movq 0x88(%rbp), %rax
testq %rax, %rax
je 0xf229
movl 0x10(%rax), %ecx
movzwl (%rax), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r15, %rdi
leaq 0x6d35(%rip), %rsi      # 0x15f48
movl %ecx, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
jmp 0xf248
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 0xf282
movl 0x10(%rax), %ecx
movzwl (%rax), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r15, %rdi
leaq 0x6382(%rip), %rsi      # 0x155ee
movl %ecx, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
jmp 0xf2a0
movq %r14, %rdi
callq 0x3190
movabsq $0x61746164206f4e20, %rcx # imm = 0x61746164206F4E20
movq %rcx, (%rax,%r14)
movw $0x2e, 0x8(%rax,%r14)
incq %r13
jmp 0xf1b4
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x9d5d
testl %eax, %eax
jne 0xf440
movw $0x49, 0x26abd(%rip)    # 0x35d8e
movl $0x4e4f4d24, 0x26aaf(%rip) # imm = 0x4E4F4D24
movl $0x524f54, 0x26af5(%rip) # imm = 0x524F54
movq 0x80(%rbx), %rax
movq %rax, 0x26b15(%rip)     # 0x35e08
xorps %xmm0, %xmm0
movaps %xmm0, 0x26b23(%rip)    # 0x35e20
movaps %xmm0, 0x26b2c(%rip)    # 0x35e30
movaps %xmm0, 0x26b35(%rip)    # 0x35e40
andq $0x0, 0x26b3d(%rip)     # 0x35e50
leaq 0x26a6e(%rip), %r14     # 0x35d88
jmp 0xf440
movq 0x78(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x9d5d
testl %eax, %eax
jne 0xf440
movw $0x54, 0x26b21(%rip)    # 0x35e66
movl $0x4f4f4224, 0x26b13(%rip) # imm = 0x4F4F4224
movl $0x4b4c42, 0x26b59(%rip) # imm = 0x4B4C42
movq 0x78(%rbx), %rax
movq %rax, 0x26b7c(%rip)     # 0x35ee0
xorps %xmm0, %xmm0
movups %xmm0, 0x26b8a(%rip)    # 0x35ef8
movups %xmm0, 0x26b93(%rip)    # 0x35f08
movups %xmm0, 0x26b9c(%rip)    # 0x35f18
andq $0x0, 0x26ba4(%rip)     # 0x35f28
leaq 0x26ad5(%rip), %r14     # 0x35e60
jmp 0xf440
testl %esi, %esi
js 0xf43d
cmpl %esi, 0x8c(%rbx)
jle 0xf43d
movl %esi, %eax
movq 0x90(%rbx,%rax,8), %r14
jmp 0xf440
movq %r14, %rdi
callq 0x3190
movw $0xa, (%rax,%r14)
andw $0x0, 0x26c16(%rip)     # 0x35fe0
xorps %xmm0, %xmm0
movups %xmm0, 0x26c10(%rip)    # 0x35fe4
movb $0x0, 0x26c19(%rip)     # 0x35ff4
movq %r14, 0x26c06(%rip)     # 0x35fe8
movq %r14, %rdi
callq 0x3190
movl %eax, 0x26c00(%rip)     # 0x35ff0
andl $-0x80, %eax
cmpl $0x14880, %eax          # imm = 0x14880
jae 0xf455
leaq 0x26bdf(%rip), %rax     # 0x35fe0
movq %rax, 0x26928(%rip)     # 0x35d30
leaq 0x268a1(%rip), %r14     # 0x35cb0
movb 0x88(%rbx), %al
movb %al, 0x26c29(%rip)      # 0x36044
xorps %xmm0, %xmm0
movups %xmm0, 0x26923(%rip)    # 0x35d48
movups %xmm0, 0x2692c(%rip)    # 0x35d58
movups %xmm0, 0x26935(%rip)    # 0x35d68
andq $0x0, 0x2693d(%rip)     # 0x35d78
jmp 0xf440
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 0x6b32(%rip), %rdi      # 0x15f8e
leaq 0x62d1(%rip), %rsi      # 0x15734
leaq 0x6b52(%rip), %rcx      # 0x15fbc
movl $0x468, %edx            # imm = 0x468
callq 0x3200