// File: /workspace/github_cpp_makefile_star2_O2/Konano[P]UselessDatabase/Index.cpp
// Function: Index::Index(Table*, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>)
Index::Index(Table* table, json j) : table(table) {
    strcpy(name, j["name"].get<std::string>().c_str());
    key.clear();
    ty.clear();
    offset.clear();
    key_num = j["key_num"].get<int>();
    for (uint i = 0; i < key_num; i++) key.push_back(j["key"][i]);
    for (uint i = 0; i < key_num; i++) offset.push_back(j["offset"][i]);
    page_num = j["page_num"].get<int>();
    root_page = j["root_page"].get<int>();
    next_del_page = j["next_del_page"].get<int>();
    record_size = j["record_size"].get<int>();
    for (uint i = 0; i < key_num; i++) ty.push_back((enumType)j["ty"][i]);
    fileID = -1; // file is closed
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rdi, %r13
movq %rsi, (%rdi)
leaq 0x30(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x48(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x78(%rdi), %r15
xorps %xmm0, %xmm0
andq $0x0, 0x88(%rdi)
movups %xmm0, 0x78(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
leaq 0x22eed(%rip), %rsi     # 0x3802e
movq %rdx, %rdi
callq 0x7c7e
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x7f18
leaq 0x8(%r13), %rdi
leaq 0x18(%rsp), %rbx
movq (%rbx), %rsi
callq 0x53b0
movq %rbx, %rdi
callq 0x5200
movq 0x30(%r13), %rax
cmpq %rax, 0x38(%r13)
je 0x1517d
movq %rax, 0x38(%r13)
movq 0x78(%r13), %rax
cmpq %rax, 0x80(%r13)
je 0x15191
movq %rax, 0x80(%r13)
movq 0x48(%r13), %rax
cmpq %rax, 0x50(%r13)
je 0x1519f
movq %rax, 0x50(%r13)
leaq 0x22ace(%rip), %rsi     # 0x37c74
movq %r12, %rdi
callq 0x7c7e
movq %rax, %rdi
callq 0x7f58
movl %eax, 0x28(%r13)
xorl %ebp, %ebp
leaq 0x207c6(%rip), %rbx     # 0x35989
leaq 0x18(%rsp), %r14
movl %eax, %ecx
cmpq %rcx, %rbp
jae 0x15207
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7c7e
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7f8e
movq %rax, %rdi
callq 0x188fa
movl %eax, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x185ce
incq %rbp
movl 0x28(%r13), %eax
jmp 0x151c8
xorl %ebp, %ebp
leaq 0x22a6c(%rip), %rbx     # 0x37c7c
leaq 0x18(%rsp), %r14
movl %eax, %eax
cmpq %rax, %rbp
jae 0x15254
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7c7e
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7f8e
movq %rax, %rdi
callq 0x188fa
movl %eax, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x185ce
incq %rbp
movl 0x28(%r13), %eax
jmp 0x15215
leaq 0x22a28(%rip), %rsi     # 0x37c83
movq %r12, %rdi
callq 0x7c7e
movq %rax, %rdi
callq 0x7f58
movl %eax, 0x60(%r13)
leaq 0x22a16(%rip), %rsi     # 0x37c8c
movq %r12, %rdi
callq 0x7c7e
movq %rax, %rdi
callq 0x7f58
movl %eax, 0x64(%r13)
leaq 0x22a05(%rip), %rsi     # 0x37c96
movq %r12, %rdi
callq 0x7c7e
movq %rax, %rdi
callq 0x7f58
movl %eax, 0x68(%r13)
leaq 0x229f8(%rip), %rsi     # 0x37ca4
movq %r12, %rdi
callq 0x7c7e
movq %rax, %rdi
callq 0x7f58
movw %ax, 0x6c(%r13)
xorl %ebx, %ebx
leaq 0x22d03(%rip), %r14     # 0x37fcd
leaq 0x18(%rsp), %rbp
movl 0x28(%r13), %eax
cmpq %rax, %rbx
jae 0x1530a
movq %r12, %rdi
movq %r14, %rsi
callq 0x7c7e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7f8e
movq %rax, %rdi
callq 0x189fa
movl %eax, 0x18(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x18b0a
incq %rbx
jmp 0x152cf
orl $-0x1, 0x74(%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15326
jmp 0x15326
jmp 0x15326
jmp 0x15326
movq %rax, %rbx
movq %r15, %rdi
callq 0x1859a
movq 0x8(%rsp), %rdi
callq 0x18566
movq 0x10(%rsp), %rdi
callq 0x18566
movq %rbx, %rdi
callq 0x56f0
nop