// File: /workspace/github_c_makefile_star2_O2/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_file_get
xxdp_file_t *xxdp_filesystem_file_get(xxdp_filesystem_t *_this, int fileidx) {
	xxdp_file_t *result = NULL;
	static xxdp_file_t buff[3]; // buffers for monitor and bootblock
	if (fileidx == -3) {
		result = &buff[0];
		strcpy(result->filnam, XXDP_VOLUMEINFO_FILNAM);
		strcpy(result->ext, XXDP_VOLUMEINFO_EXT);
		result->fixed = 1; // can not be deleted on shared dir
		xxdp_filesystem_render_volumeinfo(_this, result);
		memset(&result->date, 0, sizeof(result->date));
		result->fixed = 1;
	} else if (fileidx == -2
			&& !is_memset(_this->monitor->data, 0, _this->monitor->data_size)) {
		result = &buff[1];
		strcpy(result->filnam, XXDP_MONITOR_FILNAM);
		strcpy(result->ext, XXDP_MONITOR_EXT);
		result->data = _this->monitor->data;
		result->data_size = _this->monitor->data_size;
		memset(&result->date, 0, sizeof(result->date));
		result->fixed = 0;
	} else if (fileidx == -1
			&& !is_memset(_this->bootblock->data, 0, _this->bootblock->data_size)) {
		result = &buff[0];
		strcpy(result->filnam, XXDP_BOOTBLOCK_FILNAM);
		strcpy(result->ext, XXDP_BOOTBLOCK_EXT);
		result->data = _this->bootblock->data;
		result->data_size = _this->bootblock->data_size;
		memset(&result->date, 0, sizeof(result->date));
		result->fixed = 0;
	} else if (fileidx >= 0 && fileidx < (int)_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 0xd134
cmpl $-0x2, %esi
je 0xd0a9
cmpl $-0x3, %esi
jne 0xd1bc
movl $0x4d554c, 0x13302(%rip) # imm = 0x4D554C
movl $0x4c4f5624, 0x132f5(%rip) # imm = 0x4C4F5624
movl $0x464e49, 0x1333b(%rip) # imm = 0x464E49
movl $0x1, 0x133a5(%rip)     # 0x2014c
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, %r14d           # imm = 0x76C
addl 0x14(%rax), %r14d
movb $0x0, 0x145a6(%rip)     # 0x21390
leaq 0x1459f(%rip), %rbp     # 0x21390
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x8637(%rip), %rsi      # 0x15437
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x13279(%rip), %rdx     # 0x20088
leaq 0x132c2(%rip), %rcx     # 0x200d8
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
incl %r13d
leaq 0x8635(%rip), %rsi      # 0x15467
movq %r15, %rdi
movl %r14d, %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 %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x4c(%rbx), %edx
leaq 0x8629(%rip), %rsi      # 0x15492
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x3c(%rbx), %edx
leaq 0x862d(%rip), %rsi      # 0x154b5
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x40(%rbx), %edx
leaq 0x8625(%rip), %rsi      # 0x154cd
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x44(%rbx), %edx
leaq 0x861e(%rip), %rsi      # 0x154e5
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x48(%rbx), %edx
leaq 0x860d(%rip), %rsi      # 0x154f4
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x4a(%rbx), %edx
leaq 0x85fc(%rip), %rsi      # 0x15503
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
cmpl $0x0, 0x38(%rbx)
leaq 0x860b(%rip), %rax      # 0x15532
leaq 0x8611(%rip), %rdx      # 0x1553f
cmovsq %rax, %rdx
leaq 0x85dc(%rip), %rsi      # 0x15515
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x34(%rbx), %edx
leaq 0x85f7(%rip), %rsi      # 0x1554f
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x38(%rbx), %edx
testl %edx, %edx
jle 0xcf99
leaq 0x85dd(%rip), %rsi      # 0x15558
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x3530
leaq 0x143ff(%rip), %rdi     # 0x21390
movq %r14, %rsi
callq 0x3510
movzwl 0x30(%rbx), %edx
leaq 0x85bd(%rip), %rsi      # 0x15561
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
leaq 0x143d6(%rip), %r14     # 0x21390
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x32(%rbx), %edx
leaq 0x85be(%rip), %rsi      # 0x1558e
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x2c(%rbx), %edx
leaq 0x85ae(%rip), %rsi      # 0x1559e
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x2e(%rbx), %edx
leaq 0x85b6(%rip), %rsi      # 0x155c6
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
leaq 0x85c2(%rip), %r13      # 0x155ee
xorl %ebp, %ebp
movslq 0xa8(%rbx), %rax
cmpq %rax, %rbp
jge 0xd1d4
movq %rbx, %r12
movq 0xb0(%rbx,%rbp,8), %rbx
leaq 0x808(%rbx), %rcx
leaq 0x858(%rbx), %r8
movq %r15, %rdi
leaq 0x8578(%rip), %rsi      # 0x155d9
movl %ebp, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x884(%rbx), %ecx
movzwl 0x4(%rbx), %r8d
movq %r12, %rbx
movl %r8d, %r9d
shll $0x9, %r9d
movq %r15, %rdi
movq %r13, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
incq %rbp
jmp 0xd02e
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x9d5d
testl %eax, %eax
jne 0xd22e
movw $0x49, 0x1388a(%rip)    # 0x2095c
movl $0x4e4f4d24, 0x1387c(%rip) # imm = 0x4E4F4D24
movl $0x524f54, 0x138c2(%rip) # imm = 0x524F54
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x138e0(%rip)     # 0x209d8
movl 0x10(%rax), %eax
movl %eax, 0x138d3(%rip)     # 0x209d4
xorps %xmm0, %xmm0
movaps %xmm0, 0x138d5(%rip)    # 0x209e0
movaps %xmm0, 0x138de(%rip)    # 0x209f0
movaps %xmm0, 0x138e7(%rip)    # 0x20a00
andq $0x0, 0x138ef(%rip)     # 0x20a10
andl $0x0, 0x138f4(%rip)     # 0x20a1c
leaq 0x13021(%rip), %r15     # 0x20150
jmp 0xd22e
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x9d5d
testl %eax, %eax
jne 0xd22e
movw $0x54, 0x12f2f(%rip)    # 0x2008c
movl $0x4f4f4224, 0x12f21(%rip) # imm = 0x4F4F4224
leaq 0x12712(%rip), %r15     # 0x1f880
movl $0x4b4c42, 0x12f60(%rip) # imm = 0x4B4C42
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x12f7e(%rip)     # 0x20108
movl 0x10(%rax), %eax
movl %eax, 0x12f71(%rip)     # 0x20104
xorps %xmm0, %xmm0
movaps %xmm0, 0x12f73(%rip)    # 0x20110
movaps %xmm0, 0x12f7c(%rip)    # 0x20120
andq $0x0, 0x12f94(%rip)     # 0x20140
movaps %xmm0, 0x12f7d(%rip)    # 0x20130
andl $0x0, 0x12f92(%rip)     # 0x2014c
jmp 0xd22e
testl %esi, %esi
js 0xd22b
cmpl %esi, 0xa8(%rbx)
jle 0xd22b
movl %esi, %eax
movq 0xb0(%rbx,%rax,8), %r15
jmp 0xd22e
movq %r14, %rdi
callq 0x3190
movw $0xa, (%rax,%r14)
movq %r14, 0x12f1e(%rip)     # 0x20108
leaq 0x1268f(%rip), %r15     # 0x1f880
movq %r14, %rdi
callq 0x3190
movl %eax, 0x12f05(%rip)     # 0x20104
xorps %xmm0, %xmm0
movaps %xmm0, 0x12f07(%rip)    # 0x20110
movaps %xmm0, 0x12f10(%rip)    # 0x20120
movaps %xmm0, 0x12f19(%rip)    # 0x20130
andq $0x0, 0x12f21(%rip)     # 0x20140
movl $0x1, 0x12f23(%rip)     # 0x2014c
jmp 0xd22e
xorl %r15d, %r15d
movq %r15, %rax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq