// File: medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::ConstructMatchRecordBackup(SequencePath&, std::vector<DiploidVariant, std::allocator<DiploidVariant>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, int, int, int, int)
void WholeGenome::ConstructMatchRecordBackup(SequencePath & best_path,
                                       vector<DiploidVariant> & variant_list,
                                       string & subsequence,
                                       int offset,
                                       int thread_index,
                                       int chr_id,
                                       int mode_index,
                                       int threshold_index){
    int truth_num = 0;
    int predict_num = 0;

    bool need_match_record = false;

    if (threshold_index == 0) need_match_record = true;

    bool multiple_match = false;

    if(best_path.donor_sequences[0] != best_path.donor_sequences[1]) multiple_match = true;

    string parsimonious_ref = subsequence;
    string parsimonious_alt0 = best_path.donor_sequences[0];
    string parsimonious_alt1 = best_path.donor_sequences[1];

    int parsimonious_pos = offset;
//    NormalizeVariantSequence(offset,
//                             parsimonious_ref,
//                             parsimonious_alt0,
//                             parsimonious_alt1,
//                             chr_id);

    string match_record = chrname_by_chrid[chr_id] + "\t" + to_string(parsimonious_pos+1) + "\t" + parsimonious_ref + "\t" + parsimonious_alt0;
    if(multiple_match) match_record += "/" + parsimonious_alt1;

    string vcf_record[2];
    string phasing_record[2];

	for (int i = 0; i < 2; i++) {
		for (auto it = best_path.choice_made[i].begin(); it != best_path.choice_made[i].end(); ++it) {
            pair<int, int> selection = it->second;
            int phasing = selection.second;
            if(selection.first == -1) continue;
            DiploidVariant variant = variant_list[selection.first];
            if(!variant.flag){
                truth_num++;
            }else{
                predict_num++;
            }

            if(need_match_record){
                string alt_string = variant.alts[0];
                if(variant.multi_alts){
                    alt_string += "/" + variant.alts[1];
                }
                string phasing_string = "";
                if(phasing == 0){
                    phasing_string += "1";
                    if(variant.heterozygous){
                        if(variant.multi_alts && !variant.zero_one_var){
                            phasing_string += "|2";
                        }else{
                            phasing_string += "|0";
                        }
                    }else{
                        phasing_string += "|1";
                    }
                }else if(phasing == 1){
                    if(variant.multi_alts && !variant.zero_one_var){
                        phasing_string += "2|1";
                    }else if(variant.multi_alts && variant.zero_one_var){
                        phasing_string += "2|0";
                    }else{
                        phasing_string += "0|1";
                    }
                }else if(phasing == -1){
                    phasing_string += "0|1";
                }else if(phasing == -2){
                    phasing_string += "0|2";
                }
                string variant_record = to_string(variant.pos+1) + "," + variant.ref + "," + alt_string;
                vcf_record[i] += variant_record;
                phasing_record[i] += phasing_string;
                vcf_record[i] += ";";
                phasing_record[i] += ";";
            }
		}
        if(need_match_record){
            vcf_record[i] = vcf_record[i].substr(0, vcf_record[i].size()-1);
            phasing_record[i] = phasing_record[i].substr(0, phasing_record[i].size()-1);
        }

	}

    if(need_match_record){
    	match_record += "\t" + vcf_record[0] + "\t" + vcf_record[1];
        match_record += "\t" + phasing_record[0] + "\t" + phasing_record[1];
    	match_record += "\t" + to_string(best_path.score) + "\n";

    	//complex_match_records[thread_index]->push_back(match_record);
    	
        // this line should be recovered


        match_records_by_mode_by_thread[thread_index][mode_index]->push_back(match_record);
    

    }

    baseline_total_match_num[thread_index][threshold_index]->at(mode_index) += truth_num;
    query_total_match_num[thread_index][threshold_index]->at(mode_index) += predict_num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x600, %rsp            # imm = 0x600
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x520(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
cmpl $0x0, 0x20(%rbp)
jne 0x2a733
movb $0x1, -0x31(%rbp)
movb $0x0, -0x32(%rbp)
movq -0x10(%rbp), %rdi
addq $0xd0, %rdi
movq -0x10(%rbp), %rsi
addq $0xd0, %rsi
addq $0x20, %rsi
callq 0x125b0
testb $0x1, %al
jne 0x2a75c
jmp 0x2a760
movb $0x1, -0x32(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x61b0
movq -0x10(%rbp), %rsi
addq $0xd0, %rsi
leaq -0x78(%rbp), %rdi
callq 0x61b0
jmp 0x2a783
movq -0x10(%rbp), %rsi
addq $0xf0, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x61b0
jmp 0x2a79c
movq -0x520(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, -0xac(%rbp)
addq $0xb8, %rdi
leaq 0x10(%rbp), %rsi
callq 0x32770
movq %rax, -0x528(%rbp)
jmp 0x2a7c5
movq -0x528(%rbp), %rsi
leaq 0x2adca(%rip), %rdx     # 0x5559d
leaq -0x170(%rbp), %rdi
callq 0xe200
jmp 0x2a7e1
movl -0xac(%rbp), %esi
incl %esi
leaq -0x190(%rbp), %rdi
callq 0xb190
jmp 0x2a7f7
leaq -0x150(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0xde60
jmp 0x2a813
leaq 0x2ad83(%rip), %rdx     # 0x5559d
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xb0f0
jmp 0x2a82f
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0xe1b0
jmp 0x2a848
leaq 0x2ad4e(%rip), %rdx     # 0x5559d
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xb0f0
jmp 0x2a864
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0xe1b0
jmp 0x2a87d
leaq -0xf0(%rbp), %rdi
callq 0x6828
leaq -0x110(%rbp), %rdi
callq 0x6828
leaq -0x130(%rbp), %rdi
callq 0x6828
leaq -0x150(%rbp), %rdi
callq 0x6828
leaq -0x190(%rbp), %rdi
callq 0x6828
leaq -0x170(%rbp), %rdi
callq 0x6828
testb $0x1, -0x32(%rbp)
je 0x2aa35
leaq 0x2acc9(%rip), %rsi     # 0x5559f
leaq -0x1b0(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x10610
jmp 0x2a8eb
leaq -0xd0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x6560
jmp 0x2a900
leaq -0x1b0(%rbp), %rdi
callq 0x6828
jmp 0x2aa35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b67e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b669
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2a9f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2a9e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2a9d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2a9cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2a9c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x6828
leaq -0x110(%rbp), %rdi
callq 0x6828
leaq -0x130(%rbp), %rdi
callq 0x6828
leaq -0x150(%rbp), %rdi
callq 0x6828
leaq -0x190(%rbp), %rdi
callq 0x6828
leaq -0x170(%rbp), %rdi
callq 0x6828
jmp 0x2b669
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b65d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x6828
jmp 0x2b65d
leaq -0x1f0(%rbp), %rax
movq %rax, %rcx
addq $0x40, %rcx
movq %rcx, -0x538(%rbp)
movq %rax, -0x530(%rbp)
movq -0x530(%rbp), %rdi
movq %rdi, -0x540(%rbp)
callq 0x65e0
movq -0x540(%rbp), %rax
movq -0x538(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x530(%rbp)
jne 0x2aa51
leaq -0x230(%rbp), %rax
movq %rax, %rcx
addq $0x40, %rcx
movq %rcx, -0x550(%rbp)
movq %rax, -0x548(%rbp)
movq -0x548(%rbp), %rdi
movq %rdi, -0x558(%rbp)
callq 0x65e0
movq -0x558(%rbp), %rax
movq -0x550(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x548(%rbp)
jne 0x2aa9e
movl $0x0, -0x234(%rbp)
cmpl $0x2, -0x234(%rbp)
jge 0x2b17e
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movslq -0x234(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x35cc0
movq %rax, -0x240(%rbp)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movslq -0x234(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x35d20
movq %rax, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x35cf0
testb $0x1, %al
jne 0x2ab46
jmp 0x2b083
leaq -0x240(%rbp), %rdi
callq 0x35d50
movq 0x4(%rax), %rax
movq %rax, -0x250(%rbp)
movl -0x24c(%rbp), %eax
movl %eax, -0x254(%rbp)
cmpl $-0x1, -0x250(%rbp)
jne 0x2ab77
jmp 0x2b061
movq -0x18(%rbp), %rdi
movslq -0x250(%rbp), %rsi
callq 0x33de0
movq %rax, %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x340a0
jmp 0x2ab98
testb $0x1, -0x264(%rbp)
jne 0x2abc0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2abc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b5c7
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
testb $0x1, -0x31(%rbp)
je 0x2b055
leaq -0x288(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9080
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x61b0
jmp 0x2abf4
testb $0x1, -0x26f(%rbp)
je 0x2ac95
leaq -0x288(%rbp), %rdi
movl $0x1, %esi
callq 0x9080
movq %rax, %rdx
leaq 0x2a983(%rip), %rsi     # 0x5559f
leaq -0x2f0(%rbp), %rdi
callq 0x10610
jmp 0x2ac2a
leaq -0x2d0(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0x6560
jmp 0x2ac3f
leaq -0x2f0(%rbp), %rdi
callq 0x6828
jmp 0x2ac95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b047
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x6828
jmp 0x2b047
leaq -0x311(%rbp), %rdi
movq %rdi, -0x560(%rbp)
callq 0x6760
movq -0x560(%rbp), %rdx
leaq 0x2a8e8(%rip), %rsi     # 0x5559e
leaq -0x310(%rbp), %rdi
callq 0x9680
jmp 0x2acc4
leaq -0x311(%rbp), %rdi
callq 0x64b0
cmpl $0x0, -0x254(%rbp)
jne 0x2ad8d
leaq 0x2a91b(%rip), %rsi     # 0x555ff
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2acf2
testb $0x1, -0x270(%rbp)
je 0x2ad71
testb $0x1, -0x26f(%rbp)
je 0x2ad58
testb $0x1, -0x26e(%rbp)
jne 0x2ad58
leaq 0x2ab20(%rip), %rsi     # 0x55834
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2ad22
jmp 0x2ad6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x311(%rbp), %rdi
callq 0x64b0
jmp 0x2b047
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b03b
leaq 0x2aacd(%rip), %rsi     # 0x5582c
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2ad6d
jmp 0x2ad6f
jmp 0x2ad88
leaq 0x2aab8(%rip), %rsi     # 0x55830
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2ad86
jmp 0x2ad88
jmp 0x2ae49
cmpl $0x1, -0x254(%rbp)
jne 0x2ae03
testb $0x1, -0x26f(%rbp)
je 0x2adbf
testb $0x1, -0x26e(%rbp)
jne 0x2adbf
leaq 0x2aa78(%rip), %rsi     # 0x55827
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2adbd
jmp 0x2ae01
testb $0x1, -0x26f(%rbp)
je 0x2ade8
testb $0x1, -0x26e(%rbp)
je 0x2ade8
leaq 0x2aa53(%rip), %rsi     # 0x5582b
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2ade6
jmp 0x2adff
leaq 0x2aa40(%rip), %rsi     # 0x5582f
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2adfd
jmp 0x2adff
jmp 0x2ae01
jmp 0x2ae47
cmpl $-0x1, -0x254(%rbp)
jne 0x2ae23
leaq 0x2aa1c(%rip), %rsi     # 0x5582f
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2ae21
jmp 0x2ae45
cmpl $-0x2, -0x254(%rbp)
jne 0x2ae43
leaq 0x2aa00(%rip), %rsi     # 0x55833
leaq -0x310(%rbp), %rdi
callq 0x6410
jmp 0x2ae41
jmp 0x2ae43
jmp 0x2ae45
jmp 0x2ae47
jmp 0x2ae49
movl -0x2b0(%rbp), %esi
incl %esi
leaq -0x3b8(%rbp), %rdi
callq 0xb190
jmp 0x2ae5f
leaq 0x2a6d7(%rip), %rdx     # 0x5553d
leaq -0x398(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0xb0f0
jmp 0x2ae7b
leaq -0x2a8(%rbp), %rdx
leaq -0x378(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0xe1b0
jmp 0x2ae97
leaq 0x2a69f(%rip), %rdx     # 0x5553d
leaq -0x358(%rbp), %rdi
leaq -0x378(%rbp), %rsi
callq 0xb0f0
jmp 0x2aeb3
leaq -0x338(%rbp), %rdi
leaq -0x358(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
callq 0xe1b0
jmp 0x2aecf
leaq -0x358(%rbp), %rdi
callq 0x6828
leaq -0x378(%rbp), %rdi
callq 0x6828
leaq -0x398(%rbp), %rdi
callq 0x6828
leaq -0x3b8(%rbp), %rdi
callq 0x6828
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x1f0(%rbp,%rax), %rdi
leaq -0x338(%rbp), %rsi
callq 0x6560
jmp 0x2af20
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x230(%rbp,%rax), %rdi
leaq -0x310(%rbp), %rsi
callq 0x6560
jmp 0x2af41
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x1f0(%rbp,%rax), %rdi
leaq 0x2a8dc(%rip), %rsi     # 0x55837
callq 0x6410
jmp 0x2af62
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x230(%rbp,%rax), %rdi
leaq 0x2a8bb(%rip), %rsi     # 0x55837
callq 0x6410
jmp 0x2af83
leaq -0x338(%rbp), %rdi
callq 0x6828
leaq -0x310(%rbp), %rdi
callq 0x6828
leaq -0x2d0(%rbp), %rdi
callq 0x6828
jmp 0x2b055
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b012
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b006
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2affa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x6828
leaq -0x378(%rbp), %rdi
callq 0x6828
leaq -0x398(%rbp), %rdi
callq 0x6828
leaq -0x3b8(%rbp), %rdi
callq 0x6828
jmp 0x2b03b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x6828
leaq -0x310(%rbp), %rdi
callq 0x6828
leaq -0x2d0(%rbp), %rdi
callq 0x6828
jmp 0x2b072
leaq -0x2b0(%rbp), %rdi
callq 0x32c60
leaq -0x240(%rbp), %rdi
callq 0x35d70
jmp 0x2ab08
leaq -0x2b0(%rbp), %rdi
callq 0x32c60
jmp 0x2b5c7
testb $0x1, -0x31(%rbp)
je 0x2b168
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x1f0(%rbp,%rax), %rdi
movq %rdi, -0x568(%rbp)
callq 0x6320
movq -0x568(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x3d8(%rbp), %rdi
callq 0x6460
jmp 0x2b0cb
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x1f0(%rbp,%rax), %rdi
leaq -0x3d8(%rbp), %rsi
movq %rsi, -0x578(%rbp)
callq 0x6530
movq -0x578(%rbp), %rdi
callq 0x6828
movslq -0x234(%rbp), %rax
shlq $0x5, %rax
leaq -0x230(%rbp,%rax), %rdi
movq %rdi, -0x570(%rbp)
callq 0x6320
movq -0x570(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x3f8(%rbp), %rdi
callq 0x6460
jmp 0x2b13b
movslq -0x234(%rbp), %rax
leaq -0x230(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x6530
leaq -0x3f8(%rbp), %rdi
callq 0x6828
jmp 0x2b16a
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x2aad9
testb $0x1, -0x31(%rbp)
je 0x2b46a
leaq 0x2a40e(%rip), %rsi     # 0x5559d
leaq -0x458(%rbp), %rdi
leaq -0x1f0(%rbp), %rdx
callq 0x10610
jmp 0x2b1a4
leaq 0x2a3f2(%rip), %rdx     # 0x5559d
leaq -0x438(%rbp), %rdi
leaq -0x458(%rbp), %rsi
callq 0xb0f0
jmp 0x2b1c0
leaq -0x1d0(%rbp), %rdx
leaq -0x418(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0xe1b0
jmp 0x2b1dc
leaq -0xd0(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x6560
jmp 0x2b1f1
leaq -0x418(%rbp), %rdi
callq 0x6828
leaq -0x438(%rbp), %rdi
callq 0x6828
leaq -0x458(%rbp), %rdi
callq 0x6828
leaq 0x2a381(%rip), %rsi     # 0x5559d
leaq -0x4b8(%rbp), %rdi
leaq -0x230(%rbp), %rdx
callq 0x10610
jmp 0x2b231
leaq 0x2a365(%rip), %rdx     # 0x5559d
leaq -0x498(%rbp), %rdi
leaq -0x4b8(%rbp), %rsi
callq 0xb0f0
jmp 0x2b24d
leaq -0x210(%rbp), %rdx
leaq -0x478(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0xe1b0
jmp 0x2b269
leaq -0xd0(%rbp), %rdi
leaq -0x478(%rbp), %rsi
callq 0x6560
jmp 0x2b27e
leaq -0x478(%rbp), %rdi
callq 0x6828
leaq -0x498(%rbp), %rdi
callq 0x6828
leaq -0x4b8(%rbp), %rdi
callq 0x6828
movq -0x10(%rbp), %rax
movl 0x158(%rax), %esi
leaq -0x518(%rbp), %rdi
callq 0xb190
jmp 0x2b2ba
leaq 0x2a2dc(%rip), %rsi     # 0x5559d
leaq -0x4f8(%rbp), %rdi
leaq -0x518(%rbp), %rdx
callq 0xb140
jmp 0x2b2d6
leaq 0x28daf(%rip), %rdx     # 0x5408c
leaq -0x4d8(%rbp), %rdi
leaq -0x4f8(%rbp), %rsi
callq 0xb0f0
jmp 0x2b2f2
leaq -0xd0(%rbp), %rdi
leaq -0x4d8(%rbp), %rsi
callq 0x6560
jmp 0x2b307
leaq -0x4d8(%rbp), %rdi
callq 0x6828
leaq -0x4f8(%rbp), %rdi
callq 0x6828
leaq -0x518(%rbp), %rdi
callq 0x6828
movq -0x520(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x17750
jmp 0x2b357
jmp 0x2b46a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b3a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b399
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x6828
leaq -0x438(%rbp), %rdi
callq 0x6828
leaq -0x458(%rbp), %rdi
callq 0x6828
jmp 0x2b5c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b3ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b3f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x478(%rbp), %rdi
callq 0x6828
leaq -0x498(%rbp), %rdi
callq 0x6828
leaq -0x4b8(%rbp), %rdi
callq 0x6828
jmp 0x2b5c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b459
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2b44d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x4d8(%rbp), %rdi
callq 0x6828
leaq -0x4f8(%rbp), %rdi
callq 0x6828
leaq -0x518(%rbp), %rdi
callq 0x6828
jmp 0x2b5c7
movq -0x520(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, -0x584(%rbp)
movq 0x180(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq 0x18(%rbp), %rsi
callq 0x34130
movq %rax, -0x580(%rbp)
jmp 0x2b4a3
movq -0x520(%rbp), %rax
movq -0x580(%rbp), %rcx
movl -0x584(%rbp), %esi
movl (%rcx), %edx
addl %esi, %edx
movl %edx, (%rcx)
movl -0x30(%rbp), %ecx
movl %ecx, -0x594(%rbp)
movq 0x188(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq 0x18(%rbp), %rsi
callq 0x34130
movq %rax, -0x590(%rbp)
jmp 0x2b4ef
movq -0x590(%rbp), %rax
movl -0x594(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
leaq -0x230(%rbp), %rax
movq %rax, -0x5a8(%rbp)
addq $0x40, %rax
movq %rax, -0x5a0(%rbp)
movq -0x5a0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x5b0(%rbp)
callq 0x6828
movq -0x5a8(%rbp), %rcx
movq -0x5b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5a0(%rbp)
jne 0x2b519
leaq -0x1f0(%rbp), %rax
movq %rax, -0x5c0(%rbp)
addq $0x40, %rax
movq %rax, -0x5b8(%rbp)
movq -0x5b8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x5c8(%rbp)
callq 0x6828
movq -0x5c0(%rbp), %rcx
movq -0x5c8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5b8(%rbp)
jne 0x2b563
leaq -0xd0(%rbp), %rdi
callq 0x6828
leaq -0xa8(%rbp), %rdi
callq 0x6828
leaq -0x78(%rbp), %rdi
callq 0x6828
leaq -0x58(%rbp), %rdi
callq 0x6828
addq $0x600, %rsp            # imm = 0x600
popq %rbp
retq
leaq -0x230(%rbp), %rax
movq %rax, -0x5d8(%rbp)
addq $0x40, %rax
movq %rax, -0x5d0(%rbp)
movq -0x5d0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x5e0(%rbp)
callq 0x6828
movq -0x5d8(%rbp), %rcx
movq -0x5e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5d0(%rbp)
jne 0x2b5e0
leaq -0x1f0(%rbp), %rax
movq %rax, -0x5f0(%rbp)
addq $0x40, %rax
movq %rax, -0x5e8(%rbp)
movq -0x5e8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x5f8(%rbp)
callq 0x6828
movq -0x5f0(%rbp), %rcx
movq -0x5f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5e8(%rbp)
jne 0x2b62a
jmp 0x2b65d
leaq -0xd0(%rbp), %rdi
callq 0x6828
leaq -0xa8(%rbp), %rdi
callq 0x6828
leaq -0x78(%rbp), %rdi
callq 0x6828
leaq -0x58(%rbp), %rdi
callq 0x6828
movq -0x80(%rbp), %rdi
callq 0x6750