// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/API.cc
// Function: API::Delete(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Filter const&)
Response API::Delete(const std::string &tableName, const Filter &filter) {
    if (!cm.hasTable(tableName + ".table")) {
        return Response("Table does not exist");
    }
    
    Table nt = cm.loadTable(tableName + ".table");
    std::string dbName = tableName + ".db";
    for (size_t i = 0; i < filter.rules.size(); ++ i) {
        element val = filter.rules[i].val;
        int attrIndex = filter.rules[i].index;
        if (nt.attributes[attrIndex].type != val.type) {
            return Response("Type mismatch");
        }
    }
    
    for (size_t i = 0; i < filter.rules.size(); ++ i) {
        if (filter.rules[i].type == 2) { // =
            element val = filter.rules[i].val;
            int attrIndex = filter.rules[i].index;
            if (!nt.attributes[attrIndex].indices.empty()) { // has index on it
                std::string indexFileName = tableName + "." + nt.attributes[attrIndex].name;
                long offset = getOffset(indexFileName, val);
                // offset == -1 表示没有这个val
                // Record Manager delete records by using index
                // 传入数据库文件名（dbName），偏移量(offset)，过滤器(filter)，当前表(nt)
                rm.RecordManagerRecordDelete(dbName, offset, filter, nt);
                return Response();
            }
        }
    }
    /*
    if (filter.rules.empty()) {
        // Record Manager delete records without index
        // 传入数据库文件名（dbName），过滤器(filter)，当前表(nt)
        rm.rmDeleteWithoutIndex(dbName, filter, nt);
        return Response();
    }
    */
    std::set<long> offset;
    // Record Manager get offset according to dbName
    // 传入数据库文件名(daName)，返回一个offset的集合(类型set)
    offset = rm.RecordManagerGetAllOffsets(dbName, nt);
    for (size_t i = 0; i < filter.rules.size(); ++ i) {
        Rule rule = filter.rules[i];
        int attrIndex = rule.index;
        if (nt.attributes[attrIndex].indices.empty()) {
            continue;
        }
        element val = rule.val;
        std::string indexFileName = tableName + "." + nt.attributes[attrIndex].name;
        std::set<long> newOffset;
        long tmpOffset;
        // B plus tree get offset according to filter rules
        // 传入文件名(indexFileName)，属性的值(val)
        switch (rule.type) {
            case 0: // <
                newOffset = getLessOffset(indexFileName, val);
                break;
            case 1: // <=
                newOffset = getLessOffset(indexFileName, val);
                tmpOffset = getOffset(indexFileName, val);
                if (tmpOffset != -1) {
                    newOffset.insert(tmpOffset);
                }
                break;
            case 2: // =
                assert(false);
                break;
            case 3: // >=
                newOffset = getMoreOffset(indexFileName, val);
                tmpOffset = getOffset(indexFileName, val);
                if (tmpOffset != -1) {
                    newOffset.insert(tmpOffset);
                }
                break;
            case 4: // >
                newOffset = getMoreOffset(indexFileName, val);
                break;
            case 5: // <>
                newOffset = offset;
                break;
            default: 
                assert(false);
                break;
        }
        std::vector<long> tmp(offset.size());
        std::vector<long>::iterator end = std::set_intersection(offset.begin(), offset.end(), newOffset.begin(), newOffset.end(), tmp.begin());
        offset.clear();
        for (std::vector<long>::iterator it = tmp.begin(); it != end; ++ it) {
            offset.insert(*it);
        }
    }
    
    for (auto x : offset) {
        // Record Manager delete records by using index
        // 传入数据库文件名（dbName），偏移量(x)，过滤器(filter)，当前表(nt)
        rm.RecordManagerRecordDelete(dbName, x, filter, nt);
    }
    return Response();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movq %rcx, -0x38(%rbp)
movq %rsi, %r15
movq %rdi, %r12
leaq -0x290(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rdx), %rsi
movq %rdx, -0x138(%rbp)
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq -0x2a0(%rbp), %rbx
movq %rbx, %rdi
callq 0x8766
leaq 0xe001(%rip), %rsi      # 0x14051
movq %rbx, %rdi
callq 0x34f0
leaq -0x2a0(%rbp), %rsi
movq %r15, %rdi
callq 0xdd18
movl %eax, %ebx
movq -0x2a0(%rbp), %rdi
cmpq %r14, %rdi
je 0x607a
callq 0x3270
testb %bl, %bl
je 0x6d05
leaq -0xc8(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x138(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rbx
movq %rbx, %rdi
callq 0x8766
leaq 0xdf9d(%rip), %rsi      # 0x14051
movq %rbx, %rdi
callq 0x34f0
leaq -0x2a0(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
movq %r15, %rsi
callq 0xde70
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x60e3
callq 0x3270
leaq -0x150(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x138(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x160(%rbp), %rdi
callq 0x8766
movq %r15, -0x30(%rbp)
movq %r12, -0x130(%rbp)
leaq 0xdfa1(%rip), %rsi      # 0x140be
leaq -0x160(%rbp), %rdi
callq 0x34f0
movq -0x38(%rbp), %rax
movq (%rax), %r14
cmpq %r14, 0x8(%rax)
je 0x61e6
leaq -0xd0(%rbp), %rbx
leaq -0xc0(%rbp), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%r14,%r12), %rax
movq %rax, -0xd8(%rbp)
movq %r15, -0xd0(%rbp)
movq 0x10(%r14,%r12), %rsi
movq 0x18(%r14,%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x8766
movl 0x30(%r14,%r12), %eax
movl %eax, -0xb0(%rbp)
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movslq (%rcx,%r12), %rcx
movq -0x278(%rbp), %rdx
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
cmpl %eax, 0x20(%rdx,%rcx)
jne 0x6d5e
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
je 0x61b6
callq 0x3270
incq %r13
movq -0x38(%rbp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq $0x38, %r12
cmpq %rax, %r13
jb 0x614e
movq -0x38(%rbp), %rax
movq (%rax), %r14
cmpq %r14, 0x8(%rax)
je 0x62ad
leaq -0xd0(%rbp), %rbx
leaq -0xc0(%rbp), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl $0x2, 0x4(%r14,%r12)
jne 0x627d
movq 0x8(%r14,%r12), %rax
movq %rax, -0xd8(%rbp)
movq %r15, -0xd0(%rbp)
movq 0x10(%r14,%r12), %rsi
movq 0x18(%r14,%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x8766
movl 0x30(%r14,%r12), %eax
movl %eax, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movslq (%rax,%r12), %rax
movq -0x278(%rbp), %rcx
leaq (%rax,%rax,2), %r14
shlq $0x5, %r14
cmpq $0x0, 0x58(%rcx,%r14)
jne 0x6dfb
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
je 0x627d
callq 0x3270
incq %r13
movq -0x38(%rbp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq $0x38, %r12
cmpq %rax, %r13
jb 0x620b
leaq -0x188(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x3f0(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
addq %rsi, %rdx
leaq -0x400(%rbp), %rdi
callq 0x8766
movq -0x30(%rbp), %rax
leaq 0x30(%rax), %rsi
leaq -0xd8(%rbp), %rdi
leaq -0x400(%rbp), %rdx
leaq -0x2a0(%rbp), %rcx
movq %rsi, -0x198(%rbp)
callq 0x12ade
leaq -0x190(%rbp), %rdi
callq 0x83dc
movq -0xc8(%rbp), %rax
testq %rax, %rax
je 0x637e
leaq -0xd0(%rbp), %rcx
movl (%rcx), %edx
movl %edx, -0x188(%rbp)
movq %rax, -0x180(%rbp)
movups 0x10(%rcx), %xmm0
movups %xmm0, -0x178(%rbp)
leaq -0x188(%rbp), %rdx
movq %rdx, 0x8(%rax)
movq 0x20(%rcx), %rax
movq %rax, -0x168(%rbp)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xd8(%rbp), %rdi
callq 0x8454
movq -0x400(%rbp), %rdi
cmpq %r15, %rdi
je 0x639b
callq 0x3270
movq -0x38(%rbp), %rax
movq (%rax), %r15
cmpq %r15, 0x8(%rax)
je 0x6c51
leaq -0x100(%rbp), %r12
addq $0x40, -0x30(%rbp)
leaq -0x190(%rbp), %rbx
xorl %r13d, %r13d
imulq $0x38, %r13, %r14
movq (%r15,%r14), %rax
movq %rax, -0xd8(%rbp)
movq 0x8(%r15,%r14), %rax
movq %rax, -0xd0(%rbp)
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq 0x10(%r15,%r14), %rsi
movq 0x18(%r15,%r14), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0x8766
addq %r14, %r15
movl 0x30(%r15), %eax
movl %eax, -0xa8(%rbp)
movslq -0xd8(%rbp), %rax
movq -0x278(%rbp), %rcx
leaq (%rax,%rax,2), %r14
shlq $0x5, %r14
cmpq $0x0, 0x58(%rcx,%r14)
je 0x6c0d
movq -0xd0(%rbp), %rax
movq -0xc8(%rbp), %rsi
movq %rax, -0xa0(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0xc0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0x8766
movl -0xa8(%rbp), %eax
movl %eax, -0x78(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x138(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %r15
movq %r15, %rdi
callq 0x8766
movq %r15, %rdi
leaq 0xde23(%rip), %rsi      # 0x142d0
callq 0x34f0
movq -0x278(%rbp), %rax
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
movq %r15, %rdi
callq 0x30c0
leaq -0x118(%rbp), %r14
movq %r14, -0x128(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x70(%rbp), %r15
je 0x64fe
movq %rdx, -0x128(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x118(%rbp)
jmp 0x6505
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x120(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x108(%rbp), %r14
je 0x653e
callq 0x3270
movl $0x0, -0x100(%rbp)
xorl %eax, %eax
movq %rax, -0xf8(%rbp)
movq %r12, -0xf0(%rbp)
movq %r12, -0xe8(%rbp)
movq %rax, -0xe0(%rbp)
movl -0xd4(%rbp), %eax
cmpq $0x5, %rax
ja 0x7011
leaq 0xdabb(%rip), %rcx      # 0x14038
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
leaq -0x258(%rbp), %rdi
callq 0x8766
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x3c0(%rbp)
leaq -0x3a8(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x3b8(%rbp), %rdi
callq 0x8766
movl -0x78(%rbp), %eax
movl %eax, -0x398(%rbp)
movq %r15, %rdi
movq -0x30(%rbp), %rsi
leaq -0x258(%rbp), %rdx
leaq -0x3c0(%rbp), %rcx
callq 0xc588
movq %r14, %rdi
callq 0x83dc
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x665e
movl -0x68(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x58(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
movq %r12, 0x8(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %r15, %rdi
callq 0x8454
movq -0x3b8(%rbp), %rdi
leaq -0x3a8(%rbp), %rax
cmpq %rax, %rdi
je 0x667e
callq 0x3270
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
jmp 0x67a7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x846c
jmp 0x6b64
leaq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x8766
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x2d0(%rbp)
leaq -0x2b8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2c8(%rbp), %rdi
callq 0x8766
movl -0x78(%rbp), %eax
movl %eax, -0x2a8(%rbp)
movq %r15, %rdi
movq -0x30(%rbp), %rsi
leaq -0x1b8(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
callq 0xc428
movq %r14, %rdi
callq 0x83dc
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x6779
movl -0x68(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x58(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
movq %r12, 0x8(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %r15, %rdi
callq 0x8454
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x6799
callq 0x3270
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x6b64
callq 0x3270
jmp 0x6b64
leaq -0x1e8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1f8(%rbp), %rdi
callq 0x8766
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x330(%rbp)
leaq -0x318(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x328(%rbp), %rdi
callq 0x8766
movl -0x78(%rbp), %eax
movl %eax, -0x308(%rbp)
movq %r15, %rdi
movq -0x30(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
leaq -0x330(%rbp), %rcx
callq 0xc428
movq %r14, %rdi
callq 0x83dc
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x6892
movl -0x68(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x58(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
movq %r12, 0x8(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %r15, %rdi
callq 0x8454
movq -0x328(%rbp), %rdi
leaq -0x318(%rbp), %rax
cmpq %rax, %rdi
je 0x68b2
callq 0x3270
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x68ca
callq 0x3270
leaq -0x1c8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1d8(%rbp), %rdi
callq 0x8766
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x300(%rbp)
leaq -0x2e8(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2f8(%rbp), %rdi
callq 0x8766
movl -0x78(%rbp), %eax
movl %eax, -0x2d8(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0xc34e
movq %rax, -0x140(%rbp)
movq -0x2f8(%rbp), %rdi
leaq -0x2e8(%rbp), %rax
cmpq %rax, %rdi
je 0x696d
callq 0x3270
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
jmp 0x6b41
leaq -0x228(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
leaq -0x238(%rbp), %rdi
callq 0x8766
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x390(%rbp)
leaq -0x378(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x388(%rbp), %rdi
callq 0x8766
movl -0x78(%rbp), %eax
movl %eax, -0x368(%rbp)
movq %r15, %rdi
movq -0x30(%rbp), %rsi
leaq -0x238(%rbp), %rdx
leaq -0x390(%rbp), %rcx
callq 0xc588
movq %r14, %rdi
callq 0x83dc
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x6a58
movl -0x68(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x58(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
movq %r12, 0x8(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %r15, %rdi
callq 0x8454
movq -0x388(%rbp), %rdi
leaq -0x378(%rbp), %rax
cmpq %rax, %rdi
je 0x6a78
callq 0x3270
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
je 0x6a90
callq 0x3270
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
addq %rsi, %rdx
leaq -0x218(%rbp), %rdi
callq 0x8766
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x360(%rbp)
leaq -0x348(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0x358(%rbp), %rdi
callq 0x8766
movl -0x78(%rbp), %eax
movl %eax, -0x338(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x360(%rbp), %rdx
callq 0xc34e
movq %rax, -0x140(%rbp)
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x6b33
callq 0x3270
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x6b4b
callq 0x3270
cmpq $-0x1, -0x140(%rbp)
je 0x6b64
movq %r14, %rdi
leaq -0x140(%rbp), %rsi
callq 0x8d7e
movq -0x168(%rbp), %rsi
movq %r15, %rdi
leaq -0x39(%rbp), %rdx
callq 0x796c
movq -0x178(%rbp), %rdi
movq -0xf0(%rbp), %rdx
movq -0x70(%rbp), %r8
leaq -0x188(%rbp), %rsi
movq %r12, %r14
movq %r12, %rcx
callq 0x8ec8
movq %rax, %r15
movq %rbx, %rdi
callq 0x83dc
movq -0x70(%rbp), %r12
cmpq %r15, %r12
je 0x6bc0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8d7e
addq $0x8, %r12
jmp 0x6baa
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x6bce
callq 0x3270
leaq -0x108(%rbp), %rdi
callq 0x8454
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
movq %r14, %r12
je 0x6bf5
callq 0x3270
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x6c0d
callq 0x3270
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x6c25
callq 0x3270
incq %r13
movq -0x38(%rbp), %rax
movq (%rax), %r15
movq 0x8(%rax), %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq %rax, %r13
jb 0x63c2
movq -0x178(%rbp), %rbx
leaq -0x188(%rbp), %rax
cmpq %rax, %rbx
je 0x6cde
leaq -0x3d0(%rbp), %r14
leaq -0x3e0(%rbp), %r15
leaq -0x2a0(%rbp), %r12
movq 0x20(%rbx), %r13
movq %r14, -0x3e0(%rbp)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x8766
movq -0x198(%rbp), %rdi
movq %r15, %rsi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
movq %r12, %r8
callq 0x121a2
movq -0x3e0(%rbp), %rdi
cmpq %r14, %rdi
je 0x6cc7
callq 0x3270
movq %rbx, %rdi
callq 0x3320
movq %rax, %rbx
leaq -0x188(%rbp), %rax
cmpq %rax, %rbx
jne 0x6c79
movq -0x130(%rbp), %r12
movq %r12, %rdi
callq 0x13488
leaq -0x190(%rbp), %rdi
callq 0x8454
leaq -0x150(%rbp), %rbx
jmp 0x6dc2
leaq -0x470(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xd341(%rip), %rsi      # 0x14058
leaq 0xd34e(%rip), %rdx      # 0x1406c
leaq -0x480(%rbp), %rbx
movq %rbx, %rdi
callq 0x8800
movq %r12, %rdi
movq %rbx, %rsi
callq 0x134ae
movq -0x480(%rbp), %rdi
cmpq %r14, %rdi
je 0x6d49
callq 0x3270
movq %r12, %rax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x450(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xd401(%rip), %rsi      # 0x14171
leaq 0xd407(%rip), %rdx      # 0x1417e
leaq -0x460(%rbp), %rdi
callq 0x8800
leaq -0x460(%rbp), %rsi
movq -0x130(%rbp), %r12
movq %r12, %rdi
callq 0x134ae
movq -0x460(%rbp), %rdi
cmpq %r14, %rdi
je 0x6daa
callq 0x3270
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
leaq -0x150(%rbp), %rbx
je 0x6dc2
callq 0x3270
movq -0x160(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6dd3
callq 0x3270
leaq -0x278(%rbp), %rbx
movq %rbx, %rdi
callq 0x8304
movq -0x20(%rbx), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
jne 0x6d44
jmp 0x6d49
leaq -0x90(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x138(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x8766
leaq 0xd4a6(%rip), %rsi      # 0x142d0
leaq -0xa0(%rbp), %rdi
callq 0x34f0
movq -0x278(%rbp), %rax
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x30c0
leaq -0x180(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6e80
movq %rdx, -0x190(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x180(%rbp)
jmp 0x6e88
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x188(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0xa0(%rbp), %rdi
cmpq %r13, %rdi
je 0x6eb3
callq 0x3270
leaq -0x430(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
addq %rsi, %rdx
leaq -0x440(%rbp), %rdi
callq 0x8766
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
leaq -0x4a8(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0x498(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
callq 0x8766
movl -0xb0(%rbp), %eax
leaq -0x4b0(%rbp), %rdx
movl %eax, 0x28(%rdx)
movq -0x30(%rbp), %rax
leaq 0x40(%rax), %rdi
leaq -0x440(%rbp), %rsi
callq 0xc34e
movq %rax, %rbx
movq -0x4a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x6f46
callq 0x3270
movq -0x440(%rbp), %rdi
cmpq %r13, %rdi
je 0x6f57
callq 0x3270
leaq -0x410(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
addq %rsi, %rdx
leaq -0x420(%rbp), %rdi
callq 0x8766
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
leaq -0x420(%rbp), %rsi
leaq -0x2a0(%rbp), %r8
movq %rbx, %rdx
movq -0x38(%rbp), %rcx
callq 0x121a2
movq -0x420(%rbp), %rdi
cmpq %r14, %rdi
je 0x6fb2
callq 0x3270
movq -0x130(%rbp), %rdi
callq 0x13488
movq -0x190(%rbp), %rdi
cmpq %r12, %rdi
je 0x6fcf
callq 0x3270
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
leaq -0x150(%rbp), %rbx
movq -0x130(%rbp), %r12
jne 0x6dbd
jmp 0x6dc2
leaq 0xd186(%rip), %rdi      # 0x1417f
leaq 0xd109(%rip), %rsi      # 0x14109
leaq 0xd1b8(%rip), %rcx      # 0x141bf
movl $0x10f, %edx            # imm = 0x10F
callq 0x31a0
leaq 0xd167(%rip), %rdi      # 0x1417f
leaq 0xd0ea(%rip), %rsi      # 0x14109
leaq 0xd199(%rip), %rcx      # 0x141bf
movl $0x11f, %edx            # imm = 0x11F
callq 0x31a0
movq %rax, %rbx
movq -0x420(%rbp), %rdi
cmpq %r14, %rdi
jne 0x7066
jmp 0x709b
movq %rax, %rbx
movq -0x4a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x705a
callq 0x3270
jmp 0x705a
movq %rax, %rbx
movq -0x440(%rbp), %rdi
cmpq %r13, %rdi
je 0x709b
callq 0x3270
jmp 0x709b
jmp 0x706f
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
cmpq %r13, %rdi
jne 0x70a7
jmp 0x70ac
jmp 0x7093
movq %rax, %rbx
movq -0x460(%rbp), %rdi
cmpq %r14, %rdi
jne 0x70a7
jmp 0x70ac
movq %rax, %rbx
jmp 0x70ac
movq %rax, %rbx
movq -0x190(%rbp), %rdi
cmpq %r12, %rdi
je 0x70ac
callq 0x3270
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
je 0x732e
callq 0x3270
jmp 0x732e
jmp 0x72a7
movq %rax, %rbx
movq -0x400(%rbp), %rdi
cmpq %r15, %rdi
jne 0x731d
jmp 0x7322
jmp 0x72a7
jmp 0x729d
movq %rax, %rbx
jmp 0x7346
jmp 0x7106
movq %rax, %rbx
movq -0x480(%rbp), %rdi
jmp 0x725d
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
jmp 0x725d
movq %rax, %rbx
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x7135
callq 0x3270
jmp 0x7135
movq %rax, %rbx
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
jmp 0x7248
movq %rax, %rbx
movq -0x388(%rbp), %rdi
leaq -0x378(%rbp), %rax
cmpq %rax, %rdi
je 0x7168
callq 0x3270
jmp 0x7168
movq %rax, %rbx
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
jmp 0x7248
jmp 0x7274
movq %rax, %rbx
movq -0x2f8(%rbp), %rdi
leaq -0x2e8(%rbp), %rax
cmpq %rax, %rdi
je 0x71a0
callq 0x3270
jmp 0x71a0
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
jmp 0x7248
movq %rax, %rbx
movq -0x328(%rbp), %rdi
leaq -0x318(%rbp), %rax
cmpq %rax, %rdi
je 0x71d3
callq 0x3270
jmp 0x71d3
movq %rax, %rbx
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
jmp 0x7248
jmp 0x7274
movq %rax, %rbx
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x7208
callq 0x3270
jmp 0x7208
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
jmp 0x7248
jmp 0x7274
movq %rax, %rbx
movq -0x3b8(%rbp), %rdi
leaq -0x3a8(%rbp), %rax
cmpq %rax, %rdi
je 0x723a
callq 0x3270
jmp 0x723a
movq %rax, %rbx
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
cmpq %rax, %rdi
jne 0x72c9
jmp 0x72ce
jmp 0x7274
jmp 0x7253
movq %rax, %rbx
movq -0x2a0(%rbp), %rdi
cmpq %r14, %rdi
je 0x7352
callq 0x3270
jmp 0x7352
jmp 0x729d
jmp 0x7274
movq %rax, %rbx
jmp 0x72ce
jmp 0x728a
jmp 0x72bd
movq %rax, %rbx
jmp 0x730a
movq %rax, %rbx
jmp 0x72f2
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
jmp 0x72e8
movq %rax, %rbx
jmp 0x732e
jmp 0x72a7
movq %rax, %rbx
jmp 0x7322
movq %rax, %rbx
movq -0x3e0(%rbp), %rdi
cmpq %r14, %rdi
jne 0x731d
jmp 0x7322
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x72ce
callq 0x3270
leaq -0x108(%rbp), %rdi
callq 0x8454
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x72f2
callq 0x3270
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x730a
callq 0x3270
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x7322
callq 0x3270
leaq -0x190(%rbp), %rdi
callq 0x8454
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
je 0x7346
callq 0x3270
leaq -0x2a0(%rbp), %rdi
callq 0x78f8
movq %rbx, %rdi
callq 0x3480