// File: /workspace/github_cpp_makefile_star2_O3/lagoproject[P]arti/analysis/analysis.cc
// Function: main
int main(int argc, char *argv[]) {

  char nfi[256]; // filename container
  char *ifiname=NULL; // input
  int block=0;

  // reading arguments from command line
  for (int i=1;i<argc;i++) {
    char *tmparg=argv[i];
    if (*tmparg=='-') {
      switch (*(tmparg+1)) {
        case 'v':
          iverbose=1;
          break;
        case 'p':
          iprim=1;
          break;
        case 'f':
          iforce=1;
          break;
        case 'd':
          idegub=1;
          break;
        case 'i':
          iinclude=1;
          break;
        case 'c':
		  icurve=1;
		  i++;
		  h=(double)(atof(argv[i])*100.); // calculation is in cm...
		  hInM=h*cm2m;
		  break;
        case '?':
        default:
          Usage(argv[0]);
          break;
      }
    }
    else {
      ifiname=argv[i];
    }
  }
  if (!ifiname) {
    cerr << endl << "Error: Missing filename" << endl << endl;
    Usage(argv[0]);
  }
  //open input
  snprintf(nfi,256,"%s",ifiname);
  Open(nfi);
  //open output
  char *ifile2;
  char ifile[256];
  ifile2=ifiname;
  //remove dirs
  if (strrchr(ifile2,'/')!=NULL) {
    ifile2=strrchr(ifile2,'/')+1;
  }
  snprintf(ifile, 256,"%s",ifile2);
  if (strrchr(ifile,'.')!=NULL) {
    if (strncmp(strrchr(ifile,'.'),".bz2",4)==0) { // remove .bz2 if present
      *(strrchr(ifile,'.'))='\0';
    }
  }
  if (strrchr(ifile,'.')!=NULL) {
    if (strncmp(strrchr(ifile,'.'),".dat",4)==0) { // remove .dat if present
      *(strrchr(ifile,'.'))='\0';
    }
  }

  // open output file (.bz2) via popen
  //secondaries
  snprintf(nfi,256,"bzip2 -9z > %s.sec.bz2",ifile);
  if ((sec = popen(nfi,"w"))==NULL) {
    fprintf(stderr,"Failed to open compressed secondaries file. Abort.\n");
    exit(1);
  }
  fprintf(sec, "# # # sec\n");
  fprintf(sec, "# # This is the Secondaries file - ARTI     %s\n", VERSION);
  if (icurve)
	  fprintf(sec, "# # Curve mode was enabled and observation level is %.0lf m a.s.l. XYZ is printed instead of x'y't\n",hInM);
  fprintf(sec, "# # 12 column format is:\n");
  if (icurve)
	  fprintf(sec, "# # CorsikaId px py pz x y z shower_id prm_id prm_energy prm_theta prm_phi\n");
  else
	  fprintf(sec, "# # CorsikaId px py pz x' y' t shower_id prm_id prm_energy prm_theta prm_phi\n");
  if (iforce)
    cerr << "WARNING! Force mode is enabled. Consistency checks will be ignorated\n";
  //primaries
  if (iprim) {
    snprintf(nfi,256,"bzip2 -9z > %s.pri.bz2",ifile);
    if ((pri = popen(nfi,"w"))==NULL) {
      fprintf(stderr,"Failed to open compressed primaries file. Abort.\n");
      exit(1);
    }
    fprintf(pri, "# # # pri\n");
    fprintf(pri, "# # This is the Primaries file - ARTI     %s\n", VERSION);
    fprintf(pri, "# # 10 column format is:\n");
    fprintf(pri, "# # prm_Crk_id prm_energy prm_x0 prm_theta prm_phi ph_obs_lev el_obs_lev hd_obs_lev mu_obs_lev tot_obs_lev\n");
  }

  if (iforce)
    cerr << "WARNING! Force mode is enabled. Consistency checks will be ignorated\n";

  // stop talking, let's work

  for (int i=0; i<block_size; i++)
    data_block[i] = run_header[i] = evt_header[i] = evt_footer[i] = run_footer[i] = 0.;

  // Reading RUN HEADER (273=7x39)
  if (iverbose)
    cerr << "Files opened. Reading run header" << endl;
  if (!ReadBlock(run_header, 1) || bad_block)
    if (!iforce)
      exit(1);
  if (iinclude) {
    fprintf(sec, "# r");
    for (int i=0; i<block_size; i++)
      fprintf(sec, " %+.5E", run_header[i]);
    fprintf(sec, "\n");
  } 
  // Everything ok, continue
  // events
  // event header
  events=true;
  while (events) {
    if (!ReadBlock(evt_header, 2) || bad_block)
      if (!iforce)
        exit(1);
    if (!events)
      break;
    //reading data blocks for this events
    shower_id++;
    if (iverbose)
      cerr << "Reading event " << shower_id << endl;
    block = 1;
    b_data=true;
    if (iinclude) {
      fprintf(sec, "# h");
      for (int i=0; i<block_size; i++)
        fprintf(sec, " %+.5E", evt_header[i]);
      fprintf(sec, "\n");
    }
     
    if (iprim) {
      evt_buffer[0] = evt_header[2];
      evt_buffer[1] = evt_header[3];
      evt_buffer[2] = evt_header[6]/1e5;
      evt_buffer[3] = rad2deg(evt_header[10]);
      evt_buffer[4] = rad2deg(evt_header[11]);
    }
    while (b_data) {
      if (!ReadDataBlock(data_block, block))
        if (!iforce)
          exit(1);
      if (!b_data)
        break;
      for (int i=0; i<block_rows; i++) {
      if (iverbose)
        fprintf(stderr, "Reading block: %08d\r", block);
      if (data_block[i*block_cols]) {
        if (data_block[i*block_cols]>0) {
			x = data_block[i*block_cols+4];
			y = data_block[i*block_cols+5];
			z = data_block[i*block_cols+6];
			if (icurve)
			  curved(data_block[i*block_cols+4], data_block[i*block_cols+5]);
            fprintf (
              sec, "%04d %+.5E %+.5E %+.5E %+.5E %+.5E %+.5E %08ld %04d %+.5E %+07.3lf %+08.3lf\n",
              int(data_block[i*block_cols+0]/1000.),
              data_block[i*block_cols+1], 
              data_block[i*block_cols+2], 
              data_block[i*block_cols+3], 
              x,
			  y,
			  z,
              shower_id,
              int(evt_header[2]),
              evt_header[3],
              rad2deg(evt_header[10]),
              rad2deg(evt_header[11])
            ); 
            fflush(sec);
            counter++;
        }
      }
      else { // no more particles
          if (iverbose)
            fprintf(stderr,"\nNo more particles for this event.\n");
          b_data=false;
          break;
      }
    }
    block++;
    }
    if (!evt_footer[0])
      if (!ReadBlock(evt_footer, 3) || bad_block)
        if (!iforce)
          exit(1);
    if (iinclude) {
      fprintf(sec, "# f");
      for (int i=0; i<block_size; i++)
        fprintf(sec, " %+.5E", evt_footer[i]);
      fprintf(sec, "\n");
    } 
    if (iprim) {
      fprintf (
        pri, "%04d %+.5E %+.5E %+08.3lf %+08.3lf %+.5E %+.5E %+.5E %+.5E %+.5E\n",
        int(evt_buffer[0]),
        evt_buffer[1],
        evt_buffer[2],
        evt_buffer[3],
        evt_buffer[4],
        evt_footer[2],
        evt_footer[3],
        evt_footer[4],
        evt_footer[5],
        evt_footer[6]
      );
      for (int i=0; i<block_size; i++)
        evt_footer[i] = 0.;
    }
    else
      evt_footer[0] = 0.; // force lecture of the new event footer
  }
  fprintf(sec, "# # %ld lines read on %ld secondaries for %ld showers\n", lines, counter, shower_id);
  fprintf(stderr, "%ld lines read on %ld secondaries for %ld showers\nEverything fine. Goodbye\n\n", lines, counter, shower_id);
  pclose(sec);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
cmpl $0x2, %edi
jl 0x2580
movl %edi, %ebp
movl $0x1, %r12d
movsd 0x3521(%rip), %xmm0     # 0x5148
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
leaq 0x1409(%rip), %r15      # 0x3040
movslq %r12d, %rax
movq (%rbx,%rax,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x1c90
movzbl 0x1(%rcx), %ecx
leal -0x63(%rcx), %edx
cmpl $0x6, %edx
ja 0x1c9d
movslq (%r15,%rdx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movl $0x1, 0x6046(%rip)      # 0x7ca8
leal 0x1(%rax), %r12d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1160
mulsd 0x1390(%rip), %xmm0     # 0x3008
movsd %xmm0, 0x6048(%rip)     # 0x7cc8
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x6042(%rip)     # 0x7cd0
jmp 0x1c93
movq %rcx, %r14
incl %r12d
cmpl %ebp, %r12d
jl 0x1c37
jmp 0x1ce7
cmpl $0x70, %ecx
je 0x1cdb
cmpl $0x76, %ecx
jne 0x2616
movl $0x1, 0x5fdf(%rip)      # 0x7c94
jmp 0x1c93
movl $0x1, 0x5fdb(%rip)      # 0x7c9c
jmp 0x1c93
movl $0x1, 0x5fd7(%rip)      # 0x7ca4
jmp 0x1c93
movl $0x1, 0x5fc7(%rip)      # 0x7ca0
jmp 0x1c93
movl $0x1, 0x5fb3(%rip)      # 0x7c98
jmp 0x1c93
testq %r14, %r14
je 0x2580
leaq 0x13a0(%rip), %rbx      # 0x3097
leaq 0x110(%rsp), %r15
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x11c0
movq %r15, %rdi
callq 0x13fc
movq %r14, %rdi
movl $0x2f, %esi
callq 0x1110
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %r14, %rcx
leaq 0x10(%rsp), %r14
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x11c0
movq %r14, %rdi
movl $0x2e, %esi
callq 0x1110
testq %rax, %rax
je 0x1d7b
movq %rax, %rbx
leaq 0x188c(%rip), %rsi      # 0x35f3
movl $0x4, %edx
movq %rax, %rdi
callq 0x1080
testl %eax, %eax
jne 0x1d7b
movb $0x0, (%rbx)
leaq 0x10(%rsp), %rdi
movl $0x2e, %esi
callq 0x1110
testq %rax, %rax
je 0x1dad
movq %rax, %rbx
leaq 0x1843(%rip), %rsi      # 0x35dc
movl $0x4, %edx
movq %rax, %rdi
callq 0x1080
testl %eax, %eax
jne 0x1dad
movb $0x0, (%rbx)
leaq 0x182d(%rip), %rdx      # 0x35e1
leaq 0x110(%rsp), %rbx
leaq 0x10(%rsp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11c0
leaq 0x1821(%rip), %rsi      # 0x35f8
movq %rbx, %rdi
callq 0x1060
movq %rax, 0x338a(%rip)      # 0x5170
testq %rax, %rax
je 0x261e
leaq 0x1838(%rip), %rdi      # 0x362e
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x11f0
movq 0x3361(%rip), %rdi      # 0x5170
leaq 0x1823(%rip), %rsi      # 0x3639
leaq 0x140d(%rip), %rdx      # 0x322a
xorl %eax, %eax
callq 0x1190
cmpl $0x0, 0x5e7d(%rip)      # 0x7ca8
je 0x1e4a
movq 0x333c(%rip), %rdi      # 0x5170
movsd 0x5e94(%rip), %xmm0     # 0x7cd0
leaq 0x1826(%rip), %rsi      # 0x3669
movb $0x1, %al
callq 0x1190
movq 0x331f(%rip), %rcx      # 0x5170
leaq 0x1875(%rip), %rdi      # 0x36cd
movl $0x19, %esi
movl $0x1, %edx
callq 0x11f0
cmpl $0x0, 0x5e3a(%rip)      # 0x7ca8
movq 0x32fb(%rip), %rcx      # 0x5170
jne 0x1e85
leaq 0x18b5(%rip), %rdi      # 0x3733
movl $0x4d, %esi
jmp 0x1e91
leaq 0x185b(%rip), %rdi      # 0x36e7
movl $0x4b, %esi
movl $0x1, %edx
callq 0x11f0
cmpl $0x0, 0x5e02(%rip)      # 0x7ca4
je 0x1ebc
movq 0x3145(%rip), %rdi      # 0x4ff0
leaq 0x18cf(%rip), %rsi      # 0x3781
movl $0x45, %edx
callq 0x1130
cmpl $0x0, 0x5dd5(%rip)      # 0x7c98
je 0x1f7a
leaq 0x18f7(%rip), %rdx      # 0x37c7
leaq 0x110(%rsp), %rbx
leaq 0x10(%rsp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11c0
leaq 0x1705(%rip), %rsi      # 0x35f8
movq %rbx, %rdi
callq 0x1060
movq %rax, 0x3276(%rip)      # 0x5178
testq %rax, %rax
je 0x2623
leaq 0x18fe(%rip), %rdi      # 0x3810
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x11f0
movq 0x324d(%rip), %rdi      # 0x5178
leaq 0x18e9(%rip), %rsi      # 0x381b
leaq 0x12f1(%rip), %rdx      # 0x322a
xorl %eax, %eax
callq 0x1190
movq 0x3231(%rip), %rcx      # 0x5178
leaq 0x18fb(%rip), %rdi      # 0x3849
movl $0x19, %esi
movl $0x1, %edx
callq 0x11f0
movq 0x3214(%rip), %rcx      # 0x5178
leaq 0x18f8(%rip), %rdi      # 0x3863
movl $0x6b, %esi
movl $0x1, %edx
callq 0x11f0
cmpl $0x0, 0x5d23(%rip)      # 0x7ca4
je 0x1f9b
movq 0x3066(%rip), %rdi      # 0x4ff0
leaq 0x17f0(%rip), %rsi      # 0x3781
movl $0x45, %edx
callq 0x1130
leaq 0x541e(%rip), %rdi      # 0x73c0
movl $0x888, %edx            # imm = 0x888
xorl %esi, %esi
callq 0x10a0
leaq 0x4b7b(%rip), %rbx      # 0x6b30
movl $0x888, %edx            # imm = 0x888
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
leaq 0x42d5(%rip), %r14      # 0x62a0
movl $0x888, %edx            # imm = 0x888
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
leaq 0x3a2f(%rip), %rdi      # 0x5a10
movl $0x888, %edx            # imm = 0x888
xorl %esi, %esi
callq 0x10a0
leaq 0x318c(%rip), %r15      # 0x5180
movl $0x888, %edx            # imm = 0x888
movq %r15, %rdi
xorl %esi, %esi
callq 0x10a0
cmpl $0x0, 0x5c8a(%rip)      # 0x7c94
je 0x204f
movq 0x2fdd(%rip), %r12      # 0x4ff0
leaq 0x18b5(%rip), %rsi      # 0x38cf
movl $0x20, %edx
movq %r12, %rdi
callq 0x1130
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
leaq 0x39ba(%rip), %r12      # 0x5a10
movq %r12, %rdi
movl $0x1, %esi
callq 0x14e3
cmpl $0x0, 0x5c26(%rip)      # 0x7c90
sete %cl
testb %cl, %al
jne 0x207e
cmpl $0x0, 0x5c2c(%rip)      # 0x7ca4
je 0x2576
cmpl $0x0, 0x5c1b(%rip)      # 0x7ca0
je 0x20e3
movq 0x30e2(%rip), %rcx      # 0x5170
leaq 0x185b(%rip), %rdi      # 0x38f0
movl $0x3, %esi
movl $0x1, %edx
callq 0x11f0
xorl %ebp, %ebp
leaq 0x1847(%rip), %r13      # 0x38f4
movq 0x30bc(%rip), %rdi      # 0x5170
movsd (%rbp,%r12), %xmm0
movq %r13, %rsi
movb $0x1, %al
callq 0x1190
addq $0x8, %rbp
cmpq $0x888, %rbp            # imm = 0x888
jne 0x20ad
movq 0x3097(%rip), %rsi      # 0x5170
movl $0xa, %edi
callq 0x1170
movb $0x1, 0x304e(%rip)      # 0x5138
leaq 0x1803(%rip), %rbp      # 0x38f4
movq %r14, %rdi
movl $0x2, %esi
callq 0x14e3
cmpl $0x0, 0x5b8b(%rip)      # 0x7c90
sete %cl
testb %cl, %al
jne 0x2119
cmpl $0x0, 0x5b91(%rip)      # 0x7ca4
je 0x2576
cmpb $0x1, 0x3018(%rip)      # 0x5138
jne 0x2550
incq 0x5b53(%rip)            # 0x7c80
cmpl $0x0, 0x5b60(%rip)      # 0x7c94
je 0x218a
movl $0xe, %edx
movq 0x2eae(%rip), %r12      # 0x4ff0
movq %r12, %rdi
leaq 0x17af(%rip), %rsi      # 0x38fb
callq 0x1130
movq 0x5b28(%rip), %rsi      # 0x7c80
movq %r12, %rdi
callq 0x10d0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r13, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movb $0x1, 0x2fa8(%rip)      # 0x5139
cmpl $0x0, 0x5b08(%rip)      # 0x7ca0
je 0x21ef
movq 0x2fcf(%rip), %rcx      # 0x5170
movl $0x3, %esi
movl $0x1, %edx
leaq 0x1758(%rip), %rdi      # 0x390a
callq 0x11f0
xorl %r12d, %r12d
movq 0x2faf(%rip), %rdi      # 0x5170
movsd (%r12,%r14), %xmm0
movq %rbp, %rsi
movb $0x1, %al
callq 0x1190
addq $0x8, %r12
cmpq $0x888, %r12            # imm = 0x888
jne 0x21ba
movq 0x2f8b(%rip), %rsi      # 0x5170
movl $0xa, %edi
callq 0x1170
cmpl $0x0, 0x5aa2(%rip)      # 0x7c98
je 0x2252
movaps 0x40b1(%rip), %xmm0     # 0x62b0
movaps %xmm0, 0x5a4a(%rip)     # 0x7c50
movapd 0x40c2(%rip), %xmm0     # 0x62d0
movsd 0x40da(%rip), %xmm1     # 0x62f0
movsd 0xdf2(%rip), %xmm2      # 0x3010
mulsd %xmm2, %xmm1
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
divpd 0xe02(%rip), %xmm0      # 0x3030
movapd %xmm0, 0x5a2a(%rip)     # 0x7c60
movsd 0x40ba(%rip), %xmm0     # 0x62f8
mulsd %xmm2, %xmm0
divsd 0xdce(%rip), %xmm0      # 0x3018
movsd %xmm0, 0x5a1e(%rip)     # 0x7c70
cmpb $0x1, 0x2ee0(%rip)      # 0x5139
jne 0x240c
movl $0x1, %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x1820
orl 0x5a2e(%rip), %eax      # 0x7ca4
je 0x2576
cmpb $0x1, 0x2eb6(%rip)      # 0x5139
jne 0x240c
xorl %r12d, %r12d
cmpl $0x0, 0x5a01(%rip)      # 0x7c94
jne 0x23c6
movsd (%r12,%r15), %xmm0
ucomisd 0xd81(%rip), %xmm0      # 0x3028
jne 0x22af
jnp 0x23f8
jbe 0x23b3
movsd 0x20(%r12,%r15), %xmm3
movsd 0x28(%r12,%r15), %xmm4
movsd %xmm3, 0x59e5(%rip)     # 0x7cb0
movsd %xmm4, 0x59e5(%rip)     # 0x7cb8
movsd 0x30(%r12,%r15), %xmm5
movsd %xmm5, 0x59de(%rip)     # 0x7cc0
cmpl $0x0, 0x59bf(%rip)      # 0x7ca8
je 0x2315
movaps %xmm3, %xmm0
movapd %xmm4, %xmm1
callq 0x1749
movsd (%r12,%r15), %xmm0
movsd 0x59ab(%rip), %xmm3     # 0x7cb0
movsd 0x59ab(%rip), %xmm4     # 0x7cb8
movsd 0x59ab(%rip), %xmm5     # 0x7cc0
movq 0x2e54(%rip), %rdi      # 0x5170
divsd 0xcfc(%rip), %xmm0      # 0x3020
cvttsd2si %xmm0, %edx
movsd 0x8(%r12,%r15), %xmm0
movsd 0x10(%r12,%r15), %xmm1
movsd 0x18(%r12,%r15), %xmm2
cvttsd2si 0x3f6a(%rip), %r8d # 0x62b0
movq 0x5933(%rip), %rcx      # 0x7c80
movsd 0x3f63(%rip), %xmm6     # 0x62b8
movsd 0x3f93(%rip), %xmm7     # 0x62f0
movsd 0xcaa(%rip), %xmm9      # 0x3010
mulsd %xmm9, %xmm7
movsd 0xca4(%rip), %xmm10     # 0x3018
divsd %xmm10, %xmm7
movsd 0x3f76(%rip), %xmm8     # 0x62f8
mulsd %xmm9, %xmm8
divsd %xmm10, %xmm8
movsd %xmm8, (%rsp)
leaq 0x158a(%rip), %rsi      # 0x3923
movb $0x8, %al
callq 0x1190
movq 0x2dc9(%rip), %rdi      # 0x5170
callq 0x1140
incq 0x58d5(%rip)            # 0x7c88
addq $0x38, %r12
cmpq $0x888, %r12            # imm = 0x888
jne 0x228c
jmp 0x23e6
movq 0x2c03(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
leaq 0x1537(%rip), %rsi      # 0x390e
movl %r13d, %edx
xorl %eax, %eax
callq 0x1190
jmp 0x2299
incl %r13d
testb $0x1, 0x2d49(%rip)      # 0x5139
jne 0x2265
jmp 0x240c
cmpl $0x0, 0x5895(%rip)      # 0x7c94
jne 0x2546
movb $0x0, 0x2d2d(%rip)      # 0x5139
movsd 0x471c(%rip), %xmm0     # 0x6b30
ucomisd 0xc0c(%rip), %xmm0      # 0x3028
jne 0x2448
jp 0x2448
movq %rbx, %rdi
movl $0x3, %esi
callq 0x14e3
cmpl $0x0, 0x585c(%rip)      # 0x7c90
sete %cl
testb %cl, %al
jne 0x2448
cmpl $0x0, 0x5862(%rip)      # 0x7ca4
je 0x2576
cmpl $0x0, 0x5851(%rip)      # 0x7ca0
je 0x24a6
movq 0x2d18(%rip), %rcx      # 0x5170
movl $0x3, %esi
movl $0x1, %edx
leaq 0x152b(%rip), %rdi      # 0x3994
callq 0x11f0
xorl %r12d, %r12d
movq 0x2cf8(%rip), %rdi      # 0x5170
movsd (%r12,%rbx), %xmm0
movq %rbp, %rsi
movb $0x1, %al
callq 0x1190
addq $0x8, %r12
cmpq $0x888, %r12            # imm = 0x888
jne 0x2471
movq 0x2cd4(%rip), %rsi      # 0x5170
movl $0xa, %edi
callq 0x1170
cmpl $0x0, 0x57eb(%rip)      # 0x7c98
je 0x252c
movq 0x2cc2(%rip), %rdi      # 0x5178
cvttsd2si 0x5792(%rip), %edx # 0x7c50
movsd 0x5792(%rip), %xmm0     # 0x7c58
movsd 0x5792(%rip), %xmm1     # 0x7c60
movsd 0x5792(%rip), %xmm2     # 0x7c68
movsd 0x5792(%rip), %xmm3     # 0x7c70
movsd 0x465a(%rip), %xmm4     # 0x6b40
movsd 0x465a(%rip), %xmm5     # 0x6b48
movsd 0x465a(%rip), %xmm6     # 0x6b50
movsd 0x465a(%rip), %xmm7     # 0x6b58
movsd 0x4659(%rip), %xmm8     # 0x6b60
movsd %xmm8, (%rsp)
leaq 0x1484(%rip), %rsi      # 0x3998
movb $0x8, %al
callq 0x1190
movl $0x888, %edx            # imm = 0x888
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
jmp 0x2537
movq $0x0, 0x45f9(%rip) # 0x6b30
cmpb $0x0, 0x2bfa(%rip)      # 0x5138
jne 0x20f1
jmp 0x2550
callq 0x1235
jmp 0x2405
leaq 0x10(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x1257
xorl %eax, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1150
movq 0x2a69(%rip), %r14      # 0x4ff0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movq %rax, %r14
leaq 0x100c(%rip), %rsi      # 0x35c4
movl $0x17, %edx
movq %rax, %rdi
callq 0x1130
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movq (%rbx), %rdi
callq 0x1a31
callq 0x12c0
callq 0x1210