// File: myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::doBaumWelchStep(FitBitSlicedA*)
NUMBER HMMProblemSlicedA::doBaumWelchStep(FitBitSlicedA *fb) {
	NCAT x;
    NPAR nS = this->p->nS, nO = this->p->nO, nZ = this->p->nZ;
	NPAR i,j,m, o, z;
	NDAT t;
    NUMBER ll;
    
    NCAT xndat = fb->xndat;
    struct data **x_data = fb->x_data;
    computeAlphaAndPOParam(xndat, x_data);
	computeBeta(xndat, x_data);
	computeXiGamma(xndat, x_data);
	

    NUMBER * b_PI = NULL;
	NUMBER *** b_A_num = NULL;
	NUMBER *** b_A_den = NULL;
	NUMBER ** b_B_num = NULL;
	NUMBER ** b_B_den = NULL;
//    NUMBER *** c_A     = NULL;  // A,B average across sequences
//    NUMBER *** c_B     = NULL;  // A,B average across sequences
    if(fb->pi != NULL)
        b_PI = init1D<NUMBER>((NDAT)nS);
    if(fb->A != NULL) {
        b_A_num = init3D<NUMBER>((NDAT)nZ, (NDAT)nS, (NDAT)nS);
        b_A_den = init3D<NUMBER>((NDAT)nZ, (NDAT)nS, (NDAT)nS);
//        c_A     = init3D<NUMBER>((NDAT)nZ, (NDAT)nS, (NDAT)nS);  // A,B average across sequences
    }
    if(fb->B != NULL) {
        b_B_num = init2D<NUMBER>((NDAT)nS, (NDAT)nO);
        b_B_den = init2D<NUMBER>((NDAT)nS, (NDAT)nO);
//        c_B     = init3D<NUMBER>((NDAT)nZ, (NDAT)nS, (NDAT)nO);  // A,B average across sequences
    }

    // compute sums PI

	for(x=0; x<xndat; x++) {
        if( x_data[x]->cnt!=0 ) continue;
        if(fb->pi != NULL) {
            for(i=0; i<nS; i++) {
                b_PI[i] += x_data[x]->gamma[0][i] / xndat;
            }
        }
		
		for(t=0;t<(x_data[x]->n-1);t++) {
            //			o = x_data[x]->obs[t];
            o = this->p->dat_obs[ x_data[x]->ix[t] ];//->get( x_data[x]->ix[t] );
			for(i=0; i<nS; i++) {
                if(fb->A != NULL) {
                    for(j=0; j<nS; j++){
                        z = this->p->dat_slice[ fb->x_data[x]->ix[t] ];
                        b_A_num[z][i][j] += x_data[x]->xi[t][i][j];
                        b_A_den[z][i][j] += x_data[x]->gamma[t][i];
                    }
                }
                if(fb->B != NULL) {
                    for(m=0; m<nO; m++) {
                        b_B_num[i][m] += (m==o) * x_data[x]->gamma[t][i];
                        b_B_den[i][m] += x_data[x]->gamma[t][i];
                    }
                }
			}
		}
	} // for all groups within a skill
	// set params
	for(i=0; i<nS; i++) {
        if(fb->pi != NULL) fb->pi[i] = b_PI[i];
        if(fb->A != NULL) {
            for(z=0; z<nZ; z++) {
                for(j=0; j<nS; j++) {
                    fb->A[z][i][j] = b_A_num[z][i][j] / safe0num(b_A_den[z][i][j]);
                }
            }
        }
        if(fb->B != NULL) {
            for(m=0; m<nO; m++) {
                fb->B[i][m] = b_B_num[i][m] / safe0num(b_B_den[i][m]);
            }
        }
	}
    // scale
    if( !this->hasNon01Constraints() ) {
        if(fb->pi != NULL) projectsimplex(fb->pi, nS);
        for(i=0; i<nS; i++) {
            if(fb->A != NULL) {
                for(z=0; z<nZ; z++) {
                    projectsimplex(fb->A[z][i], nS);
                }
            }
            if(fb->B != NULL) projectsimplex(fb->B[i], nS);
        }
    } else {
        if(fb->pi != NULL) projectsimplexbounded(fb->pi, this->getLbPI(), this->getUbPI(), nS);
        for(i=0; i<nS; i++) {
            if(fb->A != NULL) {
                for(z=0; z<nZ; z++) {
                    projectsimplexbounded(fb->A[z][i], this->getLbA()[z][i], this->getUbA()[z][i], nS); // tag is currently fit slice
                }
            }
            if(fb->B != NULL) projectsimplexbounded(fb->B[i], this->getLbB()[i], this->getUbB()[i], nS);
        }
    }
    // compute LL
    computeAlphaAndPOParam(fb->xndat, fb->x_data);
    ll = HMMProblemSlicedA::getSumLogPOPara(fb->xndat, fb->x_data);
    // free mem
    //    RecycleFitData(xndat, x_data, this->p);
	if(b_PI    != NULL) free(b_PI);
	if(b_A_num != NULL) free3D<NUMBER>(b_A_num, nZ, nS);
	if(b_A_den != NULL) free3D<NUMBER>(b_A_den, nZ, nS);
	if(b_B_num != NULL) free2D<NUMBER>(b_B_num, nS);
	if(b_B_den != NULL) free2D<NUMBER>(b_B_den, nS);
//    if(c_A     != NULL) free3D<NUMBER>(c_A, nZ, nS); // A,B average across sequences
//    if(c_B     != NULL) free3D<NUMBER>(c_B, nZ, nS); // A,B average across sequences
    return ll;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movq 0x88(%rdi), %rax
movb 0x8b8(%rax), %al
movb %al, -0x15(%rbp)
movq 0x88(%rdi), %rax
movb 0x8b9(%rax), %al
movb %al, -0x16(%rbp)
movq 0x88(%rdi), %rax
movb 0x8c8(%rax), %al
movb %al, -0x17(%rbp)
movq -0x10(%rbp), %rax
movl 0xd0(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0x43a00
movq -0x68(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0x43fc0
movq -0x68(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0x442e0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x49393
movsbl -0x15(%rbp), %edi
callq 0xc410
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x493c8
movsbl -0x17(%rbp), %edi
movsbl -0x15(%rbp), %esi
movsbl -0x15(%rbp), %edx
callq 0x11310
movq %rax, -0x48(%rbp)
movsbl -0x17(%rbp), %edi
movsbl -0x15(%rbp), %esi
movsbl -0x15(%rbp), %edx
callq 0x11310
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x493f5
movsbl -0x15(%rbp), %edi
movsbl -0x16(%rbp), %esi
callq 0xf580
movq %rax, -0x58(%rbp)
movsbl -0x15(%rbp), %edi
movsbl -0x16(%rbp), %esi
callq 0xf580
movq %rax, -0x60(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x496e1
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, 0x4(%rax)
je 0x4941f
jmp 0x496d3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4947f
movb $0x0, -0x18(%rbp)
movsbl -0x18(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4947d
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movsbq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
cvtsi2sdl -0x2c(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x40(%rbp), %rax
movsbq -0x18(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movb -0x18(%rbp), %al
addb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0x4942e
jmp 0x4947f
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x38(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x496d1
movq -0x68(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x870(%rax), %rax
movq -0x38(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1b(%rbp)
movb $0x0, -0x18(%rbp)
movsbl -0x18(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x496c1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x495e6
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x495e4
movq -0x68(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x8a8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xd8(%rcx), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x40(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x19(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x48(%rbp), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x19(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x19(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x494f9
jmp 0x495e6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x496b2
movb $0x0, -0x1a(%rbp)
movsbl -0x1a(%rbp), %eax
movsbl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jge 0x496b0
movsbl -0x1a(%rbp), %eax
movsbl -0x1b(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x58(%rbp), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x1a(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38(%rax), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x1a(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movb -0x1a(%rbp), %al
addb $0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x495f9
jmp 0x496b2
jmp 0x496b4
movb -0x18(%rbp), %al
addb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0x494d6
jmp 0x496c3
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x49486
jmp 0x496d3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x493fc
movb $0x0, -0x18(%rbp)
movsbl -0x18(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x49884
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x49720
movq -0x40(%rbp), %rax
movsbq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movsbq -0x18(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x497ef
movb $0x0, -0x1c(%rbp)
movsbl -0x1c(%rbp), %eax
movsbl -0x17(%rbp), %ecx
cmpl %ecx, %eax
jge 0x497ed
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x497de
movq -0x48(%rbp), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x19(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x50(%rbp), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x19(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x9a40
movaps %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x19(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x49747
jmp 0x497e0
movb -0x1c(%rbp), %al
addb $0x1, %al
movb %al, -0x1c(%rbp)
jmp 0x49733
jmp 0x497ef
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x49875
movb $0x0, -0x1a(%rbp)
movsbl -0x1a(%rbp), %eax
movsbl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jge 0x49873
movq -0x58(%rbp), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x1a(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x60(%rbp), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x1a(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x9a40
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x1a(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movb -0x1a(%rbp), %al
addb $0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x497fe
jmp 0x49875
jmp 0x49877
movb -0x18(%rbp), %al
addb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0x496e5
movq -0x68(%rbp), %rdi
callq 0x1a4e0
testb $0x1, %al
jne 0x49944
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x498b1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movsbl -0x15(%rbp), %esi
callq 0x7980
movb $0x0, -0x18(%rbp)
movsbl -0x18(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4993f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4990b
movb $0x0, -0x1c(%rbp)
movsbl -0x1c(%rbp), %eax
movsbl -0x17(%rbp), %ecx
cmpl %ecx, %eax
jge 0x49909
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsbl -0x15(%rbp), %esi
callq 0x7980
movb -0x1c(%rbp), %al
addb $0x1, %al
movb %al, -0x1c(%rbp)
jmp 0x498d0
jmp 0x4990b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x49930
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsbl -0x15(%rbp), %esi
callq 0x7980
jmp 0x49932
movb -0x18(%rbp), %al
addb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0x498b5
jmp 0x49abc
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4998b
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x88(%rbp)
callq 0x1a6b0
movq -0x68(%rbp), %rdi
movq %rax, -0x80(%rbp)
callq 0x1a770
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq %rax, %rdx
movsbl -0x15(%rbp), %ecx
callq 0x87e0
movb $0x0, -0x18(%rbp)
movsbl -0x18(%rbp), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jge 0x49aba
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x49a46
movb $0x0, -0x1c(%rbp)
movsbl -0x1c(%rbp), %eax
movsbl -0x17(%rbp), %ecx
cmpl %ecx, %eax
jge 0x49a44
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x98(%rbp)
callq 0x43820
movq -0x68(%rbp), %rdi
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
callq 0x43860
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsbq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movsbl -0x15(%rbp), %ecx
callq 0x87e0
movb -0x1c(%rbp), %al
addb $0x1, %al
movb %al, -0x1c(%rbp)
jmp 0x499b2
jmp 0x49a46
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x49aab
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa8(%rbp)
callq 0x1a730
movq -0x68(%rbp), %rdi
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
callq 0x1a7f0
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movsbq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movsbl -0x15(%rbp), %ecx
callq 0x87e0
jmp 0x49aad
movb -0x18(%rbp), %al
addb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0x4998f
jmp 0x49abc
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xd0(%rax), %esi
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rdx
callq 0x43a00
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xd0(%rax), %esi
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rdx
callq 0x1a9f0
movsd %xmm0, -0x28(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x49b0d
movq -0x40(%rbp), %rdi
callq 0x5380
cmpq $0x0, -0x48(%rbp)
je 0x49b25
movq -0x48(%rbp), %rdi
movsbl -0x17(%rbp), %esi
movsbl -0x15(%rbp), %edx
callq 0x11290
cmpq $0x0, -0x50(%rbp)
je 0x49b3d
movq -0x50(%rbp), %rdi
movsbl -0x17(%rbp), %esi
movsbl -0x15(%rbp), %edx
callq 0x11290
cmpq $0x0, -0x58(%rbp)
je 0x49b51
movq -0x58(%rbp), %rdi
movsbl -0x15(%rbp), %esi
callq 0xc7f0
cmpq $0x0, -0x60(%rbp)
je 0x49b65
movq -0x60(%rbp), %rdi
movsbl -0x15(%rbp), %esi
callq 0xc7f0
movsd -0x28(%rbp), %xmm0
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)