// File: /workspace/github_c_makefile_star2_O2/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: write_ev
int write_ev(MJD_Siggen_Setup *setup) {
  int    i, j, new=1;
  float  grid = setup->xtal_grid;
  //int    L  = setup->xtal_length/grid + 2.99;
  //int    R  = setup->xtal_radius/grid + 2.99;
  int    L  = lrint(setup->xtal_length/grid)+2;
  int    R  = lrint(setup->xtal_radius/grid)+2;
  float  r, z, E;
  FILE   *file;
  double ***v = setup->v;
  cyl_pt **e;

  setup->Emin = 99999.9;
  setup->rmin = setup->zmin = 999.9;


  if (setup->impurity_z0 > 0) {
    // swap voltages back to negative for n-type material
    for (i=1; i<L; i++) {
      for (j=1; j<R; j++) {
        setup->v[new][i][j] = -setup->v[new][i][j];
      }
    }
  }

  /* write potential and field to output file */
  if (!(file = fopen(setup->field_name, "w"))) {
    printf("ERROR: Cannot open file %s for electric field...\n", setup->field_name);
    return 1;
  } else {
    printf("Writing electric field data to file %s\n", setup->field_name);
  }
  /* copy configuration parameters to output file */
  report_config(file, setup->config_file_name);
  fprintf(file, "#\n# HV bias in fieldgen: %.1f V\n", setup->xtal_HV);
  if (setup->fully_depleted) {
    fprintf(file, "# Detector is fully depleted.\n");
  } else {
    fprintf(file, "# Detector is not fully depleted.\n");
    if (setup->bubble_volts > 0.0f)
      fprintf(file, "# Pinch-off bubble at %.0f V potential\n", setup->bubble_volts);
  }
  
  if ((e = (cyl_pt **) malloc(R*sizeof(*e))) == NULL) {
    printf("ERROR: Malloc failed\n");
    fclose(file);
    return 1;
  }
  for (i = 0; i < R; i++){
    if ((e[i] = (cyl_pt *) calloc(L, sizeof(*e[i]))) == NULL) {
      printf("ERROR: Calloc failed\n");
      fclose(file);
      return 1;
    }
  }

  for (j = 1; j < R; j++) {
    r = (j-1) * grid;
    for (i = 1; i < L; i++) {
      z = (i-1) * grid;
      // calc E in r-direction
      if (j == 1) {  // r = 0; symmetry implies E_r = 0
        e[j][i].r = 0;
      } else if (setup->point_type[i][j] == CONTACT_EDGE) {
        e[j][i].r = ((v[new][i][j] - v[new][i][j+1])*setup->dr[1][i][j] +
               (v[new][i][j-1] - v[new][i][j])*setup->dr[0][i][j]) / (0.2*grid);
      } else if (setup->point_type[i][j] < INSIDE &&
                 setup->point_type[i][j-1] == CONTACT_EDGE) {
        e[j][i].r =  (v[new][i][j-1] - v[new][i][j]) * setup->dr[1][i][j-1] / ( 0.1*grid) ;
      } else if (setup->point_type[i][j] < INSIDE &&
                 setup->point_type[i][j+1] == CONTACT_EDGE) {
        e[j][i].r =  (v[new][i][j] - v[new][i][j+1]) * setup->dr[0][i][j+1] / ( 0.1*grid) ;
      } else if (j == R-1) {
        e[j][i].r = (v[new][i][j-1] - v[new][i][j])/(0.1*grid);
      } else {
        e[j][i].r = (v[new][i][j-1] - v[new][i][j+1])/(0.2*grid);
      }
      // calc E in z-direction
      if (setup->point_type[i][j] == CONTACT_EDGE) {
        e[j][i].z = ((v[new][i][j] - v[new][i+1][j])*setup->dz[1][i][j] +
               (v[new][i-1][j] - v[new][i][j])*setup->dz[0][i][j]) / (0.2*grid);
      } else if (setup->point_type[i][j] < INSIDE &&
                 setup->point_type[i-1][j] == CONTACT_EDGE) {
        e[j][i].z =  (v[new][i-1][j] - v[new][i][j]) * setup->dz[1][i-1][j] / ( 0.1*grid) ;
      } else if (setup->point_type[i][j] < INSIDE &&
                 setup->point_type[i+1][j] == CONTACT_EDGE) {
        e[j][i].z =  (v[new][i][j] - v[new][i+1][j]) * setup->dz[0][i+1][j] / ( 0.1*grid) ;
      } else if (i == 1) {
        e[j][i].z = (v[new][i][j] - v[new][i+1][j])/(0.1*grid);
      } else if (i == L-1) {
        e[j][i].z = (v[new][i-1][j] - v[new][i][j])/(0.1*grid);
      } else {
        e[j][i].z = (v[new][i-1][j] - v[new][i+1][j])/(0.2*grid);
      }

      /* temporarily store E in e[j][i].phi */
      E = e[j][i].phi = sqrt(e[j][i].r*e[j][i].r + e[j][i].z*e[j][i].z);
      /* check for minimum field inside bulk of detector */
      int k = 3.0/grid;
      if (E > 0.1 && E < setup->Emin &&
          i > k+1 && j < R-k-1 && i < L-k-1 &&
          setup->point_type[i][j] == INSIDE &&
          setup->point_type[i + k][j] == INSIDE &&  // point is at least 3 mm from a boundary
          setup->point_type[i - k][j] == INSIDE &&
          setup->point_type[i][j + k] == INSIDE &&
          (j < k+1 || setup->point_type[i][j - k] == INSIDE)) {
        setup->Emin = E;
        setup->rmin = r;
        setup->zmin = z;
      }
    }
  }

  if (strstr(setup->field_name, "unf")) {
    fprintf(file, "#\n## start of unformatted data\n");
    i = R-1; j = L-1;
    fwrite(&i, sizeof(int), 1, file);
    fwrite(&j, sizeof(int), 1, file);
    for (i = 1; i < R; i++) {
      for (j = 1; j < L; j++) e[i][j].phi = 0;
      if (fwrite(&e[i][1], sizeof(cyl_pt), L-1, file) != L-1) {
        printf("ERROR while writing %s\n", setup->field_name);
      }
    }
  } else {
    fprintf(file, "#\n## r (mm), z (mm), V (V),  E (V/cm), E_r (V/cm), E_z (V/cm)\n");
    for (j = 1; j < R; j++) {
      r = (j-1) * grid;
      for (i = 1; i < L; i++) {
        z = (i-1) * grid;
        E = e[j][i].phi;
        fprintf(file, "%7.2f %7.2f %7.1f %7.1f %7.1f %7.1f\n",
                r, z, v[new][i][j], E, e[j][i].r, e[j][i].z);
      }
      fprintf(file, "\n");
    }
  }
  fclose(file);
  for (i = 0; i < R; i++) free(e[i]);
  free(e);

  if (!setup->write_WP)
    printf("\n Minimum bulk field = %.2f V/cm at (r,z) = (%.1f, %.1f) mm\n\n",
           setup->Emin, setup->rmin, setup->zmin);

  if (0) { /* write point_type to output file */
    file = fopen("fields/point_type.dat", "w");
    for (j = 1; j < R; j++) {
      for (i = 1; i < L; i++)
        fprintf(file, "%7.2f %7.2f %2d\n",
                (j-1)*grid, (i-1)*grid, setup->point_type[i][j]);
      fprintf(file, "\n");
    }
    fclose(file);
  }

  return 0;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movss 0x4(%rdi), %xmm0
movss 0x54(%rdi), %xmm1
movss %xmm1, 0xc(%rsp)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
movq %rax, %r13
leal 0x2(%rax), %ebp
movss 0x8(%rbx), %xmm0
divss 0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
movq %rax, %rdi
leal 0x2(%rax), %ecx
movl $0x47c34ff3, 0x448(%rbx) # imm = 0x47C34FF3
movl $0x4479f99a, %eax       # imm = 0x4479F99A
movl %eax, 0x3bc(%rbx)
movl %eax, 0x3b0(%rbx)
movss 0x58(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
movl %ecx, 0x18(%rsp)
movslq %ecx, %r15
movslq %ebp, %rax
movq %rax, 0x28(%rsp)
jbe 0x46f4
pushq $0x1
popq %rcx
movaps 0x3aa7(%rip), %xmm0     # 0x8160
movq %rcx, %rax
cmpq 0x28(%rsp), %rax
jge 0x46ec
movq %rcx, %rdx
cmpq %r15, %rdx
jge 0x46e7
movq 0x3e8(%rbx), %rsi
movq (%rsi,%rax,8), %rsi
movsd (%rsi,%rdx,8), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, (%rsi,%rdx,8)
incq %rdx
jmp 0x46c6
incq %rax
jmp 0x46bc
movl %eax, 0x34(%rsp)
movl %edx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
leaq 0x188(%rbx), %r12
leaq 0x3f9d(%rip), %rsi      # 0x86a4
movq %r12, %rdi
callq 0x11b0
testq %rax, %rax
je 0x4772
movq %rax, %r14
leaq 0x477d(%rip), %rdi      # 0x8e9b
movq %r12, %rsi
xorl %eax, %eax
callq 0x10f0
leaq 0x1480(%rbx), %rsi
movq %r14, %rdi
callq 0x6210
cvtss2sd 0x74(%rbx), %xmm0
leaq 0x4631(%rip), %rsi      # 0x8d74
movq %r14, %rdi
movb $0x1, %al
callq 0x1150
cmpl $0x0, 0x440(%rbx)
movq %r12, 0x38(%rsp)
je 0x4791
leaq 0x4633(%rip), %rdi      # 0x8d95
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x11d0
jmp 0x47cb
leaq 0x46f0(%rip), %rdi      # 0x8e69
movq %r12, %rsi
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
leaq 0x461c(%rip), %rdi      # 0x8db4
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x11d0
movss 0x444(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x47cb
cvtss2sd %xmm0, %xmm0
leaq 0x4616(%rip), %rsi      # 0x8dd7
movq %r14, %rdi
movb $0x1, %al
callq 0x1150
movq %r14, 0x10(%rsp)
leaq (,%r15,8), %rdi
callq 0x1170
testq %rax, %rax
je 0x4824
movq %rax, %r12
xorl %r14d, %r14d
movl 0x18(%rsp), %ecx
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movq %rax, 0x48(%rsp)
cmpq %r14, 0x48(%rsp)
je 0x4848
movq 0x28(%rsp), %rdi
pushq $0xc
popq %rsi
callq 0x1140
movq %rax, (%r12,%r14,8)
incq %r14
testq %rax, %rax
jne 0x47fb
leaq 0x48d1(%rip), %rdi      # 0x90f3
jmp 0x482b
leaq 0x48dd(%rip), %rdi      # 0x9108
callq 0x1070
movq 0x10(%rsp), %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
cvtss2sd 0xc(%rsp), %xmm2
movsd 0x3816(%rip), %xmm0     # 0x8078
mulsd %xmm2, %xmm0
movsd 0x37ba(%rip), %xmm1     # 0x8028
mulsd %xmm2, %xmm1
incl %r13d
movsd 0x37b3(%rip), %xmm3     # 0x8030
divsd %xmm2, %xmm3
cvttsd2si %xmm3, %eax
leal 0x1(%rax), %ecx
movslq %eax, %rdi
notl %eax
movl 0x18(%rsp), %esi
addl %eax, %esi
addl %eax, %ebp
movslq %ecx, %rcx
movslq %ebp, %rdx
movslq %esi, %rsi
movq %rdi, 0x40(%rsp)
leaq (,%rdi,8), %rdi
movq %rdi, 0x68(%rsp)
negq %rdi
movq %rdi, 0x60(%rsp)
movsd 0x3768(%rip), %xmm2     # 0x8028
pushq $0x1
popq %r9
cmpq %r15, %r9
jge 0x4cba
leaq -0x1(%r9), %rdi
movq %rdi, 0x70(%rsp)
cvtsi2ss %edi, %xmm3
mulss 0xc(%rsp), %xmm3
leaq 0x1(%r9), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
leaq (%r9,%rax), %rdi
movq %rdi, 0x58(%rsp)
movq %r9, %rdi
subq %rax, %rdi
movq %rdi, 0x50(%rsp)
xorl %eax, %eax
pushq $0x1
popq %r8
cmpq 0x28(%rsp), %r8
jge 0x4cb0
cmpq $0x1, %r9
jne 0x4933
movq 0x8(%r12), %rdi
andl $0x0, 0xc(%rdi,%rax)
movq 0x430(%rbx), %r10
movq (%r10,%r8,8), %rdi
jmp 0x4a60
movq 0x430(%rbx), %r10
movq (%r10,%r8,8), %rdi
movb (%rdi,%r9), %r14b
cmpb $0x7, %r14b
jne 0x499e
movq 0x3e8(%rbx), %r14
movq (%r14,%r8,8), %r14
movsd -0x8(%r14,%r9,8), %xmm4
movsd (%r14,%r9,8), %xmm5
subsd %xmm5, %xmm4
subsd 0x8(%r14,%r9,8), %xmm5
movq 0x1458(%rbx), %r14
movq (%r14,%r8,8), %r14
movq 0x1450(%rbx), %r11
movq (%r11,%r8,8), %r11
mulsd (%r11,%r9,8), %xmm4
mulsd (%r14,%r9,8), %xmm5
addsd %xmm4, %xmm5
divsd %xmm0, %xmm5
cvtsd2ss %xmm5, %xmm4
jmp 0x4a55
cmpb $0x1, %r14b
jg 0x4a17
movq 0x70(%rsp), %r11
cmpb $0x7, (%rdi,%r11)
jne 0x49dc
movq 0x3e8(%rbx), %r11
movq (%r11,%r8,8), %r11
movsd -0x8(%r11,%r9,8), %xmm4
subsd (%r11,%r9,8), %xmm4
movq 0x1458(%rbx), %r11
movq (%r11,%r8,8), %r11
mulsd -0x8(%r11,%r9,8), %xmm4
jmp 0x4a39
movq 0x18(%rsp), %r11
cmpb $0x7, (%rdi,%r11)
jne 0x4a17
movq 0x3e8(%rbx), %r11
movq (%r11,%r8,8), %r11
movsd (%r11,%r9,8), %xmm4
movq 0x18(%rsp), %r14
subsd (%r11,%r14,8), %xmm4
movq 0x1450(%rbx), %r11
movq (%r11,%r8,8), %r11
mulsd (%r11,%r14,8), %xmm4
jmp 0x4a39
movq 0x3e8(%rbx), %r11
movq (%r11,%r8,8), %r14
movq 0x20(%rsp), %r11
cmpq %r11, %r9
jne 0x4a3f
movsd -0x8(%r14,%r11,8), %xmm4
subsd (%r14,%r11,8), %xmm4
divsd %xmm1, %xmm4
jmp 0x4a51
movsd -0x8(%r14,%r9,8), %xmm4
subsd 0x8(%r14,%r9,8), %xmm4
divsd %xmm0, %xmm4
cvtsd2ss %xmm4, %xmm4
movq (%r12,%r9,8), %r11
movss %xmm4, 0xc(%r11,%rax)
movb (%rdi,%r9), %r14b
cmpb $0x7, %r14b
jne 0x4ac5
movq 0x3e8(%rbx), %r11
movq -0x8(%r11,%r8,8), %r14
movq (%r11,%r8,8), %rbp
movsd (%rbp,%r9,8), %xmm4
movq 0x8(%r11,%r8,8), %r11
movsd (%r14,%r9,8), %xmm5
subsd %xmm4, %xmm5
subsd (%r11,%r9,8), %xmm4
movq 0x1468(%rbx), %r11
movq (%r11,%r8,8), %r11
movq 0x1460(%rbx), %r14
movq (%r14,%r8,8), %r14
mulsd (%r14,%r9,8), %xmm5
mulsd (%r11,%r9,8), %xmm4
addsd %xmm5, %xmm4
divsd %xmm0, %xmm4
jmp 0x4b47
cmpb $0x1, %r14b
jg 0x4c20
movq -0x8(%r10,%r8,8), %r11
cmpb $0x7, (%r11,%r9)
jne 0x4b05
movq 0x3e8(%rbx), %r11
movq -0x8(%r11,%r8,8), %r14
movq (%r11,%r8,8), %r11
movsd (%r14,%r9,8), %xmm4
subsd (%r11,%r9,8), %xmm4
movq 0x1468(%rbx), %r11
movq -0x8(%r11,%r8,8), %r11
jmp 0x4b3d
movq 0x8(%r10,%r8,8), %r11
cmpb $0x7, (%r11,%r9)
jne 0x4c20
movq 0x3e8(%rbx), %r11
movq (%r11,%r8,8), %r14
movq 0x8(%r11,%r8,8), %r11
movsd (%r14,%r9,8), %xmm4
subsd (%r11,%r9,8), %xmm4
movq 0x1460(%rbx), %r11
movq 0x8(%r11,%r8,8), %r11
mulsd (%r11,%r9,8), %xmm4
divsd %xmm1, %xmm4
cvtsd2ss %xmm4, %xmm4
movq (%r12,%r9,8), %r14
movss %xmm4, 0x14(%r14,%rax)
movss 0xc(%r14,%rax), %xmm4
movss 0x14(%r14,%rax), %xmm5
mulss %xmm5, %xmm5
mulss %xmm4, %xmm4
addss %xmm5, %xmm4
sqrtss %xmm4, %xmm4
movss %xmm4, 0x10(%r14,%rax)
cvtss2sd %xmm4, %xmm5
ucomisd %xmm2, %xmm5
jbe 0x4c14
movss 0x448(%rbx), %xmm5
ucomiss %xmm4, %xmm5
jbe 0x4c14
cmpq %rcx, %r8
jle 0x4c14
cmpq %rsi, %r9
jge 0x4c14
cmpq %rdx, %r8
jge 0x4c14
cmpb $0x2, (%rdi,%r9)
jne 0x4c14
movq 0x68(%rsp), %r11
addq %r10, %r11
movq (%r11,%r8,8), %r11
cmpb $0x2, (%r11,%r9)
jne 0x4c14
addq 0x60(%rsp), %r10
movq (%r10,%r8,8), %r10
cmpb $0x2, (%r10,%r9)
jne 0x4c14
movq 0x58(%rsp), %r10
cmpb $0x2, (%rdi,%r10)
jne 0x4c14
cmpq 0x40(%rsp), %r9
jle 0x4bee
movq 0x50(%rsp), %r10
cmpb $0x2, (%rdi,%r10)
jne 0x4c14
leal -0x1(%r8), %edi
cvtsi2ss %edi, %xmm5
mulss 0xc(%rsp), %xmm5
movss %xmm4, 0x448(%rbx)
movss %xmm3, 0x3b0(%rbx)
movss %xmm5, 0x3bc(%rbx)
incq %r8
addq $0xc, %rax
jmp 0x4908
cmpq $0x1, %r8
jne 0x4c58
movq 0x3e8(%rbx), %r11
movq 0x8(%r11), %r14
movq 0x10(%r11), %r11
movsd (%r14,%r9,8), %xmm4
subsd (%r11,%r9,8), %xmm4
divsd %xmm1, %xmm4
cvtsd2ss %xmm4, %xmm4
movq (%r12,%r9,8), %r14
movss %xmm4, 0x14(%r14)
jmp 0x4b56
movq 0x3e8(%rbx), %r14
cmpq %r8, %r13
jne 0x4c95
movq -0x8(%r14,%r13,8), %r11
movq (%r14,%r13,8), %r14
movsd (%r11,%r9,8), %xmm4
subsd (%r14,%r9,8), %xmm4
divsd %xmm1, %xmm4
cvtsd2ss %xmm4, %xmm4
movq (%r12,%r9,8), %r14
imulq $0xc, %r13, %r11
movss %xmm4, 0x8(%r14,%r11)
jmp 0x4b56
movq -0x8(%r14,%r8,8), %r11
movq 0x8(%r14,%r8,8), %r14
movsd (%r11,%r9,8), %xmm4
subsd (%r14,%r9,8), %xmm4
jmp 0x4abc
movq 0x18(%rsp), %r9
jmp 0x48c4
leaq 0x413e(%rip), %rsi      # 0x8dff
movq 0x38(%rsp), %rdi
callq 0x11e0
testq %rax, %rax
je 0x4d84
leaq 0x4128(%rip), %rdi      # 0x8e03
pushq $0x1f
popq %rsi
pushq $0x1
popq %rbp
movq %rbp, %rdx
movq 0x10(%rsp), %r14
movq %r14, %rcx
callq 0x11d0
leaq 0x34(%rsp), %rdi
movq 0x20(%rsp), %rax
movl %eax, (%rdi)
leaq 0x30(%rsp), %rax
movl %r13d, (%rax)
pushq $0x4
popq %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x11d0
leaq 0x30(%rsp), %rdi
pushq $0x4
popq %rsi
movq %rbp, %rdx
movq %r14, %rcx
movq %rbp, %r14
callq 0x11d0
movslq %r13d, %r13
cmpq %r15, %rbp
jge 0x4e3d
movq (%r12,%rbp,8), %rdi
leaq 0x10(%rdi), %rax
movq %r14, %rcx
cmpq 0x28(%rsp), %rcx
jge 0x4d53
andl $0x0, (%rax)
incq %rcx
addq $0xc, %rax
jmp 0x4d40
addq $0xc, %rdi
pushq $0xc
popq %rsi
movq %r13, %rdx
movq 0x10(%rsp), %rcx
callq 0x11d0
cmpq %r13, %rax
je 0x4d7f
leaq 0x4150(%rip), %rdi      # 0x8ec3
movq 0x38(%rsp), %rsi
xorl %eax, %eax
callq 0x10f0
incq %rbp
jmp 0x4d2c
leaq 0x4150(%rip), %rdi      # 0x8edb
pushq $0x3e
popq %rsi
pushq $0x1
popq %r13
movq %r13, %rdx
movq 0x10(%rsp), %rcx
callq 0x11d0
cmpq %r15, %r13
jge 0x4e3d
leal -0x1(%r13), %eax
cvtsi2ss %eax, %xmm0
mulss 0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
pushq $0x14
popq %rbp
pushq $0x1
popq %r14
cmpq 0x28(%rsp), %r14
jge 0x4e28
leal -0x1(%r14), %eax
cvtsi2ss %eax, %xmm0
mulss 0xc(%rsp), %xmm0
movq (%r12,%r13,8), %rax
cvtss2sd %xmm0, %xmm1
movq 0x3e8(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movsd (%rcx,%r13,8), %xmm2
cvtss2sd -0x4(%rax,%rbp), %xmm3
cvtss2sd -0x8(%rax,%rbp), %xmm4
cvtss2sd (%rax,%rbp), %xmm5
movq 0x10(%rsp), %rdi
leaq 0x4108(%rip), %rsi      # 0x8f1a
movsd 0x20(%rsp), %xmm0
movb $0x6, %al
callq 0x1150
incq %r14
addq $0xc, %rbp
jmp 0x4dc7
pushq $0xa
popq %rdi
movq 0x10(%rsp), %rsi
callq 0x1120
incq %r13
jmp 0x4d9f
movq 0x10(%rsp), %rdi
callq 0x10c0
xorl %r14d, %r14d
cmpq %r14, 0x48(%rsp)
je 0x4e5f
movq (%r12,%r14,8), %rdi
callq 0x1030
incq %r14
jmp 0x4e4a
movq %r12, %rdi
callq 0x1030
cmpl $0x0, 0x80(%rbx)
je 0x4e7f
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cvtss2sd 0x448(%rbx), %xmm0
cvtss2sd 0x3b0(%rbx), %xmm1
cvtss2sd 0x3bc(%rbx), %xmm2
leaq 0x40a1(%rip), %rdi      # 0x8f3f
movb $0x3, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0