// File: /workspace/github_cpp_makefile_star2_O3/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 0xce24
leaq 0x40(%rsp), %rcx
movq $0x0, (%rcx)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0x345c
movl %eax, %r15d
testl %eax, %eax
jne 0xd204
xorl %r15d, %r15d
cmpq $0x0, 0x40(%rbx)
je 0xcf1b
movq 0x40(%rsp), %r14
movq %r14, %rdi
movl $0x4, %esi
callq 0x380d
movq 0x40(%rbx), %r13
addq $0x40, %r13
movq %r13, %rdi
callq 0x2410
testl %eax, %eax
je 0xcefb
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0xd942
testl %eax, %eax
je 0xcefb
movl %eax, %r15d
jmp 0xd1fc
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
callq 0x23e0
leaq 0x68(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x2250
leaq 0x98(%rsp), %rdi
movl 0x14(%rbx), %esi
movl $0x200000, %edx         # imm = 0x200000
callq 0x2390
testl %eax, %eax
jne 0xcef3
leaq 0x40(%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)
movl %r13d, 0xa4(%r15)
movl $0x1, 0xa8(%r15)
movl %r13d, 0xac(%r15)
movq %rbx, 0x78(%r15)
movl %ebp, 0xa0(%r15)
leaq 0xbc8(%rip), %rdx       # 0xda94
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x22b0
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0x345c
testl %eax, %eax
je 0xcf23
movl %eax, %r15d
jmp 0xd204
movq %r14, %rdi
callq 0x30ea
testl %eax, %eax
je 0xd1a3
movl %eax, %r15d
movq %r13, %rdi
callq 0x2260
jmp 0xd1fc
xorl %r13d, %r13d
jmp 0xd1a6
movq 0x98(%rsp), %r15
movl 0x10(%rbx), %edx
addl %edx, %edx
xorl %r12d, %r12d
movq %r15, %rdi
xorl %esi, %esi
callq 0x2190
movq $0x0, (%r15)
movw $0x8, %ax
movw %ax, 0xa(%r15)
leaq 0x10(%r15), %rsi
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)
movl $0x1, %edx
movq %rdx, 0x88(%r15)
movl 0xc(%rbx), %edi
orl $0x8, %edi
movw %di, 0x2c(%r15)
movq $-0x1, %rdi
movq %rdi, 0x50(%r15)
movq %rdi, 0x80(%r15)
movq 0x48(%rbx), %rdi
movq 0x8(%rdi), %rdi
movq %rdi, 0x18(%r15)
movq 0x98(%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 0x40be
leaq 0x30(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movl $0x8, %ecx
callq 0x5fd1
testl %eax, %eax
jne 0xd037
xorl %r12d, %r12d
leaq 0xf0(%rsp), %r15
leaq 0x30(%rsp), %r13
leaq 0x20(%rsp), %rbp
movq 0x28(%rsp), %rax
addq (%rax), %r12
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x8, %ecx
callq 0x5fd1
testl %eax, %eax
je 0xd018
movq (%rsp), %r13
movq 0x58(%r13), %rax
addq 0x8(%rax), %r12
addq 0x10(%rax), %r12
addq 0x18(%rax), %r12
notq %r12
addq 0x10(%r13), %r12
movq 0x10(%rsp), %rcx
movq %r12, 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, %r12
movq $-0x1, %rax
jb 0xd091
movq $0x1, 0x90(%rcx)
movq %r12, %rax
movq %rax, 0x80(%rcx)
movl 0x10(%rbx), %eax
addl %eax, %eax
leaq 0x40(%rsp), %rbx
movl %eax, 0x88(%rbx)
movq %r13, 0x80(%rbx)
movq %rbx, %rdi
callq 0x2410
cmpl $0x0, 0xa8(%rbx)
je 0xd0da
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
cmpl $0x0, 0xe8(%rsp)
jne 0xd0c5
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x58(%r13), %rsi
addq $0x58, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xdb9d
movl %eax, %r15d
testl %eax, %eax
jne 0xd12a
movslq 0xec(%rsp), %rax
cmpl $0x0, 0xc8(%rsp,%rax,4)
movl $0x0, %r15d
je 0xd12a
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
callq 0xe144
movl %eax, %r15d
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe144
movq %rbx, %rdi
callq 0x2410
cmpl $0x0, 0xa8(%rbx)
je 0xd167
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
cmpl $0x0, 0xe8(%rsp)
jne 0xd152
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x23b0
movq %r13, %rdi
callq 0x3aa6
movq %r14, %rdi
callq 0x2300
movq %rbx, %rdi
callq 0x2140
movq 0x58(%rbx), %rdi
callq 0x2030
jmp 0xd204
xorl %r15d, %r15d
movl 0x10(%rbx), %r14d
movq 0x38(%rbx), %r12
addl %r14d, %r14d
movq %r14, (%rsp)
je 0xd1e5
movl %ebp, %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x20d0
testq %rax, %rax
js 0xd1d5
je 0xd1df
addq %rax, %r12
subq %rax, %r14
jne 0xd1b7
jmp 0xd1e5
callq 0x2050
movl (%rax), %r15d
jmp 0xd1e5
movl $0x5, %r15d
testq %r13, %r13
je 0xd1f2
movq %r13, %rdi
callq 0x2260
movq 0x40(%rsp), %r14
testl %r15d, %r15d
je 0xd219
movq %r14, %rdi
callq 0x3aa6
movl %r15d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r14), %r13
movl (%rbx), %edi
movl 0x10(%rbx), %ebx
leaq 0xf0(%rsp), %rsi
callq 0x23f0
testl %eax, %eax
je 0xd245
callq 0x2050
movl (%rax), %r15d
testl %r15d, %r15d
jne 0xd1fc
xorl %r13d, %r13d
jmp 0xd258
imulq %rbx, %r13
movq 0x120(%rsp), %rax
cmpq %rax, %r13
cmovaeq %rax, %r13
xorl %r15d, %r15d
subq (%rsp), %r13
je 0xd1fc
movl $0x80000000, %ebx       # imm = 0x80000000
cmpq %rbx, %r13
movl $0x80000000, %edx       # imm = 0x80000000
cmovbq %r13, %rdx
movl %ebp, %edi
movq %r12, %rsi
callq 0x20d0
testq %rax, %rax
js 0xd290
je 0xd29d
addq %rax, %r12
subq %rax, %r13
jne 0xd266
jmp 0xd1fc
callq 0x2050
movl (%rax), %r15d
jmp 0xd1fc
movl $0x5, %r15d
jmp 0xd1fc