// File: bauerj4[P]Riemann1D/src/FiniteVolume.cpp
// Function: FVUpdate(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, mesh_t&, context_t&, double&, double, int&)
int FVUpdate(vector<vector<double> > &conserved, vector<vector<double> > &fluxes,
	     mesh_t &mesh, context_t &RiemannContext, double &current_time, double smax, int &iteration)
{

  //double reduction_const = 1.e-1;
  printf("smax = %10.10f\n",smax);
  double dx = fabs(RiemannContext.X1 - RiemannContext.X0)/RiemannContext.MESH_RESOLUTION;
  printf("dx = %10.10f\n", dx);
  double dt = dx/smax * RiemannContext.CFL_NUMBER;
  // printf("dt = %10.10f\n", dt);

  if (iteration < 0)
    {
      dt = 0.2 * dt;
    }
  printf("t + dt = %10.10f + %10.10f\n", current_time, dt);


  if(RiemannContext.SOLUTION_METHOD == "HLLC_FLUX_SUPERBEE" ||
     RiemannContext.SOLUTION_METHOD == "HLLC_FLUX_MINBEE")
    {
      printf("Updating conserved quantities \n");
      for(int i = 2; i < mesh.NCells - 2; i++)
        {
	  //printf("Updating conserved %d.\n",i+1);

	  if ((fluxes[i-1][0] - fluxes[i-2][0]) != (fluxes[i-1][0] - fluxes[i-2][0]))
	    {
	      printf("ERROR: FLUXES ARE NAN.\n");
	      return 1;
	    }
	  conserved[i][0] -= dt/dx * (fluxes[i-1][0] - fluxes[i-2][0]);
	  conserved[i][1] -= dt/dx * (fluxes[i-1][1] - fluxes[i-2][1]);
	  conserved[i][2] -= dt/dx * (fluxes[i-1][2] - fluxes[i-2][2]);

	    
        }
      printf("Conserved quantities updated.\n");
    }

  else
    {
      for(int i = 1; i < mesh.NCells - 1; i++)
	{
	  conserved[i][0] -= dt/dx * (fluxes[i][0] - fluxes[i-1][0]);
	  conserved[i][1] -= dt/dx * (fluxes[i][1] - fluxes[i-1][1]);
	  conserved[i][2] -= dt/dx * (fluxes[i][2] - fluxes[i-1][2]);
	}
    }
  
  //SPECIFY BCS FOR GHOST CELLS
  if(RiemannContext.SOLUTION_METHOD == "HLLC_FLUX_SUPERBEE" || 
     RiemannContext.SOLUTION_METHOD == "HLLC_FLUX_MINBEE")
    {

      conserved[0][0] = conserved[2][0];
      conserved[0][1] = conserved[2][1];
      conserved[0][2] = conserved[2][2];

      conserved[1][0] = conserved[3][0];
      conserved[1][1] = conserved[3][1];
      conserved[1][2] = conserved[3][2];


      conserved[mesh.NCells - 1][0] = conserved[mesh.NCells- 4][0];
      conserved[mesh.NCells - 1][1] = conserved[mesh.NCells- 4][1];
      conserved[mesh.NCells - 1][2] = conserved[mesh.NCells- 4][2];

      conserved[mesh.NCells - 2][0] = conserved[mesh.NCells- 3][0];
      conserved[mesh.NCells - 2][1] = conserved[mesh.NCells- 3][1];
      conserved[mesh.NCells - 2][2] = conserved[mesh.NCells- 3][2];
    }

  else
    {
      conserved[mesh.NCells - 1][0] = conserved[mesh.NCells- 2][0];
      conserved[mesh.NCells - 1][1] = conserved[mesh.NCells- 2][1];
      conserved[mesh.NCells - 1][2] = conserved[mesh.NCells- 2][2];
    }
  current_time +=  dt;
  iteration++;
    
  printf("t + dt = %10.10f + %10.10f\n", current_time, dt);
  return 0;
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x168(%rsp)
movq %rsi, 0x160(%rsp)
movq %rdx, 0x158(%rsp)
movq %rcx, 0x150(%rsp)
movq %r8, 0x148(%rsp)
movsd %xmm0, 0x140(%rsp)
movq %r9, 0x138(%rsp)
movsd 0x140(%rsp), %xmm0
leaq 0x14058(%rip), %rdi     # 0x181f8
movb $0x1, %al
callq 0x2040
movq 0x150(%rsp), %rax
movsd 0x10(%rax), %xmm0
movq 0x150(%rsp), %rax
subsd 0x8(%rax), %xmm0
movaps 0x14018(%rip), %xmm1    # 0x181e0
pand %xmm1, %xmm0
movq 0x150(%rsp), %rax
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0x130(%rsp), %xmm0
leaq 0x14013(%rip), %rdi     # 0x18208
movb $0x1, %al
callq 0x2040
movsd 0x130(%rsp), %xmm0
divsd 0x140(%rsp), %xmm0
movq 0x150(%rsp), %rax
mulsd 0x50(%rax), %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x138(%rsp), %rax
cmpl $0x0, (%rax)
jge 0x424b
movsd 0x13fb7(%rip), %xmm0    # 0x181f0
mulsd 0x128(%rsp), %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x148(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x128(%rsp), %xmm1
leaq 0x13faf(%rip), %rdi     # 0x18216
movb $0x2, %al
callq 0x2040
movq 0x150(%rsp), %rdi
addq $0x60, %rdi
leaq 0x13fb1(%rip), %rsi     # 0x18232
callq 0x3260
testb $0x1, %al
jne 0x42ab
movq 0x150(%rsp), %rdi
addq $0x60, %rdi
leaq 0x13fa8(%rip), %rsi     # 0x18245
callq 0x3260
testb $0x1, %al
jne 0x42ab
jmp 0x46c1
leaq 0x13fa4(%rip), %rdi     # 0x18256
movb $0x0, %al
callq 0x2040
movl $0x2, 0x124(%rsp)
movl 0x124(%rsp), %eax
movq 0x158(%rsp), %rcx
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x46ae
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x108(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x108(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0x118(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x110(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x110(%rsp), %xmm1
movsd 0x118(%rsp), %xmm0
subsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
jne 0x43c8
jp 0x43c8
jmp 0x43e6
leaq 0x13ea7(%rip), %rdi     # 0x18276
movb $0x0, %al
callq 0x2040
movl $0x1, 0x174(%rsp)
jmp 0x4fba
movsd 0x128(%rsp), %xmm0
divsd 0x130(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0xc0(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0xc0(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0xd0(%rsp)
movq 0x168(%rsp), %rdi
movslq 0x124(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x128(%rsp), %xmm0
divsd 0x130(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0xd8(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0xd8(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0xe8(%rsp)
movq 0x168(%rsp), %rdi
movslq 0x124(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0xe0(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x128(%rsp), %xmm0
divsd 0x130(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0xf0(%rsp)
movq 0x160(%rsp), %rdi
movl 0x124(%rsp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0xf0(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0x100(%rsp)
movq 0x168(%rsp), %rdi
movslq 0x124(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x124(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x124(%rsp)
jmp 0x42c4
leaq 0x13bd9(%rip), %rdi     # 0x1828e
movb $0x0, %al
callq 0x2040
jmp 0x499d
movl $0x1, 0x120(%rsp)
movl 0x120(%rsp), %eax
movq 0x158(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x499b
movsd 0x128(%rsp), %xmm0
divsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movq 0x160(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0x160(%rsp), %rdi
movl 0x120(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x78(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0x168(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x128(%rsp), %xmm0
divsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movq 0x160(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0x160(%rsp), %rdi
movl 0x120(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x90(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0x168(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x128(%rsp), %xmm0
divsd 0x130(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movq 0x160(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0xa8(%rsp)
movq 0x160(%rsp), %rdi
movl 0x120(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0xa8(%rsp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0x168(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0xb0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x46cc
jmp 0x499d
movq 0x150(%rsp), %rdi
addq $0x60, %rdi
leaq 0x13882(%rip), %rsi     # 0x18232
callq 0x3260
testb $0x1, %al
jne 0x49da
movq 0x150(%rsp), %rdi
addq $0x60, %rdi
leaq 0x13879(%rip), %rsi     # 0x18245
callq 0x3260
testb $0x1, %al
jne 0x49da
jmp 0x4e30
movq 0x168(%rsp), %rdi
movl $0x2, %esi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x168(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movl $0x2, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x168(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movl $0x2, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x168(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movl $0x3, %esi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x168(%rsp), %rdi
movl $0x1, %esi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movl $0x3, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x168(%rsp), %rdi
movl $0x1, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movl $0x3, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x168(%rsp), %rdi
movl $0x1, %esi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x4, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x4, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x4, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0x58(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x3, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd 0x60(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x3, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x68(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x3, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0x70(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x4f64
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ff0
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4ff0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x168(%rsp), %rdi
movq 0x158(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x4fd0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4ff0
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x128(%rsp), %xmm0
movq 0x148(%rsp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq 0x138(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x148(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x128(%rsp), %xmm1
leaq 0x1326e(%rip), %rdi     # 0x18216
movb $0x2, %al
callq 0x2040
movl $0x0, 0x174(%rsp)
movl 0x174(%rsp), %eax
addq $0x178, %rsp            # imm = 0x178
retq
nopl (%rax)