// File: IlanPrice[P]Linear-Algebra-Library-in-Cplusplus/Matrix.cpp
// Function: GMRES(Matrix const&, Vector const&)
Vector GMRES(const Matrix& A, const Vector& b)
{
	std::ofstream GMRESres;
	GMRESres.open("GMRESres.txt");
	int n = length(b);
	Vector x(n);
	Vector temp1 = A*x;
	Vector r = b - temp1;
	double norm_r = norm(r);
	GMRESres << std::setprecision(15) << norm_r << "\n";
	double norm_r0 = norm_r;
	Vector v = r/norm_r;
	Matrix V(length(v),n);
	Matrix H(n+1,n);
	Vector r_e1(n+1);
	r_e1(1) = norm_r0;
	Matrix G = eye(n+1);
	V.setElements(1,n,1,1,v);

	double Tol = 1e-14;
	int k=0;
	while (norm_r > Tol)
		{
			k = k+1;
			Vector v_k = V.getElements(1,n,k,k,"Vector");
			Vector w = A*v_k;
			for (int j = 1; j<=k; j++)
			{
				Vector v_j = V.getElements(1,n,j,j,"Vector");
				double h = v_j*w;
				H(j,k) = h;
				w = w - h*v_j;
			}
			double hplus = norm(w);
			H(k+1,k) = hplus;
			if (hplus<1e-13)
			{break;}
			else
			{
				Vector v_kplus1 = w/hplus;
				V.setElements(1,n,k+1,k+1,v_kplus1);
				Matrix Hhat = H.getElements(1,(k+1),1,k);
				Hhat = G.getElements(1,k+1,1,k+1)*Hhat;
				std::pair<double,double> g = givens(Hhat(k,k),Hhat(k+1,k));
				double gcos = g.first; double gsin = g.second;
				G.applygivens(k,k+1,gcos,gsin);
				norm_r = std::abs(norm_r*gsin);
				GMRESres << std::setprecision(15) << norm_r << "\n";
			}

		}

		r_e1.setValues(1,k+1,G.getElements(1,k+1,1,k+1)*r_e1.getValues(1,k+1));
		H.setElements(1,k+1,1,k, G.getElements(1,k+1,1,k+1)*H.getElements(1,(k+1),1,k));
		Vector y = backsubst(H.getElements(1,k,1,k),r_e1.getValues(1,k));
		Vector xfinal = temp1 + V.getElements(1,n,1,k)*y;
		GMRESres.close();
		return xfinal;
}

