// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq %rsi, %r13
movq %rdi, %r12
leaq -0x290(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rdx), %rsi
movq %rdx, -0x118(%rbp)
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq -0x2a0(%rbp), %rbx
movq %rbx, %rdi
callq 0x88b4
leaq 0xdf26(%rip), %rsi      # 0x14051
movq %rbx, %rdi
callq 0x34f0
leaq -0x2a0(%rbp), %rsi
movq %r13, %rdi
callq 0xde1c
movl %eax, %ebx
movq -0x2a0(%rbp), %rdi
cmpq %r14, %rdi
je 0x6155
callq 0x3270
testb %bl, %bl
je 0x6e09
leaq -0x98(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x118(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
callq 0x88b4
leaq 0xdec2(%rip), %rsi      # 0x14051
movq %rbx, %rdi
callq 0x34f0
leaq -0x2a0(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
movq %r13, %rsi
callq 0xdf7e
movq -0xa8(%rbp), %rdi
cmpq %r14, %rdi
je 0x61be
callq 0x3270
leaq -0x180(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x118(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x190(%rbp), %rdi
callq 0x88b4
leaq 0xded1(%rip), %rsi      # 0x140be
leaq -0x190(%rbp), %rdi
callq 0x34f0
movq %r13, -0x30(%rbp)
movq %r12, -0x110(%rbp)
movq (%r15), %r12
movq %r15, -0x38(%rbp)
movq 0x8(%r15), %rax
cmpq %r12, %rax
je 0x62c1
leaq -0x90(%rbp), %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
movq -0x38(%rbp), %rbx
movq 0x8(%r12,%r13), %rax
movq %rax, -0xa8(%rbp)
movq %r15, -0xa0(%rbp)
movq 0x10(%r12,%r13), %rsi
movq 0x18(%r12,%r13), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x88b4
movl 0x30(%r12,%r13), %eax
movl %eax, -0x80(%rbp)
movq -0x38(%rbp), %rcx
movq (%rcx), %r12
movslq (%r12,%r13), %rcx
movq -0x278(%rbp), %rdx
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
cmpl %eax, 0x20(%rdx,%rcx)
jne 0x6e62
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x6295
callq 0x3270
movq (%rbx), %r12
incq %r14
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %r12, %rcx
sarq $0x3, %rcx
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
addq $0x38, %r13
cmpq %rcx, %r14
jb 0x6229
cmpq %r12, %rax
je 0x638b
leaq -0xa0(%rbp), %rbx
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpl $0x2, 0x4(%r12,%r13)
jne 0x6363
movq 0x8(%r12,%r13), %rax
movq %rax, -0xa8(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq 0x10(%r12,%r13), %rsi
movq 0x18(%r12,%r13), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x88b4
movl 0x30(%r12,%r13), %eax
movl %eax, -0x80(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %r12
movslq (%r12,%r13), %rax
movq -0x278(%rbp), %rcx
leaq (%rax,%rax,2), %r14
shlq $0x5, %r14
cmpq $0x0, 0x58(%rcx,%r14)
jne 0x6ecf
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %r14
je 0x635f
callq 0x3270
movq (%r14), %r12
movq 0x8(%r14), %rax
incq %r15
movq %rax, %rcx
subq %r12, %rcx
sarq $0x3, %rcx
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
addq $0x38, %r13
cmpq %rcx, %r15
jb 0x62d7
leaq -0x168(%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 -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
addq %rsi, %rdx
leaq -0x400(%rbp), %rdi
callq 0x88b4
movq -0x30(%rbp), %rax
leaq 0x30(%rax), %rsi
leaq -0xa8(%rbp), %rdi
leaq -0x400(%rbp), %rdx
leaq -0x2a0(%rbp), %rcx
movq %rsi, -0x198(%rbp)
callq 0x12c42
movq -0x38(%rbp), %rbx
leaq -0x170(%rbp), %rdi
callq 0x8524
movq -0x98(%rbp), %rax
testq %rax, %rax
je 0x6460
leaq -0xa0(%rbp), %rcx
movl (%rcx), %edx
movl %edx, -0x168(%rbp)
movq %rax, -0x160(%rbp)
movups 0x10(%rcx), %xmm0
movups %xmm0, -0x158(%rbp)
leaq -0x168(%rbp), %rdx
movq %rdx, 0x8(%rax)
movq 0x20(%rcx), %rax
movq %rax, -0x148(%rbp)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xa8(%rbp), %rdi
callq 0x859c
movq -0x400(%rbp), %rdi
cmpq %r15, %rdi
je 0x647d
callq 0x3270
movq (%rbx), %r15
cmpq %r15, 0x8(%rbx)
je 0x6d55
addq $0x40, -0x30(%rbp)
leaq -0x170(%rbp), %rbx
xorl %r13d, %r13d
imulq $0x38, %r13, %r14
movq (%r15,%r14), %rax
movq %rax, -0xa8(%rbp)
movq 0x8(%r15,%r14), %rax
movq %rax, -0xa0(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x10(%r15,%r14), %rsi
movq 0x18(%r15,%r14), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0x88b4
addq %r14, %r15
movl 0x30(%r15), %eax
movl %eax, -0x78(%rbp)
movslq -0xa8(%rbp), %rax
movq -0x278(%rbp), %rcx
leaq (%rax,%rax,2), %r14
shlq $0x5, %r14
cmpq $0x0, 0x58(%rcx,%r14)
leaq -0x108(%rbp), %r15
je 0x6d11
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0xd8(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x88b4
movl -0x78(%rbp), %eax
movl %eax, -0xb0(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x118(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x88b4
movq %r15, %rdi
leaq 0xdd4f(%rip), %rsi      # 0x142d0
callq 0x34f0
movq -0x278(%rbp), %rax
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
movq %r15, %rdi
callq 0x30c0
leaq -0x130(%rbp), %r14
movq %r14, -0x140(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x65ce
movq %rdx, -0x140(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x130(%rbp)
jmp 0x65d5
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x138(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x6607
callq 0x3270
movl $0x0, -0x100(%rbp)
xorl %ecx, %ecx
movq %rcx, -0xf8(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq %rax, -0xe8(%rbp)
movq %rcx, -0xe0(%rbp)
movl -0xa4(%rbp), %eax
cmpq $0x5, %rax
ja 0x7121
leaq 0xd9eb(%rip), %rcx      # 0x14038
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0x258(%rbp), %rdi
callq 0x88b4
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0x3c0(%rbp)
leaq -0x3a8(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x3b8(%rbp), %rdi
callq 0x88b4
movl -0xb0(%rbp), %eax
movl %eax, -0x398(%rbp)
leaq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x258(%rbp), %rdx
leaq -0x3c0(%rbp), %rcx
callq 0xc6d6
movq %r15, %rdi
callq 0x8524
movq -0x58(%rbp), %rax
testq %rax, %rax
je 0x6739
movl -0x60(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x50(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
leaq -0x100(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x58(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x859c
movq -0x3b8(%rbp), %rdi
leaq -0x3a8(%rbp), %rax
cmpq %rax, %rdi
je 0x675a
callq 0x3270
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
jmp 0x688f
movq %r15, %rdi
movq %rbx, %rsi
callq 0x85b4
jmp 0x6c6a
leaq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x88b4
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0x2d0(%rbp)
leaq -0x2b8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2c8(%rbp), %rdi
callq 0x88b4
movl -0xb0(%rbp), %eax
movl %eax, -0x2a8(%rbp)
leaq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x1b8(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
callq 0xc57e
movq %r15, %rdi
callq 0x8524
movq -0x58(%rbp), %rax
testq %rax, %rax
je 0x6860
movl -0x60(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x50(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
leaq -0x100(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x58(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x859c
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x6881
callq 0x3270
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x6c6a
callq 0x3270
jmp 0x6c6a
leaq -0x1e8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1f8(%rbp), %rdi
callq 0x88b4
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0x330(%rbp)
leaq -0x318(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x328(%rbp), %rdi
callq 0x88b4
movl -0xb0(%rbp), %eax
movl %eax, -0x308(%rbp)
leaq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
leaq -0x330(%rbp), %rcx
callq 0xc57e
movq %r15, %rdi
callq 0x8524
movq -0x58(%rbp), %rax
testq %rax, %rax
je 0x6985
movl -0x60(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x50(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
leaq -0x100(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x58(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x859c
movq -0x328(%rbp), %rdi
leaq -0x318(%rbp), %rax
cmpq %rax, %rdi
je 0x69a6
callq 0x3270
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x69be
callq 0x3270
leaq -0x1c8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1d8(%rbp), %rdi
callq 0x88b4
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0x300(%rbp)
leaq -0x2e8(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x2f8(%rbp), %rdi
callq 0x88b4
movl -0xb0(%rbp), %eax
movl %eax, -0x2d8(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0xc4a4
movq %rax, -0x120(%rbp)
movq -0x2f8(%rbp), %rdi
leaq -0x2e8(%rbp), %rax
cmpq %rax, %rdi
je 0x6a64
callq 0x3270
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
jmp 0x6c47
leaq -0x228(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0x238(%rbp), %rdi
callq 0x88b4
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0x390(%rbp)
leaq -0x378(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x388(%rbp), %rdi
callq 0x88b4
movl -0xb0(%rbp), %eax
movl %eax, -0x368(%rbp)
leaq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x238(%rbp), %rdx
leaq -0x390(%rbp), %rcx
callq 0xc6d6
movq %r15, %rdi
callq 0x8524
movq -0x58(%rbp), %rax
testq %rax, %rax
je 0x6b5a
movl -0x60(%rbp), %ecx
movl %ecx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movups -0x50(%rbp), %xmm0
movups %xmm0, -0xf0(%rbp)
leaq -0x100(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x58(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x859c
movq -0x388(%rbp), %rdi
leaq -0x378(%rbp), %rax
cmpq %rax, %rdi
je 0x6b7b
callq 0x3270
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
cmpq %rax, %rdi
je 0x6b93
callq 0x3270
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0x218(%rbp), %rdi
callq 0x88b4
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rsi
movq %rax, -0x360(%rbp)
leaq -0x348(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x358(%rbp), %rdi
callq 0x88b4
movl -0xb0(%rbp), %eax
movl %eax, -0x338(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x360(%rbp), %rdx
callq 0xc4a4
movq %rax, -0x120(%rbp)
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x6c39
callq 0x3270
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x6c51
callq 0x3270
cmpq $-0x1, -0x120(%rbp)
je 0x6c6a
movq %r15, %rdi
leaq -0x120(%rbp), %rsi
callq 0x8ede
movq -0x148(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x69(%rbp), %rdx
callq 0x7aba
movq -0x158(%rbp), %rdi
movq -0xf0(%rbp), %rdx
movq -0x68(%rbp), %r8
leaq -0x168(%rbp), %rsi
leaq -0x100(%rbp), %rcx
callq 0x901e
movq %rax, %r12
movq %rbx, %rdi
callq 0x8524
movq -0x68(%rbp), %r15
cmpq %r12, %r15
je 0x6ccf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8ede
addq $0x8, %r15
cmpq %r12, %r15
jne 0x6cb7
movq -0x68(%rbp), %r15
testq %r15, %r15
je 0x6cdc
movq %r15, %rdi
callq 0x3270
leaq -0x108(%rbp), %rdi
callq 0x859c
movq -0x140(%rbp), %rdi
cmpq %r14, %rdi
je 0x6cf9
callq 0x3270
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x6d11
callq 0x3270
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x6d29
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 0x6499
movq -0x158(%rbp), %rbx
leaq -0x168(%rbp), %rax
cmpq %rax, %rbx
je 0x6de2
leaq -0x3d0(%rbp), %r14
leaq -0x3e0(%rbp), %r15
leaq -0x2a0(%rbp), %r12
movq 0x20(%rbx), %r13
movq %r14, -0x3e0(%rbp)
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x88b4
movq -0x198(%rbp), %rdi
movq %r15, %rsi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
movq %r12, %r8
callq 0x12300
movq -0x3e0(%rbp), %rdi
cmpq %r14, %rdi
je 0x6dcb
callq 0x3270
movq %rbx, %rdi
callq 0x3320
movq %rax, %rbx
leaq -0x168(%rbp), %rax
cmpq %rax, %rbx
jne 0x6d7d
movq -0x110(%rbp), %r12
movq %r12, %rdi
callq 0x135ba
leaq -0x170(%rbp), %rdi
callq 0x859c
leaq -0x180(%rbp), %rbx
jmp 0x70c9
leaq -0x470(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xd23d(%rip), %rsi      # 0x14058
leaq 0xd24a(%rip), %rdx      # 0x1406c
leaq -0x480(%rbp), %rbx
movq %rbx, %rdi
callq 0x8952
movq %r12, %rdi
movq %rbx, %rsi
callq 0x135e0
movq -0x480(%rbp), %rdi
cmpq %r14, %rdi
je 0x6e4d
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 0xd2fd(%rip), %rsi      # 0x14171
leaq 0xd303(%rip), %rdx      # 0x1417e
leaq -0x460(%rbp), %rdi
callq 0x8952
leaq -0x460(%rbp), %rsi
movq -0x110(%rbp), %r12
movq %r12, %rdi
callq 0x135e0
movq -0x460(%rbp), %rdi
cmpq %r14, %rdi
je 0x6eae
callq 0x3270
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
leaq -0x180(%rbp), %rbx
je 0x70c9
callq 0x3270
jmp 0x70c9
leaq -0xc8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x118(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x88b4
leaq 0xd3d2(%rip), %rsi      # 0x142d0
leaq -0xd8(%rbp), %rdi
callq 0x34f0
movq -0x278(%rbp), %rax
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x30c0
leaq -0x160(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6f54
movq %rdx, -0x170(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x160(%rbp)
jmp 0x6f5c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x168(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x6f87
callq 0x3270
leaq -0x430(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
addq %rsi, %rdx
leaq -0x440(%rbp), %rdi
callq 0x88b4
movq -0xa8(%rbp), %rax
movq -0xa0(%rbp), %rsi
leaq -0x4a8(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0x498(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
callq 0x88b4
movl -0x80(%rbp), %eax
leaq -0x4b0(%rbp), %rdx
movl %eax, 0x28(%rdx)
movq -0x30(%rbp), %rax
leaq 0x40(%rax), %rdi
leaq -0x440(%rbp), %rsi
callq 0xc4a4
movq %rax, %rbx
movq -0x4a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x7017
callq 0x3270
movq -0x440(%rbp), %rdi
cmpq %r13, %rdi
je 0x7028
callq 0x3270
leaq -0x410(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
addq %rsi, %rdx
leaq -0x420(%rbp), %rdi
callq 0x88b4
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
leaq -0x420(%rbp), %rsi
leaq -0x2a0(%rbp), %r8
movq %rbx, %rdx
movq -0x38(%rbp), %rcx
callq 0x12300
movq -0x420(%rbp), %rdi
cmpq %r14, %rdi
movq -0x110(%rbp), %rbx
je 0x708a
callq 0x3270
movq %rbx, %rdi
callq 0x135ba
movq -0x170(%rbp), %rdi
cmpq %r12, %rdi
je 0x70a3
callq 0x3270
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
leaq -0x180(%rbp), %rbx
je 0x70c2
callq 0x3270
movq -0x110(%rbp), %r12
movq -0x190(%rbp), %rdi
cmpq %rbx, %rdi
je 0x70da
callq 0x3270
leaq -0x278(%rbp), %rbx
movq %rbx, %rdi
callq 0x844c
movq -0x20(%rbx), %rdi
leaq -0x288(%rbp), %rax
cmpq %rax, %rdi
jne 0x6e48
jmp 0x6e4d
leaq 0xd076(%rip), %rdi      # 0x1417f
leaq 0xcff9(%rip), %rsi      # 0x14109
leaq 0xd0a8(%rip), %rcx      # 0x141bf
movl $0x10f, %edx            # imm = 0x10F
callq 0x31a0
leaq 0xd057(%rip), %rdi      # 0x1417f
leaq 0xcfda(%rip), %rsi      # 0x14109
leaq 0xd089(%rip), %rcx      # 0x141bf
movl $0x11f, %edx            # imm = 0x11F
callq 0x31a0
movq %rax, %rbx
movq -0x420(%rbp), %rdi
cmpq %r14, %rdi
jne 0x7176
jmp 0x71c2
movq %rax, %rbx
movq -0x4a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x716a
callq 0x3270
jmp 0x716a
movq %rax, %rbx
movq -0x440(%rbp), %rdi
cmpq %r13, %rdi
je 0x71c2
callq 0x3270
jmp 0x71c2
jmp 0x717f
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x71ce
jmp 0x71d3
movq %rax, %rbx
jmp 0x71d3
movq %rax, %rbx
movq -0x460(%rbp), %rdi
cmpq %r14, %rdi
je 0x71ae
callq 0x3270
jmp 0x71ae
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
jne 0x71ea
jmp 0x746f
movq %rax, %rbx
movq -0x170(%rbp), %rdi
cmpq %r12, %rdi
je 0x71d3
callq 0x3270
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x746f
callq 0x3270
jmp 0x746f
jmp 0x73e8
movq %rax, %rbx
movq -0x400(%rbp), %rdi
cmpq %r15, %rdi
jne 0x745e
jmp 0x7463
jmp 0x73e8
movq %rax, %rbx
movq -0x190(%rbp), %rdi
cmpq %r14, %rdi
jne 0x7482
jmp 0x7487
movq %rax, %rbx
jmp 0x7487
jmp 0x7247
movq %rax, %rbx
movq -0x480(%rbp), %rdi
jmp 0x739e
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
jmp 0x739e
movq %rax, %rbx
movq -0x358(%rbp), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x7276
callq 0x3270
jmp 0x7276
movq %rax, %rbx
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
jmp 0x7389
movq %rax, %rbx
movq -0x388(%rbp), %rdi
leaq -0x378(%rbp), %rax
cmpq %rax, %rdi
je 0x72a9
callq 0x3270
jmp 0x72a9
movq %rax, %rbx
movq -0x238(%rbp), %rdi
leaq -0x228(%rbp), %rax
jmp 0x7389
jmp 0x73b5
movq %rax, %rbx
movq -0x2f8(%rbp), %rdi
leaq -0x2e8(%rbp), %rax
cmpq %rax, %rdi
je 0x72e1
callq 0x3270
jmp 0x72e1
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
jmp 0x7389
movq %rax, %rbx
movq -0x328(%rbp), %rdi
leaq -0x318(%rbp), %rax
cmpq %rax, %rdi
je 0x7314
callq 0x3270
jmp 0x7314
movq %rax, %rbx
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
jmp 0x7389
jmp 0x73b5
movq %rax, %rbx
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x7349
callq 0x3270
jmp 0x7349
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
jmp 0x7389
jmp 0x73b5
movq %rax, %rbx
movq -0x3b8(%rbp), %rdi
leaq -0x3a8(%rbp), %rax
cmpq %rax, %rdi
je 0x737b
callq 0x3270
jmp 0x737b
movq %rax, %rbx
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
cmpq %rax, %rdi
jne 0x740a
jmp 0x740f
jmp 0x73b5
jmp 0x7394
movq %rax, %rbx
movq -0x2a0(%rbp), %rdi
cmpq %r14, %rdi
je 0x7493
callq 0x3270
jmp 0x7493
jmp 0x73de
jmp 0x73b5
movq %rax, %rbx
jmp 0x740f
jmp 0x73cb
jmp 0x73fe
movq %rax, %rbx
jmp 0x744b
movq %rax, %rbx
jmp 0x7433
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
jmp 0x7429
movq %rax, %rbx
jmp 0x746f
jmp 0x73e8
movq %rax, %rbx
jmp 0x7463
movq %rax, %rbx
movq -0x3e0(%rbp), %rdi
cmpq %r14, %rdi
jne 0x745e
jmp 0x7463
movq %rax, %rbx
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x740f
callq 0x3270
leaq -0x108(%rbp), %rdi
callq 0x859c
movq -0x140(%rbp), %rdi
leaq -0x130(%rbp), %rax
cmpq %rax, %rdi
je 0x7433
callq 0x3270
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x744b
callq 0x3270
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x7463
callq 0x3270
leaq -0x170(%rbp), %rdi
callq 0x859c
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x7487
callq 0x3270
leaq -0x2a0(%rbp), %rdi
callq 0x7a3c
movq %rbx, %rdi
callq 0x3480
nop