// File: /workspace/github_cpp_makefile_star2_O3/myudelson[P]hmm-scalable/HMMProblemComp.cpp
// Function: HMMProblemComp::GradientDescent()
NUMBER HMMProblemComp::GradientDescent() {
	NCAT k, x;
    NCAT nK = this->p->nK;

	//
	// fit all as 1 skill first, set group gradients to 0, and do not fit them
	//
	if(this->p->single_skill>0) {
        FitBit *fb = new FitBit(this->p->nS, this->p->nO, this->p->nK, this->p->nG, this->p->tol, this->p->tol_mode);
        fb->link( HMMProblem::getPI(0), HMMProblem::getA(0), HMMProblem::getB(0), this->p->nSeq, this->p->k_data);// link skill 0 (we'll copy fit parameters to others
        if(this->p->block_fitting[0]!=0) fb->pi = NULL;
        if(this->p->block_fitting[1]!=0) fb->A  = NULL;
        if(this->p->block_fitting[2]!=0) fb->B  = NULL;
        
        fb->init(FBS_PARm1);
        fb->init(FBS_PARm2);
        fb->init(FBS_GRAD);
        if(this->p->solver==METHOD_CGD) {
            fb->init(FBS_GRADm1);
            fb->init(FBS_DIRm1);
        }
        
        NCAT* original_ks = Calloc(NCAT, (size_t)this->p->nSeq);
        for(x=0; x<this->p->nSeq; x++) { original_ks[x] = this->p->all_data[x].k; this->p->all_data[x].k = 0; } // save progonal k's
        FitResult fr = GradientDescentBit(fb);
        for(x=0; x<this->p->nSeq; x++) { this->p->all_data[x].k = original_ks[x]; } // restore original k's
        free(original_ks);
        if( !this->p->quiet )
            printf("single skill iter#%3d p(O|param)= %15.7f >> %15.7f, conv=%d\n", fr.iter,fr.pO0,fr.pO,fr.conv);
        delete fb;
    }
    if( this->p->single_skill!=2 ) { // if not "force single skill"
		NCAT first_iteration_qualify = this->p->first_iteration_qualify; // at what iteration, qualification for skill/group convergence should start
		NCAT iterations_to_qualify = this->p->iterations_to_qualify; // how many concecutive iterations necessary for skill/group to qualify as converged
		NCAT* iter_qual_skill = Calloc(NCAT, (size_t)nK); //
		NCAT* iter_fail_skill = Calloc(NCAT, (size_t)nK); // counting consecutive number of failures to converge for skills
		int skip_k = 0;
		NDAT sum_is_multi = 0;
		//
		// Main fit Stage 1. Single-skills, skills that only show up on single-skill rows.
		//

//		int parallel_now = this->p->parallel==1; //PAR
//		#pragma omp parallel if(parallel_now) shared(iter_qual_skill, iter_fail_skill)//PAR
//		{//PAR
//		#pragma omp for schedule(dynamic) //PAR
		for(x=0; x<nK; x++) {
//			#pragma omp critical(update_sum_is_multi)//PAR
//			{//PAR
			sum_is_multi += (this->is_multi[x] == 1);
//			}//PAR
			if(this->is_multi[x] == 0) {  // READ WARNING BELOW IF YOU COMMENT
				// vvvv Extract from HMMProblem.cpp
				NCAT xndat;
				struct data** x_data;
				xndat = this->p->k_numg[x];
				x_data = this->p->k_g_data[x];
                k = x_data[0]->k; // grab the first one, since all of them are the same k
				FitBit *fb = new FitBit(this->p->nS, this->p->nO, this->p->nK, this->p->nG, this->p->tol, this->p->tol_mode);
				fb->link( this->getPI(x), this->getA(x), this->getB(x), xndat, x_data);
				if(this->p->block_fitting[0]!=0) fb->pi = NULL;
				if(this->p->block_fitting[1]!=0) fb->A  = NULL;
				if(this->p->block_fitting[2]!=0) fb->B  = NULL;
				
				FitResult fr;
				fb->init(FBS_PARm1);
				fb->init(FBS_GRAD);
				if(this->p->solver==METHOD_CGD) {
					fb->init(FBS_DIR);
					fb->init(FBS_DIRm1);
					fb->init(FBS_GRADm1);
				}
				if(this->p->solver==METHOD_GBB) {
					fb->init(FBS_GRADm1);
				}
				fb->init(FBS_PARm2); // do this for all in order to capture oscillation, e.g. if new param at time t is close to param at t-2 (tolerance)
				
//				fr = GradientDescentBit(fb);
				NDAT tag1 = this->p->tag1;   // FORCE
				this->p->tag1 = 1;           // FORCE
				fr = GradientDescentBit(fb); // FORCE
				this->p->tag1 = tag1;        // FORCE
			
				// count number of concecutive failures
				if(fr.iter==this->p->maxiter) {
					iter_fail_skill[k]++;
				} else {
					iter_fail_skill[k]=0;
				}

				delete fb;
				
				if( ( (fr.conv || fr.iter==this->p->maxiter) )) {
					if(!this->p->quiet)
						printf("skill %5d, seq %5d, dat %8d, iter#%3d p(O|param)= %15.7f >> %15.7f, conv=%d\n", x, xndat, fr.ndat, fr.iter,fr.pO0,fr.pO,fr.conv);
				}
				// ^^^^
//				#pragma omp critical(update_skip_k)//PAR
//				{//PAR
				skip_k++;
//				}//PAR
			} // if(this->is_multi[x] == 0) // READ WARNING BELOW IF YOU COMMENT
		}
		/**/
//        }//PAR
		
		//
		// Main fit Stage 2. Multi-skills (skills that at least sometimes show up in multi-skil rows
		//
//		skip_k -= sum_is_multi; // update skills showing up in multi-skill rows // WATCHOUT
		// WARNING!! if you comment out `if(this->is_multi[x] == 0)` above, uncomment the previous line, otherwise the previous line should stay commented
        int i = 0; // count runs
		NDAT tag1 = this->p->tag1;
		this->p->tag1 = 1;
//        #pragma omp parallel if(parallel_now) shared(iter_qual_skill,iter_fail_skill)//PAR
//        {//PAR
        while(skip_k<nK || i < this->p->maxiter) { // add maxiter as cap
            //
            // Multi-skills, a version of what iBKT was doing
            //
            if(skip_k<nK) {
//                #pragma omp for schedule(dynamic) //PAR
                for(k=0; k<nK; k++) { // for all A,B-by-skill
                    if(this->is_multi[k]==0 || iter_qual_skill[k]==iterations_to_qualify || iter_fail_skill[k]==iterations_to_qualify)
                        continue;
                    FitBit *fb = new FitBit(this->p->nS, this->p->nO, this->p->nK, this->p->nG, this->p->tol, this->p->tol_mode);
                    // link
                    fb->link( this->getPI(k), this->getA(k), this->getB(k), this->p->k_numg[k], this->p->k_g_data[k]);
                    if(this->p->block_fitting[0]!=0) fb->pi = NULL;
                    if(this->p->block_fitting[1]!=0) fb->A  = NULL;
                    if(this->p->block_fitting[2]!=0) fb->B  = NULL;

                    fb->Cslice = 0;
                    fb->init(FBS_PARm1);
                    fb->init(FBS_PARm2);
                    fb->init(FBS_GRAD);
                    if(this->p->solver==METHOD_CGD) {
						fb->init(FBS_DIR);
                        fb->init(FBS_GRADm1);
                        fb->init(FBS_DIRm1);
                    }
					if(this->p->solver==METHOD_GBB) {
						fb->init(FBS_GRADm1);
					}
					FitResult fr = GradientDescentBit(fb);
					
					// count number of concecutive failures
					if(fr.iter==this->p->maxiter) {
						iter_fail_skill[k]++;
					} else {
						iter_fail_skill[k]=0;
					}
					
                    // decide on convergence
                    if(i>=first_iteration_qualify || fb->xndat==0) {
                        if(fr.iter==1 /*e<=this->p->tol*/ || fb->xndat==0) { // converged quick, or don't care (others all converged
                            iter_qual_skill[k]++;
                            if(fb->xndat==0) {
                                iter_qual_skill[k]=iterations_to_qualify;
                                fr.conv = 1;
                            }
                            if(iter_qual_skill[k]==iterations_to_qualify ) {// criterion met, or don't care (others all converged)
//                                #pragma omp critical(update_skip_k)//PAR
//                                {//PAR
                                    skip_k++;
//                                }//PAR
                                if( !this->p->quiet && ( /*(!conv && iter<this->p->maxiter) ||*/ (fr.conv || fr.iter==this->p->maxiter) )) {
                                    printf("run %2d skipK %4d skill %4d iter#%3d p(O|param)= %15.7f >> %15.7f, conv=%d\n",i,skip_k,k,fr.iter,fr.pO0,fr.pO,fr.conv);
                                }
                            }
                        }
                        else
                            iter_qual_skill[k]=0;
                    } // decide on convergence
                    delete fb;
                } // for all skills
            }
//            #pragma omp single//PAR
//            {//PAR
            i++;
//            }//PAR
        }
//        }//PAR
		this->p->tag1 = tag1;
        // recycle qualifications
        if( iter_qual_skill != NULL ) free(iter_qual_skill);
        if( iter_fail_skill != NULL ) free(iter_fail_skill);

    } // if not "force single skill
        
    // compute loglik
    return getSumLogPOPara(this->p->nSeq, this->p->k_data);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq 0x88(%rdi), %rbx
movslq 0x8c0(%rbx), %r14
cmpb $0x0, 0x3d(%rbx)
movq %rdi, 0x10(%rsp)
jle 0x31e92
movl $0x110, %edi            # imm = 0x110
callq 0x4210
movq %rax, %r15
movsbl 0x8b8(%rbx), %esi
movsbl 0x8b9(%rbx), %edx
movl 0x8bc(%rbx), %r8d
movsd 0x28(%rbx), %xmm0
movsbl 0x30(%rbx), %r9d
movq %rax, %rdi
movl %r14d, %ecx
callq 0xa858
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11354
movq %rax, %r12
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11370
movq %rax, %r13
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1138c
movq 0x88(%rbx), %rcx
movl 0x8dc(%rcx), %r8d
movq 0x8f0(%rcx), %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0xac70
movq 0x88(%rbx), %rax
cmpb $0x0, 0x981(%rax)
je 0x31d2d
movq $0x0, 0x10(%r15)
cmpb $0x0, 0x982(%rax)
je 0x31d3e
movq $0x0, 0x18(%r15)
cmpb $0x0, 0x983(%rax)
je 0x31d4f
movq $0x0, 0x20(%r15)
movq %r15, %rdi
movl $0x2, %esi
callq 0xaf10
movq %r15, %rdi
movl $0x7, %esi
callq 0xaf10
movq %r15, %rdi
movl $0x3, %esi
callq 0xaf10
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rbx
cmpb $0x3, 0x3f(%rbx)
jne 0x31dae
movq %r15, %rdi
movl $0x4, %esi
callq 0xaf10
movq %r15, %rdi
movl $0x6, %esi
callq 0xaf10
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rbx
movslq 0x8dc(%rbx), %r13
movl $0x4, %esi
movq %r13, %rdi
callq 0x4130
movq %rax, %r12
testq %r13, %r13
jle 0x31def
movq 0x8e8(%rbx), %rax
addq $0x58, %rax
xorl %ecx, %ecx
movl (%rax), %edx
movl %edx, (%r12,%rcx,4)
movl $0x0, (%rax)
incq %rcx
addq $0x60, %rax
cmpq %rcx, %r13
jne 0x31dd7
leaq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
movq %r15, %rdx
callq 0x14c44
movq 0x88(%rbx), %rbx
movslq 0x8dc(%rbx), %rax
testq %rax, %rax
jle 0x31e36
movq 0x8e8(%rbx), %rcx
addq $0x58, %rcx
xorl %edx, %edx
movl (%r12,%rdx,4), %esi
movl %esi, (%rcx)
incq %rdx
addq $0x60, %rcx
cmpq %rdx, %rax
jne 0x31e24
movq %r12, %rdi
callq 0x42a0
cmpb $0x0, 0x3c(%rbx)
jne 0x31e66
movl 0x40(%rsp), %esi
movsd 0x48(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movl 0x60(%rsp), %edx
leaq 0x2b0a(%rip), %rdi      # 0x34969
movb $0x2, %al
callq 0x4050
movq %r15, %rdi
callq 0xa8fa
movl $0x110, %esi            # imm = 0x110
movq %r15, %rdi
callq 0x4220
movq 0x10(%rsp), %r15
movq 0x88(%r15), %rbx
cmpb $0x2, 0x3d(%rbx)
jne 0x31e95
jmp 0x3248b
movq %rdi, %r15
movl %r14d, %ebp
movsbl 0x978(%rbx), %eax
movl %eax, 0x3c(%rsp)
movsbl 0x979(%rbx), %eax
movl %eax, 0x1c(%rsp)
movl $0x4, %esi
movq %r14, %rdi
callq 0x4130
movq %rax, 0x30(%rsp)
movl $0x4, %esi
movq %r14, %rdi
callq 0x4130
movq %rax, %r14
movl $0x0, 0x18(%rsp)
testl %ebp, %ebp
movq %rbp, 0x68(%rsp)
movq %rax, 0x28(%rsp)
jle 0x32175
xorl %r12d, %r12d
movl $0x0, 0x18(%rsp)
movq 0x90(%r15), %rax
cmpb $0x0, (%rax,%r12)
jne 0x32162
movq 0x88(%r15), %rbx
movq 0x8e0(%rbx), %rax
movq 0x8f8(%rbx), %rcx
movl (%rax,%r12,4), %eax
movl %eax, 0xc(%rsp)
movq (%rcx,%r12,8), %rbp
movq (%rbp), %rax
movq %r15, %r13
movslq 0x58(%rax), %r15
movl $0x110, %edi            # imm = 0x110
callq 0x4210
movq %rax, %r14
movsbl 0x8b8(%rbx), %esi
movsbl 0x8b9(%rbx), %edx
movl 0x8c0(%rbx), %ecx
movl 0x8bc(%rbx), %r8d
movsd 0x28(%rbx), %xmm0
movsbl 0x30(%rbx), %r9d
movq %rax, %rdi
callq 0xa858
movq (%r13), %rax
movq %r13, %rdi
movl %r12d, %esi
callq *0xa8(%rax)
movq %rax, %rbx
movq (%r13), %rax
movq %r13, %rdi
movl %r12d, %esi
callq *0xb0(%rax)
movq %rax, 0x20(%rsp)
movq (%r13), %rax
movq %r13, %rdi
movl %r12d, %esi
callq *0xb8(%rax)
movq %r14, %rdi
movq %rbx, %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
movl 0xc(%rsp), %r8d
movq %rbp, %r9
callq 0xac70
movq 0x88(%r13), %rax
cmpb $0x0, 0x981(%rax)
je 0x31fd8
movq $0x0, 0x10(%r14)
cmpb $0x0, 0x982(%rax)
je 0x31fe9
movq $0x0, 0x18(%r14)
cmpb $0x0, 0x983(%rax)
je 0x31ffa
movq $0x0, 0x20(%r14)
movq %r14, %rdi
movl $0x2, %esi
callq 0xaf10
movq %r14, %rdi
movl $0x3, %esi
callq 0xaf10
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rax
movb 0x3f(%rax), %al
cmpb $0x3, %al
jne 0x3205d
movq %r14, %rdi
movl $0x8, %esi
callq 0xaf10
movq %r14, %rdi
movl $0x6, %esi
callq 0xaf10
movq %r14, %rdi
movl $0x4, %esi
callq 0xaf10
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rax
movb 0x3f(%rax), %al
cmpb $0x5, %al
jne 0x3206e
movq %r14, %rdi
movl $0x4, %esi
callq 0xaf10
movq %r14, %rdi
movl $0x7, %esi
callq 0xaf10
movq 0x10(%rsp), %r13
movq 0x88(%r13), %rax
movl 0x9a0(%rax), %ebx
movl $0x1, 0x9a0(%rax)
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x14c44
movl 0x40(%rsp), %eax
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movl 0x60(%rsp), %ebp
movl 0x64(%rsp), %ecx
movl %ecx, 0x38(%rsp)
movq 0x88(%r13), %rcx
movl %ebx, 0x9a0(%rcx)
movl %eax, %ebx
xorl %eax, %eax
cmpl 0x38(%rcx), %ebx
jne 0x320f0
movq 0x28(%rsp), %rax
movl (%rax,%r15,4), %eax
incl %eax
movq 0x28(%rsp), %rcx
movl %eax, (%rcx,%r15,4)
movq %r14, %rdi
callq 0xa8fa
movl $0x110, %esi            # imm = 0x110
movq %r14, %rdi
callq 0x4220
movq 0x10(%rsp), %r15
movq 0x88(%r15), %rax
testl %ebp, %ebp
movl 0xc(%rsp), %edx
jne 0x32127
cmpl 0x38(%rax), %ebx
jne 0x32154
cmpb $0x0, 0x3c(%rax)
jne 0x32154
leaq 0x2528(%rip), %rdi      # 0x3465c
movl %r12d, %esi
movl 0x38(%rsp), %ecx
movl %ebx, %r8d
movsd 0x20(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movl %ebp, %r9d
movb $0x2, %al
callq 0x4050
incl 0x18(%rsp)
movq 0x68(%rsp), %rbp
movq 0x28(%rsp), %r14
incq %r12
cmpq %r12, %rbp
jne 0x31ef5
movq 0x88(%r15), %rbx
movl 0x9a0(%rbx), %eax
movl %eax, 0x20(%rsp)
movl $0x1, 0x9a0(%rbx)
movl $0x0, 0xc(%rsp)
movl 0x1c(%rsp), %ecx
movq 0x30(%rsp), %rdi
cmpl %ebp, 0x18(%rsp)
jge 0x32451
testl %ebp, %ebp
jle 0x32461
xorl %r12d, %r12d
movq 0x90(%r15), %rax
cmpb $0x0, (%rax,%r12)
je 0x32443
movl (%rdi,%r12,4), %r13d
cmpl %ecx, %r13d
je 0x32443
movl (%r14,%r12,4), %ebx
cmpl %ecx, %ebx
je 0x32443
movl $0x110, %edi            # imm = 0x110
callq 0x4210
movq %rax, %rbp
movq 0x88(%r15), %rax
movsbl 0x8b8(%rax), %esi
movsbl 0x8b9(%rax), %edx
movl 0x8c0(%rax), %ecx
movl 0x8bc(%rax), %r8d
movsd 0x28(%rax), %xmm0
movsbl 0x30(%rax), %r9d
movq %rbp, %rdi
callq 0xa858
movq (%r15), %rax
movq %r15, %rdi
movl %r12d, %esi
callq *0xa8(%rax)
movq %rax, %r14
movq (%r15), %rax
movq %r15, %rdi
movl %r12d, %esi
callq *0xb0(%rax)
movq %rax, %r15
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdi
movl %r12d, %esi
callq *0xb8(%rax)
movq 0x10(%rsp), %rcx
movq 0x88(%rcx), %rcx
movq 0x8e0(%rcx), %rdx
movq 0x8f8(%rcx), %rcx
movl (%rdx,%r12,4), %r8d
movq (%rcx,%r12,8), %r9
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %r15
movq %rax, %rcx
callq 0xac70
movq 0x88(%r15), %rax
cmpb $0x0, 0x981(%rax)
je 0x322a5
movq $0x0, 0x10(%rbp)
cmpb $0x0, 0x982(%rax)
je 0x322b6
movq $0x0, 0x18(%rbp)
cmpb $0x0, 0x983(%rax)
movq 0x28(%rsp), %r14
je 0x322cc
movq $0x0, 0x20(%rbp)
movb $0x0, 0xfa(%rbp)
movq %rbp, %rdi
movl $0x2, %esi
callq 0xaf10
movq %rbp, %rdi
movl $0x7, %esi
callq 0xaf10
movq %rbp, %rdi
movl $0x3, %esi
callq 0xaf10
movq 0x88(%r15), %rax
movb 0x3f(%rax), %al
cmpb $0x3, %al
jne 0x32339
movq %rbp, %rdi
movl $0x8, %esi
callq 0xaf10
movq %rbp, %rdi
movl $0x4, %esi
callq 0xaf10
movq %rbp, %rdi
movl $0x6, %esi
callq 0xaf10
movq 0x88(%r15), %rax
movb 0x3f(%rax), %al
cmpb $0x5, %al
jne 0x3234a
movq %rbp, %rdi
movl $0x4, %esi
callq 0xaf10
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x14c44
movl 0x40(%rsp), %r8d
movq 0x88(%r15), %rcx
movl 0x38(%rcx), %eax
incl %ebx
cmpl %eax, %r8d
movl $0x0, %edx
cmovnel %edx, %ebx
movl %ebx, (%r14,%r12,4)
movl 0xc(%rsp), %edx
cmpl 0x3c(%rsp), %edx
jge 0x32391
cmpl $0x0, 0xe8(%rbp)
jne 0x32420
movl 0xe8(%rbp), %edx
cmpl $0x1, %r8d
jne 0x323b6
incl %r13d
movq 0x30(%rsp), %rsi
movl %r13d, (%rsi,%r12,4)
testl %edx, %edx
je 0x323c9
cmpl 0x1c(%rsp), %r13d
je 0x323d9
jmp 0x32420
testl %edx, %edx
movq 0x30(%rsp), %rsi
je 0x323c9
movl $0x0, (%rsi,%r12,4)
jmp 0x32420
movl 0x1c(%rsp), %edx
movl %edx, (%rsi,%r12,4)
movl $0x1, 0x60(%rsp)
incl 0x18(%rsp)
cmpb $0x0, 0x3c(%rcx)
jne 0x32420
cmpl %eax, %r8d
sete %al
movl 0x60(%rsp), %r9d
testl %r9d, %r9d
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x32420
movsd 0x48(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
leaq 0x2598(%rip), %rdi      # 0x349a6
movl 0xc(%rsp), %esi
movl 0x18(%rsp), %edx
movl %r12d, %ecx
movb $0x2, %al
callq 0x4050
movq %rbp, %rdi
callq 0xa8fa
movl $0x110, %esi            # imm = 0x110
movq %rbp, %rdi
callq 0x4220
movq 0x68(%rsp), %rbp
movl 0x1c(%rsp), %ecx
movq 0x30(%rsp), %rdi
incq %r12
cmpq %r12, %rbp
jne 0x321af
jmp 0x32461
movq 0x88(%r15), %rbx
movl 0xc(%rsp), %eax
cmpl 0x38(%rbx), %eax
jge 0x3246a
incl 0xc(%rsp)
jmp 0x3219a
movl 0x20(%rsp), %eax
movl %eax, 0x9a0(%rbx)
testq %rdi, %rdi
je 0x3247e
callq 0x42a0
testq %r14, %r14
je 0x3248b
movq %r14, %rdi
callq 0x42a0
movl 0x8dc(%rbx), %esi
movq 0x8f0(%rbx), %rdx
movq %r15, %rdi
callq 0x114ae
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x110, %esi            # imm = 0x110
movq %r15, %rdi
jmp 0x324d4
movq %rax, %rbx
movl $0x110, %esi            # imm = 0x110
movq %r14, %rdi
jmp 0x324d4
movq %rax, %rbx
movl $0x110, %esi            # imm = 0x110
movq %rbp, %rdi
callq 0x4220
movq %rbx, %rdi
callq 0x4430
nop