// Assembly:
subq $0x618, %rsp            # imm = 0x618
movq %rdi, 0x130(%rsp)
movq %rdi, %rax
movq %rax, 0x138(%rsp)
movq %rdi, 0x610(%rsp)
movq %rsi, 0x608(%rsp)
movq %rdx, 0x600(%rsp)
leaq 0x400(%rsp), %rdi
movq %rdi, 0x140(%rsp)
callq 0x2170
movq 0x140(%rsp), %rdi
leaq 0x77bb(%rip), %rsi      # 0x125a1
movl $0x10, %edx
callq 0x2050
jmp 0xadf2
movq 0x600(%rsp), %rdi
callq 0x4090
movl %eax, 0x12c(%rsp)
jmp 0xae08
movl 0x12c(%rsp), %eax
movl %eax, 0x3f0(%rsp)
movl 0x3f0(%rsp), %esi
leaq 0x3e0(%rsp), %rdi
callq 0x2d70
jmp 0xae2c
movq 0x608(%rsp), %rsi
leaq 0x3d0(%rsp), %rdi
leaq 0x3e0(%rsp), %rdx
callq 0x6f70
jmp 0xae4b
movq 0x600(%rsp), %rsi
leaq 0x3c0(%rsp), %rdi
leaq 0x3d0(%rsp), %rdx
callq 0x31a0
jmp 0xae6a
leaq 0x3c0(%rsp), %rdi
movl $0x2, %esi
callq 0x3fe0
movsd %xmm0, 0x120(%rsp)
jmp 0xae87
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0x3b8(%rsp)
movl $0xf, %edi
callq 0x10e10
movl %eax, 0x11c(%rsp)
jmp 0xaeac
movl 0x11c(%rsp), %eax
movl %eax, 0x3b4(%rsp)
movl 0x3b4(%rsp), %esi
leaq 0x400(%rsp), %rdi
callq 0x2160
movq %rax, 0x110(%rsp)
jmp 0xaed8
movq 0x110(%rsp), %rdi
movsd 0x3b8(%rsp), %xmm0
callq 0x21d0
movq %rax, 0x108(%rsp)
jmp 0xaef8
movq 0x108(%rsp), %rdi
leaq 0x73a3(%rip), %rsi      # 0x122aa
callq 0x20e0
jmp 0xaf0e
movsd 0x3b8(%rsp), %xmm0
movsd %xmm0, 0x3a8(%rsp)
leaq 0x398(%rsp), %rdi
leaq 0x3c0(%rsp), %rsi
leaq 0x3b8(%rsp), %rdx
callq 0x36f0
jmp 0xaf3f
leaq 0x398(%rsp), %rdi
callq 0x4090
movl %eax, 0x104(%rsp)
jmp 0xaf55
movl 0x104(%rsp), %esi
movl 0x3f0(%rsp), %edx
leaq 0x388(%rsp), %rdi
callq 0x4e80
jmp 0xaf72
movl 0x3f0(%rsp), %edx
movl %edx, %esi
incl %esi
leaq 0x378(%rsp), %rdi
callq 0x4e80
jmp 0xaf8c
movl 0x3f0(%rsp), %esi
incl %esi
leaq 0x368(%rsp), %rdi
callq 0x2d70
jmp 0xafa4
movsd 0x3a8(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
leaq 0x368(%rsp), %rdi
movl $0x1, %esi
callq 0x3ee0
movq %rax, 0xf8(%rsp)
jmp 0xafd2
movq 0xf8(%rsp), %rax
movsd 0xf0(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x3f0(%rsp), %esi
incl %esi
leaq 0x358(%rsp), %rdi
callq 0xa210
jmp 0xafff
movl 0x3f0(%rsp), %eax
movl %eax, 0xec(%rsp)
leaq 0x348(%rsp), %rdi
leaq 0x398(%rsp), %rsi
callq 0x2e00
jmp 0xb024
movl 0xec(%rsp), %edx
leaq 0x388(%rsp), %rdi
movl $0x1, %r8d
leaq 0x348(%rsp), %r9
movl %r8d, %esi
movl %r8d, %ecx
callq 0x6340
jmp 0xb04e
leaq 0x348(%rsp), %rdi
callq 0x2ea0
movsd 0x7255(%rip), %xmm0     # 0x122b8
movsd %xmm0, 0x340(%rsp)
movl $0x0, 0x33c(%rsp)
movsd 0x3b8(%rsp), %xmm0
ucomisd 0x340(%rsp), %xmm0
jbe 0xb9d5
movl 0x33c(%rsp), %eax
incl %eax
movl %eax, 0x33c(%rsp)
movl 0x3f0(%rsp), %eax
movl %eax, 0xd4(%rsp)
movl 0x33c(%rsp), %eax
movl %eax, 0xd8(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0x307(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x21c0
movq 0xe0(%rsp), %rdx
leaq 0x74c8(%rip), %rsi      # 0x125ae
leaq 0x308(%rsp), %rdi
callq 0x2110
jmp 0xb0f5
movl 0xd8(%rsp), %r9d
movl 0xdc(%rsp), %r8d
movl 0xd4(%rsp), %ecx
movq %rsp, %rax
leaq 0x308(%rsp), %rdx
movq %rdx, (%rax)
leaq 0x328(%rsp), %rdi
leaq 0x388(%rsp), %rsi
movl $0x1, %edx
callq 0x5870
jmp 0xb136
leaq 0x308(%rsp), %rdi
callq 0x2080
leaq 0x307(%rsp), %rdi
callq 0x20f0
movq 0x608(%rsp), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0x328(%rsp), %rdx
callq 0x6f70
jmp 0xb16f
movl $0x1, 0x2ec(%rsp)
movl 0x2ec(%rsp), %eax
cmpl 0x33c(%rsp), %eax
jg 0xb56d
movl 0x3f0(%rsp), %eax
movl %eax, 0xbc(%rsp)
movl 0x2ec(%rsp), %eax
movl %eax, 0xc0(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x2b7(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x21c0
movq 0xc8(%rsp), %rdx
leaq 0x73d9(%rip), %rsi      # 0x125ae
leaq 0x2b8(%rsp), %rdi
callq 0x2110
jmp 0xb1e4
movl 0xc0(%rsp), %r9d
movl 0xc4(%rsp), %r8d
movl 0xbc(%rsp), %ecx
movq %rsp, %rax
leaq 0x2b8(%rsp), %rdx
movq %rdx, (%rax)
leaq 0x2d8(%rsp), %rdi
leaq 0x388(%rsp), %rsi
movl $0x1, %edx
callq 0x5870
jmp 0xb225
leaq 0x2b8(%rsp), %rdi
callq 0x2080
leaq 0x2b7(%rsp), %rdi
callq 0x20f0
leaq 0x2d8(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0x3470
movsd %xmm0, 0xb0(%rsp)
jmp 0xb25f
movsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0x2a8(%rsp)
movsd 0x2a8(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movl 0x2ec(%rsp), %esi
movl 0x33c(%rsp), %edx
leaq 0x378(%rsp), %rdi
callq 0x96e0
movq %rax, 0xa8(%rsp)
jmp 0xb2a8
movq 0xa8(%rsp), %rax
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x288(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
leaq 0x2d8(%rsp), %rdx
callq 0x3640
jmp 0xb2dc
leaq 0x298(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x31a0
jmp 0xb2fb
leaq 0x2f0(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x39a0
jmp 0xb312
leaq 0x298(%rsp), %rdi
callq 0x2ea0
leaq 0x288(%rsp), %rdi
callq 0x2ea0
leaq 0x2d8(%rsp), %rdi
callq 0x2ea0
movl 0x2ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2ec(%rsp)
jmp 0xb17a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x2ea0
jmp 0xbf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb48d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x2080
leaq 0x307(%rsp), %rdi
callq 0x20f0
jmp 0xbf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb9c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb4ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x2080
leaq 0x2b7(%rsp), %rdi
callq 0x20f0
jmp 0xb9b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb55b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb54e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x298(%rsp), %rdi
callq 0x2ea0
leaq 0x288(%rsp), %rdi
callq 0x2ea0
leaq 0x2d8(%rsp), %rdi
callq 0x2ea0
jmp 0xb9b6
leaq 0x2f0(%rsp), %rdi
movl $0x2, %esi
callq 0x3fe0
movsd %xmm0, 0x98(%rsp)
jmp 0xb58a
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x280(%rsp)
movsd 0x280(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movl 0x33c(%rsp), %edx
movl %edx, %esi
incl %esi
leaq 0x378(%rsp), %rdi
callq 0x96e0
movq %rax, 0x90(%rsp)
jmp 0xb5d0
movq 0x90(%rsp), %rax
movsd 0x88(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x6cd3(%rip), %xmm0     # 0x122c0
ucomisd 0x280(%rsp), %xmm0
jbe 0xb621
movl $0x3, 0x27c(%rsp)
jmp 0xb988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb9b6
leaq 0x268(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
leaq 0x280(%rsp), %rdx
callq 0x36f0
jmp 0xb640
movl 0x3f0(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl 0x33c(%rsp), %eax
incl %eax
movl %eax, 0x80(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x258(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x2e00
jmp 0xb679
movl 0x80(%rsp), %r8d
movl 0x84(%rsp), %ecx
movl 0x7c(%rsp), %edx
leaq 0x388(%rsp), %rdi
movl $0x1, %esi
leaq 0x258(%rsp), %r9
callq 0x6340
jmp 0xb6a8
leaq 0x258(%rsp), %rdi
callq 0x2ea0
movl 0x33c(%rsp), %r9d
movl %r9d, %ecx
incl %ecx
leaq 0x248(%rsp), %rdi
leaq 0x378(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
callq 0x5440
jmp 0xb6e2
movl 0x33c(%rsp), %r9d
incl %r9d
leaq 0x228(%rsp), %rdi
leaq 0x358(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
movl %r9d, %ecx
callq 0x5440
jmp 0xb710
leaq 0x238(%rsp), %rdi
leaq 0x228(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x6cc0
jmp 0xb72f
leaq 0x248(%rsp), %rdi
movq %rdi, 0x68(%rsp)
leaq 0x238(%rsp), %rsi
movq %rsi, 0x60(%rsp)
callq 0x9930
movq 0x60(%rsp), %rdi
callq 0x5230
leaq 0x228(%rsp), %rdi
callq 0x5230
movq 0x68(%rsp), %rdi
movl 0x33c(%rsp), %edx
movl %edx, %esi
callq 0x96e0
movq %rax, 0x70(%rsp)
jmp 0xb77f
movq 0x70(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movl 0x33c(%rsp), %edx
movl %edx, %esi
incl %esi
leaq 0x248(%rsp), %rdi
callq 0x96e0
movq %rax, 0x58(%rsp)
jmp 0xb7ad
movsd 0x50(%rsp), %xmm0
movq 0x58(%rsp), %rax
movsd (%rax), %xmm1
callq 0xbf90
movsd %xmm1, 0x40(%rsp)
movsd %xmm0, 0x48(%rsp)
jmp 0xb7cf
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd %xmm1, 0x218(%rsp)
movsd %xmm0, 0x220(%rsp)
movsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x210(%rsp)
movsd 0x220(%rsp), %xmm0
movsd %xmm0, 0x208(%rsp)
movl 0x33c(%rsp), %esi
movl %esi, %edx
incl %edx
movsd 0x210(%rsp), %xmm0
movsd 0x208(%rsp), %xmm1
leaq 0x358(%rsp), %rdi
callq 0xc030
jmp 0xb83d
movsd 0x3b8(%rsp), %xmm0
movsd 0x208(%rsp), %xmm1
mulsd %xmm1, %xmm0
callq 0x10e30
movsd %xmm0, 0x38(%rsp)
jmp 0xb860
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x3b8(%rsp)
movl $0xf, %edi
callq 0x10e10
movl %eax, 0x34(%rsp)
jmp 0xb87f
movl 0x34(%rsp), %eax
movl %eax, 0x204(%rsp)
movl 0x204(%rsp), %esi
leaq 0x400(%rsp), %rdi
callq 0x2160
movq %rax, 0x28(%rsp)
jmp 0xb8a5
movq 0x28(%rsp), %rdi
movsd 0x3b8(%rsp), %xmm0
callq 0x21d0
movq %rax, 0x20(%rsp)
jmp 0xb8bf
movq 0x20(%rsp), %rdi
leaq 0x69df(%rip), %rsi      # 0x122aa
callq 0x20e0
jmp 0xb8d2
leaq 0x248(%rsp), %rdi
callq 0x5230
leaq 0x268(%rsp), %rdi
callq 0x2ea0
jmp 0xb97d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb96e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x2ea0
jmp 0xb96e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xb961
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x5230
leaq 0x248(%rsp), %rdi
callq 0x5230
leaq 0x268(%rsp), %rdi
callq 0x2ea0
jmp 0xb9b6
movl $0x0, 0x27c(%rsp)
leaq 0x2f0(%rsp), %rdi
callq 0x2ea0
leaq 0x328(%rsp), %rdi
callq 0x2ea0
movl 0x27c(%rsp), %eax
testl %eax, %eax
je 0xb9b1
jmp 0xb9af
jmp 0xb9d5
jmp 0xb077
leaq 0x2f0(%rsp), %rdi
callq 0x2ea0
leaq 0x328(%rsp), %rdi
callq 0x2ea0
jmp 0xbf07
movl 0x33c(%rsp), %r9d
incl %r9d
movl %r9d, 0x1c(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x358(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
movl %r9d, %ecx
callq 0x5440
jmp 0xba08
movl 0x33c(%rsp), %ecx
incl %ecx
leaq 0x1d0(%rsp), %rdi
leaq 0x368(%rsp), %rsi
movl $0x1, %edx
callq 0x4630
jmp 0xba2d
leaq 0x1f0(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
callq 0x6f70
jmp 0xba4c
movl 0x1c(%rsp), %edx
leaq 0x368(%rsp), %rdi
movl $0x1, %esi
leaq 0x1f0(%rsp), %rcx
callq 0x46f0
jmp 0xba6c
leaq 0x1f0(%rsp), %rdi
callq 0x2ea0
leaq 0x1d0(%rsp), %rdi
callq 0x2ea0
leaq 0x1e0(%rsp), %rdi
callq 0x5230
movl 0x33c(%rsp), %r9d
movl %r9d, 0x14(%rsp)
incl %r9d
movl %r9d, 0x18(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x358(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
movl %r9d, %ecx
callq 0x5440
jmp 0xbacb
movl 0x33c(%rsp), %r9d
movl %r9d, %ecx
incl %ecx
leaq 0x1a0(%rsp), %rdi
leaq 0x378(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
callq 0x5440
jmp 0xbaf8
leaq 0x1c0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
callq 0x6cc0
jmp 0xbb17
movl 0x14(%rsp), %r8d
movl 0x18(%rsp), %edx
leaq 0x378(%rsp), %rdi
movl $0x1, %ecx
leaq 0x1c0(%rsp), %r9
movl %ecx, %esi
callq 0x5f20
jmp 0xbb3e
leaq 0x1c0(%rsp), %rdi
callq 0x5230
leaq 0x1a0(%rsp), %rdi
callq 0x5230
leaq 0x1b0(%rsp), %rdi
callq 0x5230
movl 0x33c(%rsp), %r9d
leaq 0x180(%rsp), %rdi
leaq 0x378(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
movl %r9d, %ecx
callq 0x5440
jmp 0xbb90
movl 0x33c(%rsp), %ecx
leaq 0x170(%rsp), %rdi
leaq 0x368(%rsp), %rsi
movl $0x1, %edx
callq 0x4630
jmp 0xbbb3
leaq 0x190(%rsp), %rdi
leaq 0x180(%rsp), %rsi
leaq 0x170(%rsp), %rdx
xorl %ecx, %ecx
callq 0x8dc0
jmp 0xbbd4
leaq 0x170(%rsp), %rdi
callq 0x2ea0
leaq 0x180(%rsp), %rdi
callq 0x5230
movb $0x0, 0x16f(%rsp)
movl 0x3f0(%rsp), %ecx
movl 0x33c(%rsp), %r9d
leaq 0x148(%rsp), %rdi
leaq 0x388(%rsp), %rsi
movl $0x1, %r8d
movl %r8d, %edx
callq 0x5440
jmp 0xbc25
leaq 0x158(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0x6f70
jmp 0xbc44
movq 0x130(%rsp), %rdi
leaq 0x3d0(%rsp), %rsi
leaq 0x158(%rsp), %rdx
callq 0x2ed0
jmp 0xbc63
leaq 0x158(%rsp), %rdi
callq 0x2ea0
leaq 0x148(%rsp), %rdi
callq 0x5230
leaq 0x400(%rsp), %rdi
callq 0x2130
jmp 0xbc8c
movb $0x1, 0x16f(%rsp)
movl $0x1, 0x27c(%rsp)
testb $0x1, 0x16f(%rsp)
jne 0xbe68
jmp 0xbe5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbd0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbcff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x2ea0
leaq 0x1d0(%rsp), %rdi
callq 0x2ea0
leaq 0x1e0(%rsp), %rdi
callq 0x5230
jmp 0xbf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbd78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbd6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x5230
leaq 0x1a0(%rsp), %rdi
callq 0x5230
leaq 0x1b0(%rsp), %rdi
callq 0x5230
jmp 0xbf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbdc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x2ea0
leaq 0x180(%rsp), %rdi
callq 0x5230
jmp 0xbf07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbefa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xbe23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x2ea0
leaq 0x148(%rsp), %rdi
callq 0x5230
jmp 0xbefa
movq 0x130(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
callq 0x2ea0
jmp 0xbefa
movq 0x130(%rsp), %rdi
callq 0x2ea0
leaq 0x190(%rsp), %rdi
callq 0x2ea0
leaq 0x358(%rsp), %rdi
callq 0x5230
leaq 0x368(%rsp), %rdi
callq 0x2ea0
leaq 0x378(%rsp), %rdi
callq 0x5230
leaq 0x388(%rsp), %rdi
callq 0x5230
leaq 0x398(%rsp), %rdi
callq 0x2ea0
leaq 0x3c0(%rsp), %rdi
callq 0x2ea0
leaq 0x3d0(%rsp), %rdi
callq 0x2ea0
leaq 0x3e0(%rsp), %rdi
callq 0x2ea0
leaq 0x400(%rsp), %rdi
callq 0x2140
movq 0x138(%rsp), %rax
addq $0x618, %rsp            # imm = 0x618
retq
leaq 0x190(%rsp), %rdi
callq 0x2ea0
leaq 0x358(%rsp), %rdi
callq 0x5230
leaq 0x368(%rsp), %rdi
callq 0x2ea0
leaq 0x378(%rsp), %rdi
callq 0x5230
leaq 0x388(%rsp), %rdi
callq 0x5230
leaq 0x398(%rsp), %rdi
callq 0x2ea0
leaq 0x3c0(%rsp), %rdi
callq 0x2ea0
leaq 0x3d0(%rsp), %rdi
callq 0x2ea0
leaq 0x3e0(%rsp), %rdi
callq 0x2ea0
leaq 0x400(%rsp), %rdi
callq 0x2140
movq 0x3f8(%rsp), %rdi
callq 0x21b0
nopl (%rax)