// File: /workspace/github_c_makefile_star2_O3/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 0xdd31
cmpl $-0x2, %esi
je 0xdca0
cmpl $-0x3, %esi
jne 0xddbf
movl $0x4d554c, 0x12780(%rip) # imm = 0x4D554C
movl $0x4c4f5624, 0x12773(%rip) # imm = 0x4C4F5624
movl $0x464e49, 0x127b9(%rip) # imm = 0x464E49
movl $0x1, 0x12823(%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, 0x13a24(%rip)     # 0x21390
leaq 0x13a1d(%rip), %rbp     # 0x21390
movq 0x20(%rbx), %rax
movq 0x8(%rax), %r8
leaq 0x8b02(%rip), %rsi      # 0x16484
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x126f7(%rip), %rdx     # 0x20088
leaq 0x12740(%rip), %rcx     # 0x200d8
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
incl %r13d
leaq 0x8b00(%rip), %rsi      # 0x164b4
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
addq $0x10, %rsp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x4c(%rbx), %edx
leaq 0x8af2(%rip), %rsi      # 0x164df
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x3c(%rbx), %edx
leaq 0x8af6(%rip), %rsi      # 0x16502
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x40(%rbx), %edx
leaq 0x8aee(%rip), %rsi      # 0x1651a
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x44(%rbx), %edx
leaq 0x8ae7(%rip), %rsi      # 0x16532
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x48(%rbx), %edx
leaq 0x8ad6(%rip), %rsi      # 0x16541
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x4a(%rbx), %edx
leaq 0x8ac5(%rip), %rsi      # 0x16550
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
cmpl $0x0, 0x38(%rbx)
leaq 0x8ad4(%rip), %rax      # 0x1657f
leaq 0x8ada(%rip), %rdx      # 0x1658c
cmovsq %rax, %rdx
leaq 0x8aa5(%rip), %rsi      # 0x16562
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x34(%rbx), %edx
leaq 0x8ac0(%rip), %rsi      # 0x1659c
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3510
movl 0x38(%rbx), %edx
testl %edx, %edx
jle 0xdb1d
leaq 0x8aa6(%rip), %rsi      # 0x165a5
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x3530
leaq 0x1387b(%rip), %rdi     # 0x21390
movq %r14, %rsi
callq 0x3510
movzwl 0x30(%rbx), %edx
leaq 0x8a86(%rip), %rsi      # 0x165ae
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
leaq 0x13852(%rip), %r14     # 0x21390
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x32(%rbx), %edx
leaq 0x8a87(%rip), %rsi      # 0x165db
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x2c(%rbx), %edx
leaq 0x8a77(%rip), %rsi      # 0x165eb
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
movzwl 0x2e(%rbx), %edx
leaq 0x8a7f(%rip), %rsi      # 0x16613
movq %r15, %rdi
xorl %eax, %eax
callq 0x3530
movq %r14, %rdi
movq %r15, %rsi
callq 0x3510
cmpl $0x0, 0xa8(%rbx)
jle 0xdc3d
leaq 0x20(%rsp), %r12
leaq 0x137ce(%rip), %r13     # 0x21390
leaq 0x8a72(%rip), %rbp      # 0x1663b
xorl %r14d, %r14d
movq 0xb0(%rbx,%r14,8), %r15
leaq 0x808(%r15), %rcx
leaq 0x858(%r15), %r8
movq %r12, %rdi
leaq 0x8a3a(%rip), %rsi      # 0x16626
movl %r14d, %edx
xorl %eax, %eax
callq 0x3530
movq %r13, %rdi
movq %r12, %rsi
callq 0x3510
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 0x3530
movq %r13, %rdi
movq %r12, %rsi
callq 0x3510
incq %r14
movslq 0xa8(%rbx), %rax
cmpq %rax, %r14
jl 0xdbcc
leaq 0x1374c(%rip), %rbx     # 0x21390
movq %rbx, %rdi
callq 0x3190
movw $0xa, (%rax,%rbx)
movq %rbx, 0x124af(%rip)     # 0x20108
leaq 0x11c20(%rip), %r15     # 0x1f880
movq %rbx, %rdi
callq 0x3190
movl %eax, 0x12496(%rip)     # 0x20104
xorps %xmm0, %xmm0
movaps %xmm0, 0x12498(%rip)    # 0x20110
movaps %xmm0, 0x124a1(%rip)    # 0x20120
movaps %xmm0, 0x124aa(%rip)    # 0x20130
movq $0x0, 0x124af(%rip) # 0x20140
movl $0x1, 0x124b1(%rip)     # 0x2014c
jmp 0xddda
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0xa508
testl %eax, %eax
jne 0xddda
movw $0x49, 0x12c93(%rip)    # 0x2095c
movl $0x4e4f4d24, 0x12c85(%rip) # imm = 0x4E4F4D24
movl $0x524f54, 0x12ccb(%rip) # imm = 0x524F54
movq 0x88(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x12ce9(%rip)     # 0x209d8
movl 0x10(%rax), %eax
movl %eax, 0x12cdc(%rip)     # 0x209d4
xorps %xmm0, %xmm0
movaps %xmm0, 0x12cde(%rip)    # 0x209e0
movaps %xmm0, 0x12ce7(%rip)    # 0x209f0
movaps %xmm0, 0x12cf0(%rip)    # 0x20a00
movq $0x0, 0x12cf5(%rip) # 0x20a10
movl $0x0, 0x12cf7(%rip)     # 0x20a1c
leaq 0x12424(%rip), %r15     # 0x20150
jmp 0xddda
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %edx
xorl %r15d, %r15d
xorl %esi, %esi
callq 0xa508
testl %eax, %eax
jne 0xddda
movw $0x54, 0x12332(%rip)    # 0x2008c
movl $0x4f4f4224, 0x12324(%rip) # imm = 0x4F4F4224
leaq 0x11b15(%rip), %r15     # 0x1f880
movl $0x4b4c42, 0x12363(%rip) # imm = 0x4B4C42
movq 0x80(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x12381(%rip)     # 0x20108
movl 0x10(%rax), %eax
movl %eax, 0x12374(%rip)     # 0x20104
xorps %xmm0, %xmm0
movaps %xmm0, 0x12376(%rip)    # 0x20110
movaps %xmm0, 0x1237f(%rip)    # 0x20120
movaps %xmm0, 0x12388(%rip)    # 0x20130
movq $0x0, 0x1238d(%rip) # 0x20140
movl $0x0, 0x1238f(%rip)     # 0x2014c
jmp 0xddda
testl %esi, %esi
js 0xddd7
cmpl %esi, 0xa8(%rbx)
jle 0xddd7
movl %esi, %eax
movq 0xb0(%rbx,%rax,8), %r15
jmp 0xddda
xorl %r15d, %r15d
movq %r15, %rax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq