// File: tlestang[P]IW_gene/main.cpp
// Function: main
int main(int argc, char *argv[])
{

  string folderName = "test_temp/";
  string instru = "mkdir " + folderName;
  system(instru.c_str());
  instru = "mkdir " + folderName + "vtk_fluid/";
  system(instru.c_str());
  
  
  double **rho = NULL;;
  double ***velocity = NULL;
  double **temp = NULL;

  // declaration of parameters in PHYSICAL units to
  // be init. from input_file.
  double U0, nuPhi, kappaPhi, D, asp, hb, Pr, N2Phi;

  // declaration of parameters in LATTICE units.

  int Nx;
  double beta = 1;
  double nu, kappa, tau_prim, N2;
  int h;
  int Dx, Dy; double gr;

  ifstream input_file(argv[1]);
  if(input_file.is_open())
    {
      input_file >> U0;
      input_file >> Pr;
      input_file >> D;
      input_file >> asp;
      input_file >> hb;
      input_file >> Dx;
      input_file >> N2Phi;
      input_file.close();
    }

  else
    {
      cout << "ERROR - Could not open input file " << endl; return(0);
    }

  // Now compute simulation parameters from physical values.
  //Lattice velocity set to 0.1 (Low Ma limit).
  double u0 = 0.01;
  double delta_x = D/(Dx-1);
  double delta_t = (delta_x*u0)/U0;

  //Lattice viscosity is set so that tau = 0.51 which is expected to be stable enough.
  double tau = 0.6;
  //double tau = 3./2.;
  nu = (2*tau -1)/6.; nuPhi = nu*(delta_x*delta_x/delta_t);
  kappa = nu/Pr; kappaPhi = kappa*(delta_x*delta_x/delta_t);
  tau_prim = 2.*kappa + 0.5;

  h = floor(hb/delta_x);
  cout << asp << " " << Dx << " " << endl;
  Dy = asp*(Dx-1) + 1; N2 = delta_t*delta_t*N2Phi;
  gr = N2*(Dy-1); // So that T = 1 on top of the domain
  ofstream paramFile("parameters.datout");
  paramFile << "PHYSICAL SETUP IN LATTICE UNITS" << endl;
  paramFile << "--------------------" << endl;
  paramFile << "  Grid is " << Dx << "x" << Dy << endl;
  paramFile << "  tau = " << tau << " | tau_prim = " << tau_prim << endl;
  paramFile << "  Dy = " << Dy << endl;
  paramFile << "  h = " << h << endl;
  paramFile << "  g = " << gr << endl;
  paramFile << "  N2 = " << N2 << endl;

  paramFile << "PHYSICAL SETUP IN PHYSICAL UNITS" << endl;
  paramFile << "  nu = " << nuPhi << endl;
  paramFile << "  kappa = " << kappaPhi << endl;
  paramFile << "  dx = " << delta_x << " m" << endl;
  paramFile << "  dt = " << delta_t << " s" << endl;
  paramFile.close();

  int dims[2] = {Dx, Dy};
  double omega[2];
  omega[0] = 1./tau;
  omega[1]  = 1./tau_prim;


  LatticeBoltzmann *lb;

  lb = new LatticeBoltzmann(dims, omega, gr*beta, u0, h, N2);
  lb->setSpgeLayer(floor((Dy-1)/4));

  lb->getDensityAndVelocityField(temp, rho, velocity);

  int N = 1600000;
  int k = 0; int tt = 0;
  double d;
  for (int i=0;i<N;i++)
    {

      lb->update();
      if(i%(N/100)==0)
      	{
      	  cout << k << "%" << endl;
      	  k++;
      	}
      if(i%1000 == 0)
      	{
      	  write_fluid_vtk(tt, dims[0], dims[1], temp, velocity, folderName.c_str());
      	  tt++;
      	}
    }    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x740, %rsp            # imm = 0x740
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x5c0(%rbp)
callq 0x3390
movq -0x5c0(%rbp), %rdx
leaq 0x1821(%rip), %rsi      # 0x9398
leaq -0x30(%rbp), %rdi
callq 0x77f0
jmp 0x7b82
leaq -0x31(%rbp), %rdi
callq 0x3260
leaq 0x1811(%rip), %rsi      # 0x93a3
leaq -0x68(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x87f0
jmp 0x7ba1
leaq -0x68(%rbp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x31e0
jmp 0x7bb4
leaq 0x17e8(%rip), %rsi      # 0x93a3
leaq -0xa8(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x87f0
jmp 0x7bcd
leaq 0x1692(%rip), %rdx      # 0x9266
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x77a0
jmp 0x7be9
leaq -0x68(%rbp), %rdi
movq %rdi, -0x5c8(%rbp)
leaq -0x88(%rbp), %rsi
movq %rsi, -0x5d0(%rbp)
callq 0x32a0
movq -0x5d0(%rbp), %rdi
callq 0x3140
leaq -0xa8(%rbp), %rdi
callq 0x3140
movq -0x5c8(%rbp), %rdi
callq 0x30e0
movq %rax, %rdi
callq 0x31e0
jmp 0x7c35
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x350(%rbp), %rdi
movl $0x8, %edx
callq 0x33c0
jmp 0x7c82
leaq -0x350(%rbp), %rdi
callq 0x3320
movb %al, -0x5d1(%rbp)
jmp 0x7c96
movb -0x5d1(%rbp), %al
testb $0x1, %al
jne 0x7ca5
jmp 0x7db5
leaq -0x350(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x31b0
jmp 0x7cba
leaq -0x350(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x31b0
jmp 0x7ccf
leaq -0x350(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x31b0
jmp 0x7ce4
leaq -0x350(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x31b0
jmp 0x7cf9
leaq -0x350(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x31b0
jmp 0x7d0e
leaq -0x350(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x3130
jmp 0x7d23
leaq -0x350(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x31b0
jmp 0x7d38
leaq -0x350(%rbp), %rdi
callq 0x3080
jmp 0x7d46
jmp 0x7dfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x3260
jmp 0x87e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x87dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x87d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3140
jmp 0x87d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x87c7
movq 0x421c(%rip), %rdi      # 0xbfd8
leaq 0x15e7(%rip), %rsi      # 0x93aa
callq 0x3210
movq %rax, -0x5e0(%rbp)
jmp 0x7dd1
movq -0x5e0(%rbp), %rdi
movq 0x41e9(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x7de6
movl $0x0, -0x4(%rbp)
movl $0x1, -0x354(%rbp)
jmp 0x8791
movabsq $0x3f847ae147ae147b, %rax # imm = 0x3F847AE147AE147B
movq %rax, -0x360(%rbp)
movsd -0xe0(%rbp), %xmm0
movl -0x138(%rbp), %eax
decl %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x368(%rbp)
movsd -0x368(%rbp), %xmm0
movsd -0x360(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd -0xc8(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x370(%rbp)
movabsq $0x3fe3333333333333, %rax # imm = 0x3FE3333333333333
movq %rax, -0x378(%rbp)
movsd -0x378(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x150e(%rip), %xmm1     # 0x9388
addsd %xmm1, %xmm0
movsd 0x150a(%rip), %xmm1     # 0x9390
divsd %xmm1, %xmm0
movsd %xmm0, -0x118(%rbp)
movsd -0x118(%rbp), %xmm0
movsd -0x368(%rbp), %xmm1
mulsd %xmm1, %xmm1
movsd -0x370(%rbp), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
movsd -0x118(%rbp), %xmm0
movsd -0xf8(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x120(%rbp)
movsd -0x120(%rbp), %xmm0
movsd -0x368(%rbp), %xmm1
mulsd %xmm1, %xmm1
movsd -0x370(%rbp), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0x120(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x10ee(%rip), %xmm1     # 0x9008
addsd %xmm1, %xmm0
movsd %xmm0, -0x128(%rbp)
movsd -0xf0(%rbp), %xmm0
movsd -0x368(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x3340
cvttsd2si %xmm0, %eax
movl %eax, -0x134(%rbp)
movsd -0xe8(%rbp), %xmm0
movq 0x4080(%rip), %rdi      # 0xbfd8
callq 0x33e0
movq %rax, -0x5e8(%rbp)
jmp 0x7f66
movq -0x5e8(%rbp), %rdi
leaq 0x14e1(%rip), %rsi      # 0x9455
callq 0x3210
movq %rax, -0x5f0(%rbp)
jmp 0x7f82
movq -0x5f0(%rbp), %rdi
movl -0x138(%rbp), %esi
callq 0x3370
movq %rax, -0x5f8(%rbp)
jmp 0x7f9d
movq -0x5f8(%rbp), %rdi
leaq 0x14aa(%rip), %rsi      # 0x9455
callq 0x3210
movq %rax, -0x600(%rbp)
jmp 0x7fb9
movq -0x600(%rbp), %rdi
movq 0x4001(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x7fce
movsd -0xe8(%rbp), %xmm0
movl -0x138(%rbp), %eax
decl %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd 0x103a(%rip), %xmm1     # 0x9028
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x13c(%rbp)
movsd -0x370(%rbp), %xmm0
mulsd %xmm0, %xmm0
movsd -0x100(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
movsd -0x130(%rbp), %xmm0
movl -0x13c(%rbp), %eax
decl %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x148(%rbp)
leaq 0x138a(%rip), %rsi      # 0x93cd
leaq -0x578(%rbp), %rdi
movl $0x10, %edx
callq 0x3270
jmp 0x8056
leaq 0x1382(%rip), %rsi      # 0x93df
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x608(%rbp)
jmp 0x8072
movq -0x608(%rbp), %rdi
movq 0x3f48(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x8087
leaq 0x1371(%rip), %rsi      # 0x93ff
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x610(%rbp)
jmp 0x80a3
movq -0x610(%rbp), %rdi
movq 0x3f17(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x80b8
leaq 0x1355(%rip), %rsi      # 0x9414
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x618(%rbp)
jmp 0x80d4
movq -0x618(%rbp), %rdi
movl -0x138(%rbp), %esi
callq 0x3370
movq %rax, -0x620(%rbp)
jmp 0x80ef
movq -0x620(%rbp), %rdi
leaq 0x1322(%rip), %rsi      # 0x941f
callq 0x3210
movq %rax, -0x628(%rbp)
jmp 0x810b
movq -0x628(%rbp), %rdi
movl -0x13c(%rbp), %esi
callq 0x3370
movq %rax, -0x630(%rbp)
jmp 0x8126
movq -0x630(%rbp), %rdi
movq 0x3e94(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x813b
leaq 0x12df(%rip), %rsi      # 0x9421
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x638(%rbp)
jmp 0x8157
movq -0x638(%rbp), %rdi
movsd -0x378(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x640(%rbp)
jmp 0x8174
movq -0x640(%rbp), %rdi
leaq 0x12a8(%rip), %rsi      # 0x942a
callq 0x3210
movq %rax, -0x648(%rbp)
jmp 0x8190
movq -0x648(%rbp), %rdi
movsd -0x128(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x650(%rbp)
jmp 0x81ad
movq -0x650(%rbp), %rdi
movq 0x3e0d(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x81c2
leaq 0x1270(%rip), %rsi      # 0x9439
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x658(%rbp)
jmp 0x81de
movq -0x658(%rbp), %rdi
movl -0x13c(%rbp), %esi
callq 0x3370
movq %rax, -0x660(%rbp)
jmp 0x81f9
movq -0x660(%rbp), %rdi
movq 0x3dc1(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x820e
leaq 0x122c(%rip), %rsi      # 0x9441
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x668(%rbp)
jmp 0x822a
movq -0x668(%rbp), %rdi
movl -0x134(%rbp), %esi
callq 0x3370
movq %rax, -0x670(%rbp)
jmp 0x8245
movq -0x670(%rbp), %rdi
movq 0x3d75(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x825a
leaq 0x11e7(%rip), %rsi      # 0x9448
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x678(%rbp)
jmp 0x8276
movq -0x678(%rbp), %rdi
movsd -0x148(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x680(%rbp)
jmp 0x8293
movq -0x680(%rbp), %rdi
movq 0x3d27(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x82a8
leaq 0x11a0(%rip), %rsi      # 0x944f
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x688(%rbp)
jmp 0x82c4
movq -0x688(%rbp), %rdi
movsd -0x130(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x690(%rbp)
jmp 0x82e1
movq -0x690(%rbp), %rdi
movq 0x3cd9(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x82f6
leaq 0x115a(%rip), %rsi      # 0x9457
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x698(%rbp)
jmp 0x8312
movq -0x698(%rbp), %rdi
movq 0x3ca8(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x8327
leaq 0x114a(%rip), %rsi      # 0x9478
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x6a0(%rbp)
jmp 0x8343
movq -0x6a0(%rbp), %rdi
movsd -0xd0(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x6a8(%rbp)
jmp 0x8360
movq -0x6a8(%rbp), %rdi
movq 0x3c5a(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x8375
leaq 0x1104(%rip), %rsi      # 0x9480
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x6b0(%rbp)
jmp 0x8391
movq -0x6b0(%rbp), %rdi
movsd -0xd8(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x6b8(%rbp)
jmp 0x83ae
movq -0x6b8(%rbp), %rdi
movq 0x3c0c(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x83c3
leaq 0x10c1(%rip), %rsi      # 0x948b
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x6c0(%rbp)
jmp 0x83df
movq -0x6c0(%rbp), %rdi
movsd -0x368(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x6c8(%rbp)
jmp 0x83fc
movq -0x6c8(%rbp), %rdi
leaq 0x1089(%rip), %rsi      # 0x9493
callq 0x3210
movq %rax, -0x6d0(%rbp)
jmp 0x8418
movq -0x6d0(%rbp), %rdi
movq 0x3ba2(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x842d
leaq 0x1062(%rip), %rsi      # 0x9496
leaq -0x578(%rbp), %rdi
callq 0x3210
movq %rax, -0x6d8(%rbp)
jmp 0x8449
movq -0x6d8(%rbp), %rdi
movsd -0x370(%rbp), %xmm0
callq 0x33e0
movq %rax, -0x6e0(%rbp)
jmp 0x8466
movq -0x6e0(%rbp), %rdi
leaq 0x102a(%rip), %rsi      # 0x949e
callq 0x3210
movq %rax, -0x6e8(%rbp)
jmp 0x8482
movq -0x6e8(%rbp), %rdi
movq 0x3b38(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x8497
leaq -0x578(%rbp), %rdi
callq 0x32c0
jmp 0x84a5
movl -0x138(%rbp), %eax
movl %eax, -0x580(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, -0x57c(%rbp)
movsd -0x378(%rbp), %xmm2
movsd 0xb5b(%rip), %xmm0      # 0x9028
movaps %xmm0, %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, -0x590(%rbp)
movsd -0x128(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x588(%rbp)
movl $0x90, %edi
callq 0x3220
movq %rax, -0x6f0(%rbp)
jmp 0x8503
movq -0x6f0(%rbp), %rdi
movsd -0x148(%rbp), %xmm0
movsd -0x110(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd -0x360(%rbp), %xmm1
movl -0x134(%rbp), %ecx
movsd -0x130(%rbp), %xmm2
leaq -0x580(%rbp), %rsi
leaq -0x590(%rbp), %rdx
callq 0x5cb0
jmp 0x8549
movq -0x6f0(%rbp), %rax
movq %rax, -0x598(%rbp)
movq -0x598(%rbp), %rax
movq %rax, -0x700(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, %edi
decl %edi
addl $0x2, %eax
testl %edi, %edi
cmovsl %eax, %edi
sarl $0x2, %edi
callq 0x8900
movsd %xmm0, -0x6f8(%rbp)
jmp 0x8589
movq -0x700(%rbp), %rdi
movsd -0x6f8(%rbp), %xmm0
cvttsd2si %xmm0, %esi
callq 0x6dc0
jmp 0x85a3
movq -0x598(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
callq 0x6ae0
jmp 0x85c6
movl $0x186a00, -0x59c(%rbp) # imm = 0x186A00
movl $0x0, -0x5a0(%rbp)
movl $0x0, -0x5a4(%rbp)
movl $0x0, -0x5b4(%rbp)
movl -0x5b4(%rbp), %eax
cmpl -0x59c(%rbp), %eax
jge 0x877b
movq -0x598(%rbp), %rdi
callq 0x6770
jmp 0x860e
movl -0x5b4(%rbp), %eax
movl %eax, -0x704(%rbp)
movl -0x59c(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x704(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x86cc
movl -0x5a0(%rbp), %esi
movq 0x398f(%rip), %rdi      # 0xbfd8
callq 0x3370
movq %rax, -0x710(%rbp)
jmp 0x8657
movq -0x710(%rbp), %rdi
leaq 0xe3c(%rip), %rsi       # 0x94a1
callq 0x3210
movq %rax, -0x718(%rbp)
jmp 0x8673
movq -0x718(%rbp), %rdi
movq 0x3947(%rip), %rsi      # 0xbfc8
callq 0x3240
jmp 0x8688
movl -0x5a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5a0(%rbp)
jmp 0x86cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x87bb
movq -0x6f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x90, %esi
callq 0x3230
jmp 0x87bb
movl -0x5b4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x8765
movl -0x5a4(%rbp), %eax
movl %eax, -0x734(%rbp)
movl -0x580(%rbp), %eax
movl %eax, -0x730(%rbp)
movl -0x57c(%rbp), %eax
movl %eax, -0x72c(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x728(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x720(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x30e0
movl -0x734(%rbp), %edi
movl -0x730(%rbp), %esi
movl -0x72c(%rbp), %edx
movq -0x728(%rbp), %rcx
movq -0x720(%rbp), %r8
movq %rax, %r9
callq 0x6f10
jmp 0x8756
movl -0x5a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5a4(%rbp)
jmp 0x8767
movl -0x5b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5b4(%rbp)
jmp 0x85ee
leaq -0x578(%rbp), %rdi
callq 0x32e0
movl $0x0, -0x354(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x30a0
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x30(%rbp), %rdi
callq 0x3140
movl -0x4(%rbp), %eax
addq $0x740, %rsp            # imm = 0x740
popq %rbp
retq
leaq -0x578(%rbp), %rdi
callq 0x32e0
leaq -0x350(%rbp), %rdi
callq 0x30a0
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x30(%rbp), %rdi
callq 0x3140
movq -0x40(%rbp), %rdi
callq 0x3380
nop