// File: /workspace/github_cpp_makefile_star2_O1/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 0x1cdd
movl %edi, %ebp
movl $0x1, %r12d
movsd 0x353b(%rip), %xmm0     # 0x5158
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
leaq 0x140b(%rip), %r15      # 0x3038
movslq %r12d, %rax
movq (%rbx,%rax,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x1c86
movzbl 0x1(%rcx), %ecx
leal -0x63(%rcx), %edx
cmpl $0x6, %edx
ja 0x1c93
movslq (%r15,%rdx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movl $0x1, 0x6060(%rip)      # 0x7cb8
leal 0x1(%rax), %r12d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1170
mulsd 0x139a(%rip), %xmm0     # 0x3008
movsd %xmm0, 0x6062(%rip)     # 0x7cd8
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x605c(%rip)     # 0x7ce0
jmp 0x1c89
movq %rcx, %r14
incl %r12d
cmpl %ebp, %r12d
jl 0x1c2d
jmp 0x1ce0
cmpl $0x70, %ecx
je 0x1cd1
cmpl $0x76, %ecx
jne 0x260e
movl $0x1, 0x5ff9(%rip)      # 0x7ca4
jmp 0x1c89
movl $0x1, 0x5ff5(%rip)      # 0x7cac
jmp 0x1c89
movl $0x1, 0x5ff1(%rip)      # 0x7cb4
jmp 0x1c89
movl $0x1, 0x5fe1(%rip)      # 0x7cb0
jmp 0x1c89
movl $0x1, 0x5fcd(%rip)      # 0x7ca8
jmp 0x1c89
xorl %r14d, %r14d
testq %r14, %r14
je 0x2578
leaq 0x139f(%rip), %rbx      # 0x308f
leaq 0x110(%rsp), %r15
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x11d0
movq %r15, %rdi
callq 0x140c
movq %r14, %rdi
movl $0x2f, %esi
callq 0x1120
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 0x11d0
movq %r14, %rdi
movl $0x2e, %esi
callq 0x1120
testq %rax, %rax
je 0x1d74
movq %rax, %rbx
leaq 0x188b(%rip), %rsi      # 0x35eb
movl $0x4, %edx
movq %rax, %rdi
callq 0x1080
testl %eax, %eax
jne 0x1d74
movb $0x0, (%rbx)
leaq 0x10(%rsp), %rdi
movl $0x2e, %esi
callq 0x1120
testq %rax, %rax
je 0x1da6
movq %rax, %rbx
leaq 0x1842(%rip), %rsi      # 0x35d4
movl $0x4, %edx
movq %rax, %rdi
callq 0x1080
testl %eax, %eax
jne 0x1da6
movb $0x0, (%rbx)
leaq 0x182c(%rip), %rdx      # 0x35d9
leaq 0x110(%rsp), %rbx
leaq 0x10(%rsp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11d0
leaq 0x1820(%rip), %rsi      # 0x35f0
movq %rbx, %rdi
callq 0x1060
movq %rax, 0x33a1(%rip)      # 0x5180
testq %rax, %rax
je 0x2616
leaq 0x1837(%rip), %rdi      # 0x3626
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x1200
movq 0x3378(%rip), %rdi      # 0x5180
leaq 0x1822(%rip), %rsi      # 0x3631
leaq 0x140c(%rip), %rdx      # 0x3222
xorl %eax, %eax
callq 0x11a0
cmpl $0x0, 0x5e94(%rip)      # 0x7cb8
je 0x1e43
movq 0x3353(%rip), %rdi      # 0x5180
movsd 0x5eab(%rip), %xmm0     # 0x7ce0
leaq 0x1825(%rip), %rsi      # 0x3661
movb $0x1, %al
callq 0x11a0
movq 0x3336(%rip), %rcx      # 0x5180
leaq 0x1874(%rip), %rdi      # 0x36c5
movl $0x19, %esi
movl $0x1, %edx
callq 0x1200
cmpl $0x0, 0x5e51(%rip)      # 0x7cb8
movq 0x3312(%rip), %rcx      # 0x5180
jne 0x1e7e
leaq 0x18b4(%rip), %rdi      # 0x372b
movl $0x4d, %esi
jmp 0x1e8a
leaq 0x185a(%rip), %rdi      # 0x36df
movl $0x4b, %esi
movl $0x1, %edx
callq 0x1200
cmpl $0x0, 0x5e19(%rip)      # 0x7cb4
je 0x1eb5
movq 0x314c(%rip), %rdi      # 0x4ff0
leaq 0x18ce(%rip), %rsi      # 0x3779
movl $0x45, %edx
callq 0x1140
cmpl $0x0, 0x5dec(%rip)      # 0x7ca8
je 0x1f73
leaq 0x18f6(%rip), %rdx      # 0x37bf
leaq 0x110(%rsp), %rbx
leaq 0x10(%rsp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11d0
leaq 0x1704(%rip), %rsi      # 0x35f0
movq %rbx, %rdi
callq 0x1060
movq %rax, 0x328d(%rip)      # 0x5188
testq %rax, %rax
je 0x261b
leaq 0x18fd(%rip), %rdi      # 0x3808
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x1200
movq 0x3264(%rip), %rdi      # 0x5188
leaq 0x18e8(%rip), %rsi      # 0x3813
leaq 0x12f0(%rip), %rdx      # 0x3222
xorl %eax, %eax
callq 0x11a0
movq 0x3248(%rip), %rcx      # 0x5188
leaq 0x18fa(%rip), %rdi      # 0x3841
movl $0x19, %esi
movl $0x1, %edx
callq 0x1200
movq 0x322b(%rip), %rcx      # 0x5188
leaq 0x18f7(%rip), %rdi      # 0x385b
movl $0x6b, %esi
movl $0x1, %edx
callq 0x1200
cmpl $0x0, 0x5d3a(%rip)      # 0x7cb4
je 0x1f94
movq 0x306d(%rip), %rdi      # 0x4ff0
leaq 0x17ef(%rip), %rsi      # 0x3779
movl $0x45, %edx
callq 0x1140
leaq 0x5435(%rip), %rdi      # 0x73d0
movl $0x888, %edx            # imm = 0x888
xorl %esi, %esi
callq 0x10a0
leaq 0x4b92(%rip), %rdi      # 0x6b40
movl $0x888, %edx            # imm = 0x888
xorl %esi, %esi
callq 0x10a0
leaq 0x42ef(%rip), %r14      # 0x62b0
movl $0x888, %edx            # imm = 0x888
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
leaq 0x3a49(%rip), %rdi      # 0x5a20
movl $0x888, %edx            # imm = 0x888
xorl %esi, %esi
callq 0x10a0
leaq 0x31a6(%rip), %r15      # 0x5190
movl $0x888, %edx            # imm = 0x888
movq %r15, %rdi
xorl %esi, %esi
callq 0x10a0
cmpl $0x0, 0x5ca4(%rip)      # 0x7ca4
je 0x2045
movq 0x2fe7(%rip), %r12      # 0x4ff0
leaq 0x18b7(%rip), %rsi      # 0x38c7
movl $0x20, %edx
movq %r12, %rdi
callq 0x1140
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
leaq 0x39d4(%rip), %r12      # 0x5a20
movq %r12, %rdi
movl $0x1, %esi
callq 0x14f3
cmpl $0x0, 0x5c40(%rip)      # 0x7ca0
sete %cl
testb %cl, %al
jne 0x2074
cmpl $0x0, 0x5c46(%rip)      # 0x7cb4
je 0x256e
cmpl $0x0, 0x5c35(%rip)      # 0x7cb0
je 0x20d8
movq 0x30fc(%rip), %rcx      # 0x5180
leaq 0x185d(%rip), %rdi      # 0x38e8
movl $0x3, %esi
movl $0x1, %edx
callq 0x1200
xorl %ebx, %ebx
leaq 0x1849(%rip), %r13      # 0x38ec
movq 0x30d6(%rip), %rdi      # 0x5180
movsd (%rbx,%r12), %xmm0
movq %r13, %rsi
movb $0x1, %al
callq 0x11a0
addq $0x8, %rbx
cmpq $0x888, %rbx            # imm = 0x888
jne 0x20a3
movq 0x30b2(%rip), %rsi      # 0x5180
movl $0xa, %edi
callq 0x1180
movb $0x1, 0x3069(%rip)      # 0x5148
leaq 0x1835(%rip), %r12      # 0x391b
leaq 0x17ff(%rip), %rbp      # 0x38ec
movq %r14, %rdi
movl $0x2, %esi
callq 0x14f3
cmpl $0x0, 0x5b9f(%rip)      # 0x7ca0
sete %cl
testb %cl, %al
jne 0x2115
cmpl $0x0, 0x5ba5(%rip)      # 0x7cb4
je 0x256e
cmpb $0x1, 0x302c(%rip)      # 0x5148
jne 0x2548
incq 0x5b67(%rip)            # 0x7c90
cmpl $0x0, 0x5b74(%rip)      # 0x7ca4
je 0x2186
movl $0xe, %edx
movq 0x2eb2(%rip), %rbx      # 0x4ff0
movq %rbx, %rdi
leaq 0x17ab(%rip), %rsi      # 0x38f3
callq 0x1140
movq 0x5b3c(%rip), %rsi      # 0x7c90
movq %rbx, %rdi
callq 0x10e0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r13, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movb $0x1, 0x2fbc(%rip)      # 0x5149
cmpl $0x0, 0x5b1c(%rip)      # 0x7cb0
je 0x21ea
movq 0x2fe3(%rip), %rcx      # 0x5180
movl $0x3, %esi
movl $0x1, %edx
leaq 0x1754(%rip), %rdi      # 0x3902
callq 0x1200
xorl %ebx, %ebx
movq 0x2fc4(%rip), %rdi      # 0x5180
movsd (%rbx,%r14), %xmm0
movq %rbp, %rsi
movb $0x1, %al
callq 0x11a0
addq $0x8, %rbx
cmpq $0x888, %rbx            # imm = 0x888
jne 0x21b5
movq 0x2fa0(%rip), %rsi      # 0x5180
movl $0xa, %edi
callq 0x1180
cmpl $0x0, 0x5ab7(%rip)      # 0x7ca8
je 0x2259
movaps 0x40c6(%rip), %xmm0     # 0x62c0
movaps %xmm0, 0x5a5f(%rip)     # 0x7c60
movsd 0x40d7(%rip), %xmm0     # 0x62e0
divsd 0xdff(%rip), %xmm0      # 0x3010
movsd %xmm0, 0x5a57(%rip)     # 0x7c70
movsd 0x40df(%rip), %xmm0     # 0x6300
movsd 0xdef(%rip), %xmm1      # 0x3018
mulsd %xmm1, %xmm0
movsd 0xdeb(%rip), %xmm2      # 0x3020
divsd %xmm2, %xmm0
movsd %xmm0, 0x5a37(%rip)     # 0x7c78
movsd 0x40bf(%rip), %xmm0     # 0x6308
mulsd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, 0x5a27(%rip)     # 0x7c80
cmpb $0x1, 0x2ee9(%rip)      # 0x5149
jne 0x240a
movl $0x1, %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x1831
orl 0x5a37(%rip), %eax      # 0x7cb4
je 0x256e
cmpb $0x1, 0x2ebf(%rip)      # 0x5149
jne 0x240a
xorl %ebx, %ebx
cmpl $0x0, 0x5a0b(%rip)      # 0x7ca4
jne 0x23c1
movsd (%rbx,%r15), %xmm0
ucomisd 0xd83(%rip), %xmm0      # 0x3030
jne 0x22b5
jnp 0x23e1
jbe 0x23ae
movsd 0x20(%rbx,%r15), %xmm0
movsd 0x28(%rbx,%r15), %xmm1
movsd %xmm0, 0x59ef(%rip)     # 0x7cc0
movsd %xmm1, 0x59ef(%rip)     # 0x7cc8
movsd 0x30(%rbx,%r15), %xmm2
movsd %xmm2, 0x59e8(%rip)     # 0x7cd0
cmpl $0x0, 0x59c9(%rip)      # 0x7cb8
je 0x22f6
callq 0x1733
movq 0x2e83(%rip), %rdi      # 0x5180
movsd (%rbx,%r15), %xmm1
movsd 0x8(%rbx,%r15), %xmm0
divsd 0xd16(%rip), %xmm1      # 0x3028
cvttsd2si %xmm1, %edx
movsd 0x10(%rbx,%r15), %xmm1
movsd 0x18(%rbx,%r15), %xmm2
movsd 0x5994(%rip), %xmm3     # 0x7cc0
movsd 0x5994(%rip), %xmm4     # 0x7cc8
movsd 0x5994(%rip), %xmm5     # 0x7cd0
cvttsd2si 0x3f7b(%rip), %r8d # 0x62c0
movq 0x5944(%rip), %rcx      # 0x7c90
movsd 0x3f74(%rip), %xmm6     # 0x62c8
movsd 0x3fa4(%rip), %xmm7     # 0x6300
movsd 0xcb3(%rip), %xmm9      # 0x3018
mulsd %xmm9, %xmm7
movsd 0xcad(%rip), %xmm10     # 0x3020
divsd %xmm10, %xmm7
movsd 0x3f87(%rip), %xmm8     # 0x6308
mulsd %xmm9, %xmm8
divsd %xmm10, %xmm8
movsd %xmm8, (%rsp)
movq %r12, %rsi
movb $0x8, %al
callq 0x11a0
movq 0x2dde(%rip), %rdi      # 0x5180
callq 0x1150
incq 0x58ea(%rip)            # 0x7c98
addq $0x38, %rbx
cmpq $0x888, %rbx            # imm = 0x888
jne 0x2292
jmp 0x23f1
movq 0x2c08(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
leaq 0x1534(%rip), %rsi      # 0x3906
movl %r13d, %edx
xorl %eax, %eax
callq 0x11a0
jmp 0x229f
cmpl $0x0, 0x58bc(%rip)      # 0x7ca4
jne 0x2403
movb $0x0, 0x2d58(%rip)      # 0x5149
incl %r13d
cmpb $0x0, 0x2d4e(%rip)      # 0x5149
jne 0x226c
jmp 0x240a
callq 0x1245
jmp 0x23ea
movsd 0x472e(%rip), %xmm0     # 0x6b40
ucomisd 0xc16(%rip), %xmm0      # 0x3030
leaq 0x471f(%rip), %r13      # 0x6b40
jne 0x244d
jp 0x244d
movq %r13, %rdi
movl $0x3, %esi
callq 0x14f3
cmpl $0x0, 0x5867(%rip)      # 0x7ca0
sete %cl
testb %cl, %al
jne 0x244d
cmpl $0x0, 0x586d(%rip)      # 0x7cb4
je 0x256e
cmpl $0x0, 0x585c(%rip)      # 0x7cb0
je 0x24aa
movq 0x2d23(%rip), %rcx      # 0x5180
movl $0x3, %esi
movl $0x1, %edx
leaq 0x151e(%rip), %rdi      # 0x398c
callq 0x1200
xorl %ebx, %ebx
movq 0x2d04(%rip), %rdi      # 0x5180
movsd (%rbx,%r13), %xmm0
movq %rbp, %rsi
movb $0x1, %al
callq 0x11a0
addq $0x8, %rbx
cmpq $0x888, %rbx            # imm = 0x888
jne 0x2475
movq 0x2ce0(%rip), %rsi      # 0x5180
movl $0xa, %edi
callq 0x1180
cmpl $0x0, 0x57f7(%rip)      # 0x7ca8
je 0x2530
movq 0x2cce(%rip), %rdi      # 0x5188
cvttsd2si 0x579e(%rip), %edx # 0x7c60
movsd 0x579e(%rip), %xmm0     # 0x7c68
movsd 0x579e(%rip), %xmm1     # 0x7c70
movsd 0x579e(%rip), %xmm2     # 0x7c78
movsd 0x579e(%rip), %xmm3     # 0x7c80
movsd 0x4666(%rip), %xmm4     # 0x6b50
movsd 0x4666(%rip), %xmm5     # 0x6b58
movsd 0x4666(%rip), %xmm6     # 0x6b60
movsd 0x4666(%rip), %xmm7     # 0x6b68
movsd 0x4665(%rip), %xmm8     # 0x6b70
movsd %xmm8, (%rsp)
leaq 0x1478(%rip), %rsi      # 0x3990
movb $0x8, %al
callq 0x11a0
movl $0x888, %edx            # imm = 0x888
movq %r13, %rdi
xorl %esi, %esi
callq 0x10a0
jmp 0x253b
movq $0x0, 0x4605(%rip) # 0x6b40
cmpb $0x0, 0x2c06(%rip)      # 0x5148
jne 0x20ed
leaq 0x10(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x1267
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 0x1160
movq 0x2a71(%rip), %r14      # 0x4ff0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movq %rax, %r14
leaq 0x100c(%rip), %rsi      # 0x35bc
movl $0x17, %edx
movq %rax, %rdi
callq 0x1140
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10f0
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 0x10f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movq (%rbx), %rdi
callq 0x1a27
callq 0x12d0
callq 0x1220