// File: myudelson[P]hmm-scalable/trainhmm.cpp
// Function: read_and_structure_data(char const*, _IO_FILE*)
bool read_and_structure_data(const char *filename, FILE *fid_console) {
    bool readok = true;
    if(param.binaryinput==0) {
        readok = InputUtil::readTxt(filename, &param);
    } else {
        readok = InputUtil::readBin(filename, &param);
    }
    if(! readok ) {
        return false;
    }
    
	//	2. distribute data into nK skill bins
	//		create
	//          skill_group_map[nK][nG] - explicit 'sparse' map of skills and groups, here 1 means done
	//			k_numg[nK]        - number of groups per skill                 RETAIN
	
	NDAT t = 0;
    NDAT t_stacked = 0;
	NCAT g, k;
//	NPAR o;
	NPAR **skill_group_map = init2D<NPAR>(param.nK, param.nG); // binary map of skills to groups
	param.k_numg = Calloc(NCAT, (size_t)param.nK);
	param.g_numk = Calloc(NCAT, (size_t)param.nG);
    NDAT *count_null_skill_group = Calloc(NDAT, (size_t)param.nG); // count null skill occurences per group
    NCAT *index_null_skill_group = Calloc(NCAT, (size_t)param.nG); // index of group in compressed array
    
	// Pass A
	for(t=0; t<param.N; t++) {
        if(param.multiskill==0)
            k = param.dat_skill[t];//[t];
        else
//            k = param.dat_multiskill->get(t)[1]; // #0 is count, #1 is first element
            k = param.dat_skill_stacked[ param.dat_skill_rix[t] ]; // first skill of multi-skill

        g = param.dat_group[t];//[t];
		// null skill : just count
		if( k < 0 ) {
            if(count_null_skill_group[g]==0) param.n_null_skill_group++;
            count_null_skill_group[g]++;
			continue;
		}
        NCAT *ar;
        int n;
        if(param.multiskill==0) {
            k = param.dat_skill[t];
            ar = &k;
            n = 1;
        } else {
//            ar = &param.dat_multiskill->get(t)[1];
//            n = param.dat_multiskill->get(t)[0];
            k = param.dat_skill_stacked[ param.dat_skill_rix[t] ];
            ar = &param.dat_skill_stacked[ param.dat_skill_rix[t] ];
            n = param.dat_skill_rcount[t];
        }
        for(int l=0; l<n; l++) {
            k = ar[l];
            if( skill_group_map[k][g] == 0 ) {
                skill_group_map[k][g] = 1;
                param.k_numg[k]++;
                param.g_numk[g]++;
            }
        }
	}
    for(k=0; k<param.nK; k++) param.nSeq += param.k_numg[k];
    param.all_data = Calloc(struct data, (size_t)param.nSeq);
    
	// Section B
	param.k_g_data = Malloc(struct data **, (size_t)param.nK);
	param.k_data = Malloc(struct data *, (size_t)param.nSeq);
    //	for(k=0; k<param.nK; k++)
    //		param.k_g_data[k] = Calloc(struct data*, param.k_numg[k]);
	param.g_k_data = Calloc(struct data **, (size_t)param.nG);
	param.g_data = Malloc(struct data *, (size_t)param.nSeq);
    //	for(g=0; g<param.nG; g++)
    //		param.g_k_data[g] = Calloc(struct data*, param.g_numk[g]);
	param.null_skills = Calloc(struct data, (size_t)param.n_null_skill_group);
    // index compressed array of null-skill-BY-group
    NCAT idx = 0;
	for(g=0; g<param.nG; g++)
        if( count_null_skill_group[g] >0 ) index_null_skill_group[g] = idx++;
    
	// Pass C
	NDAT *k_countg = Calloc(NDAT, (size_t)param.nK); // track current group in skill
	NDAT *g_countk = Calloc(NDAT, (size_t)param.nG); // track current skill in group
    // set k_countg and g_countk pointers to relative positions
    NDAT sumk=0, sumg=0;
    for(k=0; k<param.nK; k++) {
        k_countg[k] = sumk;
        param.k_g_data[k] = &param.k_data[sumk];
        sumk += param.k_numg[k];
    }
    for(g=0; g<param.nG; g++) {
        g_countk[g] = sumg;
        param.g_k_data[g] = &param.g_data[sumg];
        sumg += param.g_numk[g];
    }
    
    NDAT n_all_data = 0;
	for(t=0; t<param.N; t++) {
        NCAT *ar;
        int n;
        if(param.multiskill==0) {
            k = param.dat_skill[t];
            ar = &k;
            n = 1;
        } else {
//            ar = &param.dat_multiskill->get(t)[1];
//            n = param.dat_multiskill->get(t)[0];
            k = param.dat_skill_stacked[ param.dat_skill_rix[t] ];
            ar = &param.dat_skill_stacked[ param.dat_skill_rix[t] ];
            n = param.dat_skill_rcount[t];
        }
        for(int l=0; l<n; l++) {
            k = ar[l];
            g = param.dat_group[t];//[t];
            // now allocate space for the data
            if( k < 0 ) {
                NCAT gidx = index_null_skill_group[g];
                if( param.null_skills[gidx].ix != NULL) // was obs // check if we allocated it already
                    continue;
                param.null_skills[gidx].n = count_null_skill_group[g];
				param.null_skills[gidx].g = g;
				param.null_skills[gidx].k = -1;
                param.null_skills[gidx].cnt = 0;
                param.null_skills[gidx].t   = -1;
                //                param.null_skills[gidx].obs = Calloc(NPAR, count_null_skill_group[g]);
				param.null_skills[gidx].ix = Calloc(NDAT, (size_t)count_null_skill_group[g]);
				if(param.multiskill!=0)
					param.null_skills[gidx].ix_stacked = Calloc(NDAT, (size_t)count_null_skill_group[g]);
                // no time for null skills is necessary
//                if(param.time)
//                    param.null_skills[gidx].time = Calloc(int, (size_t)count_null_skill_group[g]);
                param.null_skills[gidx].alpha = NULL;
                param.null_skills[gidx].beta = NULL;
                param.null_skills[gidx].gamma = NULL;
				param.null_skills[gidx].xi = NULL;
                param.null_skills[gidx].c = NULL;
//                param.null_skills[gidx].time = NULL; // no longer used
                param.null_skills[gidx].p_O_param = 0.0;
                continue;
            }
            if( skill_group_map[k][g]==0) {
                fprintf(stderr, "ERROR! position [%d,%d] in skill_group_map should have been 1\n",k,g);
                if(param.duplicate_console==1) fprintf(fid_console,"ERROR! position [%d,%d] in skill_group_map should have been 1\n",k,g);
            } else if( skill_group_map[k][g]==1 ) { // insert new sequence and grab new data
                // link
                param.k_data[ k_countg[k] ] = &param.all_data[n_all_data]; // in linear array
                param.g_data[ g_countk[g] ] = &param.all_data[n_all_data]; // in linear array
                // param.k_g_data[k] and param.g_k_data[g] are already linked
                //                param.k_g_data[k][ k_countg[k] ] = Calloc(struct data, 1); // grab
                //                param.g_k_data[g][ g_countk[g] ] = param.k_g_data[k][ k_countg[k] ]; // relink
                //                param.k_g_data[k][ k_countg[k] ]->n = 1; // init data << VV
                //                param.k_g_data[k][ k_countg[k] ]->k = k; // init k
                //                param.k_g_data[k][ k_countg[k] ]->g = g; // init g
                //                param.k_g_data[k][ k_countg[k] ]->cnt = 0;
                //                param.k_g_data[k][ k_countg[k] ]->obs = NULL;
                //                param.k_g_data[k][ k_countg[k] ]->alpha = NULL;
                //                param.k_g_data[k][ k_countg[k] ]->beta = NULL;
                //                param.k_g_data[k][ k_countg[k] ]->gamma = NULL;
                //                param.k_g_data[k][ k_countg[k] ]->xi = NULL;
                //                param.k_g_data[k][ k_countg[k] ]->c = NULL;
                //                param.k_g_data[k][ k_countg[k] ]->p_O_param = 0.0;
                //                param.k_g_data[k][ k_countg[k] ]->loglik = 0.0;
                param.all_data[n_all_data].n = 1; // init data << VV
                param.all_data[n_all_data].k = k; // init k
                param.all_data[n_all_data].g = g; // init g
                param.all_data[n_all_data].cnt = 0;
                param.all_data[n_all_data].t   = -1;
                //                param.all_data[n_all_data].obs = NULL;
                param.all_data[n_all_data].ix = NULL;
                param.all_data[n_all_data].ix_stacked = NULL;
                param.all_data[n_all_data].alpha = NULL;
                param.all_data[n_all_data].beta = NULL;
                param.all_data[n_all_data].gamma = NULL;
                param.all_data[n_all_data].xi = NULL;
                param.all_data[n_all_data].c = NULL;
                param.all_data[n_all_data].p_O_param = 0.0;
                param.all_data[n_all_data].loglik = 0.0;
                k_countg[k]++; // count
                g_countk[g]++; // count
                skill_group_map[k][g] = 2; // mark
                n_all_data++;
            } else if( skill_group_map[k][g]== 2) { // update data count, LINEAR SEARCH :(
                int gidx;
                //                for(gidx=(k_countg[k]-(NCAT)1); gidx>=0 && param.k_g_data[k][gidx]->g!=g; gidx--)
                //                    ;
                for(gidx=(k_countg[k]-1); gidx>=0 && param.k_data[gidx]->g!=g; gidx--)
                    ;
                if( param.k_data[gidx]->g==g)
                    param.k_data[gidx]->n++;
                else {
                    fprintf(stderr, "ERROR! position of group %d in skill %d not found\n",g,k);
                    if(param.duplicate_console==1) fprintf(fid_console,"ERROR! position of group %d in skill %d not found\n",g,k);
                }
            }
        }
	}
	// recycle
	free(k_countg);
	free(g_countk);
    free(count_null_skill_group);
    
    //	3 fill data
    //		pass A
    //			fill k_g_data.data (g_k_data is already linked)
    //				using skill_group_map as marker, 3 - data grabbed
	k_countg = Calloc(NDAT, (size_t)param.nK); // track current group in skill
	g_countk = Calloc(NDAT, (size_t)param.nG); // track current skill in group
	for(t=0; t<param.N; t++) {
		g = param.dat_group[t];
//		o = param.dat_obs->get(t);
//        if(param.sliced)
//            tm = param.dat_slice[t];
        NCAT *ar;
        int n;
        if(param.multiskill==0) {
            k = param.dat_skill[t];
            ar = &k;
            n = 1;
        } else {
//            ar = &param.dat_multiskill->get(t)[1];
//            n = param.dat_multiskill->get(t)[0];
            k = param.dat_skill_stacked[ param.dat_skill_rix[t] ];
            ar = &param.dat_skill_stacked[ param.dat_skill_rix[t] ];
            n = param.dat_skill_rcount[t];
        }
        for(int l=0; l<n; l++) {
            k = ar[l];
            if( k < 0 ) {
                NCAT gidx = index_null_skill_group[g];
                //                param.null_skills[gidx].obs[ param.null_skills[gidx].cnt++ ] = o; // use .cnt as counter
				param.null_skills[gidx].ix[ param.null_skills[gidx].cnt++ ] = t; // use .cnt as counter
				if(param.multiskill!=0)
					param.null_skills[gidx].ix_stacked[ param.null_skills[gidx].cnt-1 ] = t_stacked; // use prior value version of cnt that was increased for ix
                continue;
            }
            if( skill_group_map[k][g]<2) {
                fprintf(stderr, "ERROR! position [%d,%d] in skill_group_map should have been 2\n",k,g);
                if(param.duplicate_console==1) fprintf(fid_console, "ERROR! position [%d,%d] in skill_group_map should have been 2\n",k,g);
            } else if( skill_group_map[k][g]==2 ) { // grab data and insert first dat point
//                param.k_g_data[k][ k_countg[k] ]->obs = Calloc(NPAR, (size_t)param.k_g_data[k][ k_countg[k] ]->n); // grab
//                param.k_g_data[k][ k_countg[k] ]->obs[0] = o; // insert
                param.k_g_data[k][ k_countg[k] ]->ix = Calloc(NDAT, (size_t)param.k_g_data[k][ k_countg[k] ]->n); // grab
                param.k_g_data[k][ k_countg[k] ]->ix[0] = t; // insert
                if(param.multiskill!=0) {
                    param.k_g_data[k][ k_countg[k] ]->ix_stacked = Calloc(NDAT, (size_t)param.k_g_data[k][ k_countg[k] ]->n); // grab
                    param.k_g_data[k][ k_countg[k] ]->ix_stacked[0] = t_stacked; // first stacked index
                }
                param.k_g_data[k][ k_countg[k] ]->cnt++; // increase data counter
                k_countg[k]++; // count unique groups forward
                g_countk[g]++; // count unique skills forward
                skill_group_map[k][g] = 3; // mark
            } else if( skill_group_map[k][g]== 3) { // insert next data point and inc counter, LINEAR SEARCH :(
                NCAT gidx;
                //			for(gidx=0; gidx < k_countg[k] && param.k_g_data[k][gidx]->g!=g; gidx++)
                for(gidx=(k_countg[k]-(NCAT)1); gidx>=0 && param.k_g_data[k][gidx]->g!=g; gidx--)
                    ; // skip
                if( param.k_g_data[k][gidx]->g==g ) {
                    NDAT pos = param.k_g_data[k][ gidx ]->cnt; // copy position
                    //                    param.k_g_data[k][ gidx ]->obs[pos] = o; // insert
                    param.k_g_data[k][ gidx ]->ix[pos] = t; // insert
                    if(param.multiskill!=0)
                        param.k_g_data[k][ gidx ]->ix_stacked[pos] = t_stacked; // insert
                    param.k_g_data[k][ gidx ]->cnt++; // increase data counter
                }
                else {
                    fprintf(stderr, "ERROR! position of group %d in skill %d not found\n",g,k);
                    if(param.duplicate_console==1) fprintf(fid_console, "ERROR! position of group %d in skill %d not found\n",g,k);
                }
            }
            t_stacked++;
        }// all skills on the row
    } // all t
	// recycle
	free(k_countg);
	free(g_countk);
    free(index_null_skill_group);
    // we delete linear column data in the end now
    //    if(param.cv_folds==0 && param.structure != STRUCTURE_SKILL_T) {
    //        if(param.multiskill==0) {
    //            delete param.dat_skill;//.clear();
    //            param.dat_skill = NULL;
    //        }
    //        else {
    //            delete param.dat_multiskill;
    //            param.dat_multiskill = NULL;
    //        }
    //        delete param.dat_group;
    //        delete param.dat_obs;
    //        delete param.dat_item;
    //        param.dat_group = NULL;
    //        param.dat_obs   = NULL;
    //        param.dat_item  = NULL;
    //    }
	free2D<NPAR>(skill_group_map, param.nK);
    // reset `cnt'
    for(g=0; g<param.nG; g++) // for all groups
        for(k=0; k<param.g_numk[g]; k++) // for all skills in it
            param.g_k_data[g][k]->cnt = 0;
    for(NCAT x=0; x<param.n_null_skill_group; x++)
        param.null_skills[x].cnt = 0;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x1, -0x19(%rbp)
cmpl $0x0, 0x59e12(%rip)     # 0x613c0
jne 0x75c7
movq -0x10(%rbp), %rdi
leaq 0x59d9d(%rip), %rsi     # 0x61358
callq 0x181e0
andb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x75dc
movq -0x10(%rbp), %rdi
leaq 0x59d86(%rip), %rsi     # 0x61358
callq 0x19d50
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x75eb
movb $0x0, -0x1(%rbp)
jmp 0x86dd
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl 0x5a619(%rip), %edi     # 0x61c18
movl 0x5a60f(%rip), %esi     # 0x61c14
callq 0xb800
movq %rax, -0x38(%rbp)
movslq 0x5a603(%rip), %rdi     # 0x61c18
movl $0x4, %esi
callq 0x5190
movq %rax, 0x5a612(%rip)     # 0x61c38
movslq 0x5a5e7(%rip), %rdi     # 0x61c14
movl $0x4, %esi
callq 0x5190
movq %rax, 0x5a61a(%rip)     # 0x61c58
movslq 0x5a5cf(%rip), %rdi     # 0x61c14
movl $0x4, %esi
callq 0x5190
movq %rax, -0x40(%rbp)
movslq 0x5a5ba(%rip), %rdi     # 0x61c14
movl $0x4, %esi
callq 0x5190
movq %rax, -0x48(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x5a590(%rip), %eax     # 0x61c08
jge 0x780e
movsbl 0x5a5eb(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
jne 0x769d
movq 0x5a547(%rip), %rax     # 0x61bd8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
jmp 0x76b9
movq 0x5a53c(%rip), %rax     # 0x61be0
movq 0x5a545(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq 0x5a510(%rip), %rax     # 0x61bd0
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x7703
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x76ed
movl 0x5a54c(%rip), %eax     # 0x61c30
addl $0x1, %eax
movl %eax, 0x5a543(%rip)     # 0x61c30
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x7800
movsbl 0x5a566(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
jne 0x7731
movq 0x5a4c2(%rip), %rax     # 0x61bd8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0x777f
movq 0x5a4a8(%rip), %rax     # 0x61be0
movq 0x5a4b1(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq 0x5a48c(%rip), %rax     # 0x61be0
movq 0x5a495(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq 0x5a473(%rip), %rax     # 0x61be8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x77fe
movq -0x50(%rbp), %rax
movslq -0x58(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x77f1
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq 0x5a468(%rip), %rax     # 0x61c38
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq 0x5a474(%rip), %rax     # 0x61c58
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x77f3
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x7786
jmp 0x7800
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x766f
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x5a3fa(%rip), %eax     # 0x61c18
jge 0x7845
movq 0x5a411(%rip), %rax     # 0x61c38
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl 0x5a400(%rip), %eax     # 0x61c34
movl %eax, 0x5a3fa(%rip)     # 0x61c34
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7815
movslq 0x5a3e8(%rip), %rdi     # 0x61c34
movl $0x60, %esi
callq 0x5190
movq %rax, 0x5a3e3(%rip)     # 0x61c40
movslq 0x5a3b4(%rip), %rdi     # 0x61c18
shlq $0x3, %rdi
callq 0x5410
movq %rax, 0x5a3dc(%rip)     # 0x61c50
movslq 0x5a3b9(%rip), %rdi     # 0x61c34
shlq $0x3, %rdi
callq 0x5410
movq %rax, 0x5a3bd(%rip)     # 0x61c48
movslq 0x5a382(%rip), %rdi     # 0x61c14
movl $0x8, %esi
callq 0x5190
movq %rax, 0x5a3c5(%rip)     # 0x61c68
movslq 0x5a38a(%rip), %rdi     # 0x61c34
shlq $0x3, %rdi
callq 0x5410
movq %rax, 0x5a3a6(%rip)     # 0x61c60
movslq 0x5a36f(%rip), %rdi     # 0x61c30
movl $0x60, %esi
callq 0x5190
movq %rax, 0x5a356(%rip)     # 0x61c28
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x5a32b(%rip), %eax     # 0x61c14
jge 0x791c
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x790f
movl -0x5c(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x48(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x7911
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x78e0
movslq 0x5a2f5(%rip), %rdi     # 0x61c18
movl $0x4, %esi
callq 0x5190
movq %rax, -0x68(%rbp)
movslq 0x5a2dc(%rip), %rdi     # 0x61c14
movl $0x4, %esi
callq 0x5190
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x5a2b4(%rip), %eax     # 0x61c18
jge 0x79b4
movl -0x74(%rbp), %edx
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x5a2cd(%rip), %rdx     # 0x61c48
movslq -0x74(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x5a2c3(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x5a29c(%rip), %rax     # 0x61c38
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x74(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x795b
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x5a250(%rip), %eax     # 0x61c14
jge 0x7a14
movl -0x78(%rbp), %edx
movq -0x70(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x5a285(%rip), %rdx     # 0x61c60
movslq -0x78(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x5a27b(%rip), %rax     # 0x61c68
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x5a25c(%rip), %rax     # 0x61c58
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x78(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x79bb
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x5a1dd(%rip), %eax     # 0x61c08
jge 0x8088
movsbl 0x5a238(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
jne 0x7a65
movq 0x5a194(%rip), %rax     # 0x61bd8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0x7ab9
movq 0x5a174(%rip), %rax     # 0x61be0
movq 0x5a17d(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq 0x5a158(%rip), %rax     # 0x61be0
movq 0x5a161(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq 0x5a13c(%rip), %rax     # 0x61be8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jge 0x8078
movq -0x88(%rbp), %rax
movslq -0x90(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq 0x5a0e0(%rip), %rax     # 0x61bd0
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x7cea
movq -0x48(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x94(%rbp)
movq 0x5a10c(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x7b36
jmp 0x8064
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq 0x5a0e0(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %ecx
movq 0x5a0c6(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x5c(%rax)
movq 0x5a0ae(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
movq 0x5a092(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq 0x5a076(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movslq (%rax,%rcx,4), %rdi
movl $0x4, %esi
callq 0x5190
movq %rax, %rcx
movq 0x5a041(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movsbl 0x5a070(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
je 0x7c37
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movslq (%rax,%rcx,4), %rdi
movl $0x4, %esi
callq 0x5190
movq %rax, %rcx
movq 0x5a003(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq 0x59fea(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x28(%rax)
movq 0x59fcd(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x30(%rax)
movq 0x59fb0(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x38(%rax)
movq 0x59f93(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x40(%rax)
movq 0x59f76(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x20(%rax)
movq 0x59f59(%rip), %rax     # 0x61c28
movslq -0x94(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rax)
jmp 0x8064
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x7d4a
movq 0x592ce(%rip), %rax     # 0x60fd8
movq (%rax), %rdi
movl -0x2c(%rbp), %edx
movl -0x28(%rbp), %ecx
leaq 0x4e119(%rip), %rsi     # 0x55e33
movb $0x0, %al
callq 0x5470
movsbl 0x59664(%rip), %eax     # 0x6138c
cmpl $0x1, %eax
jne 0x7d45
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl -0x28(%rbp), %ecx
leaq 0x4e0f5(%rip), %rsi     # 0x55e33
movb $0x0, %al
callq 0x5470
jmp 0x8062
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0x7f61
movq 0x59ed2(%rip), %rdx     # 0x61c40
movslq -0x7c(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdx
movq 0x59ec8(%rip), %rax     # 0x61c48
movq -0x68(%rbp), %rcx
movslq -0x2c(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x59ea9(%rip), %rdx     # 0x61c40
movslq -0x7c(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdx
movq 0x59eb7(%rip), %rax     # 0x61c60
movq -0x70(%rbp), %rcx
movslq -0x28(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x59e80(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0x2c(%rbp), %ecx
movq 0x59e65(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x58(%rax)
movl -0x28(%rbp), %ecx
movq 0x59e4d(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x5c(%rax)
movq 0x59e38(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq 0x59e1f(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq 0x59e06(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movq 0x59dec(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x18(%rax)
movq 0x59dd2(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x28(%rax)
movq 0x59db8(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x30(%rax)
movq 0x59d9e(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x38(%rax)
movq 0x59d84(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x40(%rax)
movq 0x59d6a(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x20(%rax)
movq 0x59d50(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rax)
movq 0x59d36(%rip), %rax     # 0x61c40
movslq -0x7c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rax)
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x70(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movb $0x2, (%rax,%rcx)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x8060
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x805e
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0x98(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x98(%rbp)
movb %al, -0xb9(%rbp)
jl 0x7fc4
movq 0x59c9e(%rip), %rax     # 0x61c48
movslq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x5c(%rax), %eax
cmpl -0x28(%rbp), %eax
setne %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x7fd0
jmp 0x7fe3
jmp 0x7fd2
movl -0x98(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x7f92
movq 0x59c5e(%rip), %rax     # 0x61c48
movslq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x5c(%rax), %eax
cmpl -0x28(%rbp), %eax
jne 0x8018
movq 0x59c44(%rip), %rax     # 0x61c48
movslq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x805c
movq 0x58fb9(%rip), %rax     # 0x60fd8
movq (%rax), %rdi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq 0x4de43(%rip), %rsi     # 0x55e72
movb $0x0, %al
callq 0x5470
movsbl 0x5934f(%rip), %eax     # 0x6138c
cmpl $0x1, %eax
jne 0x805a
movq -0x18(%rbp), %rdi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq 0x4de1f(%rip), %rsi     # 0x55e72
movb $0x0, %al
callq 0x5470
jmp 0x805c
jmp 0x805e
jmp 0x8060
jmp 0x8062
jmp 0x8064
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x7ac3
jmp 0x807a
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7a22
movq -0x68(%rbp), %rdi
callq 0x53b0
movq -0x70(%rbp), %rdi
callq 0x53b0
movq -0x40(%rbp), %rdi
callq 0x53b0
movslq 0x59b6e(%rip), %rdi     # 0x61c18
movl $0x4, %esi
callq 0x5190
movq %rax, -0x68(%rbp)
movslq 0x59b55(%rip), %rdi     # 0x61c14
movl $0x4, %esi
callq 0x5190
movq %rax, -0x70(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x59b2b(%rip), %eax     # 0x61c08
jge 0x8608
movq 0x59ae6(%rip), %rax     # 0x61bd0
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movsbl 0x59b75(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
jne 0x8128
movq 0x59ad1(%rip), %rax     # 0x61bd8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x1, -0xa4(%rbp)
jmp 0x817c
movq 0x59ab1(%rip), %rax     # 0x61be0
movq 0x59aba(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq 0x59a95(%rip), %rax     # 0x61be0
movq 0x59a9e(%rip), %rcx     # 0x61bf0
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq 0x59a79(%rip), %rax     # 0x61be8
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xa4(%rbp)
movl $0x0, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
cmpl -0xa4(%rbp), %eax
jge 0x85f8
movq -0xa0(%rbp), %rax
movslq -0xa8(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x8257
movq -0x48(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xac(%rbp)
movl -0x20(%rbp), %edx
movq 0x59a57(%rip), %rax     # 0x61c28
movslq -0xac(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq 0x59a3e(%rip), %rsi     # 0x61c28
movslq -0xac(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rsi
movl 0x4(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x4(%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movsbl 0x59a60(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
je 0x8252
movl -0x24(%rbp), %edx
movq 0x59a09(%rip), %rax     # 0x61c28
movslq -0xac(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq 0x599f0(%rip), %rcx     # 0x61c28
movslq -0xac(%rbp), %rsi
imulq $0x60, %rsi, %rsi
addq %rsi, %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x85e4
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jge 0x82b7
movq 0x58d61(%rip), %rax     # 0x60fd8
movq (%rax), %rdi
movl -0x2c(%rbp), %edx
movl -0x28(%rbp), %ecx
leaq 0x4dc1e(%rip), %rsi     # 0x55ea5
movb $0x0, %al
callq 0x5470
movsbl 0x590f7(%rip), %eax     # 0x6138c
cmpl $0x1, %eax
jne 0x82b2
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl -0x28(%rbp), %ecx
leaq 0x4dbfa(%rip), %rsi     # 0x55ea5
movb $0x0, %al
callq 0x5470
jmp 0x85db
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x8437
movq 0x59975(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x68(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax), %rdi
movl $0x4, %esi
callq 0x5190
movq %rax, %rcx
movq 0x59946(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq -0x68(%rbp), %rdx
movslq -0x2c(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x10(%rax)
movl -0x20(%rbp), %ecx
movq 0x59920(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq -0x68(%rbp), %rdx
movslq -0x2c(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
movq (%rax,%rdx,8), %rax
movq 0x10(%rax), %rax
movl %ecx, (%rax)
movsbl 0x5991b(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
je 0x83d4
movq 0x598ef(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x68(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax), %rdi
movl $0x4, %esi
callq 0x5190
movq %rax, %rcx
movq 0x598c0(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq -0x68(%rbp), %rdx
movslq -0x2c(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x18(%rax)
movl -0x24(%rbp), %ecx
movq 0x5989a(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq -0x68(%rbp), %rdx
movslq -0x2c(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
movq (%rax,%rdx,8), %rax
movq 0x18(%rax), %rax
movl %ecx, (%rax)
movq 0x59875(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x68(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x70(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movb $0x3, (%rax,%rcx)
jmp 0x85d9
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3, %eax
jne 0x85d7
movq -0x68(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0xb0(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xb0(%rbp)
movb %al, -0xba(%rbp)
jl 0x84a2
movq 0x597d0(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x5c(%rax), %eax
cmpl -0x28(%rbp), %eax
setne %al
movb %al, -0xba(%rbp)
movb -0xba(%rbp), %al
testb $0x1, %al
jne 0x84ae
jmp 0x84c1
jmp 0x84b0
movl -0xb0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x8468
movq 0x59788(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x5c(%rax), %eax
cmpl -0x28(%rbp), %eax
jne 0x8591
movq 0x59762(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0x20(%rbp), %edx
movq 0x5973c(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movslq -0xb4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movsbl 0x59734(%rip), %eax     # 0x61c70
cmpl $0x0, %eax
je 0x856c
movl -0x24(%rbp), %edx
movq 0x59705(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movslq -0xb4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x596dd(%rip), %rax     # 0x61c50
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x85d5
movq 0x58a40(%rip), %rax     # 0x60fd8
movq (%rax), %rdi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq 0x4d8ca(%rip), %rsi     # 0x55e72
movb $0x0, %al
callq 0x5470
movsbl 0x58dd6(%rip), %eax     # 0x6138c
cmpl $0x1, %eax
jne 0x85d3
movq -0x18(%rbp), %rdi
movl -0x28(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq 0x4d8a6(%rip), %rsi     # 0x55e72
movb $0x0, %al
callq 0x5470
jmp 0x85d5
jmp 0x85d7
jmp 0x85d9
jmp 0x85db
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x8186
jmp 0x85fa
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x80d4
movq -0x68(%rbp), %rdi
callq 0x53b0
movq -0x70(%rbp), %rdi
callq 0x53b0
movq -0x48(%rbp), %rdi
callq 0x53b0
movq -0x38(%rbp), %rdi
movl 0x595eb(%rip), %esi     # 0x61c18
callq 0xb870
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x595d2(%rip), %eax     # 0x61c14
jge 0x8694
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq 0x59603(%rip), %rcx     # 0x61c58
movslq -0x28(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x8687
movq 0x59603(%rip), %rax     # 0x61c68
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl $0x0, 0x4(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x864b
jmp 0x8689
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8639
movl $0x0, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
cmpl 0x59586(%rip), %eax     # 0x61c30
jge 0x86d9
movq 0x59575(%rip), %rax     # 0x61c28
movslq -0xb8(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x869e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)