// File: /workspace/github_cpp_makefile_star2_O1/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 0xd2ad
leaq 0x40(%rsp), %rcx
movq $0x0, (%rcx)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0x34a6
movl %eax, %r15d
testl %eax, %eax
jne 0xd6aa
xorl %r12d, %r12d
cmpq $0x0, 0x40(%rbx)
je 0xd381
movq 0x40(%rsp), %r14
movq %r14, %rdi
movl $0x4, %esi
callq 0x3884
movq 0x40(%rbx), %r12
addq $0x40, %r12
movq %r12, %rdi
callq 0x2410
testl %eax, %eax
je 0xd28d
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0xddaf
movl %eax, %r15d
testl %eax, %eax
jne 0xd6a0
movq %r14, %rdi
callq 0x30fa
testl %eax, %eax
je 0xd381
movl %eax, %r15d
movq %r12, %rdi
callq 0x2260
jmp 0xd6a0
movq $0x0, (%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 0xd379
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 0xbb7(%rip), %rdx       # 0xdf0b
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x22b0
movq %rsp, %rcx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0x34a6
testl %eax, %eax
je 0xd3bd
movl %eax, %r15d
jmp 0xd6aa
movl 0x10(%rbx), %r13d
movq 0x38(%rbx), %r14
addl %r13d, %r13d
je 0xd3b5
movq %r13, %r15
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x20d0
testq %rax, %rax
js 0xd641
je 0xd64b
addq %rax, %r14
subq %rax, %r15
jne 0xd391
xorl %r15d, %r15d
jmp 0xd651
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, 0x8(%rsp)
leaq 0x10(%rdi,%rcx), %rdi
movq %rdx, -0x10(%rdi)
movw %ax, -0x6(%rdi)
movl $0x88, %edx
callq 0x2240
movq (%rsp), %rsi
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
movq %rsi, 0x10(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4177
leaq 0x30(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movl $0x8, %ecx
callq 0x62d0
testl %eax, %eax
jne 0xd4d1
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 0x62d0
testl %eax, %eax
je 0xd4b2
movq 0x10(%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 0x8(%rsp), %rcx
movq %r12, 0x88(%rcx)
movups 0x30(%rax), %xmm0
movups 0x40(%rax), %xmm1
movups 0x50(%rax), %xmm2
movups %xmm0, 0x58(%rcx)
movups %xmm1, 0x68(%rcx)
movups %xmm2, 0x78(%rcx)
cmpq $0x2, %r12
jb 0xd52b
movq %r12, 0x80(%rcx)
movq $0x1, 0x90(%rcx)
jmp 0xd536
movq $-0x1, 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 0xd578
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
cmpl $0x0, 0xe8(%rsp)
jne 0xd563
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x58(%r13), %rsi
addq $0x58, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe020
movl %eax, %r15d
testl %eax, %eax
jne 0xd5c8
movslq 0xec(%rsp), %rax
cmpl $0x0, 0xc8(%rsp,%rax,4)
movl $0x0, %r15d
je 0xd5c8
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
callq 0xe63c
movl %eax, %r15d
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe63c
movq %rbx, %rdi
callq 0x2410
cmpl $0x0, 0xa8(%rbx)
je 0xd605
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20f0
cmpl $0x0, 0xe8(%rsp)
jne 0xd5f0
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x2260
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x23b0
movq %r13, %rdi
callq 0x3b19
movq %r14, %rdi
callq 0x2300
movq %rbx, %rdi
callq 0x2140
movq 0x58(%rbx), %rdi
callq 0x2030
jmp 0xd6aa
callq 0x2050
movl (%rax), %r15d
jmp 0xd651
movl $0x5, %r15d
testq %r12, %r12
je 0xd65e
movq %r12, %rdi
callq 0x2260
testl %r15d, %r15d
jne 0xd6a0
movq 0x40(%rsp), %rax
movl (%rbx), %edi
movl 0x10(%rbx), %r12d
imulq 0x10(%rax), %r12
leaq 0xf0(%rsp), %rsi
callq 0x23f0
testl %eax, %eax
je 0xd690
callq 0x2050
movl (%rax), %r15d
xorl %ebx, %ebx
jmp 0xd69b
xorl %r15d, %r15d
movq 0x120(%rsp), %rbx
testl %r15d, %r15d
je 0xd6bf
movq 0x40(%rsp), %rdi
callq 0x3b19
movl %r15d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %rbx, %r12
cmovbq %r12, %rbx
subq %r13, %rbx
je 0xd6a0
movl $0x80000000, %r12d      # imm = 0x80000000
xorl %r15d, %r15d
cmpq %r12, %rbx
movl $0x80000000, %edx       # imm = 0x80000000
cmovbq %rbx, %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0x20d0
testq %rax, %rax
js 0xd6fb
je 0xd705
addq %rax, %r14
subq %rax, %rbx
jne 0xd6d4
jmp 0xd6a0
callq 0x2050
movl (%rax), %r15d
jmp 0xd6a0
movl $0x5, %r15d
jmp 0xd6a0