// File: /workspace/github_cpp_makefile_star2_O3/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::ConstructMatchRecord(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::ConstructMatchRecord(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;
    int truth_edit_distance = 0;
    int predict_edit_distance = 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 (int var_index = 0; var_index < variant_list.size(); var_index++) {
            DiploidVariant variant = variant_list[var_index];
            if(variant.flag != i) continue;
            //The exact wording from the C++ standard is (§4.7/4): "If the source type is bool,
            // the value false is converted to zero and the value true is converted to one."
            int phasing = best_path.choice_vector[var_index];
            if(phasing <= NOT_USE) continue;
            int edit_distance = CalculateEditDistance(variant, phasing, 0);
            if(i == 0){
                truth_num ++;
                truth_edit_distance += edit_distance;
            }else{
                predict_num ++;
                predict_edit_distance += edit_distance;
            }

            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;

    baseline_total_edit_distance[thread_index][threshold_index]->at(mode_index) += truth_edit_distance;
    query_total_edit_distance[thread_index][threshold_index]->at(mode_index) += predict_edit_distance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movl %r9d, %r13d
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, 0x148(%rsp)
movq %rsi, %rbp
movq %rdi, %r15
movq 0xd8(%rsi), %rdx
movb $0x1, %r12b
cmpq 0xf8(%rsi), %rdx
jne 0x1c7a8
testq %rdx, %rdx
je 0x1c7a5
movq 0xd0(%rbp), %rdi
movq 0xf0(%rbp), %rsi
callq 0x5350
testl %eax, %eax
setne %r12b
jmp 0x1c7a8
xorl %r12d, %r12d
leaq 0x130(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0x1123c
leaq 0x1e0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xd0(%rbp), %rsi
movq 0xd8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x1d0(%rsp), %rdi
callq 0x1123c
leaq 0x200(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xf0(%rbp), %rsi
movq 0xf8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x1f0(%rsp), %rdi
callq 0x1123c
leaq 0xb8(%r15), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x2851c
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x1123c
movq %rbp, 0x140(%rsp)
leaq 0x14d92(%rip), %rsi     # 0x315f1
leaq 0x8(%rsp), %rdi
callq 0x5630
incl %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x1c8c6
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x1c8bd
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x1c8c3
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x1c8c6
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1c88a
addl $-0x3, %r14d
jmp 0x1c8c6
addl $-0x2, %r14d
jmp 0x1c8c6
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xa8(%rsp), %rdi
movl $0x2d, %edx
callq 0x53b0
movl %ebx, %edi
addq 0xa8(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0xe33a
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0xb0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x18(%rsp), %rsi
cmpq %rsi, %rcx
je 0x1c929
movq 0x18(%rsp), %rdi
movq 0xa8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1c955
movl $0xf, %edi
leaq 0xb8(%rsp), %r9
cmpq %r9, %rsi
je 0x1c950
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1c961
leaq 0x8(%rsp), %rdi
callq 0x50f0
jmp 0x1c972
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1c996
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1c99c
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x14c31(%rip), %rsi     # 0x315f1
leaq 0x28(%rsp), %rdi
callq 0x5630
leaq 0x220(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c9fa
movq %rdx, 0x210(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x220(%rsp)
jmp 0x1ca01
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movl %r13d, 0xd4(%rsp)
movq %r15, 0xe8(%rsp)
movq 0x8(%rax), %rdx
leaq 0x210(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
movq %rdi, 0xc8(%rsp)
callq 0x50f0
leaq 0x260(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1ca7d
movq %rdx, 0x250(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x260(%rsp)
jmp 0x1ca85
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x250(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14b46(%rip), %rsi     # 0x315f1
movq %rbx, %rdi
callq 0x5630
leaq 0x60(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1cada
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1cae0
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1d0(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
callq 0x50f0
leaq 0x110(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1cb41
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x1cb47
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x108(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1cb7e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x250(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cb9b
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x210(%rsp), %rdi
cmpq %r14, %rdi
je 0x1cbb8
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x60(%rsp), %r14
je 0x1cbd8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1cbfd
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1cc19
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
testb %r12b, %r12b
leaq 0x18(%rsp), %r12
je 0x1cc6a
leaq 0x149c9(%rip), %rsi     # 0x315f3
leaq 0x50(%rsp), %rdi
leaq 0x1f0(%rsp), %rdx
callq 0xce20
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x100(%rsp), %rdi
callq 0x50f0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1cc6a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movl $0x10, %eax
leaq (%rsp,%rax), %rcx
addq $0x250, %rcx            # imm = 0x250
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x50, %rax
jne 0x1cc6f
movl $0x10, %eax
leaq (%rsp,%rax), %rcx
addq $0x210, %rcx            # imm = 0x210
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x50, %rax
jne 0x1cc98
leaq 0x58(%rsp), %rbp
movq $0x0, 0xf8(%rsp)
movb $0x1, %al
movl %eax, 0x4c(%rsp)
leaq 0x148b7(%rip), %r13     # 0x31591
movl $0x0, 0xd8(%rsp)
movl $0x0, 0xdc(%rsp)
movl $0x0, 0xe0(%rsp)
movl $0x0, 0xe4(%rsp)
movq %rbx, 0xf0(%rsp)
movq 0x148(%rsp), %rax
movq (%rax), %r14
cmpq %r14, 0x8(%rax)
je 0x1d31b
xorl %ebx, %ebx
imulq $0x58, %rbx, %r15
movl (%r14,%r15), %eax
movl %eax, 0x50(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r14,%r15), %rsi
movq 0x10(%r14,%r15), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x1123c
addq %r15, %r14
leaq 0x28(%r14), %rsi
leaq 0x78(%rsp), %rdi
callq 0x28582
movq 0x50(%r14), %rax
movq %rax, 0x48(%rbp)
movups 0x40(%r14), %xmm0
movups %xmm0, 0x38(%rbp)
movzbl 0x9c(%rsp), %eax
cmpq %rax, 0xf8(%rsp)
jne 0x1d2c5
movq 0x140(%rsp), %rax
movq 0x168(%rax), %rax
movl (%rax,%rbx,4), %r14d
cmpl $-0x8, %r14d
jl 0x1d2c5
movq 0xe8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x16328
testb $0x1, 0x4c(%rsp)
je 0x1cdd3
incl 0xd8(%rsp)
addl %eax, 0xe0(%rsp)
jmp 0x1cde1
incl 0xdc(%rsp)
addl %eax, 0xe4(%rsp)
cmpl $0x0, 0x2e0(%rsp)
jne 0x1d2c5
movq 0x78(%rsp), %rax
leaq 0x38(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x1123c
cmpb $0x1, 0x91(%rsp)
movl $0xd1b71759, %ebp       # imm = 0xD1B71759
jne 0x1ce66
movq 0x78(%rsp), %rdx
addq $0x20, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x147bd(%rip), %rsi     # 0x315f3
callq 0xce20
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x50f0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ce66
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq %r12, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x1477b(%rip), %rdx     # 0x315f2
movq %rdx, %rsi
callq 0xc3da
addl $0x2, %r14d
cmpl $0x3, %r14d
ja 0x1cf2d
leaq 0x1443c(%rip), %rcx     # 0x312d0
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
leaq 0x149e1(%rip), %rsi     # 0x31883
jmpq *%rax
leaq 0x149dc(%rip), %rsi     # 0x31887
jmp 0x1cf23
leaq 0x8(%rsp), %rdi
leaq 0x1479a(%rip), %rsi     # 0x31653
callq 0x5630
cmpb $0x1, 0x90(%rsp)
leaq 0x149b7(%rip), %rsi     # 0x31884
jne 0x1cf23
cmpb $0x1, 0x91(%rsp)
leaq 0x149a2(%rip), %rsi     # 0x31880
jne 0x1cf23
cmpb $0x0, 0x92(%rsp)
leaq 0x14999(%rip), %rsi     # 0x31888
leaq 0x1498a(%rip), %rax     # 0x31880
jmp 0x1cf1f
cmpb $0x1, 0x91(%rsp)
leaq 0x1497c(%rip), %rsi     # 0x31883
jne 0x1cf23
cmpb $0x0, 0x92(%rsp)
leaq 0x14963(%rip), %rsi     # 0x3187b
leaq 0x14960(%rip), %rax     # 0x3187f
cmovneq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x5630
movl 0x50(%rsp), %r15d
incl %r15d
movl %r15d, %r14d
negl %r14d
cmovsl %r15d, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x1cf8d
movl $0x4, %r12d
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0x1cf84
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x1cf8a
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1cf8d
movl %eax, %ecx
imulq %rbp, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x1cf54
addl $-0x3, %r12d
jmp 0x1cf8d
addl $-0x2, %r12d
jmp 0x1cf8d
decl %r12d
movq %r13, %rbp
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x53b0
movl %r15d, %edi
addq 0x1b0(%rsp), %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0xe33a
movq %r13, %rdi
movq %rbp, %r13
movq %rbp, %rsi
callq 0x5630
leaq 0x160(%rsp), %rsi
movq %rsi, 0x150(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x18(%rsp), %r12
leaq 0x58(%rsp), %rbp
je 0x1d01f
movq %rdx, 0x150(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x160(%rsp)
jmp 0x1d025
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x158(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x150(%rsp), %rdi
callq 0x50f0
leaq 0x180(%rsp), %rsi
movq %rsi, 0x170(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d08b
movq %rdx, 0x170(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x180(%rsp)
jmp 0x1d091
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x178(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x170(%rsp), %rdi
movq %r13, %rsi
callq 0x5630
leaq 0x1a0(%rsp), %rsi
movq %rsi, 0x190(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d0f0
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x1d0f6
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x198(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x190(%rsp), %rdi
callq 0x50f0
leaq 0xb8(%rsp), %rsi
movq %rsi, 0xa8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d15c
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x1d162
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x1d1a2
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x1d1c7
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x1d1ec
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x1d211
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xf0(%rsp), %rdi
callq 0x50f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0xc8(%rsp), %rdi
callq 0x50f0
movq 0xf0(%rsp), %rdi
leaq 0x14637(%rip), %rsi     # 0x3188b
callq 0x5630
movq 0xc8(%rsp), %rdi
leaq 0x14623(%rip), %rsi     # 0x3188b
callq 0x5630
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d292
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d2a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1d2c5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x78(%rsp), %rdi
callq 0xe71c
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1d2eb
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5340
incq %rbx
movq 0x148(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rax
cmpq %rbx, %rax
ja 0x1cd25
cmpl $0x0, 0x2e0(%rsp)
je 0x1d362
movl $0x1, %eax
movq %rax, 0xf8(%rsp)
leaq 0x230(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x270(%rsp), %rbx
testb $0x1, 0x4c(%rsp)
movl $0x0, 0x4c(%rsp)
jne 0x1cd06
jmp 0x1d42e
movq 0xf0(%rsp), %rbx
movq 0x8(%rbx), %rcx
decq %rcx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x5360
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rbx
cmpq %rbx, %rdi
movq 0xc8(%rsp), %r14
je 0x1d3b2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%r14), %rcx
decq %rcx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x5360
movq %r14, %rdi
movq %r15, %rsi
callq 0x53e0
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1d3e8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movl $0x1, %eax
movq %rax, 0xf8(%rsp)
leaq 0x230(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x270(%rsp), %rbx
testb $0x1, 0x4c(%rsp)
movl $0x0, 0x4c(%rsp)
jne 0x1cd06
cmpl $0x0, 0x2e0(%rsp)
je 0x1d60e
movslq 0xd4(%rsp), %r14
movslq 0x2d8(%rsp), %rbx
movq 0xe8(%rsp), %r13
movq 0x180(%r13), %rax
movq (%rax,%r14,8), %rcx
movslq 0x2e0(%rsp), %rax
movq (%rcx,%rax,8), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rbx, %rdx
jbe 0x1da52
movl 0xd8(%rsp), %edx
addl %edx, (%rcx,%rbx,4)
movq 0x188(%r13), %rcx
movq (%rcx,%r14,8), %rcx
movq (%rcx,%rax,8), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rbx, %rdx
jbe 0x1da52
movl 0xdc(%rsp), %edx
addl %edx, (%rcx,%rbx,4)
movq 0x190(%r13), %rcx
movq (%rcx,%r14,8), %rcx
movq (%rcx,%rax,8), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rbx, %rdx
jbe 0x1da52
movl 0xe0(%rsp), %edx
addl %edx, (%rcx,%rbx,4)
movq 0x198(%r13), %rcx
movq (%rcx,%r14,8), %rcx
movq (%rcx,%rax,8), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rbx, %rdx
jbe 0x1da52
movl 0xe4(%rsp), %ecx
addl %ecx, (%rax,%rbx,4)
movq $-0x40, %rbx
leaq 0x240(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x1d531
movq (%r14), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x1d51d
movq $-0x40, %rbx
leaq 0x280(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x1d55e
movq (%r14), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x1d54a
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x1d58d
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
leaq 0x130(%rsp), %rbx
je 0x1d5ba
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x1d5df
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1d5fc
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13fdc(%rip), %rsi     # 0x315f1
leaq 0x8(%rsp), %rdi
leaq 0x250(%rsp), %rdx
callq 0xce20
leaq 0x13fc3(%rip), %rsi     # 0x315f1
leaq 0x8(%rsp), %rdi
callq 0x5630
movq 0x140(%rsp), %rbx
leaq 0x60(%rsp), %r14
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d66d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1d673
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0xe8(%rsp), %r13
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x270(%rsp), %rsi
movq 0x278(%rsp), %rdx
callq 0x50f0
movq %r14, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d6cf
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1d6d6
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x100(%rsp), %rdi
callq 0x50f0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d71c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1d738
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d74f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x13e9b(%rip), %rsi     # 0x315f1
leaq 0x8(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0xce20
leaq 0x13e82(%rip), %rsi     # 0x315f1
leaq 0x8(%rsp), %rdi
callq 0x5630
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d7a1
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1d7a7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x230(%rsp), %rsi
movq 0x238(%rsp), %rdx
callq 0x50f0
movq %r14, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d7fb
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1d802
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x100(%rsp), %rdi
callq 0x50f0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d848
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1d864
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d87b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movl 0x158(%rbx), %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x1d8dc
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x1d8d3
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x1d8d9
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x1d8dc
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1d8a0
addl $-0x3, %r14d
jmp 0x1d8dc
addl $-0x2, %r14d
jmp 0x1d8dc
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movl $0x2d, %edx
callq 0x53b0
leaq 0x8(%rsp), %r15
addq (%r15), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0xe33a
leaq 0x13ce0(%rip), %rcx     # 0x315f1
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x60(%rsp), %r14
je 0x1d950
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1d956
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x126f3(%rip), %rsi     # 0x3006c
callq 0x5630
movq %r14, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d9a1
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x1d9a8
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x100(%rsp), %rdi
callq 0x50f0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d9ee
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1da0a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1da21
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x178(%r13), %rax
movslq 0xd4(%rsp), %r14
movq (%rax,%r14,8), %rax
movslq 0x2d8(%rsp), %rbx
movq (%rax,%rbx,8), %rdi
leaq 0x100(%rsp), %rsi
callq 0x10c62
jmp 0x1d446
leaq 0x1409b(%rip), %rdi     # 0x31af4
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5490
jmp 0x1da79
jmp 0x1da95
jmp 0x1dab6
jmp 0x1dd6e
jmp 0x1da79
jmp 0x1da95
jmp 0x1dab6
jmp 0x1dd6e
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1da98
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1da98
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1dab9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1dab9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1dd71
movq 0x18(%rsp), %rsi
jmp 0x1dd64
jmp 0x1dd6e
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ddcb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ddcb
movq %rax, %rbx
jmp 0x1ddcb
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1db2a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1db2a
movq %rax, %rbx
movq 0x250(%rsp), %rdi
cmpq %r13, %rdi
je 0x1db4c
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1db4c
movq %rax, %rbx
movq 0x210(%rsp), %rdi
cmpq %r14, %rdi
je 0x1db6e
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1db6e
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1db8e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1db8e
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1dbba
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1dbba
jmp 0x1dbb7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1dbfb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1dbfb
movq %rax, %rbx
leaq 0x130(%rsp), %r14
jmp 0x1de1d
movq %rax, %rbx
leaq 0x130(%rsp), %r14
jmp 0x1de42
movq %rax, %rbx
leaq 0x130(%rsp), %r14
jmp 0x1ddf8
jmp 0x1dd6e
jmp 0x1dd6e
jmp 0x1dd6e
jmp 0x1dcd5
jmp 0x1dcda
movq %rax, %rbx
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x1dc4e
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1dc4e
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x1dc73
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x18(%rsp), %r12
jmp 0x1dc7d
movq %rax, %rbx
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x1dcac
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1dcac
movq %rax, %rbx
leaq 0x18(%rsp), %r12
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x1dd0e
movq 0x1c0(%rsp), %rsi
jmp 0x1dd06
movq %rax, %rbx
leaq 0x18(%rsp), %r12
jmp 0x1dd0e
movq %rax, %rbx
jmp 0x1dd0e
movq %rax, %rbx
jmp 0x1dd25
jmp 0x1dce1
movq %rax, %rbx
jmp 0x1dd41
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x1dd0e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1dd25
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x38(%rsp), %rax
movq 0x28(%rsp), %rdi
cmpq %rax, %rdi
je 0x1dd41
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x50(%rsp), %rdi
callq 0x286da
jmp 0x1dd71
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1dd71
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1dd71
movq %rax, %rbx
movq $-0x40, %r14
leaq 0x240(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1dd94
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r15
addq $0x20, %r14
jne 0x1dd80
movq $-0x40, %r14
leaq 0x280(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1ddc1
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r15
addq $0x20, %r14
jne 0x1ddad
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
leaq 0x130(%rsp), %r14
je 0x1ddf8
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
je 0x1de1d
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x1de42
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x120(%rsp), %rdi
cmpq %r14, %rdi
je 0x1de5f
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5340
movq %rbx, %rdi
callq 0x55c0
nop