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

  char nfi[256]; // filename container
  char *ifiname=NULL; // input
  // 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 'c':
          iline=1;
          i++; // discard "CERARY"
          nx=atoi(argv[++i]);
          ny=atoi(argv[++i]);
          dx=atof(argv[++i]);
          dy=atof(argv[++i]);
          rx=atof(argv[++i]);
          ry=atof(argv[++i]);
          break;
        case 'h':
        default:
          Usage(argv[0]);
          break;
      }
    }
    else {
      ifiname=argv[i];
    }
  }
  if (!ifiname) {
    cerr << endl << "Error: Missing filename" << endl << endl;
    Usage(argv[0]);
  }
  if (!iline) {
    cerr << endl << "Error: CERARY line is mandatory" << endl << endl;
    Usage(argv[0]);
  }

  // determine primary offsets...
  const double ext_mirr=2.; // some photons laid outside the mirror... bug in corsika? Asume 10% to avoid problems... Actually if should be lower than min(Dx/Rx,Dy/Ry)
  if (iverbose)
    cerr << "Array characteristics: " << endl << "Nx= " << nx << "; Ny= " << ny << "; Dx= "<< dx*cmtom << " m; Dy= "<< dy*cmtom << " m; Rx= "<< rx*cmtom << " m; Ry= "<< ry*cmtom << " m" << endl;
  if (ny>1) // one row is not 2d :P
    i2d=1;
  else // just in case ny=0
    ny=1;
  xMirrOff = rx/2. * ext_mirr;
  if (nx%2)
    xOff = dx * (nx - 1.) / 2.;
  else
    xOff = dx * nx  / 2.;

  yMirrOff = ry/2. * ext_mirr;
  if (ny%2)
    yOff = dy * (ny - 1.) / 2.;
  else
    yOff = dy * ny  / 2.;
  if (!dy)
    dy = 1.; // just to avoid problems 


  //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 (.hst) via fopen
  //secondaries
  snprintf(nfi,256,"%s.hst",ifile);
  if ((sec = fopen(nfi,"w"))==NULL) {
    fprintf(stderr,"Failed to open histogram file. Abort.\n");
    exit(1);
  }
  fprintf(sec, "# # # hst\n");
  fprintf(sec, "# # This is the histogram of radial distribution of cherenkov phontons - ARTI     %s\n", VERSION);
  fprintf(sec, "# # Array characteristics: Nx= %d columns; Ny= %d rows; Dx= %.3f m; Dy= %.3f m; Rx= %.3f m; Ry= %.3f m\n", nx, ny, dx*cmtom, dy*cmtom, rx*cmtom, ry*cmtom);
  fprintf(sec, "# # 4 column format is:\n");
  fprintf(sec, "# # x y photons hits\n");

  // stop talking, let's work
  // histograms...
  double data[block_cols];
  int read_line_error = 0, check = 0;
  for (int k=0; k<block_cols; k++)
    data[k] = 0.;
  long double photons[nx][ny];
  long int hits[nx][ny];
  long int badx=0, bady=0;
  int i=0, j=0;
  for (i=0; i<nx; i++) {
    for (j=0; j<ny; j++) {
      photons[i][j]=0.;
      hits[i][j]=0;
    }
  }
  if (iverbose)
    cerr << "Files opened. Reading cherenkov data blocks" << endl;
  while (fgets(line,250,fi)!=NULL) {
    read_line_error=0;
    do {
      check=sscanf(line, "%le %le %le %le %le %le %le\n", &data[0], &data[1], &data[2], &data[3], &data[4], &data[5], &data[6]);
    } while (check != block_cols && read_line_error++ < read_tries);
    lines++;
    if (iverbose)
      if (!(lines%100000))
        fprintf(stderr, "%ld lines processed up to now\r", lines);
    if (data[0]>0) {
      i=getXbin(data[1]);
      if (i>nx) {
        if (iverbose)
          fprintf(stderr, "\nWarning: skipping photon hitting outside the array (index %d) at line %ld (%s)\n",i,lines,ifile);
        badx++;
        continue;
      }
      j=getYbin(data[2]);
      if (j>ny) {
        if (iverbose)
          fprintf(stderr, "\nWarning: skipping photon hitting outside the array (index %d) at line %ld (%s)\n",j,lines,ifile);
        bady++;
        continue;
      }
      photons[i][j] += data[0];
      hits[i][j]++;
      pht_cter+=data[0];
      hit_cter++;
    }
  }
  if (iverbose)
    fprintf(stderr,"\nDone... printing histograms...\n");
  for (int j=0;j<ny;j++) {
    for (i=0;i<nx;i++) {
      fprintf (sec, "%.3lf %.3lf %Lf %ld\n", getXpos(i), getYpos(j), photons[i][j], hits[i][j]);
    }
    fprintf (sec,"\n");
  }
  fprintf (sec, "# In %ld lines, we found %ld hits corresponding to %Lf photons, and %ld photons laid outside the array(x=%ld, y=%ld)\n", lines, hit_cter, pht_cter,badx+bady,badx,bady);
  fclose(sec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rsi, %r14
movl %edi, %r15d
pushq $0x1
popq %r12
xorl %ebx, %ebx
cmpl %r15d, %r12d
jge 0x15a2
movslq %r12d, %r13
movq (%r14,%r13,8), %rax
cmpb $0x2d, (%rax)
jne 0x151f
movzbl 0x1(%rax), %eax
cmpl $0x63, %eax
je 0x1524
cmpl $0x76, %eax
jne 0x1e08
movl $0x1, 0x2c17(%rip)      # 0x4134
jmp 0x159a
movq %rax, %rbx
jmp 0x159a
movl $0x1, 0x2d22(%rip)      # 0x4250
movq 0x10(%r14,%r13,8), %rdi
callq 0x1120
movl %eax, 0x2d1a(%rip)      # 0x4258
movq 0x18(%r14,%r13,8), %rdi
callq 0x1120
movl %eax, 0x2d0e(%rip)      # 0x425c
movq 0x20(%r14,%r13,8), %rdi
callq 0x10e0
movsd %xmm0, 0x2d00(%rip)     # 0x4260
movq 0x28(%r14,%r13,8), %rdi
callq 0x10e0
movsd %xmm0, 0x2cf6(%rip)     # 0x4268
movq 0x30(%r14,%r13,8), %rdi
callq 0x10e0
movsd %xmm0, 0x2cec(%rip)     # 0x4270
addl $0x7, %r12d
movq 0x38(%r14,%r13,8), %rdi
callq 0x10e0
movsd %xmm0, 0x2cde(%rip)     # 0x4278
incl %r12d
jmp 0x14ec
testq %rbx, %rbx
je 0x1dc8
cmpl $0x0, 0x2c9e(%rip)      # 0x4250
je 0x1ddd
cmpl $0x0, 0x2b75(%rip)      # 0x4134
je 0x16cd
movq 0x2a24(%rip), %rdi      # 0x3ff0
leaq 0xccb(%rip), %rsi       # 0x229e
callq 0x1090
movq %rax, %rdi
callq 0x1060
leaq 0xccf(%rip), %rsi       # 0x22b6
movq %rax, %rdi
callq 0x1090
movl 0x2c63(%rip), %esi      # 0x4258
movq %rax, %rdi
callq 0x1160
leaq 0xcb7(%rip), %rsi       # 0x22bb
movq %rax, %rdi
callq 0x1090
movl 0x2c4a(%rip), %esi      # 0x425c
movq %rax, %rdi
callq 0x1160
leaq 0xca1(%rip), %rsi       # 0x22c2
movq %rax, %rdi
callq 0x1090
movsd 0x2c2f(%rip), %xmm0     # 0x4260
mulsd 0x9cf(%rip), %xmm0      # 0x2008
movq %rax, %rdi
callq 0x1150
leaq 0xc81(%rip), %rsi       # 0x22c9
movq %rax, %rdi
callq 0x1090
movsd 0x2c10(%rip), %xmm0     # 0x4268
mulsd 0x9a8(%rip), %xmm0      # 0x2008
movq %rax, %rdi
callq 0x1150
leaq 0xc63(%rip), %rsi       # 0x22d2
movq %rax, %rdi
callq 0x1090
movsd 0x2bf1(%rip), %xmm0     # 0x4270
mulsd 0x981(%rip), %xmm0      # 0x2008
movq %rax, %rdi
callq 0x1150
leaq 0xc45(%rip), %rsi       # 0x22db
movq %rax, %rdi
callq 0x1090
movsd 0x962(%rip), %xmm0      # 0x2008
mulsd 0x2bca(%rip), %xmm0     # 0x4278
movq %rax, %rdi
callq 0x1150
leaq 0xc27(%rip), %rsi       # 0x22e4
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1060
leaq 0x2b88(%rip), %rax      # 0x425c
movl 0x2b82(%rip), %ecx      # 0x425c
cmpl $0x2, %ecx
leaq 0x2b70(%rip), %rdx      # 0x4254
cmovlq %rax, %rdx
pushq $0x1
popq %rax
cmovgel %ecx, %eax
movl $0x1, (%rdx)
movsd 0x914(%rip), %xmm0      # 0x2010
movsd 0x2b6c(%rip), %xmm1     # 0x4270
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd %xmm1, 0x2b74(%rip)     # 0x4288
movl 0x2b3e(%rip), %ecx      # 0x4258
andl $-0x2, %ecx
cvtsi2sd %ecx, %xmm1
mulsd 0x2b37(%rip), %xmm1     # 0x4260
mulsd %xmm0, %xmm1
movsd %xmm1, 0x2b4b(%rip)     # 0x4280
movsd 0x2b3b(%rip), %xmm1     # 0x4278
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd %xmm1, 0x2b4b(%rip)     # 0x4298
movsd 0x2b13(%rip), %xmm1     # 0x4268
andl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
cvtsi2sd %eax, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x2b22(%rip)     # 0x4290
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x178b
jp 0x178b
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x2add(%rip)      # 0x4268
leaq 0x8ce(%rip), %r14       # 0x2060
leaq -0x2b0(%rbp), %r15
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1140
movq %r15, %rdi
callq 0x12ac
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x10b0
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
leaq -0x1b0(%rbp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1140
pushq $0x2e
popq %rsi
movq %rbx, %rdi
callq 0x10b0
testq %rax, %rax
je 0x1811
movq %rax, %rbx
leaq 0x821(%rip), %rsi       # 0x2020
pushq $0x4
popq %rdx
movq %rax, %rdi
callq 0x1050
testl %eax, %eax
jne 0x1811
movb $0x0, (%rbx)
leaq -0x1b0(%rbp), %rdi
pushq $0x2e
popq %rsi
callq 0x10b0
testq %rax, %rax
je 0x1841
movq %rax, %rbx
leaq 0xab8(%rip), %rsi       # 0x22e7
pushq $0x4
popq %rdx
movq %rax, %rdi
callq 0x1050
testl %eax, %eax
jne 0x1841
movb $0x0, (%rbx)
leaq 0xaa4(%rip), %rdx       # 0x22ec
leaq -0x2b0(%rbp), %rbx
leaq -0x1b0(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1140
leaq 0xa87(%rip), %rsi       # 0x22f3
movq %rbx, %rdi
callq 0x10c0
movq %rax, 0x2885(%rip)      # 0x4100
testq %rax, %rax
je 0x1e10
leaq 0xa91(%rip), %rdi       # 0x231c
pushq $0xa
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1170
movq 0x285d(%rip), %rdi      # 0x4100
leaq 0xa7d(%rip), %rsi       # 0x2327
leaq 0x803(%rip), %rdx       # 0x20b4
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x1100
movq 0x283e(%rip), %rdi      # 0x4100
movl 0x2990(%rip), %edx      # 0x4258
movl 0x298e(%rip), %ecx      # 0x425c
movsd 0x732(%rip), %xmm4      # 0x2008
movsd 0x2982(%rip), %xmm0     # 0x4260
mulsd %xmm4, %xmm0
movsd 0x297e(%rip), %xmm1     # 0x4268
mulsd %xmm4, %xmm1
movsd 0x297a(%rip), %xmm2     # 0x4270
mulsd %xmm4, %xmm2
movsd 0x2976(%rip), %xmm3     # 0x4278
mulsd %xmm4, %xmm3
leaq 0xa70(%rip), %rsi       # 0x237d
movb $0x4, %al
callq 0x1100
movq 0x27e5(%rip), %rcx      # 0x4100
leaq 0xac3(%rip), %rdi       # 0x23e5
pushq $0x18
popq %rsi
movq %rbx, %rdx
callq 0x1170
movq 0x27cc(%rip), %rcx      # 0x4100
leaq 0xac3(%rip), %rdi       # 0x23fe
pushq $0x15
popq %rsi
movq %rbx, %rdx
callq 0x1170
cmpq $0x7, %r14
je 0x195a
andq $0x0, -0xb0(%rbp,%r14,8)
incq %r14
jmp 0x1946
movq %rsp, -0x68(%rbp)
movl 0x28f4(%rip), %eax      # 0x4258
movl 0x28f1(%rip), %r13d     # 0x425c
imulq %r13, %rax
shlq $0x4, %rax
movq %rsp, %r9
subq %rax, %r9
movq %r9, %rsp
movl 0x28d6(%rip), %esi      # 0x4258
movl 0x28d4(%rip), %edi      # 0x425c
movq %rsi, %rax
imulq %rdi, %rax
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
movq %rsp, %r10
subq %rax, %r10
movq %r10, %rsp
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %ecx
cmovgl %edi, %ecx
testl %esi, %esi
movl $0x0, %edx
cmovgl %esi, %edx
shlq $0x3, %rcx
movq %rdi, -0x40(%rbp)
leaq (,%rdi,8), %rsi
movq %rsi, -0x60(%rbp)
movq %r13, -0x48(%rbp)
shlq $0x4, %r13
fldz
movq %r9, %rsi
movq %r10, %rdi
cmpq %rdx, %rax
je 0x1a08
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x19fc
fld %st(0)
fstpt (%rsi,%r8,2)
andq $0x0, (%rdi,%r8)
addq $0x8, %r8
jmp 0x19e6
incq %rax
addq -0x60(%rbp), %rdi
addq %r13, %rsi
jmp 0x19de
fstp %st(0)
movq %r10, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpl $0x0, 0x271b(%rip)      # 0x4134
je 0x1a36
movq 0x25ce(%rip), %rdi      # 0x3ff0
leaq 0x9eb(%rip), %rsi       # 0x2414
callq 0x1090
movq %rax, %rdi
callq 0x1060
leaq 0x2713(%rip), %rbx      # 0x4150
leaq 0x9fc(%rip), %r14       # 0x2440
leaq -0xb0(%rbp), %r15
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq 0x2696(%rip), %rdx      # 0x40f8
movq %rbx, %rdi
movl $0xfa, %esi
callq 0x1130
testq %rax, %rax
je 0x1c63
xorl %r12d, %r12d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
leaq -0xa8(%rbp), %rcx
leaq -0xa0(%rbp), %r8
leaq -0x98(%rbp), %r9
xorl %eax, %eax
leaq -0x80(%rbp), %r10
pushq %r10
leaq -0x88(%rbp), %r10
pushq %r10
leaq -0x90(%rbp), %r10
pushq %r10
callq 0x1080
addq $0x20, %rsp
cmpl $0x7, %eax
je 0x1ad3
leal 0x1(%r12), %eax
cmpl $0xa, %r12d
movl %eax, %r12d
jb 0x1a7b
movq 0x2636(%rip), %rcx      # 0x4110
incq %rcx
movq %rcx, 0x262c(%rip)      # 0x4110
movq %rcx, %rax
cqto
movl $0x186a0, %esi          # imm = 0x186A0
idivq %rsi
cmpl $0x0, 0x263c(%rip)      # 0x4134
je 0x1b03
testq %rdx, %rdx
je 0x1bcd
movsd -0xb0(%rbp), %xmm0
ucomisd 0x505(%rip), %xmm0      # 0x2018
jbe 0x1a5b
movsd -0xa8(%rbp), %xmm1
addsd 0x2757(%rip), %xmm1     # 0x4280
addsd 0x2757(%rip), %xmm1     # 0x4288
divsd 0x2727(%rip), %xmm1     # 0x4260
cvttsd2si %xmm1, %edx
cmpl %edx, 0x2715(%rip)      # 0x4258
jl 0x1bed
movsd -0xa0(%rbp), %xmm1
addsd 0x2737(%rip), %xmm1     # 0x4290
addsd 0x2737(%rip), %xmm1     # 0x4298
divsd 0x26ff(%rip), %xmm1     # 0x4268
cvttsd2si %xmm1, %eax
cmpl %eax, 0x26e9(%rip)      # 0x425c
jl 0x1bff
movsd %xmm0, -0x70(%rbp)
fldl -0x70(%rbp)
movslq %edx, %rcx
movq %rcx, %rdx
imulq -0x48(%rbp), %rdx
shlq $0x4, %rdx
cltq
imulq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rsi
leaq (%rsi,%rcx,8), %rcx
incq (%rcx,%rax,8)
addq -0x38(%rbp), %rdx
shlq $0x4, %rax
fldt (%rax,%rdx)
fadd %st(1), %st
fstpt (%rax,%rdx)
fldt 0x2567(%rip)            # 0x4120
faddp %st, %st(1)
fstpt 0x255f(%rip)            # 0x4120
incq 0x2550(%rip)            # 0x4118
jmp 0x1a5b
movq 0x23fc(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
leaq 0x87f(%rip), %rsi       # 0x245d
movq %rcx, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x1b03
cmpl $0x0, 0x2540(%rip)      # 0x4134
jne 0x1c11
incq -0x58(%rbp)
jmp 0x1a5b
cmpl $0x0, 0x252e(%rip)      # 0x4134
jne 0x1c39
incq -0x50(%rbp)
jmp 0x1a5b
movq 0x23b8(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
movq 0x24ee(%rip), %rcx      # 0x4110
leaq 0x853(%rip), %rsi       # 0x247c
leaq -0x1b0(%rbp), %r8
xorl %eax, %eax
callq 0x1100
jmp 0x1bf6
movq 0x2390(%rip), %rcx      # 0x3fd0
movq (%rcx), %rdi
movq 0x24c6(%rip), %rcx      # 0x4110
leaq 0x82b(%rip), %rsi       # 0x247c
movl %eax, %edx
leaq -0x1b0(%rbp), %r8
xorl %eax, %eax
callq 0x1100
jmp 0x1c08
cmpl $0x0, 0x24ca(%rip)      # 0x4134
jne 0x1da7
xorl %ecx, %ecx
leaq 0x875(%rip), %rbx       # 0x24ee
movq -0x38(%rbp), %r14
movq -0x30(%rbp), %r15
movslq 0x25d4(%rip), %rax      # 0x425c
cmpq %rax, %rcx
jge 0x1d42
movq %rcx, -0x40(%rbp)
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r14, -0x38(%rbp)
movq %r15, -0x30(%rbp)
xorl %r12d, %r12d
movslq 0x25a8(%rip), %rax      # 0x4258
movq 0x2449(%rip), %rsi      # 0x4100
cmpq %rax, %r12
jge 0x1d1e
cvtsi2sd %r12d, %xmm0
mulsd 0x2597(%rip), %xmm0     # 0x4260
subsd 0x25af(%rip), %xmm0     # 0x4280
movsd 0x258f(%rip), %xmm1     # 0x4268
mulsd -0x48(%rbp), %xmm1
subsd 0x25aa(%rip), %xmm1     # 0x4290
movsd 0x31a(%rip), %xmm2      # 0x2008
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
fldt (%r14)
movq (%r15), %rdx
subq $0x10, %rsp
fstpt (%rsp)
movq %rsi, %rdi
movq %rbx, %rsi
movb $0x2, %al
callq 0x1100
popq %rcx
popq %rdx
incq %r12
addq -0x60(%rbp), %r15
addq %r13, %r14
jmp 0x1ca9
pushq $0xa
popq %rdi
callq 0x10f0
movq -0x40(%rbp), %rcx
incq %rcx
movq -0x30(%rbp), %r15
addq $0x8, %r15
movq -0x38(%rbp), %r14
addq $0x10, %r14
jmp 0x1c81
movq 0x23b7(%rip), %rdi      # 0x4100
movq 0x23c0(%rip), %rdx      # 0x4110
movq 0x23c1(%rip), %rcx      # 0x4118
fldt 0x23c3(%rip)            # 0x4120
subq $0x20, %rsp
movq -0x50(%rbp), %r8
movq %r8, 0x10(%rsp)
movq -0x58(%rbp), %r9
addq %r9, %r8
fstpt (%rsp)
leaq 0x788(%rip), %rsi       # 0x2503
xorl %eax, %eax
callq 0x1100
addq $0x20, %rsp
movq 0x2373(%rip), %rdi      # 0x4100
callq 0x10a0
movq -0x68(%rbp), %rsp
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2222(%rip), %rax      # 0x3fd0
movq (%rax), %rcx
leaq 0x715(%rip), %rdi       # 0x24cd
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
callq 0x1170
jmp 0x1c70
movq 0x2221(%rip), %rdi      # 0x3ff0
callq 0x1060
leaq 0x48b(%rip), %rsi       # 0x2266
jmp 0x1df0
movq 0x220c(%rip), %rdi      # 0x3ff0
callq 0x1060
leaq 0x48e(%rip), %rsi       # 0x227e
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1060
movq (%r14), %rdi
callq 0x138f
movq 0x21b9(%rip), %rax      # 0x3fd0
movq (%rax), %rcx
leaq 0x4d4(%rip), %rdi       # 0x22f5
pushq $0x26
popq %rsi
pushq $0x1
popq %rdx
callq 0x1170
pushq $0x1
popq %rdi
callq 0x10d0