// File: /workspace/github_cpp_makefile_star2_O1/medvedevgroup[P]varmatch/src/wholegenome.cpp
// Function: WholeGenome::PathMakeDecisionNoGenotype(SequencePath&, std::vector<DiploidVariant, std::allocator<DiploidVariant>>&, std::multimap<int, int, std::less<int>, std::allocator<std::pair<int const, int>>>**, std::__cxx11::list<SequencePath, std::allocator<SequencePath>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, int)
bool WholeGenome::PathMakeDecisionNoGenotype(SequencePath& sp,
                                 vector<DiploidVariant> & variant_list,
                                 multimap<int, int> * choices_by_pos[],
                                 list<SequencePath> & sequence_path_list,
                                 const string & reference_sequence,
                                 int score_unit,
                                 int match_mode,
                                 int score_scheme)
{
    int pos = sp.current_genome_pos+1;
    vector<pair<int, int>> candidate_choices[2];
    for(int i = 0; i < 2; i++){
        // because if it's (-1,-1), it will do nothing, so it's ok to have this one...
        candidate_choices[i].push_back(pair<int, int>(-1, -1));
        // to maintain existance
        // in this position, make choice of not use any variants, no matter if there is variant

        pair<multimap<int, int>::iterator, multimap<int, int>::iterator> var_range;
        var_range = choices_by_pos[i]->equal_range(pos);

        for(auto it = var_range.first; it != var_range.second; ++it){
            int var_index = (*it).second;
            DiploidVariant var = variant_list[var_index];
            // check if current var influence
            string ref = var.ref; //even we do not know the offset, we know ref start from pos of reference_sequence
            string alts[2];
            alts[0] = var.alts[0];
            alts[1] = alts[0];
            if(var.multi_alts){ //here do not have to change anything
                alts[1] = var.alts[1];
            }

            // not just purely consider if a vqriant can be applied, but if a choice
            bool choice_applicable = true;
            for(int k = 0; k < ref.length(); k++){
            // for each ref char
                int y = 0;
                // for each strain
                if(sp.string_sequences[i*2+y][k+pos] != "."){
                    // decision in this area has already been made
                    if(k >= alts[y].length()){
                        choice_applicable = false;
                        break;
                    }else{
                        if(ref[k] != alts[y][k]){
                            choice_applicable = false;
                            break;
                        }
                    }
                }
            }

            if(choice_applicable){
                candidate_choices[i].push_back(pair<int, int>(var_index, 0));
            }

            if(var.multi_alts){ // here do not have to change anything

                //if heterozygous, then there is another choice, check if it is applicable
                string temp = alts[0];
                alts[0] = alts[1];
                alts[1] = temp;

                choice_applicable = true;
                for(int k = 0; k < ref.length(); k++){
                // for each ref char
                    //for(int y = 0; y < 2; y++)
                    int y = 0;
                    // for each strain
                    if(sp.string_sequences[i*2+y][k+pos] != "."){
                        // decision in this area has already been made
                        if(k >= alts[y].length()){
                            // should be a deletion
                            choice_applicable = false;
                            break;
                        }else{
                            // should be equal at current position
                            // can be an insertion, as long as current position is the same
                            if(ref[k] != alts[y][k]){
                                choice_applicable = false;
                                break;
                            }
                        }
                    }
                }

                if(choice_applicable){
                    candidate_choices[i].push_back(pair<int, int>(var_index, 1));
                }
            }
        }
    }

    //dout << candidate_choices[0].size() << "," << candidate_choices[1].size() << endl;

    for(int i = 0; i < candidate_choices[0].size(); i++){
        for(int j = 0; j < candidate_choices[1].size(); j++){
            // iterate all choices
            SequencePath path = sp;
            pair<int, int> var_choice[2];
            var_choice[0] = candidate_choices[0][i];
            var_choice[1] = candidate_choices[1][j];
            for(int x = 0; x < 2; x++){
                // iterate truth and predict
                int var_index = var_choice[x].first;
                if(var_index != -1){
                    DiploidVariant var = variant_list[var_index];
                    // if(var.flag != x){
                    //     dout << "Error" << endl;
                    // }
                    string ref = var.ref;
                    string alts[2];
                    int c = var_choice[x].second;
                    alts[0] = var.alts[c];
                    path.score += CalculateScore(var,
                                                 c,
                                                 score_unit,
                                                 match_mode,
                                                 score_scheme);

                    ToUpper(ref);
                    ToUpper(alts[0]);
                    int y = 0;

                    int k = 0;
                    for(; k < ref.length()-1; k++){
                        if(k < alts[y].length()){
                            if(ref[k] != alts[y][k]){
                                path.string_sequences[x*2+y][pos+k] = alts[y].substr(k,1);
                            }
                            // else change nothing
                        }else{
                            path.string_sequences[x*2+y][pos+k] = "";
                        }
                    }
                    // hence k == ref.length()-1, the last position
                    if(k < alts[y].length()){
                        string alt_part = alts[y].substr(k, alts[y].length()-k);
                        if(alt_part.length() > 1){
                            if(alt_part[0] == ref[k]){
                                if(path.string_sequences[x*2+y][pos+k] == "."){
                                    path.string_sequences[x*2+y][pos+k] = alt_part;
                                }else{
                                    path.string_sequences[x*2+y][pos+k] += alt_part.substr(1, alt_part.size() - 1);
                                }
                            }else{
                                path.string_sequences[x*2+y][pos+k] = alt_part;
                            }
                        }else{
                            if(ref[k] != alts[y][k]){
                                path.string_sequences[x*2+y][pos+k] = alt_part;
                            }
                        }
                    }else{
                        path.string_sequences[x*2+y][pos+k] = "";
                    }

                }
                path.choice_made[x][pos] = var_choice[x];
            }
            sequence_path_list.push_back(path);
        }
    }

    //expected number of inserted paths are 2,3,4,6,x...
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %r8, 0x188(%rsp)
movq %rcx, 0x180(%rsp)
movq %rdx, 0x150(%rsp)
movq %rdi, 0x1a0(%rsp)
movl 0xc8(%rsi), %eax
incl %eax
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
leaq 0xd0(%rsp), %rbp
movq %rsi, 0x190(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x178(%rsp)
xorl %ebx, %ebx
leaq 0x1a1d4(%rip), %r14     # 0x31a56
leaq (%rbx,%rbx,2), %rax
leaq (%rsp,%rax,8), %rdi
addq $0x110, %rdi            # imm = 0x110
movq $-0x1, 0x1a8(%rsp)
movq %rdi, 0x28(%rsp)
leaq 0x1a8(%rsp), %rsi
callq 0x2e284
movq 0x180(%rsp), %rax
movq %rbx, 0x148(%rsp)
movq (%rax,%rbx,8), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2e20c
cmpq %rdx, %rax
je 0x17c24
movq 0x148(%rsp), %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r12
addq 0x178(%rsp), %r12
movq %rdx, 0x198(%rsp)
movq %rbp, %r13
movq %rax, 0x48(%rsp)
movslq 0x24(%rax), %r15
movq 0x150(%rsp), %rax
movq (%rax), %rbx
imulq $0x58, %r15, %rbp
movl (%rbx,%rbp), %eax
movl %eax, 0x1a8(%rsp)
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq 0x8(%rbx,%rbp), %rsi
movq 0x10(%rbx,%rbp), %rdx
addq %rsi, %rdx
leaq 0x1b0(%rsp), %rdi
callq 0x112ce
addq %rbp, %rbx
leaq 0x28(%rbx), %rsi
leaq 0x1d0(%rsp), %rdi
callq 0x289ec
movq 0x50(%rbx), %rax
leaq 0x1b0(%rsp), %rcx
movq %rax, 0x48(%rcx)
movups 0x40(%rbx), %xmm0
movups %xmm0, 0x38(%rcx)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x112ce
movl $0x10, %eax
leaq (%rsp,%rax), %rcx
addq $0xb0, %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x50, %rax
jne 0x179a0
movq 0x1d0(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x51c0
movq %r13, %rbp
movq %r13, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x51c0
cmpb $0x1, 0x1e9(%rsp)
jne 0x17a0a
movq 0x1d0(%rsp), %rsi
addq $0x20, %rsi
movq %rbp, %rdi
callq 0x51c0
cmpq $0x0, 0x78(%rsp)
je 0x17a76
movb $0x1, %bl
xorl %ebp, %ebp
movl 0x4(%rsp), %eax
addl %ebp, %eax
movslq %eax, %rdi
shlq $0x5, %rdi
addq (%r12), %rdi
movq %r14, %rsi
callq 0x50e0
testl %eax, %eax
je 0x17a5b
xorl %eax, %eax
movl $0x0, %ecx
cmpq %rbp, 0xb8(%rsp)
jbe 0x17a5f
movq 0x70(%rsp), %rax
movb (%rax,%rbp), %dl
movq 0xb0(%rsp), %rsi
xorl %eax, %eax
cmpb (%rsi,%rbp), %dl
jne 0x17a5f
movb $0x1, %cl
movl %ebx, %eax
testb %cl, %cl
je 0x17a6f
incq %rbp
movl %eax, %ebx
cmpq %rbp, 0x78(%rsp)
ja 0x17a16
testb $0x1, %al
movq %r13, %rbp
je 0x17a92
movl %r15d, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2e284
cmpb $0x0, 0x1e9(%rsp)
je 0x17b88
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x112ce
leaq 0xb0(%rsp), %rdi
movq %rbp, %rsi
callq 0x51c0
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x51c0
cmpq $0x0, 0x78(%rsp)
je 0x17b50
movb $0x1, %bl
xorl %ebp, %ebp
movl 0x4(%rsp), %eax
addl %ebp, %eax
movslq %eax, %rdi
shlq $0x5, %rdi
addq (%r12), %rdi
movq %r14, %rsi
callq 0x50e0
testl %eax, %eax
je 0x17b35
xorl %eax, %eax
movl $0x0, %ecx
cmpq %rbp, 0xb8(%rsp)
jbe 0x17b39
movq 0x70(%rsp), %rax
movb (%rax,%rbp), %dl
movq 0xb0(%rsp), %rsi
xorl %eax, %eax
cmpb (%rsi,%rbp), %dl
jne 0x17b39
movb $0x1, %cl
movl %ebx, %eax
testb %cl, %cl
je 0x17b49
incq %rbp
movl %eax, %ebx
cmpq %rbp, 0x78(%rsp)
ja 0x17af0
testb $0x1, %al
movq %r13, %rbp
je 0x17b6c
movl %r15d, 0x50(%rsp)
movl $0x1, 0x54(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2e284
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17b88
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq $-0x40, %rbx
leaq 0xe0(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x17bab
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x17b97
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x17bd7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1d0(%rsp), %rdi
callq 0xe7ca
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x17c09
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x48(%rsp), %rdi
callq 0x5250
movq 0x198(%rsp), %rdx
cmpq %rdx, %rax
jne 0x178f6
movq 0x148(%rsp), %rcx
leaq 0x1(%rcx), %rbx
testq %rcx, %rcx
je 0x17882
movq 0x118(%rsp), %rax
cmpq 0x110(%rsp), %rax
je 0x1828d
movq $0x0, 0x28(%rsp)
leaq 0x1a8(%rsp), %r14
leaq 0x50(%rsp), %r12
movq 0x130(%rsp), %rax
cmpq 0x128(%rsp), %rax
je 0x18263
xorl %r15d, %r15d
movq %r14, %rdi
movq 0x190(%rsp), %rsi
callq 0x2935c
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x110(%rsp), %rax
movq 0x128(%rsp), %rcx
movq 0x28(%rsp), %rsi
movl (%rax,%rsi,8), %edx
movl %edx, 0x30(%rsp)
movl 0x4(%rax,%rsi,8), %eax
movl %eax, 0x34(%rsp)
movl (%rcx,%r15,8), %eax
movl %eax, 0x38(%rsp)
movq %r15, 0x48(%rsp)
movl 0x4(%rcx,%r15,8), %eax
movl %eax, 0x3c(%rsp)
xorl %r13d, %r13d
movslq 0x30(%rsp,%r13,8), %rbp
cmpq $-0x1, %rbp
je 0x1814b
movq 0x150(%rsp), %rax
movq (%rax), %rbx
imulq $0x58, %rbp, %r14
movl (%rbx,%r14), %eax
movl %eax, 0xb0(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x8(%rbx,%r14), %rsi
movq 0x10(%rbx,%r14), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x112ce
addq %r14, %rbx
leaq 0x28(%rbx), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x289ec
movq 0x50(%rbx), %rax
leaq 0xb8(%rsp), %rcx
movq %rax, 0x48(%rcx)
movups 0x40(%rbx), %xmm0
movups %xmm0, 0x38(%rcx)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x112ce
movl $0x10, %eax
leaq (%rsp,%rax), %rcx
addq $0x70, %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x50, %rax
jne 0x17d7e
movslq 0x34(%rsp,%r13,8), %r15
movq %r15, %rsi
shlq $0x5, %rsi
addq 0xd8(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x51c0
movq 0x1a0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl %r15d, %edx
movl 0x360(%rsp), %ecx
movl 0x368(%rsp), %r8d
movl 0x370(%rsp), %r9d
callq 0x176ee
addl %eax, 0x300(%rsp)
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x17e1b
movq 0x8(%rsp), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x5610
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x17e05
movq 0x78(%rsp), %rbx
testq %rbx, %rbx
je 0x17e43
movq 0x70(%rsp), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x5610
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x17e2d
cmpq $0x1, 0x10(%rsp)
jne 0x17e56
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x17f1a
movq %r13, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rbx
leaq 0x1b0(%rsp), %rax
addq %rax, %rbx
xorl %r15d, %r15d
leaq 0x70(%rsp), %r14
cmpq %r15, 0x78(%rsp)
jbe 0x17ed9
movq 0x8(%rsp), %rax
movb (%rax,%r15), %al
movq 0x70(%rsp), %rcx
cmpb (%rcx,%r15), %al
je 0x17f03
movl $0x1, %ecx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5360
movl 0x4(%rsp), %eax
addl %r15d, %eax
movslq %eax, %rdi
shlq $0x5, %rdi
addq (%rbx), %rdi
movq %r12, %rsi
callq 0x53e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x17f03
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x17f03
movl 0x4(%rsp), %eax
addl %r15d, %eax
cltq
movq (%rbx), %rcx
shlq $0x5, %rax
leaq (%rcx,%rax), %rdi
movq 0x8(%rcx,%rax), %rdx
xorl %esi, %esi
leaq 0x196c7(%rip), %rcx     # 0x315c2
xorl %r8d, %r8d
callq 0x54b0
incq %r15
movq 0x10(%rsp), %rax
decq %rax
cmpq %r15, %rax
ja 0x17e74
movl %r15d, %r14d
movq 0x78(%rsp), %rcx
subq %r15, %rcx
jbe 0x18007
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
movq %r15, %rdx
callq 0x5360
cmpq $0x2, 0x58(%rsp)
jb 0x18050
movq 0x50(%rsp), %rax
movb (%rax), %cl
movq 0x8(%rsp), %rdx
leaq (,%r13,2), %rax
movslq 0x4(%rsp), %rdi
movslq %r14d, %r14
addq %r14, %rdi
cmpb (%rdx,%r15), %cl
jne 0x1808b
leaq (%rax,%rax,2), %rax
leaq 0x1b0(%rsp), %rcx
leaq (%rcx,%rax,8), %rbx
shlq $0x5, %rdi
addq (%rbx), %rdi
leaq 0x19acb(%rip), %rsi     # 0x31a56
callq 0x50e0
testl %eax, %eax
je 0x1809d
movq 0x58(%rsp), %rcx
decq %rcx
movl $0x1, %edx
leaq 0x158(%rsp), %rdi
movq %r12, %rsi
callq 0x5360
movslq 0x4(%rsp), %rdi
addq %r14, %rdi
shlq $0x5, %rdi
addq (%rbx), %rdi
movq 0x158(%rsp), %rsi
movq 0x160(%rsp), %rdx
callq 0x50f0
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x180b4
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x180b4
leaq (,%r13,2), %rax
addq %r13, %rax
shlq $0x4, %rax
movslq 0x4(%rsp), %rcx
movslq %r14d, %rdx
addq %rcx, %rdx
leaq 0x1b0(%rsp), %rcx
movq (%rcx,%rax), %rax
shlq $0x5, %rdx
leaq (%rax,%rdx), %rdi
movq 0x8(%rax,%rdx), %rdx
xorl %esi, %esi
leaq 0x1957f(%rip), %rcx     # 0x315c2
xorl %r8d, %r8d
callq 0x54b0
jmp 0x180d0
movq 0x8(%rsp), %rax
movb (%rax,%r15), %al
movq 0x70(%rsp), %rcx
cmpb (%rcx,%r15), %al
je 0x180b4
leaq (,%r13,2), %rbx
addq %r13, %rbx
shlq $0x4, %rbx
leaq 0x1b0(%rsp), %rax
addq %rax, %rbx
movslq 0x4(%rsp), %rax
movslq %r14d, %rdi
addq %rax, %rdi
jmp 0x180a5
leaq (%rax,%rax,2), %rax
leaq 0x1b0(%rsp), %rcx
leaq (%rcx,%rax,8), %rbx
jmp 0x180a5
movslq 0x4(%rsp), %rdi
addq %r14, %rdi
shlq $0x5, %rdi
addq (%rbx), %rdi
movq %r12, %rsi
callq 0x51c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x180d0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
movq $-0x40, %rbx
leaq 0xa0(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x180f3
movq (%r14), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x180df
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x18119
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0xd8(%rsp), %rdi
callq 0xe7ca
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1814b
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5340
leaq (,%r13,2), %rdi
addq %r13, %rdi
shlq $0x4, %rdi
leaq 0x210(%rsp), %rax
addq %rax, %rdi
leaq 0x4(%rsp), %rsi
callq 0x294fc
movl %ebp, (%rax)
movl 0x34(%rsp,%r13,8), %ecx
movl %ecx, 0x4(%rax)
leaq 0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
je 0x17cd3
movq 0x188(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1a8(%rsp), %r14
movq %r14, %rsi
callq 0x2e600
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5070
incq 0x10(%rbx)
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x181d0
movq 0x320(%rsp), %rsi
subq %rdi, %rsi
callq 0x5340
movl $0x140, %ebx            # imm = 0x140
movq 0x48(%rsp), %r15
leaq (%rsp,%rbx), %rax
addq $0x1a8, %rax            # imm = 0x1A8
movq -0x10(%rax), %rdi
cmpq %rdi, %rax
je 0x181f8
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %rbx
cmpq $0xc0, %rbx
jne 0x181da
movl $0x98, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x2a5c6
addq $-0x30, %rbx
cmpq $0x38, %rbx
jne 0x1820a
movl $0x50, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0xe7ca
addq $-0x18, %rbx
cmpq $-0x10, %rbx
jne 0x18229
incq %r15
movq 0x130(%rsp), %rax
subq 0x128(%rsp), %rax
sarq $0x3, %rax
cmpq %r15, %rax
ja 0x17c7e
movq 0x28(%rsp), %rdx
incq %rdx
movq 0x118(%rsp), %rax
subq 0x110(%rsp), %rax
sarq $0x3, %rax
movq %rdx, 0x28(%rsp)
cmpq %rdx, %rax
ja 0x17c65
movl $0x30, %ebx
movq 0xf8(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x182af
movq 0x108(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
addq $-0x18, %rbx
jne 0x18292
movb $0x1, %al
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1831d
jmp 0x1831d
jmp 0x18325
jmp 0x18404
jmp 0x1831d
jmp 0x18346
jmp 0x18346
jmp 0x183d3
movq %rax, %r14
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x183d6
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x183d6
movq %rax, %r14
jmp 0x183a5
movq %rax, %r14
jmp 0x18398
movq %rax, %r14
jmp 0x18519
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x18349
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x18349
movq %rax, %r14
movq $-0x40, %rbx
leaq 0xe0(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1836c
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x18358
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x18398
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1d0(%rsp), %rdi
callq 0xe7ca
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x18519
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x18519
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x18413
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x18413
jmp 0x18410
jmp 0x18410
movq %rax, %r14
jmp 0x1845c
jmp 0x18404
movq %rax, %r14
jmp 0x18469
movq %rax, %r14
jmp 0x1848e
jmp 0x18410
jmp 0x18410
movq %rax, %r14
movq $-0x40, %rbx
leaq 0xa0(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x18436
movq (%r15), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x18422
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1845c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0xd8(%rsp), %rdi
callq 0xe7ca
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1848e
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x184ab
movq 0x320(%rsp), %rsi
subq %rdi, %rsi
callq 0x5340
movl $0x140, %ebx            # imm = 0x140
leaq (%rsp,%rbx), %rax
addq $0x1a8, %rax            # imm = 0x1A8
movq -0x10(%rax), %rdi
cmpq %rdi, %rax
je 0x184ce
movq (%rax), %rsi
incq %rsi
callq 0x5340
addq $-0x20, %rbx
cmpq $0xc0, %rbx
jne 0x184b0
movl $0x98, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x2a5c6
addq $-0x30, %rbx
cmpq $0x38, %rbx
jne 0x184e0
movl $0x50, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0xe7ca
addq $-0x18, %rbx
cmpq $-0x10, %rbx
jne 0x184ff
movl $0x30, %ebx
movq 0xf8(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x1853b
movq 0x108(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x5340
addq $-0x18, %rbx
jne 0x1851e
movq %r14, %rdi
callq 0x55c0
nop