// File: Konano[P]UselessDatabase/Index.cpp
// Function: Index::overflow_downstream(int)
void Index::overflow_downstream(int now_index) {
    //cout << "down" << now->index << " "  << now->record_cnt << endl;

    BtreeNode* now = Index::convert_buf_to_BtreeNode(now_index);

    if (now->fa_index == -1) {
        if (now->record_cnt != 0) 
            return;
        else {
            if (now->child[0] == -1) return;
            root_page = now->child[0];
            return;
        }
    }
    else if ((int)now->record.size() >= ceil(btree_max_per_node / 2.0) - 1) {
        return;
    }
    else {
        BtreeNode* fa = Index::convert_buf_to_BtreeNode(now->fa_index);
        uint i;
        for (i = 0; i < fa->child.size(); i++) {
            if (fa->child[i] == now->index) {
                break;
            }
        }
        if (i != 0) {
            BtreeNode* left = Index::convert_buf_to_BtreeNode(fa->child[i - 1]);
            if (left->record_cnt <= ceil(btree_max_per_node / 2.0) - 1) {
                left->record.push_back(fa->record[i - 1]);
                for (int j = 0; j < now->record_cnt; j++) {
                    left->record.push_back(now->record[j]);
                    left->child.push_back(now->child[j]);
                    if(now->child[j] != -1){
                        BtreeNode* temp = Index::convert_buf_to_BtreeNode(now->child[j]);
                        temp->fa_index = left->index;
                        Index::convert_BtreeNode_to_buf(temp);
                        delete temp;
                    }
                }
                left->record_cnt += 1 + now->record_cnt;
                left->child.push_back(now->child[now->child.size() - 1]);
                vector<BtreeRecord>::iterator it = fa->record.begin();
                vector<int>::iterator itx = fa->child.begin();
                itx++;
                uint temp = i;
                while (--temp) {it ++; itx++; }
                fa->record.erase(it);
                fa->child.erase(itx);
                fa->record_cnt--;
                Index::convert_BtreeNode_to_buf(now);
                Index::convert_BtreeNode_to_buf(left);       
                Index::convert_BtreeNode_to_buf(fa);
                overflow_downstream(fa->index); 
            }
            else {
                now->record.insert(now->record.begin(), fa->record[i - 1]);
                now->child.insert(now->child.begin(), -1);
                now->record_cnt ++;

                fa->record[i - 1] = left->record[left->record.size() - 1];

                left->record_cnt --;
                left->record.erase(left->record.end() - 1);
                left->child.erase(left->child.end() - 1);
                Index::convert_BtreeNode_to_buf(now);
                Index::convert_BtreeNode_to_buf(left);
                Index::convert_BtreeNode_to_buf(fa);
            }
        }
        else {
            BtreeNode* right = Index::convert_buf_to_BtreeNode(fa->child[i + 1]);
            if (right->record_cnt <= ceil(btree_max_per_node / 2.0) - 1) {
                now->record.push_back(fa->record[i]);
                for (int j = 0; j < right->record_cnt; j++) {
                    now->record.push_back(right->record[j]);
                    now->child.push_back(right->child[j]);
                    if(right->child[j] != -1){
                        BtreeNode* temp = Index::convert_buf_to_BtreeNode(right->child[j]);
                        temp->fa_index = now->index;
                        Index::convert_BtreeNode_to_buf(temp);
                        delete temp;
                    }
                }
                now->record_cnt += 1 + right->record_cnt;
                now->child.push_back(right->child[right->child.size() - 1]);
                vector<BtreeRecord>::iterator it = fa->record.begin();
                vector<int>::iterator itx = fa->child.begin();
                uint temp = i;
                itx ++;
                while (temp--) {it ++; itx++; }
                fa->record.erase(it);
                fa->child.erase(itx);
                fa->record_cnt--;
                Index::convert_BtreeNode_to_buf(now);
                Index::convert_BtreeNode_to_buf(right);        
                Index::convert_BtreeNode_to_buf(fa);
                overflow_downstream(fa->index);
            }
            else {
                now->record.insert(now->record.begin(), fa->record[i - 1]);
                now->child.insert(now->child.begin(), -1);
                now->record_cnt ++;

                fa->record[i - 1] = right->record[0];

                right->record_cnt --;
                right->record.erase(right->record.begin());
                right->child.erase(right->child.begin());
                Index::convert_BtreeNode_to_buf(now);
                Index::convert_BtreeNode_to_buf(right);
                Index::convert_BtreeNode_to_buf(fa);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
movl -0xc(%rbp), %esi
callq 0x36fd0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x6c(%rax)
jne 0x37ea2
movq -0x18(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x37e62
jmp 0x38ac4
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d6f0
cmpl $-0x1, (%rax)
jne 0x37e7d
jmp 0x38ac4
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d6f0
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x64(%rax)
jmp 0x38ac4
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d880
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x1e8(%rbp)
cvtsi2sdl 0x90(%rax), %xmm0
movsd 0x4b913(%rip), %xmm1    # 0x837e8
divsd %xmm1, %xmm0
callq 0x60e0
movaps %xmm0, %xmm1
movsd -0x1e8(%rbp), %xmm0
movsd 0x4b8ef(%rip), %xmm2    # 0x837e0
subsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x37f00
jmp 0x38ac4
movq -0x1e0(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x6c(%rax), %esi
callq 0x36fd0
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq %rax, -0x1f0(%rbp)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x3d860
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x37f70
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x3d6f0
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0x37f63
jmp 0x37f70
jmp 0x37f65
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x37f1e
cmpl $0x0, -0x24(%rbp)
je 0x38500
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d6f0
movq -0x1e0(%rbp), %rdi
movl (%rax), %esi
callq 0x36fd0
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rcx
cvtsi2sdl 0x1c(%rcx), %xmm0
movsd %xmm0, -0x1f8(%rbp)
cvtsi2sdl 0x90(%rax), %xmm0
movsd 0x4b81a(%rip), %xmm1    # 0x837e8
divsd %xmm1, %xmm0
callq 0x60e0
movsd -0x1f8(%rbp), %xmm1
movsd 0x4b7f9(%rip), %xmm2    # 0x837e0
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x382ba
movq -0x30(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x200(%rbp)
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d7a0
movq -0x200(%rbp), %rdi
movq %rax, %rsi
callq 0x3d730
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x38136
movq -0x30(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x210(%rbp)
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
movslq -0x34(%rbp), %rsi
callq 0x3d7a0
movq -0x210(%rbp), %rdi
movq %rax, %rsi
callq 0x3d730
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x208(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movslq -0x34(%rbp), %rsi
callq 0x3d6f0
movq -0x208(%rbp), %rdi
movq %rax, %rsi
callq 0x3d7f0
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movslq -0x34(%rbp), %rsi
callq 0x3d6f0
cmpl $-0x1, (%rax)
je 0x38126
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movslq -0x34(%rbp), %rsi
callq 0x3d6f0
movq -0x1e0(%rbp), %rdi
movl (%rax), %esi
callq 0x36fd0
movq -0x1e0(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x40(%rbp), %rsi
callq 0x376a0
movq -0x40(%rbp), %rax
movq %rax, -0x218(%rbp)
cmpq $0x0, %rax
je 0x38124
movq -0x218(%rbp), %rdi
callq 0x3d8a0
movq -0x218(%rbp), %rdi
movl $0x70, %esi
callq 0x64b0
jmp 0x38126
jmp 0x38128
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x38031
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movq -0x30(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x220(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x228(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x3d860
movq -0x228(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x3d6f0
movq -0x220(%rbp), %rdi
movq %rax, %rsi
callq 0x3d7f0
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d460
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0xd0f0
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x3d8e0
movq %rax, -0x58(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, %eax
je 0x381fc
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x3d920
movq %rax, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x3d8e0
movq %rax, -0x70(%rbp)
jmp 0x381ce
movq -0x20(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x238(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3d9d0
movq -0x238(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3d960
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x230(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3da80
movq -0x230(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x3da10
movq -0x1e0(%rbp), %rdi
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x18(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x37e20
jmp 0x384fb
movq -0x18(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x268(%rbp)
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d460
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3d9d0
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d7a0
movq -0x268(%rbp), %rdi
movq %rax, %rdx
movq -0x98(%rbp), %rsi
callq 0x3dac0
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x260(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0xd0f0
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3da80
movq -0x260(%rbp), %rdi
movl $0xffffffff, -0xbc(%rbp) # imm = 0xFFFFFFFF
movq -0xb0(%rbp), %rsi
leaq -0xbc(%rbp), %rdx
callq 0x3dcd0
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x30(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x258(%rbp)
movq -0x30(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d880
movq -0x258(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x3d7a0
movq %rax, -0x250(%rbp)
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d7a0
movq -0x250(%rbp), %rsi
movq %rax, %rdi
callq 0x3dd10
movq -0x30(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x30(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x248(%rbp)
movq -0x30(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d490
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %rdi
movl $0x1, %esi
callq 0x3dd50
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x3d9d0
movq -0x248(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x3d960
movq %rax, -0xe8(%rbp)
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x240(%rbp)
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
callq 0xd120
movq %rax, -0x100(%rbp)
leaq -0x100(%rbp), %rdi
movl $0x1, %esi
callq 0x3dd90
movq %rax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x3da80
movq -0x240(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x3da10
movq -0x1e0(%rbp), %rdi
movq %rax, -0x108(%rbp)
movq -0x18(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x376a0
jmp 0x38ac0
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d6f0
movq -0x1e0(%rbp), %rdi
movl (%rax), %esi
callq 0x36fd0
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
movq %rcx, -0x110(%rbp)
movq -0x110(%rbp), %rcx
cvtsi2sdl 0x1c(%rcx), %xmm0
movsd %xmm0, -0x270(%rbp)
cvtsi2sdl 0x90(%rax), %xmm0
movsd 0x4b28e(%rip), %xmm1    # 0x837e8
divsd %xmm1, %xmm0
callq 0x60e0
movsd -0x270(%rbp), %xmm1
movsd 0x4b26d(%rip), %xmm2    # 0x837e0
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x388b6
movq -0x18(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x278(%rbp)
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x3d7a0
movq -0x278(%rbp), %rdi
movq %rax, %rsi
callq 0x3d730
movl $0x0, -0x114(%rbp)
movl -0x114(%rbp), %eax
movq -0x110(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x386f4
movq -0x18(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x288(%rbp)
movq -0x110(%rbp), %rdi
addq $0x50, %rdi
movslq -0x114(%rbp), %rsi
callq 0x3d7a0
movq -0x288(%rbp), %rdi
movq %rax, %rsi
callq 0x3d730
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x280(%rbp)
movq -0x110(%rbp), %rdi
addq $0x20, %rdi
movslq -0x114(%rbp), %rsi
callq 0x3d6f0
movq -0x280(%rbp), %rdi
movq %rax, %rsi
callq 0x3d7f0
movq -0x110(%rbp), %rdi
addq $0x20, %rdi
movslq -0x114(%rbp), %rsi
callq 0x3d6f0
cmpl $-0x1, (%rax)
je 0x386de
movq -0x110(%rbp), %rdi
addq $0x20, %rdi
movslq -0x114(%rbp), %rsi
callq 0x3d6f0
movq -0x1e0(%rbp), %rdi
movl (%rax), %esi
callq 0x36fd0
movq -0x1e0(%rbp), %rdi
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x120(%rbp), %rsi
callq 0x376a0
movq -0x120(%rbp), %rax
movq %rax, -0x290(%rbp)
cmpq $0x0, %rax
je 0x386dc
movq -0x290(%rbp), %rdi
callq 0x3d8a0
movq -0x290(%rbp), %rdi
movl $0x70, %esi
callq 0x64b0
jmp 0x386de
jmp 0x386e0
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x385bb
movq -0x110(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x298(%rbp)
movq -0x110(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x2a0(%rbp)
movq -0x110(%rbp), %rdi
addq $0x20, %rdi
callq 0x3d860
movq -0x2a0(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x3d6f0
movq -0x298(%rbp), %rdi
movq %rax, %rsi
callq 0x3d7f0
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d460
movq %rax, -0x128(%rbp)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0xd0f0
movq %rax, -0x130(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x134(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
callq 0x3d8e0
movq %rax, -0x140(%rbp)
movl -0x134(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x134(%rbp)
cmpl $0x0, %eax
je 0x387e6
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
callq 0x3d920
movq %rax, -0x148(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
callq 0x3d8e0
movq %rax, -0x150(%rbp)
jmp 0x387a4
movq -0x20(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x2b0(%rbp)
leaq -0x158(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x3d9d0
movq -0x2b0(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x3d960
movq %rax, -0x160(%rbp)
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x2a8(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x3da80
movq -0x2a8(%rbp), %rdi
movq -0x168(%rbp), %rsi
callq 0x3da10
movq -0x1e0(%rbp), %rdi
movq %rax, -0x170(%rbp)
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x18(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x37e20
jmp 0x38abe
movq -0x18(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x2d8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d460
movq %rax, -0x180(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x3d9d0
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d7a0
movq -0x2d8(%rbp), %rdi
movq %rax, %rdx
movq -0x178(%rbp), %rsi
callq 0x3dac0
movq %rax, -0x188(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x2d0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0xd0f0
movq %rax, -0x198(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3da80
movq -0x2d0(%rbp), %rdi
movl $0xffffffff, -0x19c(%rbp) # imm = 0xFFFFFFFF
movq -0x190(%rbp), %rsi
leaq -0x19c(%rbp), %rdx
callq 0x3dcd0
movq %rax, -0x1a8(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x110(%rbp), %rdi
addq $0x50, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d7a0
movq %rax, -0x2c8(%rbp)
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3d7a0
movq -0x2c8(%rbp), %rsi
movq %rax, %rdi
callq 0x3dd10
movq -0x110(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x110(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x2c0(%rbp)
movq -0x110(%rbp), %rdi
addq $0x50, %rdi
callq 0x3d460
movq %rax, -0x1b8(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x3d9d0
movq -0x2c0(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
callq 0x3d960
movq %rax, -0x1c0(%rbp)
movq -0x110(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x2b8(%rbp)
movq -0x110(%rbp), %rdi
addq $0x20, %rdi
callq 0xd0f0
movq %rax, -0x1d0(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x3da80
movq -0x2b8(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x3da10
movq -0x1e0(%rbp), %rdi
movq %rax, -0x1d8(%rbp)
movq -0x18(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x376a0
movq -0x1e0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x376a0
jmp 0x38ac0
jmp 0x38ac2
jmp 0x38ac4
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
nopl (%rax)