// File: yukimasano[P]cpp_matrix/Matrix.cpp
// Function: QRsolve(Matrix&, Vector&)
Vector QRsolve(Matrix& A, Vector& v){
	// QR via Householder
	assert(nrows(A) == ncols(A));
	int m = ncols(A);
	Matrix R = A;
	Vector temp=ones(m);
	Matrix Q = diag(temp);
    for (int j = 0; j<m; j++){
    	Matrix x(m-j,1);
    	double len=0.0;
    	for (int l=j; l<m; l++){
    		x.set_val(l+1-j,1 ,R(l+1,j+1));
    		len+=R(l+1,j+1) * R(l+1,j+1);
    	}

    	len=sqrt(len);

    	int sign = (x(1,1) >= 0) - (x(1,1) < 0);
    	Matrix e(m-j,1);
    	e.set_val(1,1,1.0);

    	Matrix u = (sign*len*e + x);

    	// normalise u
    	len=0.0;
    	for (int i = 1; i<=m-j; i++){
    		len+=u(i,1)*u(i,1);
    	}
      //std::cout<<j<<u<<std::endl<<std::flush;
      if (len!=0){
    	   u=u* (1./sqrt(len));
      }
      //   	std::cout<<"here comes  u " << std::endl<< j<<"  "<< u << std::endl<<std::flush;

    	// SUBMULTIPLICATION    START /////////////////////////////
    	Matrix sub(m-j, m-j);
    	Matrix subQ(m,m-j);
    	for (int i = j; i<m; i++){
    	//	std::cout<<i<<std::flush<<std::endl;
    		for (int h = j; h<m; h++){
    			sub.set_val(i+1 - j,h+1 - j, R(i+1,h+1));
    		}
    	}

    	for (int i = 0; i<m; i++){
			for (int h = j; h<m; h++){
				subQ.set_val(i+1,h+1-j,Q(i+1,h+1));
			}
		}

    	Matrix w=(u.T());
    	Matrix z= w*sub;
      //  	std::cout<<"here is sub pre   "<<std::endl<< u*z<<std::flush<< std::endl;
    	sub = sub -2.0*(u*z);

    	Vector temp2= ones(m-j);
    	Matrix subeye= diag(temp2);
    	Matrix temp3= subeye -2.0*(u*w);
    	subQ= subQ*(temp3);

      //    	std::cout<<"here is sub post   "<<std::endl<< sub<<std::flush<< std::endl;
    	for (int i = j; i<m; i++){
    		for (int h = j; h<m; h++){
    			R.set_val(i+1,h+1, sub(i+1- j,h+1- j));
    		}
    	}

    	for (int i = 0; i<m; i++){
			for (int h = j; h<m; h++){
				Q.set_val(i+1, h+1, subQ(i+1,h+1-j));
			}
      //std::cout<<j<<"end of for"<<std::endl<<std::flush;
		}

    	// SUBMULTIPLICATION  END  ////////////////////////////

    }
    //    std::cout<< "here is R "<< std::endl<< R<<std::endl<<std::flush;
    //    std::cout<< "here is Q "<< std::endl<< Q<<std::endl<<std::flush;
    //    std::cout<< "here is QR "<< std::endl<< Q*R<<std::endl<<std::flush;

    // Invert Q multiply b with it.
    Matrix QT=Q.T();
    Vector v2=QT* v;
    //BACKWARD SOLVE FOR X
	Vector x(m);
	for (int k=m-1; k>=0; k--){
		x.set_val(k+1, v2(k+1));
		for (int j = k+1; j<m; j++){
			x.set_val(k+1, x(k+1)- R(k+1,j+1)*x(j+1));
			}
		x.set_val(k+1, x(k+1)/R(k+1,k+1));
		}
    //	std::cout<< A*x -v <<std::endl;
	return x;
}

