// File: /workspace/github_c_makefile_star2_O1/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
movl %esi, %ebp
movq %rdi, %rbx
cmpl $-0x1, %esi
je 0xddef
cmpl $-0x2, %ebp
je 0xddcd
cmpl $-0x3, %ebp
jne 0xde08
movl $0x4d554c, 0x12663(%rip) # imm = 0x4D554C
movl $0x4c4f5624, 0x12656(%rip) # imm = 0x4C4F5624
movl $0x464e49, 0x1269c(%rip) # imm = 0x464E49
movl $0x1, 0x12706(%rip)     # 0x2015c
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, %r14d           # imm = 0x76C
addl 0x14(%rax), %r14d
movb $0x0, 0x13907(%rip)     # 0x213a0
leaq 0x13900(%rip), %rbp     # 0x213a0
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x893d(%rip), %rsi      # 0x163ec
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x125da(%rip), %rdx     # 0x20098
leaq 0x12623(%rip), %rcx     # 0x200e8
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
incl %r13d
leaq 0x893b(%rip), %rsi      # 0x1641c
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 0x3540
addq $0x10, %rsp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x4c(%rbx), %edx
leaq 0x892d(%rip), %rsi      # 0x16447
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x3c(%rbx), %edx
leaq 0x8931(%rip), %rsi      # 0x1646a
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x40(%rbx), %edx
leaq 0x8929(%rip), %rsi      # 0x16482
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x44(%rbx), %edx
leaq 0x8922(%rip), %rsi      # 0x1649a
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x48(%rbx), %edx
leaq 0x8911(%rip), %rsi      # 0x164a9
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x4a(%rbx), %edx
leaq 0x8900(%rip), %rsi      # 0x164b8
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
cmpl $0x0, 0x38(%rbx)
leaq 0x890f(%rip), %rax      # 0x164e7
leaq 0x8915(%rip), %rdx      # 0x164f4
cmovsq %rax, %rdx
leaq 0x88e0(%rip), %rsi      # 0x164ca
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x34(%rbx), %edx
leaq 0x88fb(%rip), %rsi      # 0x16504
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3520
movl 0x38(%rbx), %edx
testl %edx, %edx
jle 0xdc4a
leaq 0x88e1(%rip), %rsi      # 0x1650d
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x3540
leaq 0x1375e(%rip), %rdi     # 0x213a0
movq %r14, %rsi
callq 0x3520
movzwl 0x30(%rbx), %edx
leaq 0x88c1(%rip), %rsi      # 0x16516
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
leaq 0x13735(%rip), %r14     # 0x213a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x32(%rbx), %edx
leaq 0x88c2(%rip), %rsi      # 0x16543
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x2c(%rbx), %edx
leaq 0x88b2(%rip), %rsi      # 0x16553
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
movzwl 0x2e(%rbx), %edx
leaq 0x88ba(%rip), %rsi      # 0x1657b
movq %r15, %rdi
xorl %eax, %eax
callq 0x3540
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
cmpl $0x0, 0xa8(%rbx)
jle 0xdd6a
leaq 0x20(%rsp), %r12
leaq 0x136b1(%rip), %r13     # 0x213a0
leaq 0x88ad(%rip), %rbp      # 0x165a3
xorl %r14d, %r14d
movq 0xb0(%rbx,%r14,8), %r15
leaq 0x808(%r15), %rcx
leaq 0x858(%r15), %r8
movq %r12, %rdi
leaq 0x8875(%rip), %rsi      # 0x1658e
movl %r14d, %edx
xorl %eax, %eax
callq 0x3540
movq %r13, %rdi
movq %r12, %rsi
callq 0x3520
movl 0x884(%r15), %ecx
movzwl 0x4(%r15), %r8d
movl %r8d, %r9d
shll $0x9, %r9d
movq %r12, %rdi
movq %rbp, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3540
movq %r13, %rdi
movq %r12, %rsi
callq 0x3520
incq %r14
movslq 0xa8(%rbx), %rax
cmpq %rax, %r14
jl 0xdcf9
leaq 0x1362f(%rip), %rbx     # 0x213a0
movq %rbx, %rdi
callq 0x31a0
movw $0xa, (%rax,%rbx)
movq %rbx, 0x12392(%rip)     # 0x20118
leaq 0x11b03(%rip), %r14     # 0x1f890
movq %rbx, %rdi
callq 0x31a0
movl %eax, 0x12379(%rip)     # 0x20114
xorps %xmm0, %xmm0
movaps %xmm0, 0x1237b(%rip)    # 0x20120
movaps %xmm0, 0x12384(%rip)    # 0x20130
movaps %xmm0, 0x1238d(%rip)    # 0x20140
movq $0x0, 0x12392(%rip) # 0x20150
movl $0x1, 0x12394(%rip)     # 0x2015c
jmp 0xdf05
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %esi, %esi
callq 0xa525
testl %eax, %eax
je 0xde99
cmpl $-0x1, %ebp
jne 0xde08
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %esi, %esi
callq 0xa525
testl %eax, %eax
je 0xde2b
testl %ebp, %ebp
js 0xde23
cmpl %ebp, 0xa8(%rbx)
jle 0xde23
movl %ebp, %eax
movq 0xb0(%rbx,%rax,8), %r14
jmp 0xdf05
xorl %r14d, %r14d
jmp 0xdf05
movw $0x54, 0x12268(%rip)    # 0x2009c
movl $0x4f4f4224, 0x1225a(%rip) # imm = 0x4F4F4224
leaq 0x11a4b(%rip), %r14     # 0x1f890
movl $0x4b4c42, 0x12299(%rip) # imm = 0x4B4C42
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x122b7(%rip)     # 0x20118
movl 0x10(%rax), %eax
movl %eax, 0x122aa(%rip)     # 0x20114
xorps %xmm0, %xmm0
movaps %xmm0, 0x122ac(%rip)    # 0x20120
movaps %xmm0, 0x122b5(%rip)    # 0x20130
movaps %xmm0, 0x122be(%rip)    # 0x20140
movq $0x0, 0x122c3(%rip) # 0x20150
movl $0x0, 0x122c5(%rip)     # 0x2015c
jmp 0xdf05
movw $0x49, 0x12aca(%rip)    # 0x2096c
movl $0x4e4f4d24, 0x12abc(%rip) # imm = 0x4E4F4D24
movl $0x524f54, 0x12b02(%rip) # imm = 0x524F54
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x12b20(%rip)     # 0x209e8
movl 0x10(%rax), %eax
movl %eax, 0x12b13(%rip)     # 0x209e4
xorps %xmm0, %xmm0
movaps %xmm0, 0x12b15(%rip)    # 0x209f0
movaps %xmm0, 0x12b1e(%rip)    # 0x20a00
movaps %xmm0, 0x12b27(%rip)    # 0x20a10
movq $0x0, 0x12b2c(%rip) # 0x20a20
movl $0x0, 0x12b2e(%rip)     # 0x20a2c
leaq 0x1225b(%rip), %r14     # 0x20160
movq %r14, %rax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq