// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/InputUtilSt.cpp
// Function: InputUtilSt::readTxt(char const*, task*)
bool InputUtilSt::readTxt(const char *fn, struct task *task) {
    FILE *fid = fopen(fn,"r");
    if( fid == NULL) {
        fprintf(stderr,"Could not read input file (%s).\n",fn);
        return false;
    }
    
    int number_columns = 0;
    max_line_length = 1024;
    char *col;
    NDAT co = 0;
    
    // count lines and check for number of columns
    line = (char *)malloc((size_t)max_line_length);// Malloc(char,max_line_length);
    
    // grab memory and read all data
    StripedArray<NPAR> *striped_dat_obs = new StripedArray<NPAR>();
    StripedArray<NCAT> *striped_dat_group = new StripedArray<NCAT>();
    StripedArray<NCAT> *striped_dat_skill = NULL;
    StripedArray<NCAT> *striped_dat_skill_stacked = NULL;
    StripedArray<NCAT> *striped_dat_skill_rcount  = NULL;
    StripedArray<NCAT> *striped_dat_skill_rix     = NULL;
    NDAT current_stacked = 0;
    if(task->multiskill==0)
        striped_dat_skill = new StripedArray<NCAT>();
    else {
//        task->dat_multiskill = new StripedArray< NCAT* >(true);
        striped_dat_skill_stacked = new StripedArray<NCAT>();
        striped_dat_skill_rcount  = new StripedArray<NCAT>();
        striped_dat_skill_rix     = new StripedArray<NCAT>();
    }
    StripedArray<NCAT> * striped_dat_item = new StripedArray<NCAT>();
    StripedArray<NPAR> *striped_dat_slice = NULL;
    if(task->sliced) {
        striped_dat_slice = new StripedArray<NPAR>();
    }
    task->map_group_fwd = new map<string,NCAT>();
    task->map_group_bwd = new map<NCAT,string>();
    task->map_skill_fwd = new map<string,NCAT>();
    task->map_skill_bwd = new map<NCAT,string>();
    task->map_step_fwd = new map<string,NCAT>();
    task->map_step_bwd = new map<NCAT,string>();
    string s_group, s_step, s_skill;
    NPAR slice = 0;
    map<string,NCAT>::iterator it;
    map<string,NCAT>::iterator it2;
    bool wrong_no_columns = false;
    task->N = 0;
    task->Nst = 0;
    NDAT Nst_alt = 0;
    task->N_null = 0;
    bool res = true;
    while( readline(fid)!=NULL && !wrong_no_columns) {
        //    while( NULL!=fgets(line,max_line_length,fid) && !wrong_no_columns) {
        number_columns = 0;
        // Observation
        col = strtok(line,"\t\n\r");
        if(col == NULL) {
            wrong_no_columns = true;
            break;
        }
        number_columns++;
        NPAR obs = (NPAR)(atoi( col )-1);
        if(obs==NPAR_MAX) {
            fprintf(stderr,"Number of observtions exceeds allowed maximum of %d.\n",NPAR_MAX);
            res=false;
            goto recycle;
        }
        striped_dat_obs->add(obs); // dat_obs[t] = (NPAR)obs;
        if( (obs >= 0) && ((task->nO-1) < obs) )
            task->nO = (NPAR)(obs + 1); // obs[t] + 1;

        // Group
        col = strtok(NULL,"\t\n\r");
        if(col == NULL) {
            wrong_no_columns = true;
            break;
        }
        number_columns++;
        s_group = string( col );
        it = task->map_group_fwd->find(s_group);
        if( it==task->map_group_fwd->end() ) { // not found
            if(task->map_group_fwd->size()==NCAT_MAX) {
                fprintf(stderr,"Number of unique groups exceeds allowed maximum of %d.\n",NCAT_MAX);
                res = false;
                goto recycle;
            }
            NCAT newg = (NCAT)task->map_group_fwd->size();
            striped_dat_group->add(newg); //[t] = task->map_group_fwd.size();
            task->map_group_fwd->insert(pair<string,NCAT>(s_group, newg));
            task->map_group_bwd->insert(pair<NCAT,string>(newg, s_group));
        }
        else
            striped_dat_group->add(it->second); // [t] = it->second;
        
        
        // Step
        col = strtok(NULL,"\t\n\r");
        if(col == NULL) {
            wrong_no_columns = true;
            break;
        }
        number_columns++;
        s_step = string( col );
        it2 = task->map_step_fwd->find(s_step);
        if( it2==task->map_step_fwd->end() ) { // not found
            if(task->map_step_fwd->size()==NCAT_MAX) {
                fprintf(stderr,"Number of unique steps exceeds allowed maximum of %d.\n",NCAT_MAX);
                res=false;
                goto recycle;
            }
            NCAT news = (NCAT)task->map_step_fwd->size();
            striped_dat_item->add(news); //[t] = task->map_group_fwd.size();
            task->map_step_fwd->insert(pair<string,NCAT>(s_step, news));
            task->map_step_bwd->insert(pair<NCAT,string>(news, s_step));
        }
        else
            striped_dat_item->add(it2->second);
        
        
        // Skill
        col = strtok(NULL,"\t\n\r");
        if(col == NULL) {
            wrong_no_columns = true;
            break;
        }
        number_columns++;
        s_skill = string( col );
        // process skills later
        
        // Slice
        if(task->sliced) {
            col = strtok(NULL,"\t\n\r");
            if(col == NULL) {
                wrong_no_columns = true;
                break;
            }
            number_columns++;
            slice = (NPAR) atoi( col );
            if( slice<0 ) {
                fprintf(stderr,"Slice cannot be negative (line %d).\n",task->N+1);
                res=false;
                goto recycle;
            }
            if( (slice >= 0) && ((task->nZ-1) < slice) ) // update slice count
                task->nZ = (NPAR)(slice + 1);
            striped_dat_slice->add(slice);
        } // time
        
        // back to skill processing
        if( (s_skill.empty() || ( s_skill.size()==1 && (s_skill[0]=='.' || s_skill[0]==' ') ) ) ) { // null skill
            task->N_null++;
            task->Nst++;    // increase stackd count too
            if(task->multiskill == 0) {
                striped_dat_skill->add(-1); // [t] = -1;
            }
            else {
//                NCAT* a_skills = Malloc(NCAT, 2);
//                a_skills[0] = 1; // count
//                a_skills[1] = -1; // value
//                task->dat_multiskill->add(a_skills);
                // add whole multi-skill row
                striped_dat_skill_rcount->add(1);
                striped_dat_skill_rix->add(current_stacked++); // first add pointer, then increase
                striped_dat_skill_stacked->add(-1);
            }
        } // empty skill
        else { // non-empty skill
            // multiskill
            if(task->multiskill != 0) {
                list<NCAT> a_skills;//
                char* a_kc;
                col = &s_skill[0];//. c_str();
                a_kc  = strtok(col, "~\n\r");
                string s_kc;
                // stacked
                NDAT skill_count = 0;
                striped_dat_skill_rix->add(current_stacked); // add stacked pointer once (but increase it with every next skill
                while(a_kc != NULL) {
                    s_kc = string(a_kc);
                    // stacked
                    skill_count++;
                    current_stacked++;
                    task->Nst++;    // increase line count
                    // adding vvvv
                    it = task->map_skill_fwd->find(s_kc);
                    if( it==task->map_skill_fwd->end() ) { // not found
                        if(task->map_skill_fwd->size()==NCAT_MAX) {
                            fprintf(stderr,"Number of unique skills exceeds allowed maximum of %d.\n",NCAT_MAX);
                            res = false;
                            goto recycle;
                        }
                        a_skills.insert(a_skills.end(), (NCAT)task->map_skill_fwd->size()); //dat_skill->add(task->map_skill_fwd->size());
                        task->map_skill_fwd->insert(pair<string,NCAT>(s_kc, (NCAT)task->map_skill_fwd->size()));
                        task->map_skill_bwd->insert(pair<NCAT,string>((NCAT)task->map_skill_bwd->size(),s_kc));
                        // add stacked skill
                        striped_dat_skill_stacked->add((NCAT)task->map_skill_fwd->size()-1); // -1 because after adding
                    }
                    else {
                        a_skills.insert(a_skills.end(), it->second); //dat_skill->add(it->second); //[t] = it->second;
                        // add stacked skill
                        striped_dat_skill_stacked->add(it->second);
                    }
                    // adding ^^^^
                    a_kc  = strtok(NULL,"~\n\r");
                }
//                NCAT *b_skills = Malloc(NCAT, a_skills.size()+1);
//                b_skills[0] = (NCAT)a_skills.size();
//                int count = 0;
//                for(list<NCAT>::iterator it=a_skills.begin(); it!=a_skills.end(); it++)
//                    b_skills[++count] = *it;
//                task->dat_multiskill->add(b_skills);
                // add stacked count
                striped_dat_skill_rcount->add(skill_count);
                Nst_alt+=skill_count;
                // multi skill
            } else {
                // single skill
                it = task->map_skill_fwd->find(s_skill);
                if( it==task->map_skill_fwd->end() ) { // not found
                    if(task->map_skill_fwd->size()==NCAT_MAX) {
                        fprintf(stderr,"Number of unique skills exceeds allowed maximum of %d.\n",NCAT_MAX);
                        res = false;
                        goto recycle;
                    }
                    striped_dat_skill->add((NCAT)task->map_skill_fwd->size()); //[t] = task->map_skill_fwd.size();
                    task->map_skill_fwd->insert(pair<string,NCAT>(s_skill, (NCAT)task->map_skill_fwd->size()));
                    task->map_skill_bwd->insert(pair<NCAT,string>((NCAT)task->map_skill_bwd->size(),s_skill));
                }
                else
                    striped_dat_skill->add(it->second); //[t] = it->second;
            } // single skill
        } // non empty skill
        
        // count lines
        task->N++;    // increase line count
    }// reading loop
    if(wrong_no_columns) {
        fprintf(stderr,"Wrong number of columns in line %u. Expected %d, found %d\n",task->N+1,COLUMNS+task->sliced, number_columns);
        res = false;
        goto recycle;
    }
    task->nG = (NCAT)task->map_group_fwd->size();
    task->nK = (NCAT)task->map_skill_fwd->size();
    task->nI = (NCAT)task->map_step_fwd->size();
    
    // copy striped to lined
    task->dat_obs = striped_dat_obs->toArray();
    task->dat_obs_stacked = init1D<NPAR>(task->Nst);
    task->dat_predict = initToValue2D<NUMBER>(task->N, task->nO, 0);

    task->dat_group = striped_dat_group->toArray();
    if(task->multiskill==0) {
        task->dat_skill = striped_dat_skill->toArray();
    } else {
        task->dat_skill_stacked = striped_dat_skill_stacked->toArray();
        task->dat_skill_rcount  = striped_dat_skill_rcount->toArray();
        task->dat_skill_rix     = striped_dat_skill_rix->toArray();
    }
    task->dat_item = striped_dat_item->toArray();
    if(task->sliced) {
        task->dat_slice = striped_dat_slice->toArray();
    }
    // build dat_obs_stacked
    co = 0;
    if(task->multiskill!=0) {
        for(NDAT t=0;t<task->N;t++) {
            for(NDAT tt=0; tt<task->dat_skill_rcount[t]; tt++) {
                task->dat_obs_stacked[co] = task->dat_obs[t];
                co++;
            }
        }
    } else {
        memcpy( task->dat_obs_stacked, task->dat_obs , sizeof(NPAR)*(size_t)task->N );
    }

    //
    // create connectivities: skill-skill, student-skill
    //
    createConnectivities(task);

    recycle: delete striped_dat_obs;
    delete striped_dat_group;
    if(striped_dat_skill!=NULL) delete striped_dat_skill;
    if(striped_dat_skill_stacked!=NULL) delete striped_dat_skill_stacked;
    if(striped_dat_skill_rcount!=NULL) delete striped_dat_skill_rcount;
    if(striped_dat_skill_rix!=NULL) delete striped_dat_skill_rix;
    if(striped_dat_item!=NULL) delete striped_dat_item;
    if(striped_dat_slice!=NULL) delete striped_dat_slice;
    
    if(fid!=NULL) fclose(fid);
    free(line);
    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8924(%rip), %rsi      # 0x10038
callq 0x3220
testq %rax, %rax
je 0x8341
movq %rax, 0x10(%rsp)
movl $0x400, 0xf5b3(%rip)    # imm = 0x400
movl $0x400, %edi            # imm = 0x400
callq 0x32a0
movq %rax, 0xf5a6(%rip)      # 0x16ce8
pushq $0x18
popq %rbx
movq %rbx, %rdi
callq 0x31c0
movabsq $0x4e2000000000, %r14   # imm = 0x4E2000000000
movq %r14, (%rax)
xorps %xmm0, %xmm0
movq %rax, 0x88(%rsp)
movups %xmm0, 0x8(%rax)
movq %rbx, %rdi
callq 0x31c0
movq %r14, (%rax)
movq %rax, 0x80(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movb 0x920(%r13), %bpl
movq %rbx, %rdi
callq 0x31c0
xorps %xmm0, %xmm0
movq %r14, (%rax)
movups %xmm0, 0x8(%rax)
testb %bpl, %bpl
je 0x77e5
pushq $0x18
popq %rbx
movq %rbx, %rdi
movq %rax, %r15
callq 0x31c0
movq %r14, (%rax)
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rbx, %rdi
callq 0x31c0
movq %r14, (%rax)
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %r15, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x7805
movq %rax, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x28(%rsp)
pushq $0x18
popq %rdi
callq 0x31c0
movq %r14, (%rax)
movq %rax, 0x78(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
cmpb $0x0, 0x43(%r13)
je 0x783c
pushq $0x18
popq %rdi
callq 0x31c0
movq %r14, (%rax)
xorps %xmm0, %xmm0
movq %rax, 0x70(%rsp)
movups %xmm0, 0x8(%rax)
jmp 0x7845
movq $0x0, 0x70(%rsp)
pushq $0x30
popq %rbx
movq %rbx, %rdi
callq 0x31c0
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x928(%r13)
movq %rbx, %rdi
callq 0x31c0
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x930(%r13)
movq %rbx, %rdi
callq 0x31c0
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x948(%r13)
movq %rbx, %rdi
callq 0x31c0
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x950(%r13)
movq %rbx, %rdi
callq 0x31c0
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x938(%r13)
movq %rbx, %rdi
callq 0x31c0
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movq %rax, 0x940(%r13)
leaq 0x118(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0xf8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq $0x0, 0x18(%rsp)
movb %dl, (%rax)
andq $0x0, 0x8f8(%r13)
andl $0x0, 0x914(%r13)
movb $0x1, %al
movl %eax, 0xc(%rsp)
leaq 0x48(%rsp), %r15
leaq 0xc8(%rsp), %r12
movq 0xf336(%rip), %rdi      # 0x16ce8
movl 0xf32c(%rip), %esi      # 0x16ce4
movq 0x10(%rsp), %rbp
movq %rbp, %rdx
callq 0x3340
testq %rax, %rax
je 0x8096
movq 0xf313(%rip), %rbx      # 0x16ce8
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x3200
testq %rax, %rax
jne 0x7a45
movq %rbx, %rdi
pushq $0xd
popq %rsi
callq 0x3200
testq %rax, %rax
jne 0x7a45
movslq 0xf2e8(%rip), %r14      # 0x16ce4
addq %r14, %r14
movl %r14d, 0xf2de(%rip)     # 0x16ce4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3370
movq %rax, %rbx
movq %rax, 0xf2cd(%rip)      # 0x16ce8
movq %rax, %rdi
callq 0x30d0
cltq
addq %rax, %rbx
subl %eax, %r14d
movq %rbx, %rdi
movl %r14d, %esi
movq %rbp, %rdx
callq 0x3340
testq %rax, %rax
jne 0x79ce
movq 0xf2a3(%rip), %rbx      # 0x16ce8
testq %rbx, %rbx
je 0x8096
movq %rbx, %rdi
leaq 0x87b6(%rip), %rsi      # 0x1020e
callq 0x3330
testq %rax, %rax
je 0x8360
movq %rax, %rdi
callq 0x3320
movl %eax, %ebx
leal -0x1(%rbx), %ebp
cmpb $0x7f, %bpl
je 0x8365
movsbl %bpl, %esi
movq 0x88(%rsp), %rdi
callq 0x9172
testb %bpl, %bpl
js 0x7aa3
cmpb %bpl, 0x901(%r13)
jg 0x7aa3
movb %bl, 0x901(%r13)
xorl %edi, %edi
leaq 0x8762(%rip), %rsi      # 0x1020e
callq 0x3330
testq %rax, %rax
je 0x8386
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6a62
movq 0x10(%rsp), %rbp
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3250
movq %r15, %rdi
callq 0x30e0
movq 0x928(%r13), %rdi
movq %rbx, %rsi
callq 0x964e
movq 0x928(%r13), %rcx
leaq 0x8(%rcx), %rdx
cmpq %rdx, %rax
je 0x7b1c
movl 0x40(%rax), %esi
movq 0x80(%rsp), %rdi
callq 0x91dc
jmp 0x7b9c
movq 0x28(%rcx), %rbx
cmpq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
je 0x83fc
movq 0x80(%rsp), %rdi
movl %ebx, %esi
callq 0x91dc
movq 0x928(%r13), %r14
movq %r15, %rdi
leaq 0x108(%rsp), %rsi
callq 0x32b0
movl %ebx, 0x68(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9756
movq %r15, %rdi
callq 0x30e0
movq 0x930(%r13), %r14
movl %ebx, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x32b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x9942
leaq 0x50(%rsp), %rdi
callq 0x30e0
xorl %edi, %edi
leaq 0x8669(%rip), %rsi      # 0x1020e
callq 0x3330
testq %rax, %rax
je 0x8391
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6a62
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3250
movq %r15, %rdi
callq 0x30e0
movq 0x938(%r13), %rdi
movq %rbx, %rsi
callq 0x964e
movq 0x938(%r13), %rcx
leaq 0x8(%rcx), %rdx
cmpq %rdx, %rax
je 0x7c0a
movl 0x40(%rax), %esi
movq 0x78(%rsp), %rdi
callq 0x91dc
jmp 0x7c87
movq 0x28(%rcx), %rbx
cmpq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
je 0x8426
movq 0x78(%rsp), %rdi
movl %ebx, %esi
callq 0x91dc
movq 0x938(%r13), %r14
movq %r15, %rdi
leaq 0xe8(%rsp), %rsi
callq 0x32b0
movl %ebx, 0x68(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9756
movq %r15, %rdi
callq 0x30e0
movq 0x940(%r13), %r14
movl %ebx, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x32b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x9942
leaq 0x50(%rsp), %rdi
callq 0x30e0
xorl %edi, %edi
leaq 0x857e(%rip), %rsi      # 0x1020e
callq 0x3330
testq %rax, %rax
je 0x8395
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x6a62
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
callq 0x3250
movq %r15, %rdi
callq 0x30e0
cmpb $0x0, 0x43(%r13)
je 0x7d19
xorl %edi, %edi
leaq 0x853a(%rip), %rsi      # 0x1020e
callq 0x3330
testq %rax, %rax
je 0x8399
movq %rax, %rdi
callq 0x3320
movsbl %al, %esi
testl %esi, %esi
movq 0x10(%rsp), %rbp
js 0x83d8
movsbl 0x910(%r13), %ecx
cmpl %ecx, %esi
jl 0x7d0f
incb %al
movb %al, 0x910(%r13)
movq 0x70(%rsp), %rdi
callq 0x9172
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x7d41
cmpq $0x1, %rax
jne 0x7d9a
movq 0xa8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
je 0x7d41
cmpl $0x20, %eax
jne 0x7d9a
incl 0x914(%r13)
incl 0x8fc(%r13)
cmpb $0x0, 0x920(%r13)
pushq $-0x1
popq %rsi
je 0x7f96
movq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x91dc
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x91dc
movq 0x28(%rsp), %rdi
pushq $-0x1
popq %rsi
callq 0x91dc
movq 0x18(%rsp), %rax
incl %eax
movq %rax, 0x18(%rsp)
jmp 0x7fa0
cmpb $0x0, 0x920(%r13)
je 0x7f6f
leaq 0x90(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %rax, 0x90(%rsp)
andq $0x0, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0x9153(%rip), %rsi      # 0x10f2b
callq 0x3330
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
andq $0x0, 0xd0(%rsp)
movb $0x0, 0xd8(%rsp)
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x91dc
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x7f39
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x27(%rsp), %rdx
callq 0x6a62
movq %r12, %rdi
movq %r15, %rsi
callq 0x3250
movq %r15, %rdi
callq 0x30e0
incl 0x8fc(%r13)
movq 0x948(%r13), %rdi
movq %r12, %rsi
callq 0x964e
movq %rax, %r14
movq 0x948(%r13), %rax
leaq 0x8(%rax), %rcx
cmpq %rcx, %r14
je 0x7e86
addq $0x40, %r14
leaq 0x90(%rsp), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x9246
movl (%r14), %esi
jmp 0x7f17
movq 0x28(%rax), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
je 0x803e
movl %eax, 0x48(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, %rsi
movq %r15, %rdx
callq 0x9ae6
movq 0x948(%r13), %rbx
movq 0x28(%rbx), %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x32b0
movl %r14d, 0x68(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9756
movq %r15, %rdi
callq 0x30e0
movq 0x950(%r13), %rbx
movl 0x28(%rbx), %eax
movl %eax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9942
leaq 0x50(%rsp), %rdi
callq 0x30e0
movq 0x948(%r13), %rax
movl 0x28(%rax), %esi
decl %esi
movq 0x28(%rsp), %rdi
callq 0x91dc
xorl %edi, %edi
leaq 0x9001(%rip), %rsi      # 0x10f2b
callq 0x3330
movq %rax, %rbx
incl %ebp
jmp 0x7e12
movq 0x38(%rsp), %rdi
movl %ebp, %esi
callq 0x91dc
movq 0x18(%rsp), %rax
addl %ebp, %eax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x30e0
leaq 0x90(%rsp), %rdi
callq 0x95a6
testq %rbx, %rbx
jne 0x7fa9
jmp 0x7fa0
movq 0x948(%r13), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x964e
movq 0x948(%r13), %rcx
leaq 0x8(%rcx), %rdx
cmpq %rdx, %rax
je 0x7fb6
movl 0x40(%rax), %esi
movq 0x30(%rsp), %rdi
callq 0x91dc
incl 0x8f8(%r13)
xorl %ebp, %ebp
testl %ebp, %ebp
je 0x79ab
jmp 0x8079
movq 0x28(%rcx), %rsi
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
je 0x8450
movq 0x30(%rsp), %rdi
callq 0x91dc
movq 0x948(%r13), %rbx
movq 0x28(%rbx), %r14
movq %r15, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x32b0
movl %r14d, 0x68(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9756
movq %r15, %rdi
callq 0x30e0
movq 0x950(%r13), %rbx
movl 0x28(%rbx), %eax
movl %eax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9942
leaq 0x50(%rsp), %rdi
callq 0x30e0
jmp 0x7fa0
movq 0xdf93(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
movl $0x0, 0xc(%rsp)
leaq 0x8ed8(%rip), %rsi      # 0x10f2f
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %eax, %eax
callq 0x32d0
movq 0x18(%rsp), %rax
addl %ebp, %eax
incl %eax
movq %rax, 0x18(%rsp)
pushq $0x4
popq %rbp
jmp 0x7f53
cmpl $0x3, %ebp
je 0x8091
cmpl $0x4, %ebp
jne 0x833f
movq 0x10(%rsp), %rbp
jmp 0x8206
movq 0x10(%rsp), %rbp
movq 0x928(%r13), %rax
movq 0x938(%r13), %rcx
movl 0x28(%rax), %eax
movl %eax, 0x904(%r13)
movq 0x948(%r13), %rax
movl 0x28(%rax), %eax
movl %eax, 0x908(%r13)
movl 0x28(%rcx), %eax
movl %eax, 0x90c(%r13)
movq 0x88(%rsp), %rdi
callq 0x9274
movq %rax, 0x880(%r13)
movl 0x8fc(%r13), %edi
callq 0x92ec
movq %rax, 0x888(%r13)
movl 0x8f8(%r13), %edi
movsbl 0x901(%r13), %esi
xorps %xmm0, %xmm0
callq 0x92f7
movq %rax, 0x8c8(%r13)
movq 0x80(%rsp), %rdi
callq 0x9378
movq %rax, 0x890(%r13)
cmpb $0x0, 0x920(%r13)
je 0x815a
movq 0x28(%rsp), %rdi
callq 0x9378
movq %rax, 0x8a0(%r13)
movq 0x38(%rsp), %rdi
callq 0x9378
movq %rax, 0x8a8(%r13)
movl $0x8b0, %ebx            # imm = 0x8B0
movq 0x40(%rsp), %rdi
jmp 0x8164
movl $0x898, %ebx            # imm = 0x898
movq 0x30(%rsp), %rdi
callq 0x9378
movq %rax, (%r13,%rbx)
movq 0x78(%rsp), %rdi
callq 0x9378
movq %rax, 0x8b8(%r13)
cmpb $0x0, 0x43(%r13)
je 0x8197
movq 0x70(%rsp), %rdi
callq 0x9274
movq %rax, 0x8c0(%r13)
cmpb $0x0, 0x920(%r13)
je 0x81e4
xorl %eax, %eax
xorl %ecx, %ecx
movslq 0x8f8(%r13), %rdx
cmpq %rdx, %rax
jge 0x81fe
movslq %ecx, %rcx
xorl %edx, %edx
movq 0x8a8(%r13), %rsi
cmpl (%rsi,%rax,4), %edx
jge 0x81df
movq 0x880(%r13), %rsi
movq 0x888(%r13), %rdi
movb (%rsi,%rax), %sil
movb %sil, (%rdi,%rcx)
incq %rcx
incl %edx
jmp 0x81b6
incq %rax
jmp 0x81a5
movq 0x880(%r13), %rsi
movq 0x888(%r13), %rdi
movslq 0x8f8(%r13), %rdx
callq 0x3180
movq %r13, %rdi
callq 0x851a
movq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0x9404
pushq $0x18
popq %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31d0
movq 0x80(%rsp), %r14
movq %r14, %rdi
callq 0x9436
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x825c
movq %rdi, %rbx
callq 0x9436
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x31d0
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x8279
movq %rbx, %rdi
callq 0x9436
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x31d0
movq 0x38(%rsp), %rbx
testq %rbx, %rbx
je 0x8296
movq %rbx, %rdi
callq 0x9436
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x31d0
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
je 0x82b3
movq %rbx, %rdi
callq 0x9436
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x31d0
movq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x9436
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x31d0
movq 0x70(%rsp), %rbx
testq %rbx, %rbx
je 0x82e8
movq %rbx, %rdi
callq 0x9404
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x31d0
movq %rbp, %rdi
callq 0x31b0
movq 0xe9f1(%rip), %rdi      # 0x16ce8
callq 0x3230
movl 0xc(%rsp), %ebp
leaq 0xa8(%rsp), %rdi
callq 0x30e0
leaq 0xe8(%rsp), %rdi
callq 0x30e0
leaq 0x108(%rsp), %rdi
callq 0x30e0
andb $0x1, %bpl
movl %ebp, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8300
movq 0xdc90(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
leaq 0x8aee(%rip), %rsi      # 0x10e40
xorl %ebp, %ebp
movq %rbx, %rdx
xorl %eax, %eax
callq 0x32d0
jmp 0x8327
xorl %r8d, %r8d
jmp 0x83a2
movq 0xdc6c(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
leaq 0x8aeb(%rip), %rsi      # 0x10e61
movl $0x0, 0xc(%rsp)
pushq $0x7f
popq %rdx
jmp 0x8444
movq 0x10(%rsp), %rbp
pushq $0x1
popq %r8
jmp 0x83a2
pushq $0x2
jmp 0x839b
pushq $0x3
jmp 0x839b
pushq $0x4
popq %r8
movq 0x10(%rsp), %rbp
movq 0xdc2f(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
movl 0x8f8(%r13), %edx
incl %edx
movsbl 0x43(%r13), %ecx
addl $0x4, %ecx
leaq 0x8ba3(%rip), %rsi      # 0x10f67
movl $0x0, 0xc(%rsp)
xorl %eax, %eax
callq 0x32d0
jmp 0x8206
movq 0xdbf9(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
movl 0x8f8(%r13), %edx
incl %edx
leaq 0x8b14(%rip), %rsi      # 0x10f06
movl $0x0, 0xc(%rsp)
jmp 0x841a
movq 0xdbd5(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
leaq 0x8a8a(%rip), %rsi      # 0x10e97
movl $0x0, 0xc(%rsp)
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %eax, %eax
callq 0x32d0
jmp 0x8206
movq 0xdbab(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
leaq 0x8a98(%rip), %rsi      # 0x10ecf
movl $0x0, 0xc(%rsp)
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %eax, %eax
callq 0x32d0
jmp 0x8087
movq 0xdb81(%rip), %rax      # 0x15fd8
movq (%rax), %rdi
leaq 0x8ace(%rip), %rsi      # 0x10f2f
jmp 0x8437
jmp 0x8479
jmp 0x84c3
jmp 0x8485
jmp 0x84c3
jmp 0x84c3
jmp 0x84c3
jmp 0x8479
jmp 0x84c3
jmp 0x8485
jmp 0x84c3
jmp 0x84c3
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x848d
jmp 0x84c3
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x30e0
jmp 0x84eb
jmp 0x84c3
jmp 0x84c3
jmp 0x84ce
jmp 0x84c3
jmp 0x84c3
jmp 0x84c3
jmp 0x84c3
jmp 0x84c3
jmp 0x84ce
jmp 0x84ce
jmp 0x84ce
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x84bc
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x30e0
jmp 0x84d1
movq %rax, %rbx
jmp 0x84eb
jmp 0x84ce
jmp 0x84ce
jmp 0x84ce
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x30e0
leaq 0x90(%rsp), %rdi
callq 0x95a6
leaq 0xa8(%rsp), %rdi
callq 0x30e0
leaq 0xe8(%rsp), %rdi
callq 0x30e0
leaq 0x108(%rsp), %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x3390