// File: yukimasano[P]cpp_matrix/Matrix.cpp
// Function: QRsolve2(Matrix&, Vector&)
Vector QRsolve2(Matrix& A, Vector& bb){
	assert(nrows(A) == ncols(A));
	int m = ncols(A);
  Matrix A2 = A;
  Vector b=bb;
	Matrix V(m-1,m-1);
	for (int k=0; k<m ;k++){
		Vector xx(m-k);
    //std::cout<<k<<xx<<std::flush<<std::endl;
		for (int j=1;j<=m-k; j++){
			xx.set_val(j, A(j+k,k+1));
		}
		//std::cout<<xx<<std::endl<<std::flush;
		Vector vk(m-k);

		double len =xx.norm();
		vk.set_val(1,len);
    //std::cout<<k<<vk<<std::endl<<std::flush;
    //std::cout<<k<<xx.norm()<<std::endl<<std::flush;


		vk = vk+ xx;
    if (vk.norm()!=0){
		    vk = vk / vk.norm();
    }
		Matrix A_sub(m-k,m-k);
    	for (int i = k; i<m; i++){
    		for (int h = k; h<m; h++){
    			A_sub.set_val(i-k+1,h-k+1, A(i+1,h+1));
    		}
    	}
    //std::cout<<k<<A<<std::endl<<std::flush;
    	//std::cout<<A_sub<<std::endl<<std::flush;
		Matrix vk2(m-k,1);
		for (int jj=1 ; jj<=m-k;jj++){
			vk2.set_val(jj,1, vk(jj));
		}
		Matrix vk2T= vk2.T();
		Matrix vk3 = vk2T*A_sub;
		//std::cout<<vk2<<std::endl<<std::flush;
		Matrix A_sub2 = vk2*vk3;


		A_sub2 = 2*A_sub2;
		A_sub2 = A_sub - A_sub2;
		//std::cout<<A<<std::endl<<std::flush;

		for (int j = k; j<m; j++){
			for (int h=k; h<m; h++){
				A2.set_val(j+1,h+1,A_sub2(j+1-k, h+1-k) );
			}
		}
		Vector bk2(m-k);
		for (int jj=k ; jj<m;jj++){
			bk2.set_val(jj+1-k,b(jj+1));
		}
		Vector bk3  =  vk;
		double temp = (vk*bk2);
		//std::cout<<temp<<std::endl<<std::flush;
		bk3 = temp*vk;
		bk3 = 2*bk3;
		bk3 = bk2 - bk3;
		for (int jj=k ; jj<m;jj++){
			b.set_val(jj+1, bk3(jj-k+1));
		}
		for (int j=1; j<=m-k-1; j++){
			V.set_val(j,k+1,vk(j));
		}
	}
	//std::cout<<b<<std::endl<<std::flush;
	Vector x(m);
	/// BACKSOLving////////
	for (int k=m-1; k>=0; k--){
		x.set_val(k+1, b(k+1));
		for (int j = k+1; j<m; j++){
			x.set_val(k+1, x(k+1)- A2(k+1,j+1)*x(j+1));
			}
		x.set_val(k+1, x(k+1)/A2(k+1,k+1));
		}
	return x;
}

