// File: /workspace/github_c_makefile_star2_O1/CkTD[P]btree/table.c
// Function: table_open
Table *table_open(TableOpenFlag flag)
{
    if(access(flag.dir, F_OK) != -1)
    {
        if(flag.error_if_exist)
            return NULL;
        return table_new_from_file(flag.dir);
    }
    else
    {
        // table not exist!
        if(!flag.create_if_missing)
            return NULL;
        return table_new_empty(flag.dir);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
callq 0x1160
cmpl $-0x1, %eax
je 0x2de9
shrq $0x20, %rbx
jne 0x2ecc
movl $0x40, %edi
callq 0x1120
movq %rax, %rbx
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1120
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %r15, (%rbx)
movl $0x350, %edi            # imm = 0x350
callq 0x1120
movq %rax, %r15
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x32ca
movq %rax, (%r15)
movq %r15, %rdi
callq 0x3310
movl 0x8(%r15), %ebp
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10c0
testq %rax, %rax
jne 0x2eff
leaq 0x20(%r15), %r12
movl $0x330, %edx            # imm = 0x330
movl %ebp, %edi
movq %r12, %rsi
callq 0x10f0
cmpq $0x330, %rax            # imm = 0x330
jne 0x2f1e
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl $0xaaaaaaaa, %eax       # imm = 0xAAAAAAAA
cmpq %rax, (%r12)
jne 0x2f3d
movq 0x28(%r15), %rbx
movq %rbx, 0x10(%r15)
movl $0x10, %edi
callq 0x1120
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
testq %rbx, %rbx
je 0x2d93
movl 0x8(%r15), %ebp
movl $0x320, %edi            # imm = 0x320
callq 0x1120
movq %rax, %r13
movl $0x320, %edx            # imm = 0x320
movl %ebp, %edi
movq %rax, %rsi
callq 0x10f0
cmpq $0x320, %rax            # imm = 0x320
jne 0x2ee0
movq (%r12), %r14
movq 0x8(%r12), %rdi
leaq 0x1(%r14), %rax
movq %rax, (%r12)
leaq 0x8(,%r14,8), %rsi
callq 0x1130
movq %rax, 0x8(%r12)
movq %r13, (%rax,%r14,8)
decq %rbx
jne 0x2d3f
movq %r12, 0x18(%r15)
movq 0x10(%rsp), %rbx
movq %r15, 0x10(%rbx)
movl $0x648, %edi            # imm = 0x648
callq 0x1120
movq %rax, %r12
movq 0x8(%rsp), %rax
movq %rax, (%r12)
leaq 0x328(%r12), %rdi
movl $0x320, %edx            # imm = 0x320
xorl %esi, %esi
callq 0x10e0
leaq 0x8(%r12), %rdi
addq $0x30, %r15
movl $0x320, %edx            # imm = 0x320
movq %r15, %rsi
callq 0x1100
movq %r12, 0x8(%rbx)
jmp 0x2eb2
testl %ebx, %ebx
je 0x2ecc
movl $0x40, %edi
callq 0x1120
movq %rax, %rbx
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1120
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %r15, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x1060
testl %eax, %eax
jne 0x2f5c
movq %r15, (%rbx)
movl $0x350, %edi            # imm = 0x350
callq 0x1120
movq %rax, %r15
movq %r14, %rdi
callq 0x32ca
movq %rax, (%r15)
movl $0xffffffff, 0x8(%r15)  # imm = 0xFFFFFFFF
movq $0x0, 0x10(%r15)
movl $0x10, %edi
callq 0x1120
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, 0x18(%r15)
movl $0xaaaaaaaa, %eax       # imm = 0xAAAAAAAA
movq %rax, 0x20(%r15)
leaq 0x28(%r15), %rdi
movl $0x328, %edx            # imm = 0x328
xorl %esi, %esi
callq 0x10e0
movq %r15, 0x10(%rbx)
movl $0x648, %edi            # imm = 0x648
callq 0x1120
movq %rax, %r15
movq %r14, (%rax)
leaq 0x8(%rax), %rdi
movl $0x640, %edx            # imm = 0x640
xorl %esi, %esi
callq 0x10e0
movq %r15, 0x8(%rbx)
movq %rbx, %rdi
addq $0x18, %rdi
xorl %esi, %esi
callq 0x1180
testl %eax, %eax
je 0x2ece
movq %rbx, %rdi
callq 0x3152
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c0f(%rip), %rdi      # 0x4af6
leaq 0x1a63(%rip), %rsi      # 0x4951
leaq 0x1b83(%rip), %rcx      # 0x4a78
movl $0xfa, %edx
callq 0x10d0
leaq 0x1a97(%rip), %rdi      # 0x499d
leaq 0x1a44(%rip), %rsi      # 0x4951
leaq 0x1b64(%rip), %rcx      # 0x4a78
movl $0xee, %edx
callq 0x10d0
leaq 0x1b8b(%rip), %rdi      # 0x4ab0
leaq 0x1a25(%rip), %rsi      # 0x4951
leaq 0x1b45(%rip), %rcx      # 0x4a78
movl $0xf0, %edx
callq 0x10d0
leaq 0x1b85(%rip), %rdi      # 0x4ac9
leaq 0x1a06(%rip), %rsi      # 0x4951
leaq 0x1b26(%rip), %rcx      # 0x4a78
movl $0xf1, %edx
callq 0x10d0
leaq 0x1a3a(%rip), %rdi      # 0x499d
leaq 0x19e7(%rip), %rsi      # 0x4951
leaq 0x1be8(%rip), %rcx      # 0x4b59
movl $0x259, %edx            # imm = 0x259
callq 0x10d0