// File: myudelson[P]hmm-scalable/HMMProblemPiGK.cpp
// Function: HMMProblemPiGK::readModelBody(_IO_FILE*, param*, int*, bool)
void HMMProblemPiGK::readModelBody(FILE *fid, struct param* param, NDAT *line_no, bool overwrite) {
	NPAR i,j,m;
	NCAT k = 0, g = 0, idxk = 0, idxg = 0;
	string s;
    std::map<std::string,NCAT>::iterator it;
    char col[2048];
    //
    readNullObsRatio(fid, param, line_no);
    //
    // init param
    //
    if(overwrite) {
        this->p->map_group_fwd = new map<string,NCAT>();
        this->p->map_group_bwd = new map<NCAT,string>();
        this->p->map_skill_fwd = new map<string,NCAT>();
        this->p->map_skill_bwd = new map<NCAT,string>();
    }
	//
	// read grouped PIg
	//
    for(g=0; g<param->nG; g++) {
		// read group label
        fscanf(fid,"%*s\t%[^\n]\n",col);
        s = string( col );
        (*line_no)++;        
        if(overwrite) {
            this->p->map_group_fwd->insert(pair<string,NCAT>(s, (NCAT)this->p->map_group_fwd->size()));
            this->p->map_group_bwd->insert(pair<NCAT,string>((NCAT)this->p->map_group_bwd->size(), s));
            idxg = g;
        } else {
            it = this->p->map_group_fwd->find(s);
            if( it==this->p->map_group_fwd->end() ) { // not found, skip 3 lines and continue
                fscanf(fid,"%[^\n]\n",col);
                (*line_no)++;
                continue; // skip this iteration
            }
            else
                idxg =it->second;
        }

        // read PIg
        fscanf(fid,"PIg\t");
        for(i=0; i<(this->p->nS-1); i++) { // read 1 less then necessary
            fscanf(fid,"%[^\t]\t",col);
            this->PIg[idxg][i] = atof(col);
        }
        fscanf(fid,"%[^\n]\n",col);// read last one
        this->PIg[idxg][i] = atof(col);
        (*line_no)++;
    }
    //
    // read skills
    //
	for(k=0; k<param->nK; k++) {
		// read skill label
        fscanf(fid,"%*s\t%[^\n]\n",col);
        s = string( col );
        (*line_no)++;
        if(overwrite) {
            this->p->map_skill_fwd->insert(pair<string,NCAT>(s, (NCAT)this->p->map_skill_fwd->size()));
            this->p->map_skill_bwd->insert(pair<NCAT,string>((NCAT)this->p->map_skill_bwd->size(), s));
            idxk = k;
        } else {
            it = this->p->map_skill_fwd->find(s);
            if( it==this->p->map_skill_fwd->end() ) { // not found, skip 3 lines and continue
                fscanf(fid,"%*s\n");
                fscanf(fid,"%*s\n");
                fscanf(fid,"%*s\n");
                continue; // skip this iteration
            }
            else
                idxk =it->second;
        }
        
        // read PI
        fscanf(fid,"PIk\t");
        for(i=0; i<(this->p->nS-1); i++) { // read 1 less then necessary
            fscanf(fid,"%[^\t]\t",col);
            this->pi[idxk][i] = atof(col);
        }
        fscanf(fid,"%[^\n]\n",col);// read last one
        this->pi[idxk][i] = atof(col);
        (*line_no)++;
		// read A
        fscanf(fid,"A\t");
		for(i=0; i<this->p->nS; i++)
			for(j=0; j<this->p->nS; j++) {
                if(i==(this->p->nS-1) && j==(this->p->nS-1)) {
                    fscanf(fid,"%[^\n]\n", col); // last one;
                    this->A[idxk][i][j] = atof(col);
                }
                else {
                    fscanf(fid,"%[^\t]\t", col); // not las one
                    this->A[idxk][i][j] = atof(col);
                }
			}
        (*line_no)++;
		// read B
        fscanf(fid,"B\t");
		for(i=0; i<this->p->nS; i++)
			for(m=0; m<this->p->nO; m++) {
                if(i==(this->p->nS-1) && m==(this->p->nO-1)) {
                    fscanf(fid,"%[^\n]\n", col); // last one;
                    this->B[idxk][i][m] = atof(col);
                }
                else {
                    fscanf(fid,"%[^\t]\t", col); // not las one
                    this->B[idxk][i][m] = atof(col);
                }
			}
        (*line_no)++;
	} // for all k
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa90, %rsp            # imm = 0xA90
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x9e8(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5420
leaq -0x60(%rbp), %rdi
callq 0x16650
movq -0x9e8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x26f70
jmp 0x2a1c6
testb $0x1, -0x21(%rbp)
je 0x2a312
movl $0x30, %edi
callq 0x52d0
movq %rax, -0x9f0(%rbp)
jmp 0x2a1e3
movq -0x9f0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x6850
movq -0x9e8(%rbp), %rax
movq -0x9f0(%rbp), %rcx
movq 0x88(%rax), %rax
movq %rcx, 0x920(%rax)
movl $0x30, %edi
callq 0x52d0
movq %rax, -0x9f8(%rbp)
jmp 0x2a22c
movq -0x9f8(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x6890
movq -0x9e8(%rbp), %rax
movq -0x9f8(%rbp), %rcx
movq 0x88(%rax), %rax
movq %rcx, 0x928(%rax)
movl $0x30, %edi
callq 0x52d0
movq %rax, -0xa00(%rbp)
jmp 0x2a275
movq -0xa00(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x6850
movq -0x9e8(%rbp), %rax
movq -0xa00(%rbp), %rcx
movq 0x88(%rax), %rax
movq %rcx, 0x940(%rax)
movl $0x30, %edi
callq 0x52d0
movq %rax, -0xa08(%rbp)
jmp 0x2a2be
movq -0xa08(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x5150
movq -0xa08(%rbp), %rdi
callq 0x6890
movq -0x9e8(%rbp), %rax
movq -0xa08(%rbp), %rcx
movq 0x88(%rax), %rax
movq %rcx, 0x948(%rax)
jmp 0x2a312
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
jmp 0x2ad7a
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8bc(%rcx), %eax
jge 0x2a6d3
movq -0x10(%rbp), %rdi
leaq 0x26574(%rip), %rsi     # 0x508ab
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2a347
leaq -0x891(%rbp), %rdi
movq %rdi, -0xa10(%rbp)
callq 0x5550
movq -0xa10(%rbp), %rdx
leaq -0x890(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xc470
jmp 0x2a376
leaq -0x58(%rbp), %rdi
leaq -0x890(%rbp), %rsi
callq 0x53a0
leaq -0x890(%rbp), %rdi
callq 0x5170
leaq -0x891(%rbp), %rdi
callq 0x5320
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
testb $0x1, -0x21(%rbp)
je 0x2a537
movq -0x9e8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x920(%rax), %rdi
movq %rdi, -0xa18(%rbp)
callq 0x167a0
movl %eax, -0x8c4(%rbp)
leaq -0x8c0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x8c4(%rbp), %rdx
callq 0x16a60
jmp 0x2a3f3
movq -0xa18(%rbp), %rdi
leaq -0x8c0(%rbp), %rsi
callq 0x16850
movb %dl, -0xa21(%rbp)
movq %rax, -0xa20(%rbp)
jmp 0x2a415
movb -0xa21(%rbp), %al
movq -0xa20(%rbp), %rcx
movq %rcx, -0x8d8(%rbp)
movb %al, -0x8d0(%rbp)
leaq -0x8c0(%rbp), %rdi
callq 0x168d0
movq -0x9e8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x928(%rax), %rdi
movq %rdi, -0xa30(%rbp)
callq 0x16aa0
movl %eax, -0x904(%rbp)
leaq -0x900(%rbp), %rdi
leaq -0x904(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x16ac0
jmp 0x2a47b
movq -0xa30(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0x168f0
movb %dl, -0xa39(%rbp)
movq %rax, -0xa38(%rbp)
jmp 0x2a49d
movb -0xa39(%rbp), %al
movq -0xa38(%rbp), %rcx
movq %rcx, -0x918(%rbp)
movb %al, -0x910(%rbp)
leaq -0x900(%rbp), %rdi
callq 0x16970
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x2a5ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
leaq -0x891(%rbp), %rdi
callq 0x5320
jmp 0x2ad7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
leaq -0x8c0(%rbp), %rdi
callq 0x168d0
jmp 0x2ad7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
leaq -0x900(%rbp), %rdi
callq 0x16970
jmp 0x2ad7a
movq -0x9e8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x920(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x16710
movq %rax, -0xa48(%rbp)
jmp 0x2a55e
movq -0x9e8(%rbp), %rax
movq -0xa48(%rbp), %rcx
movq %rcx, -0x920(%rbp)
movq -0x920(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq 0x88(%rax), %rax
movq 0x920(%rax), %rdi
callq 0x16770
movq %rax, -0x928(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x928(%rbp), %rsi
callq 0x16740
testb $0x1, %al
jne 0x2a5ae
jmp 0x2a5d9
movq -0x10(%rbp), %rdi
leaq 0x262f6(%rip), %rsi     # 0x508af
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2a5c9
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x2a6c5
leaq -0x60(%rbp), %rdi
callq 0x16990
movl 0x20(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x2a5ea
movq -0x10(%rbp), %rdi
leaq 0x26378(%rip), %rsi     # 0x5096d
xorl %eax, %eax
callq 0x5580
jmp 0x2a5fe
movb $0x0, -0x22(%rbp)
movq -0x9e8(%rbp), %rcx
movsbl -0x22(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2a673
movq -0x10(%rbp), %rdi
leaq 0x26291(%rip), %rsi     # 0x508be
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2a63d
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x22(%rbp), %al
addb $0x1, %al
movb %al, -0x22(%rbp)
jmp 0x2a602
movq -0x10(%rbp), %rdi
leaq 0x26231(%rip), %rsi     # 0x508af
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2a68e
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2a319
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8c0(%rcx), %eax
jge 0x2ad68
movq -0x10(%rbp), %rdi
leaq 0x261b3(%rip), %rsi     # 0x508ab
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2a708
leaq -0x949(%rbp), %rdi
movq %rdi, -0xa50(%rbp)
callq 0x5550
movq -0xa50(%rbp), %rdx
leaq -0x948(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xc470
jmp 0x2a737
leaq -0x58(%rbp), %rdi
leaq -0x948(%rbp), %rsi
callq 0x53a0
leaq -0x948(%rbp), %rdi
callq 0x5170
leaq -0x949(%rbp), %rdi
callq 0x5320
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
testb $0x1, -0x21(%rbp)
je 0x2a8f8
movq -0x9e8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x940(%rax), %rdi
movq %rdi, -0xa58(%rbp)
callq 0x167a0
movl %eax, -0x97c(%rbp)
leaq -0x978(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x97c(%rbp), %rdx
callq 0x16a60
jmp 0x2a7b4
movq -0xa58(%rbp), %rdi
leaq -0x978(%rbp), %rsi
callq 0x16850
movb %dl, -0xa61(%rbp)
movq %rax, -0xa60(%rbp)
jmp 0x2a7d6
movb -0xa61(%rbp), %al
movq -0xa60(%rbp), %rcx
movq %rcx, -0x990(%rbp)
movb %al, -0x988(%rbp)
leaq -0x978(%rbp), %rdi
callq 0x168d0
movq -0x9e8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x948(%rax), %rdi
movq %rdi, -0xa70(%rbp)
callq 0x16aa0
movl %eax, -0x9bc(%rbp)
leaq -0x9b8(%rbp), %rdi
leaq -0x9bc(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x16ac0
jmp 0x2a83c
movq -0xa70(%rbp), %rdi
leaq -0x9b8(%rbp), %rsi
callq 0x168f0
movb %dl, -0xa79(%rbp)
movq %rax, -0xa78(%rbp)
jmp 0x2a85e
movb -0xa79(%rbp), %al
movq -0xa78(%rbp), %rcx
movq %rcx, -0x9d0(%rbp)
movb %al, -0x9c8(%rbp)
leaq -0x9b8(%rbp), %rdi
callq 0x16970
movl -0x28(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x2a9c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
leaq -0x949(%rbp), %rdi
callq 0x5320
jmp 0x2ad7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
leaq -0x978(%rbp), %rdi
callq 0x168d0
jmp 0x2ad7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x868(%rbp)
movl %eax, -0x86c(%rbp)
leaq -0x9b8(%rbp), %rdi
callq 0x16970
jmp 0x2ad7a
movq -0x9e8(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x940(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x16710
movq %rax, -0xa88(%rbp)
jmp 0x2a91f
movq -0x9e8(%rbp), %rax
movq -0xa88(%rbp), %rcx
movq %rcx, -0x9d8(%rbp)
movq -0x9d8(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq 0x88(%rax), %rax
movq 0x940(%rax), %rdi
callq 0x16770
movq %rax, -0x9e0(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x9e0(%rbp), %rsi
callq 0x16740
testb $0x1, %al
jne 0x2a96f
jmp 0x2a9b0
movq -0x10(%rbp), %rdi
leaq 0x260d2(%rip), %rsi     # 0x50a4c
xorl %eax, %eax
callq 0x5580
jmp 0x2a983
movq -0x10(%rbp), %rdi
leaq 0x260be(%rip), %rsi     # 0x50a4c
xorl %eax, %eax
callq 0x5580
jmp 0x2a997
movq -0x10(%rbp), %rdi
leaq 0x260aa(%rip), %rsi     # 0x50a4c
xorl %eax, %eax
callq 0x5580
jmp 0x2a9ab
jmp 0x2ad5a
leaq -0x60(%rbp), %rdi
callq 0x16990
movl 0x20(%rax), %eax
movl %eax, -0x30(%rbp)
jmp 0x2a9c1
movq -0x10(%rbp), %rdi
leaq 0x25fa6(%rip), %rsi     # 0x50972
xorl %eax, %eax
callq 0x5580
jmp 0x2a9d5
movb $0x0, -0x22(%rbp)
movq -0x9e8(%rbp), %rcx
movsbl -0x22(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2aa47
movq -0x10(%rbp), %rdi
leaq 0x25eba(%rip), %rsi     # 0x508be
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2aa14
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x22(%rbp), %al
addb $0x1, %al
movb %al, -0x22(%rbp)
jmp 0x2a9d9
movq -0x10(%rbp), %rdi
leaq 0x25e5d(%rip), %rsi     # 0x508af
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2aa62
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x25b36(%rip), %rsi     # 0x505d6
xorl %eax, %eax
callq 0x5580
jmp 0x2aaa9
movb $0x0, -0x22(%rbp)
movq -0x9e8(%rbp), %rcx
movsbl -0x22(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x2abed
movb $0x0, -0x23(%rbp)
movq -0x9e8(%rbp), %rcx
movsbl -0x23(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x2abde
movq -0x9e8(%rbp), %rcx
movsbl -0x22(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2ab82
movq -0x9e8(%rbp), %rcx
movsbl -0x23(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2ab82
movq -0x10(%rbp), %rdi
leaq 0x25d71(%rip), %rsi     # 0x508af
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2ab4e
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x23(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2abcf
movq -0x10(%rbp), %rdi
leaq 0x25d31(%rip), %rsi     # 0x508be
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2ab9d
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x23(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2abd1
movb -0x23(%rbp), %al
addb $0x1, %al
movb %al, -0x23(%rbp)
jmp 0x2aad2
jmp 0x2abe0
movb -0x22(%rbp), %al
addb $0x1, %al
movb %al, -0x22(%rbp)
jmp 0x2aaad
movq -0x20(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x259d7(%rip), %rsi     # 0x505d9
xorl %eax, %eax
callq 0x5580
jmp 0x2ac0b
movb $0x0, -0x22(%rbp)
movq -0x9e8(%rbp), %rcx
movsbl -0x22(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x2ad4f
movb $0x0, -0x24(%rbp)
movq -0x9e8(%rbp), %rcx
movsbl -0x24(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b9(%rcx), %ecx
cmpl %ecx, %eax
jge 0x2ad40
movq -0x9e8(%rbp), %rcx
movsbl -0x22(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2ace4
movq -0x9e8(%rbp), %rcx
movsbl -0x24(%rbp), %eax
movq 0x88(%rcx), %rcx
movsbl 0x8b9(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2ace4
movq -0x10(%rbp), %rdi
leaq 0x25c0f(%rip), %rsi     # 0x508af
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2acb0
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x24(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2ad31
movq -0x10(%rbp), %rdi
leaq 0x25bcf(%rip), %rsi     # 0x508be
xorl %eax, %eax
leaq -0x860(%rbp), %rdx
callq 0x5580
jmp 0x2acff
leaq -0x860(%rbp), %rdi
callq 0x53c0
movq -0x9e8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x22(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x24(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2ad33
movb -0x24(%rbp), %al
addb $0x1, %al
movb %al, -0x24(%rbp)
jmp 0x2ac34
jmp 0x2ad42
movb -0x22(%rbp), %al
addb $0x1, %al
movb %al, -0x22(%rbp)
jmp 0x2ac0f
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2a6da
leaq -0x58(%rbp), %rdi
callq 0x5170
addq $0xa90, %rsp            # imm = 0xA90
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x5170
movq -0x868(%rbp), %rdi
callq 0x5540
nop