// Assembly:
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, 0xf8(%rsp)
movq %rdi, %rax
movq %rax, 0x100(%rsp)
movq %rdi, 0x2d0(%rsp)
movq %rsi, 0x2c8(%rsp)
movq %rdx, 0x2c0(%rsp)
movq 0x2c8(%rsp), %rdi
callq 0x3ac0
movl %eax, 0x108(%rsp)
movq 0x2c8(%rsp), %rdi
callq 0x3ad0
movl %eax, %ecx
movl 0x108(%rsp), %eax
cmpl %ecx, %eax
jne 0x80a2
jmp 0x80c1
leaq 0x7269(%rip), %rdi      # 0xf312
leaq 0x7099(%rip), %rsi      # 0xf149
movl $0x248, %edx            # imm = 0x248
leaq 0x72c9(%rip), %rcx      # 0xf385
callq 0x2090
movq 0x2c8(%rsp), %rdi
callq 0x3ad0
movl %eax, 0x2bc(%rsp)
movq 0x2c8(%rsp), %rsi
leaq 0x2a8(%rsp), %rdi
callq 0x5010
movq 0x2c0(%rsp), %rsi
leaq 0x298(%rsp), %rdi
callq 0xd0d0
jmp 0x8101
movl 0x2bc(%rsp), %edx
decl %edx
leaq 0x278(%rsp), %rdi
movl %edx, %esi
callq 0x3560
jmp 0x811b
movl $0x0, 0x274(%rsp)
movl 0x274(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8cc8
movl 0x2bc(%rsp), %esi
movl 0x274(%rsp), %eax
subl %eax, %esi
leaq 0x260(%rsp), %rdi
callq 0xd040
jmp 0x8159
movl $0x1, 0x25c(%rsp)
movl 0x25c(%rsp), %eax
movl 0x2bc(%rsp), %ecx
subl 0x274(%rsp), %ecx
cmpl %ecx, %eax
jg 0x824f
movl 0x25c(%rsp), %esi
movl %esi, 0xec(%rsp)
movq 0x2c8(%rsp), %rdi
movl 0x274(%rsp), %edx
addl %edx, %esi
incl %edx
callq 0x36e0
movq %rax, 0xf0(%rsp)
jmp 0x81b1
movl 0xec(%rsp), %esi
movq 0xf0(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x260(%rsp), %rdi
callq 0xe480
jmp 0x81d3
jmp 0x81d5
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
jmp 0x8164
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8f54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8f47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8f3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8cb6
movl 0x2bc(%rsp), %esi
movl 0x274(%rsp), %eax
subl %eax, %esi
leaq 0x248(%rsp), %rdi
callq 0xd040
jmp 0x826e
leaq 0x260(%rsp), %rdi
movl $0x2, %esi
callq 0xe320
movsd %xmm0, 0xe0(%rsp)
jmp 0x828b
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x240(%rsp)
movsd 0x240(%rsp), %xmm0
leaq 0x248(%rsp), %rdi
movl $0x1, %esi
callq 0xe480
jmp 0x82ba
leaq 0x230(%rsp), %rdi
leaq 0x248(%rsp), %rsi
leaq 0x260(%rsp), %rdx
callq 0xd1a0
jmp 0x82d9
leaq 0x248(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0xdc70
jmp 0x82f0
leaq 0x230(%rsp), %rdi
callq 0xd170
leaq 0x248(%rsp), %rdi
movl $0x2, %esi
callq 0xe320
movsd %xmm0, 0xd8(%rsp)
jmp 0x831a
movsd 0xd8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8333
jp 0x8333
jmp 0x840c
leaq 0x248(%rsp), %rdi
movl $0x2, %esi
callq 0xe320
movsd %xmm0, 0xd0(%rsp)
jmp 0x8350
movsd 0xd0(%rsp), %xmm0
movsd %xmm0, 0x218(%rsp)
leaq 0x220(%rsp), %rdi
leaq 0x248(%rsp), %rsi
leaq 0x218(%rsp), %rdx
callq 0xd9c0
jmp 0x8381
leaq 0x248(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0xdc70
jmp 0x8398
leaq 0x220(%rsp), %rdi
callq 0xd170
jmp 0x840c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8ca9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x230(%rsp), %rdi
callq 0xd170
jmp 0x8ca9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x220(%rsp), %rdi
callq 0xd170
jmp 0x8ca9
movl 0x2bc(%rsp), %edx
movl 0x274(%rsp), %eax
subl %eax, %edx
leaq 0x208(%rsp), %rdi
movl %edx, %esi
callq 0x3560
jmp 0x842d
movl 0x274(%rsp), %eax
movl %eax, 0x204(%rsp)
movl 0x204(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8529
movl 0x274(%rsp), %eax
movl %eax, 0x200(%rsp)
movl 0x200(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8511
movl 0x204(%rsp), %esi
movl 0x274(%rsp), %ecx
movl %esi, %eax
subl %ecx, %eax
incl %eax
movl %eax, 0xc0(%rsp)
movl 0x200(%rsp), %edx
movl %edx, %eax
subl %ecx, %eax
incl %eax
movl %eax, 0xc4(%rsp)
movq 0x2c8(%rsp), %rdi
incl %esi
incl %edx
callq 0x36e0
movq %rax, 0xc8(%rsp)
jmp 0x84bb
movl 0xc4(%rsp), %edx
movl 0xc0(%rsp), %esi
movq 0xc8(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x208(%rsp), %rdi
callq 0x47c0
movl 0x200(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x200(%rsp)
jmp 0x845d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c9c
jmp 0x8513
movl 0x204(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x204(%rsp)
jmp 0x843b
movl 0x2bc(%rsp), %esi
movl 0x274(%rsp), %eax
subl %eax, %esi
leaq 0x1f0(%rsp), %rdi
movl $0x1, %edx
callq 0x3560
jmp 0x854d
movl $0x1, 0x1ec(%rsp)
movl 0x1ec(%rsp), %eax
movl 0x2bc(%rsp), %ecx
subl 0x274(%rsp), %ecx
cmpl %ecx, %eax
jg 0x85e7
movl 0x1ec(%rsp), %esi
movl %esi, 0xb4(%rsp)
leaq 0x248(%rsp), %rdi
callq 0xdee0
movq %rax, 0xb8(%rsp)
jmp 0x8596
movl 0xb4(%rsp), %esi
movq 0xb8(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x1f0(%rsp), %rdi
movl $0x1, %edx
callq 0x47c0
movl 0x1ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1ec(%rsp)
jmp 0x8558
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c8f
leaq 0x1d8(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x39f0
jmp 0x85fe
leaq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
leaq 0x208(%rsp), %rdx
callq 0x45b0
jmp 0x861d
leaq 0x1b8(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
leaq 0x1c8(%rsp), %rdx
callq 0x45b0
jmp 0x863c
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x1a0(%rsp)
leaq 0x1a8(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
leaq 0x1b8(%rsp), %rdx
callq 0x4b60
jmp 0x866d
leaq 0x1b8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x41e0
jmp 0x8684
leaq 0x1a8(%rsp), %rdi
callq 0x3660
leaq 0x190(%rsp), %rdi
leaq 0x208(%rsp), %rsi
leaq 0x1b8(%rsp), %rdx
callq 0x3ff0
jmp 0x86b0
leaq 0x1b8(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x41e0
jmp 0x86c7
leaq 0x190(%rsp), %rdi
callq 0x3660
movl 0x274(%rsp), %eax
movl %eax, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8846
movl 0x274(%rsp), %eax
movl %eax, 0x188(%rsp)
movl 0x188(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x882e
movl 0x18c(%rsp), %esi
incl %esi
movl %esi, 0xa0(%rsp)
movl 0x188(%rsp), %edx
incl %edx
movl %edx, 0xa4(%rsp)
movl 0x274(%rsp), %eax
subl %eax, %esi
subl %eax, %edx
leaq 0x1b8(%rsp), %rdi
callq 0x36e0
movq %rax, 0xa8(%rsp)
jmp 0x875a
movl 0xa4(%rsp), %edx
movl 0xa0(%rsp), %esi
movq 0xa8(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x2a8(%rsp), %rdi
callq 0x47c0
movl 0x188(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x188(%rsp)
jmp 0x8704
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x3660
jmp 0x8c68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x3660
jmp 0x8c68
jmp 0x8830
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x86e2
movl 0x2bc(%rsp), %esi
movl 0x274(%rsp), %eax
subl %eax, %esi
leaq 0x178(%rsp), %rdi
callq 0xd040
jmp 0x8865
movl 0x274(%rsp), %eax
movl %eax, 0x174(%rsp)
movl 0x174(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8909
movl 0x174(%rsp), %esi
incl %esi
movl 0x274(%rsp), %ecx
movl %esi, %eax
subl %ecx, %eax
movl %eax, 0x94(%rsp)
leaq 0x298(%rsp), %rdi
callq 0xdee0
movq %rax, 0x98(%rsp)
jmp 0x88b9
movl 0x94(%rsp), %esi
movq 0x98(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x178(%rsp), %rdi
callq 0xe480
jmp 0x88db
jmp 0x88dd
movl 0x174(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x174(%rsp)
jmp 0x8873
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c5b
leaq 0x160(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0xd0d0
jmp 0x8920
leaq 0x248(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0xd740
movsd %xmm0, 0x88(%rsp)
jmp 0x8940
movsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x158(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0xd910
jmp 0x8971
leaq 0x160(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0xdc70
jmp 0x8988
leaq 0x148(%rsp), %rdi
callq 0xd170
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x130(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0xd910
jmp 0x89c6
leaq 0x160(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xdc70
jmp 0x89dd
leaq 0x138(%rsp), %rdi
callq 0xd170
leaq 0x120(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0xd470
jmp 0x8a09
leaq 0x160(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xdc70
jmp 0x8a20
leaq 0x120(%rsp), %rdi
callq 0xd170
movl 0x274(%rsp), %eax
movl %eax, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8b3f
movl 0x11c(%rsp), %esi
movl %esi, %eax
incl %eax
movl %eax, 0x7c(%rsp)
movl 0x274(%rsp), %eax
subl %eax, %esi
incl %esi
leaq 0x160(%rsp), %rdi
callq 0xdee0
movq %rax, 0x80(%rsp)
jmp 0x8a80
movl 0x7c(%rsp), %esi
movq 0x80(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x298(%rsp), %rdi
callq 0xe480
jmp 0x8a9f
jmp 0x8aa1
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0x8a3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
jmp 0x8c4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x148(%rsp), %rdi
callq 0xd170
jmp 0x8c4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xd170
jmp 0x8c4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
leaq 0x120(%rsp), %rdi
callq 0xd170
jmp 0x8c4e
movl $0x1, 0x118(%rsp)
movl 0x118(%rsp), %eax
movl 0x2bc(%rsp), %ecx
subl 0x274(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x8bc3
movl 0x118(%rsp), %esi
movl %esi, 0x68(%rsp)
movl 0x274(%rsp), %eax
incl %eax
movl %eax, 0x6c(%rsp)
leaq 0x248(%rsp), %rdi
callq 0xdee0
movq %rax, 0x70(%rsp)
jmp 0x8b92
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %esi
movq 0x70(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x278(%rsp), %rdi
callq 0x47c0
movl 0x118(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x118(%rsp)
jmp 0x8b4a
leaq 0x160(%rsp), %rdi
callq 0xd170
leaq 0x178(%rsp), %rdi
callq 0xd170
leaq 0x1b8(%rsp), %rdi
callq 0x3660
leaq 0x1c8(%rsp), %rdi
callq 0x3660
leaq 0x1d8(%rsp), %rdi
callq 0x3660
leaq 0x1f0(%rsp), %rdi
callq 0x3660
leaq 0x208(%rsp), %rdi
callq 0x3660
leaq 0x248(%rsp), %rdi
callq 0xd170
leaq 0x260(%rsp), %rdi
callq 0xd170
movl 0x274(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x274(%rsp)
jmp 0x8126
leaq 0x160(%rsp), %rdi
callq 0xd170
leaq 0x178(%rsp), %rdi
callq 0xd170
leaq 0x1b8(%rsp), %rdi
callq 0x3660
leaq 0x1c8(%rsp), %rdi
callq 0x3660
leaq 0x1d8(%rsp), %rdi
callq 0x3660
leaq 0x1f0(%rsp), %rdi
callq 0x3660
leaq 0x208(%rsp), %rdi
callq 0x3660
leaq 0x248(%rsp), %rdi
callq 0xd170
leaq 0x260(%rsp), %rdi
callq 0xd170
jmp 0x8f3a
movq 0xf8(%rsp), %rdi
movb $0x0, 0x117(%rsp)
movl 0x2bc(%rsp), %esi
callq 0xd040
jmp 0x8ce6
movl 0x2bc(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x110(%rsp)
cmpl $0x0, 0x110(%rsp)
jl 0x8ee4
movl 0x110(%rsp), %esi
incl %esi
movl %esi, 0x5c(%rsp)
leaq 0x298(%rsp), %rdi
callq 0xdee0
movq %rax, 0x60(%rsp)
jmp 0x8d26
movl 0x5c(%rsp), %esi
movq 0xf8(%rsp), %rdi
movq 0x60(%rsp), %rax
movsd (%rax), %xmm0
callq 0xe480
jmp 0x8d42
movl 0x110(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
movl 0x10c(%rsp), %eax
cmpl 0x2bc(%rsp), %eax
jge 0x8e57
movq 0xf8(%rsp), %rdi
movl 0x110(%rsp), %esi
incl %esi
movl %esi, 0x4c(%rsp)
callq 0xdee0
movq %rax, 0x50(%rsp)
jmp 0x8d88
movq 0x50(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x110(%rsp), %esi
incl %esi
movl 0x10c(%rsp), %edx
incl %edx
leaq 0x2a8(%rsp), %rdi
callq 0x36e0
movq %rax, 0x40(%rsp)
jmp 0x8dbd
movq 0xf8(%rsp), %rdi
movq 0x40(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x10c(%rsp), %esi
incl %esi
callq 0xdee0
movq %rax, 0x30(%rsp)
jmp 0x8de9
movl 0x4c(%rsp), %esi
movq 0xf8(%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 0x8e19
jmp 0x8e1b
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0x8d53
movq 0xf8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x290(%rsp)
movl %eax, 0x28c(%rsp)
callq 0xd170
jmp 0x8f3a
movq 0xf8(%rsp), %rdi
movl 0x110(%rsp), %esi
incl %esi
movl %esi, 0x1c(%rsp)
callq 0xdee0
movq %rax, 0x20(%rsp)
jmp 0x8e78
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x110(%rsp), %edx
incl %edx
leaq 0x2a8(%rsp), %rdi
movl %edx, %esi
callq 0x36e0
movq %rax, 0x10(%rsp)
jmp 0x8ea6
movl 0x1c(%rsp), %esi
movq 0xf8(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movq 0x10(%rsp), %rax
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0xe480
jmp 0x8ecc
jmp 0x8ece
movl 0x110(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x110(%rsp)
jmp 0x8cf7
movb $0x1, 0x117(%rsp)
testb $0x1, 0x117(%rsp)
jne 0x8f03
movq 0xf8(%rsp), %rdi
callq 0xd170
leaq 0x278(%rsp), %rdi
callq 0x3660
leaq 0x298(%rsp), %rdi
callq 0xd170
leaq 0x2a8(%rsp), %rdi
callq 0x3660
movq 0x100(%rsp), %rax
addq $0x2d8, %rsp            # imm = 0x2D8
retq
leaq 0x278(%rsp), %rdi
callq 0x3660
leaq 0x298(%rsp), %rdi
callq 0xd170
leaq 0x2a8(%rsp), %rdi
callq 0x3660
movq 0x290(%rsp), %rdi
callq 0x21e0
nop