// File: suhasjains[P]AMR-Solver/src/poisson.cpp
// Function: amrsolver::jacobi_for_field(myOctree::Octree*, myOctree::Field*, double)
double jacobi_for_field(Octree* node, Field* f, double global_res) {

	double res, err;
	double dx, dy, dz;
	double ue, uw, un, us, ut, ub, up;
	double force = 1.0;
	res = 0.0;
	
	Field temp(nx_block+2*pad,ny_block+2*pad,nz_block+2*pad, "temp");
	//temp.set_field(0.0);	
	
	dx = node->get_block_data()->dx;
	dy = node->get_block_data()->dy;
	dz = node->get_block_data()->dz;
	
	
	//jocobi work - add here
	for(int i=pad; i<nx_block+pad; i++) {
		for(int j=pad; j<ny_block+pad; j++) {
			for(int k=pad; k<nz_block+pad; k++) {
					
				ue = f->val[i+1][j][k];		
				uw = f->val[i-1][j][k];		
				un = f->val[i][j+1][k];		
				us = f->val[i][j-1][k];		
				ut = f->val[i][j][k+1];		
				ub = f->val[i][j][k-1];		
				up = f->val[i][j][k];		
				
	
				if(i==pad)		temp.val[i][j][k] += (2.0*uw - up)/pow(dx,2); 	
				else			temp.val[i][j][k] += uw/pow(dx,2);	
				if(i==nx_block+pad-1)	temp.val[i][j][k] += (2.0*ue - up)/pow(dx,2); 	
				else			temp.val[i][j][k] += ue/pow(dx,2);	
				if(j==pad)		temp.val[i][j][k] += (2.0*us - up)/pow(dy,2); 	
				else			temp.val[i][j][k] += us/pow(dy,2);	
				if(j==ny_block+pad-1)	temp.val[i][j][k] += (2.0*un - up)/pow(dy,2); 	
				else			temp.val[i][j][k] += un/pow(dy,2);	
				if(k==pad)		temp.val[i][j][k] += (2.0*ub - up)/pow(dz,2); 	
				else			temp.val[i][j][k] += ub/pow(dz,2);	
				if(k==nz_block+pad-1)	temp.val[i][j][k] += (2.0*ut - up)/pow(dz,2); 	
				else			temp.val[i][j][k] += ut/pow(dz,2);	
	
				temp.val[i][j][k] -= force;
				temp.val[i][j][k] /= 2.0;
				temp.val[i][j][k] /= (1.0/pow(dx,2) + 1.0/pow(dy,2) + 1.0/pow(dz,2));
	
			//	std::cerr << temp.val[i][j][k] << std::endl;
	
				/*magnitude to be considered*/
				err = std::abs(temp.val[i][j][k] - f->val[i][j][k]);
				if(err>res) 	res = err;	
	
	
			}
		}
	}	
	
	//Transferring values from temp to field
	for(int i=pad; i<nx_block+pad; i++) {
		for(int j=pad; j<ny_block+pad; j++) {
			for(int k=pad; k<nz_block+pad; k++) {
	
				f->val[i][j][k] = temp.val[i][j][k];	
	
			}
		}
	}	
	
	
	if(res>global_res)	global_res = res;

	return global_res;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x80(%rbp)
movq $0x0, -0x20(%rbp)
leaq 0xec77(%rip), %rax      # 0x2626c
movl (%rax), %edx
leaq 0xec6a(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x134(%rbp)
leaq 0xec5c(%rip), %rax      # 0x26270
movl (%rax), %edx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x130(%rbp)
leaq 0xec4c(%rip), %rax      # 0x26274
movl (%rax), %edx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x12c(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x3430
movq -0x128(%rbp), %rdx
leaq 0x9f3d(%rip), %rsi      # 0x21593
leaq -0xf0(%rbp), %rdi
callq 0x4570
jmp 0x17664
movl -0x12c(%rbp), %ecx
movl -0x130(%rbp), %edx
movl -0x134(%rbp), %esi
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %r8
callq 0xc0a0
jmp 0x1768b
leaq -0xf0(%rbp), %rdi
callq 0x3180
leaq -0xf1(%rbp), %rdi
callq 0x3290
movq -0x8(%rbp), %rdi
callq 0x6de0
movq %rax, -0x140(%rbp)
jmp 0x176b5
movq -0x140(%rbp), %rax
movsd 0x70(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6de0
movq %rax, -0x148(%rbp)
jmp 0x176d8
movq -0x148(%rbp), %rax
movsd 0x78(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6de0
movq %rax, -0x150(%rbp)
jmp 0x176fb
movq -0x150(%rbp), %rax
movsd 0x80(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq 0xeb52(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, -0x108(%rbp)
movl -0x108(%rbp), %eax
leaq 0xeb41(%rip), %rcx      # 0x2626c
movl (%rcx), %ecx
leaq 0xeb34(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x1813c
leaq 0xeb23(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
leaq 0xeb16(%rip), %rcx      # 0x26270
movl (%rcx), %ecx
leaq 0xeb05(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x18126
leaq 0xeaf4(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, -0x110(%rbp)
movl -0x110(%rbp), %eax
leaq 0xeaeb(%rip), %rcx      # 0x26274
movl (%rcx), %ecx
leaq 0xead6(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x18110
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x108(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x108(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x10c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x10c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x110(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x110(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movl -0x108(%rbp), %eax
leaq 0xe958(%rip), %rcx      # 0x26268
cmpl (%rcx), %eax
jne 0x17a03
movsd -0x50(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x158(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0x9812(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x158(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x17a5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x179cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3180
leaq -0xf1(%rbp), %rdi
callq 0x3290
jmp 0x18295
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xc640
jmp 0x18295
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x160(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0x974b(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x160(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x108(%rbp), %eax
leaq 0xe800(%rip), %rcx      # 0x2626c
movl (%rcx), %ecx
leaq 0xe7f3(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x17b04
movsd -0x48(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x168(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0x96a8(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x168(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x17b60
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x170(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0x964a(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x170(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x10c(%rbp), %eax
leaq 0xe6fb(%rip), %rcx      # 0x26268
cmpl (%rcx), %eax
jne 0x17bf7
movsd -0x60(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x178(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x95b5(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x178(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x17c53
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x180(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x9557(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x180(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x10c(%rbp), %eax
leaq 0xe610(%rip), %rcx      # 0x26270
movl (%rcx), %ecx
leaq 0xe5ff(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x17cf8
movsd -0x58(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x188(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x94b4(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x188(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x17d54
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x190(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x9456(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x190(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x110(%rbp), %eax
leaq 0xe507(%rip), %rcx      # 0x26268
cmpl (%rcx), %eax
jne 0x17deb
movsd -0x70(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x198(%rbp)
movsd -0x40(%rbp), %xmm0
movsd 0x93c1(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x198(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x17e47
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movsd -0x40(%rbp), %xmm0
movsd 0x9363(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x1a0(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x110(%rbp), %eax
leaq 0xe420(%rip), %rcx      # 0x26274
movl (%rcx), %ecx
leaq 0xe40b(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x17eec
movsd -0x68(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x1a8(%rbp)
movsd -0x40(%rbp), %xmm0
movsd 0x92c0(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x1a8(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x17f48
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x1b0(%rbp)
movsd -0x40(%rbp), %xmm0
movsd 0x9262(%rip), %xmm1     # 0x21168
callq 0x3410
movaps %xmm0, %xmm1
movsd -0x1b0(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd -0x80(%rbp), %xmm1
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x91d0(%rip), %xmm1     # 0x21180
mulsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd -0x30(%rbp), %xmm0
movsd 0x91a2(%rip), %xmm1     # 0x21168
movsd %xmm1, -0x1d8(%rbp)
callq 0x3410
movsd -0x1d8(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd 0x902a(%rip), %xmm0     # 0x21010
movsd %xmm0, -0x1c0(%rbp)
divsd %xmm2, %xmm0
movsd %xmm0, -0x1d0(%rbp)
movsd -0x38(%rbp), %xmm0
callq 0x3410
movsd -0x1d8(%rbp), %xmm1
movsd -0x1c0(%rbp), %xmm2
movaps %xmm0, %xmm3
movsd -0x1d0(%rbp), %xmm0
divsd %xmm3, %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, -0x1c8(%rbp)
movsd -0x40(%rbp), %xmm0
callq 0x3410
movsd -0x1c8(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x1c0(%rbp), %xmm0
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0xc0(%rbp), %rax
movslq -0x108(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movslq -0x10c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x110(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax,%rsi,8), %rax
movq (%rax,%rdx,8), %rax
movsd (%rax,%rcx,8), %xmm1
subsd %xmm1, %xmm0
callq 0x6d50
movsd %xmm0, -0x1b8(%rbp)
jmp 0x180d7
movsd -0x1b8(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x180fa
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x180fc
movl -0x110(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x110(%rbp)
jmp 0x1777c
jmp 0x18112
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x1774d
jmp 0x18128
movl -0x108(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x108(%rbp)
jmp 0x1771e
leaq 0xe125(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, -0x114(%rbp)
movl -0x114(%rbp), %eax
leaq 0xe114(%rip), %rcx      # 0x2626c
movl (%rcx), %ecx
leaq 0xe107(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x18255
leaq 0xe0f6(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, -0x118(%rbp)
movl -0x118(%rbp), %eax
leaq 0xe0e9(%rip), %rcx      # 0x26270
movl (%rcx), %ecx
leaq 0xe0d8(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x1823f
leaq 0xe0c7(%rip), %rax      # 0x26268
movl (%rax), %eax
movl %eax, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
leaq 0xe0be(%rip), %rcx      # 0x26274
movl (%rcx), %ecx
leaq 0xe0a9(%rip), %rdx      # 0x26268
addl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x18229
movq -0xc0(%rbp), %rax
movslq -0x114(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x118(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x11c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x114(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x118(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x11c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x181a9
jmp 0x1822b
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x1817a
jmp 0x18241
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x1814b
movsd -0x20(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x1826b
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x1e0(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xc640
movsd -0x1e0(%rbp), %xmm0
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x100(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)