// File: /workspace/github_cpp_makefile_star2_O2/jvanns[P]verbatim/sub/lmdb/libraries/liblmdb/mdb.c
// Function: mdb_env_copyfd2
int ESECT
mdb_env_copyfd2(MDB_env *env, HANDLE fd, unsigned int flags)
{
	if (flags & MDB_CP_COMPACT)
		return mdb_env_copyfd1(env, fd);
	else
		return mdb_env_copyfd0(env, fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movl %esi, %ebp
movq %rdi, %rbx
testb $0x1, %dl
jne 0xc46b
leaq 0x30(%rsp), %rcx
andq $0x0, (%rcx)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0x31a7
movl %eax, %r15d
testl %eax, %eax
jne 0xc805
cmpq $0x0, 0x40(%rbx)
je 0xc557
movq 0x30(%rsp), %r14
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x351c
movq 0x40(%rbx), %r13
addq $0x40, %r13
movq %r13, %rdi
callq 0x2420
testl %eax, %eax
je 0xc53b
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0xcec6
testl %eax, %eax
je 0xc53b
movl %eax, %r15d
jmp 0xc7fd
andq $0x0, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x23f0
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x2250
leaq 0x88(%rsp), %rdi
movl 0x14(%rbx), %esi
movl $0x200000, %edx         # imm = 0x200000
callq 0x23a0
testl %eax, %eax
jne 0xc533
leaq 0x30(%rsp), %r15
movq 0x58(%r15), %r12
movl $0x200000, %edx         # imm = 0x200000
movq %r12, %rdi
xorl %esi, %esi
callq 0x2190
addq $0x100000, %r12         # imm = 0x100000
movq %r12, 0x60(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%r15)
movq $0x2, 0x98(%r15)
andl $0x0, 0xa4(%r15)
movl $0x1, 0xa8(%r15)
andl $0x0, 0xac(%r15)
movq %rbx, 0x78(%r15)
movl %ebp, 0xa0(%r15)
leaq 0xb05(%rip), %rdx       # 0xd011
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x22c0
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0x31a7
testl %eax, %eax
je 0xc59a
movl %eax, %r15d
jmp 0xc805
movq %r14, %rdi
callq 0x2e42
testl %eax, %eax
je 0xc55a
movl %eax, %r15d
movq %r13, %rdi
callq 0x2260
jmp 0xc7fd
xorl %r13d, %r13d
movl 0x10(%rbx), %r14d
addl %r14d, %r14d
movq 0x38(%rbx), %r12
pushq $0x5
popq %r15
movq %r14, (%rsp)
testq %r14, %r14
je 0xc7d9
movl %ebp, %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x20d0
testq %rax, %rax
js 0xc7de
je 0xc7e6
addq %rax, %r12
subq %rax, %r14
jmp 0xc56d
movq 0x88(%rsp), %r15
movl 0x10(%rbx), %edx
addl %edx, %edx
xorl %r14d, %r14d
movq %r15, %rdi
xorl %esi, %esi
callq 0x2190
andq $0x0, (%r15)
movw $0x8, %ax
movw %ax, 0xa(%r15)
movabsq $0x1beefc0de, %rcx      # imm = 0x1BEEFC0DE
movq %rcx, 0x10(%r15)
movq 0x70(%rbx), %rcx
movq %rcx, 0x20(%r15)
movl 0x10(%rbx), %ecx
movl %ecx, 0x28(%r15)
pushq $0x1
popq %rdx
movq %rdx, 0x88(%r15)
movl 0xc(%rbx), %esi
orl $0x8, %esi
movw %si, 0x2c(%r15)
orq $-0x1, 0x50(%r15)
leaq 0x10(%r15), %rsi
orq $-0x1, 0x80(%r15)
movq 0x48(%rbx), %rdi
movq 0x8(%rdi), %rdi
movq %rdi, 0x18(%r15)
movq 0x88(%rsp), %rdi
leaq (%rdi,%rcx), %r8
movq %r8, 0x10(%rsp)
leaq 0x10(%rdi,%rcx), %rdi
movq %rdx, -0x10(%rdi)
movw %ax, -0x6(%rdi)
movl $0x88, %edx
callq 0x2240
movq 0x8(%rsp), %rsi
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
movq %rsi, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4451
leaq 0xe0(%rsp), %r13
leaq 0x20(%rsp), %rbp
pushq $0x8
popq %r12
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl %r12d, %ecx
callq 0x5b27
testl %eax, %eax
jne 0xc685
movq 0x28(%rsp), %rax
addq (%rax), %r14
jmp 0xc666
movq (%rsp), %r12
movq 0x58(%r12), %rax
addq 0x8(%rax), %r14
addq 0x10(%rax), %r14
addq 0x18(%rax), %r14
notq %r14
addq 0x10(%r12), %r14
movq 0x10(%rsp), %rcx
movq %r14, 0x88(%rcx)
movups 0x30(%rax), %xmm0
movups 0x40(%rax), %xmm1
movups %xmm0, 0x58(%rcx)
movups %xmm1, 0x68(%rcx)
movq 0x50(%rax), %rax
movq %rax, 0x78(%rcx)
cmpq $0x2, %r14
jb 0xc6d9
movq $0x1, 0x90(%rcx)
jmp 0xc6dd
pushq $-0x1
popq %r14
movq %r14, 0x80(%rcx)
movl 0x10(%rbx), %eax
addl %eax, %eax
leaq 0x30(%rsp), %rbx
movl %eax, 0x88(%rbx)
movq %r12, 0x80(%rbx)
movq %rbx, %rdi
callq 0x2420
leaq 0x58(%rsp), %r14
cmpl $0x0, 0xd8(%rsp)
je 0xc71f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
jmp 0xc708
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x58(%r12), %rsi
addq $0x58, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd10e
movl %eax, %r15d
testl %eax, %eax
jne 0xc76e
movslq 0xdc(%rsp), %rax
cmpl $0x0, 0xb8(%rsp,%rax,4)
movl $0x0, %r15d
je 0xc76e
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0xd6ba
movl %eax, %r15d
leaq 0x30(%rsp), %rbx
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xd6ba
movq %rbx, %rdi
callq 0x2420
cmpl $0x0, 0xd8(%rsp)
je 0xc79d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
jmp 0xc786
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x23c0
movq %r12, %rdi
callq 0x379c
movq %r14, %rdi
callq 0x2310
movq %rbx, %rdi
callq 0x2140
movq 0x58(%rbx), %rdi
callq 0x2030
jmp 0xc805
xorl %r15d, %r15d
jmp 0xc7e6
callq 0x2050
movl (%rax), %r15d
testq %r13, %r13
je 0xc7f3
movq %r13, %rdi
callq 0x2260
movq 0x30(%rsp), %r14
testl %r15d, %r15d
je 0xc81a
movq %r14, %rdi
callq 0x379c
movl %r15d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%rbx), %edi
movl 0x10(%rbx), %r13d
imulq 0x10(%r14), %r13
leaq 0xf0(%rsp), %rsi
callq 0x2400
testl %eax, %eax
je 0xc847
callq 0x2050
movl (%rax), %r15d
testl %r15d, %r15d
jne 0xc7fd
xorl %ebx, %ebx
jmp 0xc84f
movq 0x120(%rsp), %rbx
cmpq %rbx, %r13
cmovbq %r13, %rbx
subq (%rsp), %rbx
movl $0x80000000, %r13d      # imm = 0x80000000
pushq $0x5
popq %r15
testq %rbx, %rbx
je 0xc892
cmpq %r13, %rbx
movl $0x80000000, %edx       # imm = 0x80000000
cmovbq %rbx, %rdx
movl %ebp, %edi
movq %r12, %rsi
callq 0x20d0
testq %rax, %rax
js 0xc89a
je 0xc7fd
addq %rax, %r12
subq %rax, %rbx
jmp 0xc864
xorl %r15d, %r15d
jmp 0xc7fd
callq 0x2050
movl (%rax), %r15d
jmp 0xc7fd