// Assembly:
subq $0x328, %rsp            # imm = 0x328
movq %rdi, 0x108(%rsp)
movq %rdi, %rax
movq %rax, 0x110(%rsp)
movq %rdi, 0x320(%rsp)
movq %rsi, 0x318(%rsp)
movq %rdx, 0x310(%rsp)
movq 0x318(%rsp), %rdi
callq 0x3ac0
movl %eax, 0x118(%rsp)
movq 0x318(%rsp), %rdi
callq 0x3ad0
movl %eax, %ecx
movl 0x118(%rsp), %eax
cmpl %ecx, %eax
jne 0x6f72
jmp 0x6f91
leaq 0x8399(%rip), %rdi      # 0xf312
leaq 0x81c9(%rip), %rsi      # 0xf149
movl $0x1e9, %edx            # imm = 0x1E9
leaq 0x83d6(%rip), %rcx      # 0xf362
callq 0x2090
movq 0x318(%rsp), %rdi
callq 0x3ad0
movl %eax, 0x30c(%rsp)
movq 0x318(%rsp), %rsi
leaq 0x2f8(%rsp), %rdi
callq 0x5010
movl 0x30c(%rsp), %esi
leaq 0x2e8(%rsp), %rdi
callq 0xe3d0
jmp 0x6fd0
leaq 0x2c8(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x4f30
jmp 0x6fe7
movl $0x0, 0x2c4(%rsp)
movl 0x2c4(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7cf4
movl 0x30c(%rsp), %esi
movl 0x2c4(%rsp), %eax
subl %eax, %esi
leaq 0x2b0(%rsp), %rdi
movl $0x1, %edx
callq 0x3560
jmp 0x702a
xorps %xmm0, %xmm0
movsd %xmm0, 0x2a8(%rsp)
movl 0x2c4(%rsp), %eax
movl %eax, 0x2a4(%rsp)
movl 0x2a4(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x71c1
movl 0x2a4(%rsp), %esi
incl %esi
movl 0x2c4(%rsp), %edx
movl %esi, %eax
subl %edx, %eax
movl %eax, 0xfc(%rsp)
incl %edx
leaq 0x2f8(%rsp), %rdi
callq 0x36e0
movq %rax, 0x100(%rsp)
jmp 0x708c
movl 0xfc(%rsp), %esi
movq 0x100(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x2b0(%rsp), %rdi
movl $0x1, %edx
callq 0x47c0
movl 0x2a4(%rsp), %esi
incl %esi
movl 0x2c4(%rsp), %edx
incl %edx
leaq 0x2f8(%rsp), %rdi
callq 0x36e0
movq %rax, 0xf0(%rsp)
jmp 0x70da
movq 0xf0(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xe0(%rsp)
movl 0x2a4(%rsp), %esi
incl %esi
movl 0x2c4(%rsp), %edx
incl %edx
leaq 0x2f8(%rsp), %rdi
callq 0x36e0
movq %rax, 0xe8(%rsp)
jmp 0x7118
movsd 0xe0(%rsp), %xmm0
movq 0xe8(%rsp), %rax
movsd (%rax), %xmm2
movsd 0x2a8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2a8(%rsp)
movl 0x2a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2a4(%rsp)
jmp 0x7044
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x801c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x800f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x8002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7ce2
movsd 0x2a8(%rsp), %xmm0
callq 0x20d0
movsd %xmm0, 0x2a8(%rsp)
leaq 0x2b0(%rsp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x36e0
movq %rax, 0xd8(%rsp)
jmp 0x71f6
movq 0xd8(%rsp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
setae %al
movzbl %al, %eax
movl %eax, 0xcc(%rsp)
leaq 0x2b0(%rsp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x36e0
movq %rax, 0xd0(%rsp)
jmp 0x7234
movl 0xcc(%rsp), %eax
movq 0xd0(%rsp), %rcx
movsd (%rcx), %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
seta %cl
movzbl %cl, %ecx
subl %ecx, %eax
movl %eax, 0x2a0(%rsp)
movl 0x30c(%rsp), %esi
movl 0x2c4(%rsp), %eax
subl %eax, %esi
leaq 0x290(%rsp), %rdi
movl $0x1, %edx
callq 0x3560
jmp 0x7281
leaq 0x290(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
movl $0x1, %edx
movsd 0x7d92(%rip), %xmm0     # 0xf030
movl %edx, %esi
callq 0x47c0
movq 0xc0(%rsp), %rdx
cvtsi2sdl 0x2a0(%rsp), %xmm0
movsd 0x2a8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x268(%rsp)
leaq 0x270(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x4b60
jmp 0x72e3
leaq 0x280(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x2b0(%rsp), %rdx
callq 0x3c80
jmp 0x7302
leaq 0x270(%rsp), %rdi
callq 0x3660
xorps %xmm0, %xmm0
movsd %xmm0, 0x2a8(%rsp)
movl $0x1, 0x264(%rsp)
movl 0x264(%rsp), %eax
movl 0x30c(%rsp), %ecx
subl 0x2c4(%rsp), %ecx
cmpl %ecx, %eax
jg 0x743b
movl 0x264(%rsp), %esi
leaq 0x280(%rsp), %rdi
movl $0x1, %edx
callq 0x36e0
movq %rax, 0xb8(%rsp)
jmp 0x7366
movq 0xb8(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xa8(%rsp)
movl 0x264(%rsp), %esi
leaq 0x280(%rsp), %rdi
movl $0x1, %edx
callq 0x36e0
movq %rax, 0xb0(%rsp)
jmp 0x739e
movsd 0xa8(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movsd (%rax), %xmm2
movsd 0x2a8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x2a8(%rsp)
movl 0x264(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x264(%rsp)
jmp 0x7326
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7cd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x3660
jmp 0x7cd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7cc8
movsd 0x2a8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7454
jp 0x7454
jmp 0x74e5
movsd 0x2a8(%rsp), %xmm0
callq 0x20d0
movaps %xmm0, %xmm1
movsd 0x7bc3(%rip), %xmm0     # 0xf030
divsd %xmm1, %xmm0
movsd %xmm0, 0x248(%rsp)
leaq 0x250(%rsp), %rdi
leaq 0x280(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x4960
jmp 0x7499
leaq 0x280(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x41e0
jmp 0x74b0
leaq 0x250(%rsp), %rdi
callq 0x3660
jmp 0x74e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x3660
jmp 0x7cc8
movl 0x30c(%rsp), %edx
movl 0x2c4(%rsp), %eax
subl %eax, %edx
leaq 0x238(%rsp), %rdi
movl %edx, %esi
callq 0x3560
jmp 0x7506
movl 0x30c(%rsp), %esi
movl 0x2c4(%rsp), %eax
movl %esi, %edx
subl %eax, %edx
leaq 0x228(%rsp), %rdi
callq 0x3560
jmp 0x7527
movl 0x2c4(%rsp), %eax
movl %eax, 0x224(%rsp)
movl 0x224(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7638
movl 0x2c4(%rsp), %eax
movl %eax, 0x220(%rsp)
movl 0x220(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7620
movl 0x224(%rsp), %esi
incl %esi
movl 0x2c4(%rsp), %ecx
movl %esi, %eax
subl %ecx, %eax
movl %eax, 0x98(%rsp)
movl 0x220(%rsp), %edx
incl %edx
movl %edx, %eax
subl %ecx, %eax
movl %eax, 0x9c(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x36e0
movq %rax, 0xa0(%rsp)
jmp 0x75b1
movl 0x9c(%rsp), %edx
movl 0x98(%rsp), %esi
movq 0xa0(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x238(%rsp), %rdi
callq 0x47c0
movl 0x220(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x220(%rsp)
jmp 0x7557
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7cbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7cae
jmp 0x7622
movl 0x224(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x224(%rsp)
jmp 0x7535
movl $0x0, 0x21c(%rsp)
movl 0x21c(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x770c
movl 0x2c4(%rsp), %eax
movl %eax, 0x218(%rsp)
movl 0x218(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x76f4
movl 0x21c(%rsp), %esi
incl %esi
movl %esi, 0x88(%rsp)
movl 0x218(%rsp), %edx
incl %edx
movl 0x2c4(%rsp), %ecx
movl %edx, %eax
subl %ecx, %eax
movl %eax, 0x8c(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0x36e0
movq %rax, 0x90(%rsp)
jmp 0x76b7
movl 0x8c(%rsp), %edx
movl 0x88(%rsp), %esi
movq 0x90(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x228(%rsp), %rdi
callq 0x47c0
movl 0x218(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x218(%rsp)
jmp 0x7665
jmp 0x76f6
movl 0x21c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x21c(%rsp)
jmp 0x7643
leaq 0x208(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x39f0
jmp 0x7723
leaq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rsi
leaq 0x238(%rsp), %rdx
callq 0x45b0
jmp 0x7742
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x1d0(%rsp)
leaq 0x1c0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
leaq 0x1f8(%rsp), %rdx
callq 0x45b0
jmp 0x7773
leaq 0x1d8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
callq 0x4b60
jmp 0x7792
leaq 0x1e8(%rsp), %rdi
leaq 0x238(%rsp), %rsi
leaq 0x1d8(%rsp), %rdx
callq 0x3ff0
jmp 0x77b1
leaq 0x238(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x41e0
jmp 0x77c8
leaq 0x1e8(%rsp), %rdi
callq 0x3660
leaq 0x1d8(%rsp), %rdi
callq 0x3660
leaq 0x1c0(%rsp), %rdi
callq 0x3660
movl 0x30c(%rsp), %esi
movl 0x2c4(%rsp), %eax
subl %eax, %esi
leaq 0x1b0(%rsp), %rdi
callq 0xe3d0
jmp 0x780e
leaq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x4f30
jmp 0x7825
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x178(%rsp)
leaq 0x168(%rsp), %rdi
leaq 0x280(%rsp), %rsi
leaq 0x208(%rsp), %rdx
callq 0x45b0
jmp 0x7856
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0x168(%rsp), %rdx
callq 0x4b60
jmp 0x7875
leaq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
leaq 0x180(%rsp), %rdx
callq 0x3ff0
jmp 0x7894
leaq 0x180(%rsp), %rdi
callq 0x3660
leaq 0x168(%rsp), %rdi
callq 0x3660
leaq 0x158(%rsp), %rdi
leaq 0x228(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0x45b0
jmp 0x78cd
leaq 0x228(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x41e0
jmp 0x78e4
leaq 0x158(%rsp), %rdi
callq 0x3660
movl 0x2c4(%rsp), %eax
movl %eax, 0x154(%rsp)
movl 0x154(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7b18
movl 0x2c4(%rsp), %eax
movl %eax, 0x150(%rsp)
movl 0x150(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7b00
movl 0x154(%rsp), %esi
incl %esi
movl %esi, 0x78(%rsp)
movl 0x150(%rsp), %edx
incl %edx
movl %edx, 0x7c(%rsp)
movl 0x2c4(%rsp), %eax
subl %eax, %esi
subl %eax, %edx
leaq 0x238(%rsp), %rdi
callq 0x36e0
movq %rax, 0x80(%rsp)
jmp 0x7971
movl 0x7c(%rsp), %edx
movl 0x78(%rsp), %esi
movq 0x80(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x2f8(%rsp), %rdi
callq 0x47c0
movl 0x150(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x150(%rsp)
jmp 0x7921
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7ca1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7c94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7a34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7a27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x3660
leaq 0x1d8(%rsp), %rdi
callq 0x3660
leaq 0x1c0(%rsp), %rdi
callq 0x3660
jmp 0x7c94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7c87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7c7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7aaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x3660
leaq 0x168(%rsp), %rdi
callq 0x3660
jmp 0x7c7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7c6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x3660
jmp 0x7c6d
jmp 0x7b02
movl 0x154(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x154(%rsp)
jmp 0x78ff
movl $0x0, 0x14c(%rsp)
movl 0x14c(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7bd5
movl 0x2c4(%rsp), %eax
movl %eax, 0x148(%rsp)
movl 0x148(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7bbd
movl 0x14c(%rsp), %esi
incl %esi
movl %esi, 0x68(%rsp)
movl 0x148(%rsp), %edx
incl %edx
movl %edx, 0x6c(%rsp)
movl 0x2c4(%rsp), %eax
subl %eax, %edx
leaq 0x228(%rsp), %rdi
callq 0x36e0
movq %rax, 0x70(%rsp)
jmp 0x7b8c
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %esi
movq 0x70(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x2c8(%rsp), %rdi
callq 0x47c0
movl 0x148(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x148(%rsp)
jmp 0x7b45
jmp 0x7bbf
movl 0x14c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14c(%rsp)
jmp 0x7b23
leaq 0x190(%rsp), %rdi
callq 0x3660
leaq 0x1a0(%rsp), %rdi
callq 0x3660
leaq 0x1b0(%rsp), %rdi
callq 0xd170
leaq 0x1f8(%rsp), %rdi
callq 0x3660
leaq 0x208(%rsp), %rdi
callq 0x3660
leaq 0x228(%rsp), %rdi
callq 0x3660
leaq 0x238(%rsp), %rdi
callq 0x3660
leaq 0x280(%rsp), %rdi
callq 0x3660
leaq 0x290(%rsp), %rdi
callq 0x3660
leaq 0x2b0(%rsp), %rdi
callq 0x3660
movl 0x2c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c4(%rsp)
jmp 0x6ff2
leaq 0x190(%rsp), %rdi
callq 0x3660
leaq 0x1a0(%rsp), %rdi
callq 0x3660
leaq 0x1b0(%rsp), %rdi
callq 0xd170
leaq 0x1f8(%rsp), %rdi
callq 0x3660
leaq 0x208(%rsp), %rdi
callq 0x3660
leaq 0x228(%rsp), %rdi
callq 0x3660
leaq 0x238(%rsp), %rdi
callq 0x3660
leaq 0x280(%rsp), %rdi
callq 0x3660
leaq 0x290(%rsp), %rdi
callq 0x3660
leaq 0x2b0(%rsp), %rdi
callq 0x3660
jmp 0x8002
leaq 0x138(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x39f0
jmp 0x7d0b
movq 0x310(%rsp), %rdx
leaq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x4800
jmp 0x7d2a
movq 0x108(%rsp), %rdi
movb $0x0, 0x127(%rsp)
movl 0x30c(%rsp), %esi
callq 0xd040
jmp 0x7d48
movl 0x30c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x120(%rsp)
cmpl $0x0, 0x120(%rsp)
jl 0x7f78
movl 0x120(%rsp), %esi
incl %esi
movl %esi, 0x5c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0xdee0
movq %rax, 0x60(%rsp)
jmp 0x7d88
movl 0x5c(%rsp), %esi
movq 0x108(%rsp), %rdi
movq 0x60(%rsp), %rax
movsd (%rax), %xmm0
callq 0xe480
jmp 0x7da4
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x7eeb
movq 0x108(%rsp), %rdi
movl 0x120(%rsp), %esi
incl %esi
movl %esi, 0x4c(%rsp)
callq 0xdee0
movq %rax, 0x50(%rsp)
jmp 0x7dea
movq 0x50(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x120(%rsp), %esi
incl %esi
movl 0x11c(%rsp), %edx
incl %edx
leaq 0x2f8(%rsp), %rdi
callq 0x36e0
movq %rax, 0x40(%rsp)
jmp 0x7e1f
movq 0x108(%rsp), %rdi
movq 0x40(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x11c(%rsp), %esi
incl %esi
callq 0xdee0
movq %rax, 0x30(%rsp)
jmp 0x7e4b
movl 0x4c(%rsp), %esi
movq 0x108(%rsp), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movq 0x30(%rsp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
callq 0xe480
jmp 0x7e7b
jmp 0x7e7d
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0x7db5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7ff5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
jmp 0x7fe8
movq 0x108(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2e0(%rsp)
movl %eax, 0x2dc(%rsp)
callq 0xd170
jmp 0x7fe8
movq 0x108(%rsp), %rdi
movl 0x120(%rsp), %esi
incl %esi
movl %esi, 0x1c(%rsp)
callq 0xdee0
movq %rax, 0x20(%rsp)
jmp 0x7f0c
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x120(%rsp), %edx
incl %edx
leaq 0x2f8(%rsp), %rdi
movl %edx, %esi
callq 0x36e0
movq %rax, 0x10(%rsp)
jmp 0x7f3a
movl 0x1c(%rsp), %esi
movq 0x108(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movq 0x10(%rsp), %rax
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0xe480
jmp 0x7f60
jmp 0x7f62
movl 0x120(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x7d59
movb $0x1, 0x127(%rsp)
testb $0x1, 0x127(%rsp)
jne 0x7f97
movq 0x108(%rsp), %rdi
callq 0xd170
leaq 0x128(%rsp), %rdi
callq 0xd170
leaq 0x138(%rsp), %rdi
callq 0x3660
leaq 0x2c8(%rsp), %rdi
callq 0x3660
leaq 0x2e8(%rsp), %rdi
callq 0xd170
leaq 0x2f8(%rsp), %rdi
callq 0x3660
movq 0x110(%rsp), %rax
addq $0x328, %rsp            # imm = 0x328
retq
leaq 0x128(%rsp), %rdi
callq 0xd170
leaq 0x138(%rsp), %rdi
callq 0x3660
leaq 0x2c8(%rsp), %rdi
callq 0x3660
leaq 0x2e8(%rsp), %rdi
callq 0xd170
leaq 0x2f8(%rsp), %rdi
callq 0x3660
movq 0x2e0(%rsp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)