// File: Konano[P]UselessDatabase/Table.cpp
// Function: Table::removeRecord(int)
int Table::removeRecord(const int record_id) {
    int index;
    BufType buf = bpm->getPage(main_file, record_id / record_onepg, index);
    if (exist(buf, record_id % record_onepg)) {
        Any* data;
        queryRecord(record_id, data);
        for (uint i = 0; i < index_num; i++) {
            Anys temp;
            for (uint j = 0; j < this->index[i].key_num; j++) {
                temp.push_back(data[this->index[i].key[j]]);
            }
            this->index[i].removeRecord(&temp, record_id);
            if (i == (uint)p_key_index) {
                for (auto _k: p_key->f) {
                    for(uint jx = 0;jx < _k->table->f_key.size();jx ++){
                        if(_k->table->f_key[jx]->p->table == this){
                            std::vector <int> ans;
                            if(_k->table->index[_k->table->f_key_index[jx]].fileID == -1){
                                _k->table->index[_k->table->f_key_index[jx]].open();
                                ans = _k->table->index[_k->table->f_key_index[jx]].queryRecord(&temp);
                                _k->table->index[_k->table->f_key_index[jx]].close();
                            }
                            else {
                                ans = _k->table->index[_k->table->f_key_index[jx]].queryRecord(&temp);
                            }
                            for(uint k = 0;k < ans.size();k ++){
                                if(_k->table->index[_k->table->f_key_index[jx]].fileID == -1){
                                    _k->table->index[_k->table->f_key_index[jx]].open();
                                    _k->table->index[_k->table->f_key_index[jx]].removeRecord(&temp,ans[k]);
                                    Anys nullkey;
                                    for(uint m = 0;m < temp.size();m ++)nullkey.push_back(Any());
                                    _k->table->index[_k->table->f_key_index[jx]].insertRecord(&nullkey,ans[k]);
                                    _k->table->index[_k->table->f_key_index[jx]].close();
                                }
                                else {
                                    _k->table->index[_k->table->f_key_index[jx]].removeRecord(&temp,ans[k]);
                                    Anys nullkey;
                                    for(uint m = 0;m < temp.size();m ++)nullkey.push_back(Any());
                                    _k->table->index[_k->table->f_key_index[jx]].insertRecord(&nullkey,ans[k]);
                                }
                                Anys pre = _k->table->queryRecord(ans[k]);
                                Anys after;
                                vector<bool> mark;
                                for(uint m = 0;m < pre.size();m ++)mark.push_back(true);
                                for(uint m = 0;m < _k->table->f_key[jx]->v.size();m ++)mark[_k->table->f_key[jx]->v[m]] = false;
                                for(uint m = 0;m < pre.size();m ++){
                                    if(mark[m]) after.push_back(pre[m]);
                                    else after.push_back(Any());
                                }
                                int index;
                                BufType buf = bpm->getPage(_k->table->main_file, ans[k] / _k->table->record_onepg, index);
                                buf += (_k->table->record_onepg - 1) / 8 + 1;
                                buf += _k->table->record_size * (ans[k] % _k->table->record_onepg);
                                for (uint q = 0; q < _k->table->col_num; q++) {
                                    insert(after[q], _k->table->col_ty[q].ty, _k->table->col_ty[q].size(), buf);
                                }
                                bpm->markDirty(index);
                            }
                        }
                    }
                }
            }
        }
        
        exist_reset(buf, record_id % record_onepg);
        bpm->markDirty(index);
        return 0;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x1f0(%rbp)
movq 0x48(%rcx), %rdi
movl 0x9fa4(%rcx), %esi
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl 0x9fac(%rcx)
movl %eax, %edx
leaq -0x18(%rbp), %rcx
callq 0x71d0
movq -0x1f0(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl 0x9fac(%rcx)
movq -0x1e8(%rbp), %rax
shrl $0x3, %edx
movl %edx, %edx
movzbl (%rax,%rdx), %eax
movl %eax, -0x1e0(%rbp)
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl 0x9fac(%rcx)
movl -0x1e0(%rbp), %eax
movl %edx, %ecx
andl $0x7, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x4ad2b
movq -0x1f0(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x28(%rbp), %rdx
callq 0x4ad50
movl $0x0, -0x2c(%rbp)
movq -0x1f0(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x798(%rcx), %eax
jae 0x4acd3
leaq -0x48(%rbp), %rdi
callq 0xc310
movl $0x0, -0x4c(%rbp)
movq -0x1f0(%rbp), %rcx
movl -0x4c(%rbp), %eax
addq $0x7a0, %rcx            # imm = 0x7A0
movl -0x2c(%rbp), %edx
imulq $0x98, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x28(%rcx), %eax
jae 0x49f7f
movq -0x1f0(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, -0x1f8(%rbp)
movl -0x2c(%rbp), %ecx
imulq $0x98, %rcx, %rcx
leaq 0x7d0(%rax,%rcx), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0x3cf40
movq %rax, %rcx
movq -0x1f8(%rbp), %rax
movl (%rcx), %ecx
leaq (%rax,%rcx,8), %rsi
leaq -0x58(%rbp), %rdi
callq 0xca00
jmp 0x49f2e
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc330
jmp 0x49f3d
leaq -0x58(%rbp), %rdi
callq 0xc3c0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x49ebe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4acc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xc3c0
jmp 0x4acc8
movq -0x1f0(%rbp), %rax
movl -0x2c(%rbp), %ecx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rdi
movl -0x14(%rbp), %edx
leaq -0x48(%rbp), %rsi
callq 0x393a0
jmp 0x49fa6
movq -0x1f0(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x778(%rcx), %eax
jne 0x4acb1
movq -0x1f0(%rbp), %rax
movq 0x758(%rax), %rax
addq $0x50, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x446e0
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
callq 0x44530
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x525a0
testb $0x1, %al
jne 0x4a002
jmp 0x4acaf
leaq -0x78(%rbp), %rdi
callq 0x44ab0
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movq %rax, -0x200(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x760, %rdi            # imm = 0x760
callq 0x447e0
movq %rax, %rcx
movq -0x200(%rbp), %rax
cmpq %rcx, %rax
jae 0x4ac9f
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x760, %rdi            # imm = 0x760
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x52cd0
movq -0x1f0(%rbp), %rcx
movq (%rax), %rax
movq 0x50(%rax), %rax
cmpq %rcx, 0x48(%rax)
jne 0x4ac89
leaq -0xa8(%rbp), %rdi
callq 0xd880
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
addq $0x7a0, %rax            # imm = 0x7A0
movq %rax, -0x208(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x208(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x74(%rax)
jne 0x4a213
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x210(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x210(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rdi
callq 0x36ad0
jmp 0x4a13a
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x218(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rsi
leaq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x37aa0
jmp 0x4a18e
leaq -0xa8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x228(%rbp)
callq 0x52d90
movq -0x228(%rbp), %rdi
callq 0xde10
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x220(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x220(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rdi
callq 0x36b30
jmp 0x4a1fd
jmp 0x4a286
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4ac7b
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x230(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x230(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rsi
leaq -0xd8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x37aa0
jmp 0x4a267
leaq -0xa8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x52d90
leaq -0xd8(%rbp), %rdi
callq 0xde10
movl $0x0, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movq %rax, -0x238(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3d860
movq %rax, %rcx
movq -0x238(%rbp), %rax
cmpq %rcx, %rax
jae 0x4ac6d
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
addq $0x7a0, %rax            # imm = 0x7A0
movq %rax, -0x240(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x240(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x74(%rax)
jne 0x4a560
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x248(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x248(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rdi
callq 0x36ad0
jmp 0x4a35d
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x258(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x258(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rax
movq %rax, -0x250(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movq -0x250(%rbp), %rdi
movl (%rax), %edx
leaq -0x48(%rbp), %rsi
callq 0x393a0
jmp 0x4a3ce
leaq -0xf8(%rbp), %rdi
callq 0xc310
jmp 0x4a3dc
movl $0x0, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
movl %eax, -0x260(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xcd90
movl %eax, -0x25c(%rbp)
jmp 0x4a403
movl -0x260(%rbp), %eax
movl -0x25c(%rbp), %ecx
cmpl %ecx, %eax
jae 0x4a481
leaq -0x108(%rbp), %rdi
callq 0xd240
jmp 0x4a421
leaq -0xf8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xc330
jmp 0x4a436
leaq -0x108(%rbp), %rdi
callq 0xc3c0
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x4a3e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4a54f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xc3c0
jmp 0x4a54f
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x270(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x270(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rax
movq %rax, -0x268(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movq -0x268(%rbp), %rdi
movl (%rax), %edx
leaq -0xf8(%rbp), %rsi
callq 0x390e0
jmp 0x4a4f5
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x278(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x278(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rdi
callq 0x36b30
jmp 0x4a53e
leaq -0xf8(%rbp), %rdi
callq 0xc430
jmp 0x4a717
leaq -0xf8(%rbp), %rdi
callq 0xc430
jmp 0x4ac7b
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x288(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x288(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rax
movq %rax, -0x280(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movq -0x280(%rbp), %rdi
movl (%rax), %edx
leaq -0x48(%rbp), %rsi
callq 0x393a0
jmp 0x4a5d1
leaq -0x120(%rbp), %rdi
callq 0xc310
jmp 0x4a5df
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
movl %eax, -0x290(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xcd90
movl %eax, -0x28c(%rbp)
jmp 0x4a606
movl -0x290(%rbp), %eax
movl -0x28c(%rbp), %ecx
cmpl %ecx, %eax
jae 0x4a684
leaq -0x130(%rbp), %rdi
callq 0xd240
jmp 0x4a624
leaq -0x120(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xc330
jmp 0x4a639
leaq -0x130(%rbp), %rdi
callq 0xc3c0
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x4a5e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4a706
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xc3c0
jmp 0x4a706
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
movq %rdi, -0x2a0(%rbp)
addq $0x780, %rdi            # imm = 0x780
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x98, %rcx, %rcx
leaq 0x7a0(%rax,%rcx), %rax
movq %rax, -0x298(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movq -0x298(%rbp), %rdi
movl (%rax), %edx
leaq -0x120(%rbp), %rsi
callq 0x390e0
jmp 0x4a6f8
leaq -0x120(%rbp), %rdi
callq 0xc430
jmp 0x4a717
leaq -0x120(%rbp), %rdi
callq 0xc430
jmp 0x4ac7b
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x2a8(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movq -0x2a8(%rbp), %rsi
movl (%rax), %edx
leaq -0x148(%rbp), %rdi
callq 0x4aff0
jmp 0x4a754
leaq -0x160(%rbp), %rdi
callq 0xc310
jmp 0x4a762
leaq -0x188(%rbp), %rdi
callq 0x277b0
movl $0x0, -0x18c(%rbp)
movl -0x18c(%rbp), %eax
movl %eax, -0x2b0(%rbp)
leaq -0x148(%rbp), %rdi
callq 0xcd90
movl %eax, -0x2ac(%rbp)
jmp 0x4a798
movl -0x2b0(%rbp), %eax
movl -0x2ac(%rbp), %ecx
cmpl %ecx, %eax
jae 0x4a7f0
leaq -0x188(%rbp), %rdi
movl $0x1, %esi
callq 0x277d0
jmp 0x4a7bb
jmp 0x4a7bd
movl -0x18c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18c(%rbp)
jmp 0x4a778
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4ac5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4ac47
movl $0x0, -0x190(%rbp)
movl -0x190(%rbp), %eax
movq %rax, -0x2b8(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x760, %rdi            # imm = 0x760
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x52cd0
movq (%rax), %rdi
addq $0x30, %rdi
callq 0x3d1f0
movq %rax, %rcx
movq -0x2b8(%rbp), %rax
cmpq %rcx, %rax
jae 0x4a8d6
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x760, %rdi            # imm = 0x760
movl -0x8c(%rbp), %eax
movl %eax, %esi
callq 0x52cd0
movq (%rax), %rdi
addq $0x30, %rdi
movl -0x190(%rbp), %eax
movl %eax, %esi
callq 0x3cf40
movl (%rax), %eax
movl %eax, %esi
leaq -0x188(%rbp), %rdi
callq 0x52dc0
movq %rdx, -0x2c8(%rbp)
movq %rax, -0x2c0(%rbp)
jmp 0x4a898
movq -0x2c8(%rbp), %rax
movq -0x2c0(%rbp), %rcx
movq %rcx, -0x1a0(%rbp)
movq %rax, -0x198(%rbp)
leaq -0x1a0(%rbp), %rdi
xorl %esi, %esi
callq 0x27b60
movl -0x190(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x190(%rbp)
jmp 0x4a7fa
movl $0x0, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movl %eax, -0x2d0(%rbp)
leaq -0x148(%rbp), %rdi
callq 0xcd90
movl %eax, -0x2cc(%rbp)
jmp 0x4a900
movl -0x2d0(%rbp), %eax
movl -0x2cc(%rbp), %ecx
cmpl %ecx, %eax
jae 0x4aa3a
movl -0x1a4(%rbp), %eax
movl %eax, %esi
leaq -0x188(%rbp), %rdi
callq 0x52dc0
movq %rdx, -0x2e0(%rbp)
movq %rax, -0x2d8(%rbp)
jmp 0x4a938
movq -0x2e0(%rbp), %rax
movq -0x2d8(%rbp), %rcx
movq %rcx, -0x1b8(%rbp)
movq %rax, -0x1b0(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x28960
testb $0x1, %al
jne 0x4a966
jmp 0x4a9d6
movl -0x1a4(%rbp), %esi
leaq -0x148(%rbp), %rdi
callq 0xc8f0
movq %rax, -0x2e8(%rbp)
jmp 0x4a981
movq -0x2e8(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0xca00
jmp 0x4a996
leaq -0x160(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0xc330
jmp 0x4a9ab
leaq -0x1c0(%rbp), %rdi
callq 0xc3c0
jmp 0x4aa24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0xc3c0
jmp 0x4ac47
leaq -0x1c8(%rbp), %rdi
callq 0xd240
jmp 0x4a9e4
leaq -0x160(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xc330
jmp 0x4a9f9
leaq -0x1c8(%rbp), %rdi
callq 0xc3c0
jmp 0x4aa24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0xc3c0
jmp 0x4ac47
jmp 0x4aa26
movl -0x1a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x4a8e0
movq -0x1f0(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x300(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x9fa4(%rax), %eax
movl %eax, -0x2f4(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movq -0x300(%rbp), %rdi
movl -0x2f4(%rbp), %esi
movl (%rax), %eax
movq -0x88(%rbp), %rcx
movq 0x48(%rcx), %rcx
movl 0x9fac(%rcx), %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %edx
leaq -0x1cc(%rbp), %rcx
callq 0x71d0
movq %rax, -0x2f0(%rbp)
jmp 0x4aab2
movq -0x2f0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x9fac(%rax), %ecx
subl $0x1, %ecx
shrl $0x3, %ecx
addl $0x1, %ecx
movq -0x1d8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x1d8(%rbp)
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x9fa8(%rax), %eax
movl %eax, -0x304(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d6f0
movl -0x304(%rbp), %ecx
movl (%rax), %eax
movq -0x88(%rbp), %rdx
movq 0x48(%rdx), %rsi
xorl %edx, %edx
divl 0x9fac(%rsi)
imull %edx, %ecx
movq -0x1d8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x1d8(%rbp)
movl $0x0, -0x1dc(%rbp)
movl -0x1dc(%rbp), %eax
movq -0x88(%rbp), %rcx
movq 0x48(%rcx), %rcx
cmpl 0x54(%rcx), %eax
jae 0x4abf7
movl -0x1dc(%rbp), %esi
leaq -0x160(%rbp), %rdi
callq 0xc8f0
movq %rax, -0x310(%rbp)
jmp 0x4ab88
movq -0x88(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x1dc(%rbp), %ecx
imulq $0x38, %rcx, %rcx
leaq 0x58(%rax,%rcx), %rdi
movl 0x7c(%rax,%rcx), %eax
movl %eax, -0x318(%rbp)
callq 0x3d3d0
movl %eax, -0x314(%rbp)
jmp 0x4abb9
movl -0x314(%rbp), %ecx
movl -0x318(%rbp), %edx
movq -0x310(%rbp), %rsi
movq -0x1f0(%rbp), %rdi
leaq -0x1d8(%rbp), %r8
callq 0x496a0
jmp 0x4abe1
jmp 0x4abe3
movl -0x1dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1dc(%rbp)
jmp 0x4ab53
movq -0x1f0(%rbp), %rax
movq 0x48(%rax), %rdi
movl -0x1cc(%rbp), %esi
callq 0x7300
jmp 0x4ac0f
leaq -0x188(%rbp), %rdi
callq 0x278a0
leaq -0x160(%rbp), %rdi
callq 0xc430
leaq -0x148(%rbp), %rdi
callq 0xc430
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x4a290
leaq -0x188(%rbp), %rdi
callq 0x278a0
leaq -0x160(%rbp), %rdi
callq 0xc430
leaq -0x148(%rbp), %rdi
callq 0xc430
jmp 0x4ac7b
leaq -0xa8(%rbp), %rdi
callq 0xde10
jmp 0x4ac89
leaq -0xa8(%rbp), %rdi
callq 0xde10
jmp 0x4acc8
jmp 0x4ac8b
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x4a01f
jmp 0x4aca1
leaq -0x78(%rbp), %rdi
callq 0x525e0
jmp 0x49fec
jmp 0x4acb1
leaq -0x48(%rbp), %rdi
callq 0xc430
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x49e98
leaq -0x48(%rbp), %rdi
callq 0xc430
jmp 0x4ad3e
movq -0x1f0(%rbp), %rsi
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl 0x9fac(%rsi)
movl %edx, %ecx
andl $0x7, %ecx
movl $0x1, %edi
shll %cl, %edi
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl 0x9fac(%rsi)
movq -0x1f0(%rbp), %rax
shrl $0x3, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %esi
subl %edi, %esi
movb %sil, (%rcx,%rdx)
movq 0x48(%rax), %rdi
movl -0x18(%rbp), %esi
callq 0x7300
movl $0x0, -0x4(%rbp)
jmp 0x4ad32
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x6890
nopw (%rax,%rax)