// File: /workspace/github_c_makefile_star2_O3/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: grid_init
int grid_init(MJD_Siggen_Setup *setup) {
  float  grid = setup->xtal_grid;
  int    L  = lrint(setup->xtal_length/grid)+3;
  int    R  = lrint(setup->xtal_radius/grid)+3;
  int    i, j;
  float  r, z;


  /* first malloc arrays in setup */
  if ((setup->impurity   = malloc(L * sizeof(*setup->impurity)))   == NULL ||
      (setup->eps        = malloc(L * sizeof(*setup->eps)))        == NULL ||
      (setup->eps_dr     = malloc(L * sizeof(*setup->eps_dr)))     == NULL ||
      (setup->eps_dz     = malloc(L * sizeof(*setup->eps_dz)))     == NULL ||
      (setup->v[0]       = malloc(L * sizeof(*setup->v[0])))       == NULL ||
      (setup->v[1]       = malloc(L * sizeof(*setup->v[1])))       == NULL ||
      (setup->dr[0]      = malloc(L * sizeof(*setup->dr[0])))      == NULL ||
      (setup->dr[1]      = malloc(L * sizeof(*setup->dr[1])))      == NULL ||
      (setup->dz[0]      = malloc(L * sizeof(*setup->dz[0])))      == NULL ||
      (setup->dz[1]      = malloc(L * sizeof(*setup->dz[1])))      == NULL ||
      (setup->undepleted = malloc(R * sizeof(*setup->undepleted))) == NULL ||
      (setup->s1         = malloc(R * sizeof(*setup->s1)))         == NULL ||
      (setup->s2         = malloc(R * sizeof(*setup->s2)))         == NULL ||
      (setup->vsave      = malloc(L * sizeof(*setup->vsave)))      == NULL ||
      (setup->point_type = malloc(L * sizeof(*setup->point_type))) == NULL) {
    printf("malloc failed\n");
    return -1;
  }
  /* start from i=1 so that i=0 can be used for reflection symmetry around r=0 or z=0 */
  for (i = 1; i < L; i++) {
    if ((setup->impurity[i]   = malloc(R * sizeof(**setup->impurity)))   == NULL ||
        (setup->v[0][i]       = malloc(R * sizeof(**setup->v[0])))       == NULL ||
	(setup->v[1][i]       = malloc(R * sizeof(**setup->v[1])))       == NULL ||
        (setup->dr[0][i]      = malloc(R * sizeof(**setup->dr[0])))      == NULL ||
	(setup->dr[1][i]      = malloc(R * sizeof(**setup->dr[1])))      == NULL ||
        (setup->dz[0][i]      = malloc(R * sizeof(**setup->dz[0])))      == NULL ||
	(setup->dz[1][i]      = malloc(R * sizeof(**setup->dz[1])))      == NULL ||
	(setup->vsave[i]      = malloc(R * sizeof(**setup->vsave)))      == NULL ||
	(setup->point_type[i] = malloc(R * sizeof(**setup->point_type))) == NULL) {
      printf("malloc failed\n");
      return -1;
    }
  }
  for (i = 1; i < L; i++) {
    if ((setup->eps[i]        = malloc(R * sizeof(**setup->eps)))    == NULL ||
        (setup->eps_dr[i]     = malloc(R * sizeof(**setup->eps_dr))) == NULL ||
        (setup->eps_dz[i]     = malloc(R * sizeof(**setup->eps_dz))) == NULL) {
      printf("malloc failed\n");
      return -1;
    }
    for (j = 0; j < R; j++)
      setup->eps[i][j] = setup->eps_dz[i][j] = setup->eps_dr[i][j] = 16.0;
  }
  for (j = 0; j < R; j++) {
    if ((setup->undepleted[j] = malloc(L * sizeof(**setup->undepleted))) == NULL) {
      printf("malloc failed\n");
      return -1;
    }
    memset(setup->undepleted[j], ' ', L);
  }

  /* set up reflection symmetry around r=0 or z=0 */
  setup->impurity[0]   = malloc(R * sizeof(**setup->impurity));
  setup->v[0][0]   = setup->v[0][2];
  setup->v[1][0]   = setup->v[1][2];
  setup->eps[0]    = setup->eps[1];
  setup->eps_dr[0] = setup->eps_dr[1];
  setup->eps_dz[0] = setup->eps_dz[1];
  setup->point_type[0] = setup->point_type[1];

  /* ------------------------------------------------------------ */
  /* weighting values for the relaxation alg. as a function of r
     in the following we divide areas and volumes by pi
     r_bin   rmax  A_top A_outside A_inside  volume  total_surf  out/top  tot/vol
     0     1/2    1/4      1         0       1/4      1.5         4        6  << special case
     1     3/2      2      3         1        2        8        3/2        4
     2     5/2      4      5         3        4       16        5/4        4
     3     7/2      6      7         5        6       24        7/6        4
     r   r+0.5     2r    2r+1      2r-1      2r       8r     (2r+1)/2r     4
     = 1+0.5/r
  */
  setup->s1[1] = 4.0;
  setup->s2[1] = 0.0;
  for (i=2; i<R; i++) {
    setup->s1[i] = 1.0 + 0.5 / (double) (i-1);   //  for r+1
    setup->s2[i] = 1.0 - 0.5 / (double) (i-1);   //  for r-1
  }
  setup->s2[1] = setup->s1[1]; // special case for reflection symm at r=0

  for (i = 1; i < L; i++) {
    for (j = 0; j < R; j++) {
      setup->dr[0][i][j] = setup->s2[j];   //  for r-1
      setup->dr[1][i][j] = setup->s1[j];   //  for r+1
      setup->dz[0][i][j] = 1;       //  for z-1
      setup->dz[1][i][j] = 1;       //  for z+1
    }
  }

  /* set up pixel point types for boundary conditions etc */
  float  d, g = 0.05 * grid, lith  = setup->Li_thickness;
  cyl_pt pt, pt1, pt2, pt3, pt4;

  setup->rmax = setup->xtal_radius - lith;
  setup->zmax = setup->xtal_length - lith;
  setup->hole_radius += lith;
  setup->hole_bullet_radius += lith;
  setup->bottom_taper_length += 0.71*lith; // add top tapers?

  for (i = 1; i < L; i++) {
    pt.z = pt3.z = pt4.z = (i-1) * grid;
    pt1.z = pt.z + g;
    pt2.z = pt.z - g;
    for (j = 1; j < R; j++) {
      pt.r = pt1.r = pt2.r = (j-1) * grid;
      pt3.r = pt.r + g;
      pt4.r = pt.r - g;
      setup->point_type[i][j] = INSIDE;

      /* see if pixel is ouside (or very nearly outside) the detector bulk */
      if (i == 1 || (pt.r >= setup->wrap_around_radius && pt.z - g < lith) ||
          outside_detector_cyl(pt1, setup) || outside_detector_cyl(pt2, setup) ||
          outside_detector_cyl(pt3, setup) || outside_detector_cyl(pt4, setup)) {

        /* check for inside ditch
           boundary condition at Ge-vacuum interface:
           epsilon0 * E_vac = espilon_Ge * E_Ge  */
        if (setup->ditch_depth > 0 && pt.z < setup->ditch_depth + grid &&
            pt.r <= setup->wrap_around_radius &&
            pt.r >= setup->wrap_around_radius - setup->ditch_thickness) {
          setup->point_type[i][j] = DITCH;
          setup->eps[i][j] = setup->eps_dz[i][j] = setup->eps_dr[i][j] = 1.0;

          /* check for inside (point) contact */
        } else if (pt.z < setup->pc_length + g && pt.r < setup->pc_radius+g) {
          setup->point_type[i][j] = PC;

        /* check for passivated area  */
        } else if (i == 1 && pt.r < setup->wrap_around_radius &&      // BEGE/ICPC
                   pt.r < setup->rmax - setup->bottom_taper_length) { // PPC
          setup->point_type[i][j] = PASSIVE;

        /* only remaining surface is HV contact */
        } else  {
          setup->point_type[i][j] = HVC;
        }
      }
    }
  }

  /* find the pixels next to the contact surfaces */
  cyl_pt dp1, dp2, dp3, dp4;
  dp1.z = dp3.r = grid;
  dp2.z = dp4.r = -grid;
  dp1.r = dp2.r = dp3.z = dp4.z = 0;
  for (i = 2; i < L-1; i++) {
    pt.z = (i-1) * grid;
    for (j = 1; j < R; j++) {
      pt.r = (j-1) * grid;
      if (setup->point_type[i][j] == INSIDE &&
          (setup->point_type[i+1][j] < INSIDE || setup->point_type[i-1][j] < INSIDE ||
           setup->point_type[i][j+1] < INSIDE || (j > 1 && setup->point_type[i][j-1] < INSIDE))) {
        setup->point_type[i][j] = CONTACT_EDGE;
        /* find distance to contact surface */
        if (setup->point_type[i+1][j] < INSIDE && (d = dist_from_contact(pt, dp1, setup)) > 0)
          setup->dz[1][i][j] = 1.0/d;
        if (setup->point_type[i-1][j] < INSIDE && (d = dist_from_contact(pt, dp2, setup)) > 0)
          setup->dz[0][i][j] = 1.0/d;
        else if (setup->point_type[i-1][j] < INSIDE &&
                 pt.r >= setup->wrap_around_radius && pt.z - grid < lith)
          setup->dz[0][i][j] = grid/(pt.z - lith);
        if (setup->point_type[i][j+1] < INSIDE && (d = dist_from_contact(pt, dp3, setup)) > 0)
          setup->dr[1][i][j] = setup->s1[j] * 1.0/d;
        if (j > 1 && setup->point_type[i][j-1] < INSIDE &&
            (d = dist_from_contact(pt, dp4, setup)) > 0)
          setup->dr[0][i][j] = setup->s2[j] * 1.0/d;
      }
    }
  }
  setup->hole_radius -= lith;
  setup->hole_bullet_radius -= lith;
  setup->bottom_taper_length -= 0.71*lith;

  /* for pixels adjacent to the ditch, set point_type to DITCH_EDGE
     and for z=0, set flag for passivated surface */
  for (i = 1; i < L; i++) {
    for (j = 1; j < R; j++) {
      setup->eps_dr[i][j-1] = (setup->eps[i][j-1] + setup->eps[i][j]) / 2.0f;
      setup->eps_dz[i-1][j] = (setup->eps[i-1][j] + setup->eps[i][j]) / 2.0f;
      if (setup->point_type[i][j] == INSIDE &&
          (setup->point_type[i-1][j] == DITCH ||
           setup->point_type[i][j-1] == DITCH ||
           setup->point_type[i][j+1] == DITCH)) setup->point_type[i][j] = DITCH_EDGE;
    }
    setup->eps_dr[i][0] = setup->eps_dr[i][1];
  }

  /* set up impurity array */
  double *imp_z, imp_ra = 0, imp_rm = 1;
  double e_over_E = 11.310; // e/epsilon; for 1 mm2, charge units 1e10 e/cm3, espilon = 16*epsilon0
  /* malloc local array */
  if ((imp_z  = malloc(L * sizeof(*imp_z))) == NULL) {
    printf("malloc failed\n");
    return -1;
  }

  if (setup->rho_z_spe[0] == 0) {
    for (i = 1; i < L; i++) {
      z = (i-1) * grid;
      imp_z[i] = e_over_E * grid*grid / 4.0 *
                 (setup->impurity_z0 +
                  setup->impurity_gradient * z * 0.1 +
                  setup->impurity_quadratic *
                  (1.0 - SQ(z - setup->xtal_length/2.0) / SQ(setup->xtal_length/2.0)));
    }
  } else if (setup->rho_z_spe[(int) setup->xtal_length] == 0) {
    printf("Error: Impurity profile spectrum is too short? rho[xtal_len = %d] = 0\n", (int) setup->xtal_length);
    return -1;
  } else {
    for (i = 1; i < L; i++)
      imp_z[i] = e_over_E * grid*grid / 4.0 * setup->rho_z_spe[(int) ((i-1) * grid)];
  }
  for (j = 1; j < R; j++) {
    r = (j-1) * grid;
    if (setup->impurity_rpower > 0.1) {
      imp_ra = setup->impurity_radial_add * e_over_E * grid*grid / 4.0 *
        pow((double) r / setup->xtal_radius, setup->impurity_rpower);
      imp_rm = 1.0 + (setup->impurity_radial_mult - 1.0f) *
        pow((double) r / setup->xtal_radius, setup->impurity_rpower);
    }
    for (i = 1; i < L; i++)  setup->impurity[i][j] = imp_z[i] * imp_rm + imp_ra;
    if (setup->point_type[1][j] == PASSIVE) {
      setup->impurity[1][j] += setup->impurity_surface * e_over_E * grid/4.0;
    }
    /* reduce charge volume for CONTACT_EDGE pixels */
    for (i = 1; i < L; i++) {
      if (setup->point_type[i][j] == CONTACT_EDGE) {
        setup->impurity[i][j] /=
          SQ(setup->dz[1][i][j]*setup->dz[0][i][j] * setup->dr[1][i][j]*setup->dr[0][i][j]);
      }
    }
  }
           
  /* free local and no-longer-needed arrays */
  free(imp_z);
  for (i = 1; i < L; i++) free(setup->eps[i]);
  free(setup->eps);

  return 0;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movss 0x4(%rdi), %xmm0
movss 0x54(%rdi), %xmm1
movaps %xmm1, 0x50(%rsp)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
movq %rax, %r12
leal 0x3(%rax), %ebp
movss 0x8(%rbx), %xmm0
divss 0x50(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
movq %rax, %r13
movslq %ebp, %r14
leaq (,%r14,8), %r15
movq %r15, %rdi
callq 0x1170
movq %rax, 0x408(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x3f0(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x3f8(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x400(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x3e0(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x3e8(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x1450(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x1458(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x1460(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x1468(%rbx)
testq %rax, %rax
je 0x3b56
leal 0x3(%r13), %eax
movl %eax, 0x8(%rsp)
cltq
movq %rax, 0x40(%rsp)
leaq (,%rax,8), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1170
movq %rax, 0x438(%rbx)
testq %rax, %rax
je 0x3b56
movq 0x20(%rsp), %rdi
callq 0x1170
movq %rax, 0x418(%rbx)
testq %rax, %rax
je 0x3b56
movq 0x20(%rsp), %rdi
callq 0x1170
movq %rax, 0x420(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x428(%rbx)
testq %rax, %rax
je 0x3b56
movq %r15, %rdi
callq 0x1170
movq %rax, 0x430(%rbx)
testq %rax, %rax
je 0x3b56
movl %ebp, 0xc(%rsp)
cmpl $0x2, %ebp
jl 0x2d24
leaq -0x1(%r14), %rax
movq %rax, 0x70(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
callq 0x1170
movq 0x408(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x3e0(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x3e8(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x1450(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x1458(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x1460(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x1468(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq %rbp, %rdi
callq 0x1170
movq 0x428(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq 0x40(%rsp), %rdi
callq 0x1170
movq 0x430(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq 0x10(%rsp), %rcx
incq %rcx
movq %rcx, 0x10(%rsp)
cmpq %rcx, 0x70(%rsp)
jne 0x2af3
cmpl $0x2, 0xc(%rsp)
jl 0x2d24
movl 0x8(%rsp), %eax
movq %rax, 0x40(%rsp)
movl $0x1, %eax
movq %rax, 0x10(%rsp)
movabsq $0x4030000000000000, %rbp # imm = 0x4030000000000000
movq 0x20(%rsp), %rdi
callq 0x1170
movq 0x3f0(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq 0x20(%rsp), %rdi
callq 0x1170
movq 0x3f8(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rcx,%rdx,8)
testq %rax, %rax
je 0x3b56
movq 0x20(%rsp), %rdi
callq 0x1170
movq 0x10(%rsp), %r8
movq 0x400(%rbx), %rcx
movq %rax, (%rcx,%r8,8)
testq %rax, %rax
je 0x3b56
cmpl $0x0, 0x8(%rsp)
movq 0x40(%rsp), %rdi
jle 0x2d13
movq 0x3f0(%rbx), %rdx
movq 0x3f8(%rbx), %rax
movq (%rax,%r8,8), %rax
movq 0x400(%rbx), %rcx
movq (%rcx,%r8,8), %rcx
movq (%rdx,%r8,8), %rdx
xorl %esi, %esi
movq %rbp, (%rax,%rsi,8)
movq %rbp, (%rcx,%rsi,8)
movq %rbp, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rdi
jne 0x2cff
incq %r8
movq %r8, 0x10(%rsp)
cmpq %r14, %r8
jne 0x2c67
cmpl $0x0, 0x8(%rsp)
jle 0x2d74
movl 0x8(%rsp), %eax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x1170
movq 0x438(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
testq %rax, %rax
je 0x3b56
movq 0x438(%rbx), %rax
movq (%rax,%rbp,8), %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x1110
incq %rbp
cmpq %rbp, 0x10(%rsp)
jne 0x2d36
movq 0x20(%rsp), %rdi
callq 0x1170
movq 0x408(%rbx), %rcx
movq %rax, (%rcx)
movq 0x3e0(%rbx), %rax
movq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq 0x3e8(%rbx), %rax
movq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq 0x3f0(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rax)
movq 0x3f8(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rax)
movq 0x400(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rax)
movq 0x430(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rax)
movq 0x418(%rbx), %rax
movabsq $0x4010000000000000, %rcx # imm = 0x4010000000000000
movq %rcx, 0x8(%rax)
movq 0x420(%rbx), %rcx
movq $0x0, 0x8(%rcx)
cmpl $0x7ffffffc, %r13d      # imm = 0x7FFFFFFC
movl 0x8(%rsp), %r8d
ja 0x2e56
movl %r8d, %edx
movl $0x2, %esi
movsd 0x621a(%rip), %xmm0     # 0x9038
movsd 0x6232(%rip), %xmm1     # 0x9058
leal -0x1(%rsi), %edi
xorps %xmm2, %xmm2
cvtsi2sd %edi, %xmm2
movapd %xmm0, %xmm3
divsd %xmm2, %xmm3
movapd %xmm1, %xmm2
subsd %xmm3, %xmm2
addsd %xmm1, %xmm3
movsd %xmm3, (%rax,%rsi,8)
movsd %xmm2, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x2e26
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rcx)
movl 0xc(%rsp), %ebp
cmpl $0x2, %ebp
movaps 0x50(%rsp), %xmm4
jl 0x2ee9
movl %r8d, %edx
movl $0x1, %esi
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
testl %r8d, %r8d
jle 0x2edc
movq 0x1450(%rbx), %r8
movq 0x1458(%rbx), %r9
movq (%r8,%rsi,8), %r8
movq (%r9,%rsi,8), %r9
movq 0x1460(%rbx), %r10
movq (%r10,%rsi,8), %r10
movq 0x1468(%rbx), %r11
movq (%r11,%rsi,8), %r11
xorl %r13d, %r13d
movsd (%rcx,%r13,8), %xmm0
movsd %xmm0, (%r8,%r13,8)
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%r9,%r13,8)
movq %rdi, (%r10,%r13,8)
movq %rdi, (%r11,%r13,8)
incq %r13
cmpq %r13, %rdx
jne 0x2eb4
incq %rsi
cmpq %r14, %rsi
movl 0x8(%rsp), %r8d
jne 0x2e80
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x80(%rsp)
movss 0x4c(%rbx), %xmm2
movss 0x4(%rbx), %xmm0
movss 0x8(%rbx), %xmm1
subss %xmm2, %xmm1
movss %xmm1, 0x3b4(%rbx)
subss %xmm2, %xmm0
movss %xmm0, 0x3c0(%rbx)
movss 0x28(%rbx), %xmm0
addss %xmm2, %xmm0
movss %xmm0, 0x28(%rbx)
movss 0x48(%rbx), %xmm0
addss %xmm2, %xmm0
movss %xmm0, 0x48(%rbx)
xorps %xmm0, %xmm0
cvtss2sd 0x20(%rbx), %xmm0
movss %xmm2, 0x38(%rsp)
cvtss2sd %xmm2, %xmm2
movsd 0x6142(%rip), %xmm1     # 0x9098
movsd %xmm2, 0xc0(%rsp)
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x20(%rbx)
cmpl $0x2, %ebp
jl 0x32fb
movsd 0x610c(%rip), %xmm0     # 0x9090
mulsd 0x80(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movl 0x8(%rsp), %ecx
decq %rcx
movl $0x1, %r13d
xorps %xmm2, %xmm2
movss %xmm1, 0x60(%rsp)
movq %rcx, 0x88(%rsp)
cmpl $0x2, 0x8(%rsp)
jl 0x32ef
leal -0x1(%r13), %eax
xorps %xmm9, %xmm9
cvtsi2ss %eax, %xmm9
mulss %xmm4, %xmm9
movaps %xmm9, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xac(%rsp)
movaps %xmm9, %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
xorl %ebp, %ebp
movss %xmm9, 0x68(%rsp)
xorps %xmm10, %xmm10
cvtsi2ss %ebp, %xmm10
mulss %xmm4, %xmm10
movss %xmm10, %xmm6           # xmm6 = xmm10[0],xmm6[1,2,3]
movss %xmm10, %xmm3           # xmm3 = xmm10[0],xmm3[1,2,3]
movaps %xmm10, %xmm0
addss %xmm1, %xmm0
movss %xmm0, %xmm7            # xmm7 = xmm0[0],xmm7[1,2,3]
movaps %xmm10, %xmm0
subss %xmm1, %xmm0
movss %xmm0, %xmm8            # xmm8 = xmm0[0],xmm8[1,2,3]
movq 0x430(%rbx), %rax
movq (%rax,%r13,8), %rax
movb $0x2, 0x1(%rax,%rbp)
cmpq $0x1, %r13
je 0x31ec
ucomiss 0x14(%rbx), %xmm10
jb 0x305a
movss 0x38(%rsp), %xmm0
ucomiss 0x3c(%rsp), %xmm0
ja 0x31ec
movaps %xmm3, %xmm0
movss 0xac(%rsp), %xmm1
movq %rbx, %rdi
movaps %xmm5, 0x20(%rsp)
movaps %xmm3, 0x10(%rsp)
movaps %xmm6, 0x40(%rsp)
movaps %xmm7, 0x70(%rsp)
movaps %xmm8, 0xb0(%rsp)
movaps %xmm10, 0x90(%rsp)
callq 0x7eb5
movaps 0x90(%rsp), %xmm10
movss 0x68(%rsp), %xmm9
movaps 0xb0(%rsp), %xmm8
movaps 0x70(%rsp), %xmm7
movaps 0x40(%rsp), %xmm6
movaps 0x10(%rsp), %xmm3
xorps %xmm2, %xmm2
movq 0x88(%rsp), %rcx
movss 0x60(%rsp), %xmm1
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
testl %eax, %eax
jne 0x31ec
movaps %xmm6, %xmm0
movss 0x3c(%rsp), %xmm1
movq %rbx, %rdi
callq 0x7eb5
movaps 0x90(%rsp), %xmm10
movss 0x68(%rsp), %xmm9
movaps 0xb0(%rsp), %xmm8
movaps 0x70(%rsp), %xmm7
movaps 0x40(%rsp), %xmm6
movaps 0x10(%rsp), %xmm3
xorps %xmm2, %xmm2
movq 0x88(%rsp), %rcx
movss 0x60(%rsp), %xmm1
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
testl %eax, %eax
jne 0x31ec
movaps %xmm7, %xmm0
movaps %xmm9, %xmm1
movq %rbx, %rdi
callq 0x7eb5
movaps 0x90(%rsp), %xmm10
movss 0x68(%rsp), %xmm9
movaps 0xb0(%rsp), %xmm8
movaps 0x70(%rsp), %xmm7
movaps 0x40(%rsp), %xmm6
movaps 0x10(%rsp), %xmm3
xorps %xmm2, %xmm2
movq 0x88(%rsp), %rcx
movss 0x60(%rsp), %xmm1
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
testl %eax, %eax
jne 0x31ec
movaps %xmm8, %xmm0
movaps %xmm9, %xmm1
movq %rbx, %rdi
callq 0x7eb5
movaps 0x90(%rsp), %xmm10
movss 0x68(%rsp), %xmm9
movaps 0xb0(%rsp), %xmm8
movaps 0x70(%rsp), %xmm7
movaps 0x40(%rsp), %xmm6
movaps 0x10(%rsp), %xmm3
xorps %xmm2, %xmm2
movq 0x88(%rsp), %rcx
movss 0x60(%rsp), %xmm1
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
testl %eax, %eax
je 0x3290
movss 0x18(%rbx), %xmm0
ucomiss %xmm2, %xmm0
jbe 0x321a
addss %xmm4, %xmm0
ucomiss %xmm9, %xmm0
jbe 0x321a
movss 0x14(%rbx), %xmm0
ucomiss %xmm10, %xmm0
jb 0x321a
subss 0x1c(%rbx), %xmm0
ucomiss %xmm0, %xmm10
jae 0x32a3
movss 0xc(%rbx), %xmm0
addss %xmm1, %xmm0
ucomiss %xmm9, %xmm0
jbe 0x324a
movss 0x10(%rbx), %xmm0
addss %xmm1, %xmm0
ucomiss %xmm10, %xmm0
jbe 0x324a
movq 0x430(%rbx), %rax
movq (%rax,%r13,8), %rax
movb $0x0, 0x1(%rax,%rbp)
jmp 0x3290
cmpq $0x1, %r13
jne 0x3280
movss 0x14(%rbx), %xmm0
ucomiss %xmm10, %xmm0
jbe 0x3280
movss 0x3b4(%rbx), %xmm0
subss 0x20(%rbx), %xmm0
ucomiss %xmm10, %xmm0
jbe 0x3280
movq 0x430(%rbx), %rax
movq 0x8(%rax), %rax
movb $0x3, 0x1(%rax,%rbp)
jmp 0x3290
movq 0x430(%rbx), %rax
movq (%rax,%r13,8), %rax
movb $0x1, 0x1(%rax,%rbp)
movss %xmm10, %xmm5           # xmm5 = xmm10[0],xmm5[1,2,3]
incq %rbp
cmpq %rbp, %rcx
jne 0x2ff7
jmp 0x32ef
movq 0x430(%rbx), %rax
movq (%rax,%r13,8), %rax
movb $0x5, 0x1(%rax,%rbp)
movq 0x3f8(%rbx), %rax
movq (%rax,%r13,8), %rax
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, 0x8(%rax,%rbp,8)
movq 0x400(%rbx), %rax
movq (%rax,%r13,8), %rax
movq %rdx, 0x8(%rax,%rbp,8)
movq 0x3f0(%rbx), %rax
movq (%rax,%r13,8), %rax
movq %rdx, 0x8(%rax,%rbp,8)
jmp 0x3290
incq %r13
cmpq %r14, %r13
jne 0x2fb2
addl $0x2, %r12d
cmpl $0x3, %r12d
movl 0x8(%rsp), %r13d
jl 0x362e
movaps 0x5e3b(%rip), %xmm0     # 0x9150
xorps %xmm4, %xmm0
movaps %xmm0, 0x90(%rsp)
movl %r12d, %eax
movq %rax, 0x68(%rsp)
movl %r13d, %eax
decq %rax
movq %rax, 0x10(%rsp)
movl $0x2, %esi
leaq 0x1(%rsi), %rbp
cmpl $0x2, %r13d
jl 0x361b
leal -0x1(%rsi), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss %xmm4, %xmm0
movaps %xmm0, %xmm1
subss %xmm4, %xmm1
movss %xmm1, 0x3c(%rsp)
movss %xmm0, 0x70(%rsp)
subss 0x38(%rsp), %xmm0
movaps %xmm4, %xmm1
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
xorl %r12d, %r12d
movq %rsi, 0x40(%rsp)
movq %r12, %r13
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
incq %r12
mulss %xmm4, %xmm0
movss %xmm0, %xmm5            # xmm5 = xmm0[0],xmm5[1,2,3]
movq 0x430(%rbx), %rcx
movq (%rcx,%rsi,8), %rax
cmpb $0x2, 0x1(%rax,%r13)
jne 0x3610
movq (%rcx,%rbp,8), %rdx
cmpb $0x2, 0x1(%rdx,%r13)
jl 0x33db
movq -0x8(%rcx,%rsi,8), %rcx
cmpb $0x2, 0x1(%rcx,%r13)
jl 0x33db
cmpb $0x2, 0x2(%rax,%r13)
jge 0x35ff
movaps %xmm0, 0xb0(%rsp)
movb $0x7, 0x1(%rax,%r13)
movq 0x430(%rbx), %rax
movq (%rax,%rbp,8), %rax
cmpb $0x1, 0x1(%rax,%r13)
movaps %xmm5, 0x20(%rsp)
jg 0x3452
xorps %xmm2, %xmm2
movaps %xmm5, %xmm0
movss 0x70(%rsp), %xmm1
movaps %xmm4, %xmm3
movq %rbx, %rdi
callq 0x572e
movq 0x40(%rsp), %rsi
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
ucomiss 0x5d0a(%rip), %xmm0     # 0x9138
jbe 0x3452
cvtss2sd %xmm0, %xmm0
movsd 0x5c1c(%rip), %xmm1     # 0x9058
divsd %xmm0, %xmm1
movq 0x1468(%rbx), %rax
movq (%rax,%rsi,8), %rax
movsd %xmm1, 0x8(%rax,%r13,8)
movq 0x430(%rbx), %rax
movq -0x8(%rax,%rsi,8), %rcx
cmpb $0x1, 0x1(%rcx,%r13)
jg 0x3520
xorps %xmm2, %xmm2
movaps %xmm5, %xmm0
movss 0x70(%rsp), %xmm1
movapd 0x90(%rsp), %xmm3
movq %rbx, %rdi
callq 0x572e
ucomiss 0x5caa(%rip), %xmm0     # 0x9138
jbe 0x34ca
cvtss2sd %xmm0, %xmm0
movsd 0x5bbc(%rip), %xmm1     # 0x9058
divsd %xmm0, %xmm1
movq 0x1460(%rbx), %rax
movq 0x40(%rsp), %rsi
movq (%rax,%rsi,8), %rax
movsd %xmm1, 0x8(%rax,%r13,8)
movq 0x430(%rbx), %rax
movaps 0x50(%rsp), %xmm4
movaps 0x20(%rsp), %xmm5
jmp 0x3520
movq 0x430(%rbx), %rax
movq 0x40(%rsp), %rsi
movq -0x8(%rax,%rsi,8), %rcx
cmpb $0x1, 0x1(%rcx,%r13)
movaps 0x50(%rsp), %xmm4
movaps 0x20(%rsp), %xmm5
jg 0x3520
movaps 0xb0(%rsp), %xmm0
ucomiss 0x14(%rbx), %xmm0
jb 0x3520
movss 0x38(%rsp), %xmm0
ucomiss 0x3c(%rsp), %xmm0
jbe 0x3520
movq 0x1460(%rbx), %rcx
movq (%rcx,%rsi,8), %rcx
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x8(%rcx,%r13,8)
movq (%rax,%rsi,8), %rax
cmpb $0x1, 0x2(%rax,%r13)
jg 0x3584
xorpd %xmm3, %xmm3
movaps %xmm5, %xmm0
movss 0x70(%rsp), %xmm1
movaps %xmm4, %xmm2
movq %rbx, %rdi
callq 0x572e
movq 0x40(%rsp), %rsi
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
ucomiss 0x5bde(%rip), %xmm0     # 0x9138
jbe 0x3584
movq 0x418(%rbx), %rax
movsd 0x8(%rax,%r13,8), %xmm1
cvtss2sd %xmm0, %xmm0
divsd %xmm0, %xmm1
movq 0x1458(%rbx), %rax
movq (%rax,%rsi,8), %rax
movsd %xmm1, 0x8(%rax,%r13,8)
cmpq $0x2, %r12
jb 0x3610
movq 0x430(%rbx), %rax
movq (%rax,%rsi,8), %rax
cmpb $0x1, (%rax,%r13)
jg 0x3610
xorpd %xmm3, %xmm3
movaps %xmm5, %xmm0
movss 0x70(%rsp), %xmm1
movaps 0x90(%rsp), %xmm2
movq %rbx, %rdi
callq 0x572e
movq 0x40(%rsp), %rsi
movaps 0x20(%rsp), %xmm5
movaps 0x50(%rsp), %xmm4
ucomiss 0x5b65(%rip), %xmm0     # 0x9138
jbe 0x3610
movq 0x420(%rbx), %rax
movsd 0x8(%rax,%r13,8), %xmm1
cvtss2sd %xmm0, %xmm0
divsd %xmm0, %xmm1
movq 0x1450(%rbx), %rax
movq (%rax,%rsi,8), %rax
movsd %xmm1, 0x8(%rax,%r13,8)
jmp 0x3610
cmpq $0x2, %r12
jb 0x3610
cmpb $0x1, (%rax,%r13)
jle 0x33db
cmpq %r12, 0x10(%rsp)
jne 0x3389
movq %rbp, %rsi
cmpq 0x68(%rsp), %rbp
movl 0x8(%rsp), %r13d
jne 0x3338
movss 0x28(%rbx), %xmm0
movss 0x48(%rbx), %xmm1
movss 0x38(%rsp), %xmm2
subss %xmm2, %xmm0
movss %xmm0, 0x28(%rbx)
subss %xmm2, %xmm1
movss %xmm1, 0x48(%rbx)
xorps %xmm0, %xmm0
cvtss2sd 0x20(%rbx), %xmm0
movsd 0xc0(%rsp), %xmm1
mulsd 0x5a37(%rip), %xmm1     # 0x90a0
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x20(%rbx)
movl 0xc(%rsp), %ebp
cmpl $0x2, %ebp
jl 0x3753
movl %r13d, %eax
decq %rax
movl $0x1, %ecx
movsd 0x599f(%rip), %xmm0     # 0x9038
cmpl $0x2, %r13d
jl 0x3733
xorl %edx, %edx
movq 0x3f0(%rbx), %rsi
movq (%rsi,%rcx,8), %rdi
movsd (%rdi,%rdx,8), %xmm1
addsd 0x8(%rdi,%rdx,8), %xmm1
movq 0x3f8(%rbx), %r8
mulsd %xmm0, %xmm1
movq (%r8,%rcx,8), %r8
movsd %xmm1, (%r8,%rdx,8)
movq -0x8(%rsi,%rcx,8), %rsi
movsd 0x8(%rsi,%rdx,8), %xmm1
addsd 0x8(%rdi,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
movq 0x400(%rbx), %rsi
movq -0x8(%rsi,%rcx,8), %rsi
movsd %xmm1, 0x8(%rsi,%rdx,8)
movq 0x430(%rbx), %rdi
movq (%rdi,%rcx,8), %rsi
cmpb $0x2, 0x1(%rsi,%rdx)
jne 0x3727
movq -0x8(%rdi,%rcx,8), %rdi
cmpb $0x5, 0x1(%rdi,%rdx)
je 0x3722
cmpb $0x5, (%rsi,%rdx)
je 0x3722
cmpb $0x5, 0x2(%rsi,%rdx)
jne 0x3727
movb $0x6, 0x1(%rsi,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x36a5
movq 0x3f8(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movsd 0x8(%rdx), %xmm1
movsd %xmm1, (%rdx)
incq %rcx
cmpq %r14, %rcx
jne 0x3699
movq %r15, %rdi
callq 0x1170
testq %rax, %rax
je 0x3b56
movq %rax, %r15
movss 0x44c(%rbx), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x3b79
jp 0x3b79
cmpl $0x2, %ebp
jl 0x3915
movsd 0x5916(%rip), %xmm0     # 0x90a8
movsd 0x80(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
mulsd 0x5905(%rip), %xmm0     # 0x90b0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rbx), %xmm1
mulsd 0x587d(%rip), %xmm1     # 0x9038
movapd %xmm1, %xmm2
xorps %xmm3, %xmm3
cvtss2sd 0x60(%rbx), %xmm3
mulsd %xmm1, %xmm2
xorps %xmm4, %xmm4
cvtss2sd 0x58(%rbx), %xmm4
movl %ebp, %eax
andl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
leaq -0x2(%r14), %rcx
movq %rcx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movaps 0x50(%rsp), %xmm6
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
movlhps %xmm4, %xmm4            # xmm4 = xmm4[0,0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movlhps %xmm3, %xmm3            # xmm3 = xmm3[0,0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movss 0x5c(%rbx), %xmm7
shufps $0x0, %xmm7, %xmm7      # xmm7 = xmm7[0,0,0,0]
movq 0x595f(%rip), %xmm8     # 0x9170
xorl %ecx, %ecx
movdqa 0x5934(%rip), %xmm10    # 0x9150
pcmpeqd %xmm11, %xmm11
movapd 0x5976(%rip), %xmm9     # 0x91a0
movq %rcx, %xmm13
pshufd $0x44, %xmm13, %xmm13   # xmm13 = xmm13[0,1,0,1]
por 0x5942(%rip), %xmm13    # 0x9180
movdqa %xmm5, %xmm15
pxor %xmm10, %xmm15
pxor %xmm10, %xmm13
movdqa %xmm13, %xmm12
pcmpgtd %xmm15, %xmm12
pcmpeqd %xmm15, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pand %xmm12, %xmm13
pshufd $0xf5, %xmm12, %xmm15   # xmm15 = xmm12[1,1,3,3]
movdqa %xmm8, %xmm12
paddd %xmm11, %xmm12
cvtdq2ps %xmm12, %xmm12
mulps %xmm6, %xmm12
cvtps2pd %xmm12, %xmm14
por %xmm13, %xmm15
mulps %xmm7, %xmm12
cvtps2pd %xmm12, %xmm12
subpd %xmm1, %xmm14
mulpd %xmm14, %xmm14
divpd %xmm2, %xmm14
movapd %xmm9, %xmm13
subpd %xmm14, %xmm13
mulpd 0x58de(%rip), %xmm12    # 0x9190
addpd %xmm4, %xmm12
mulpd %xmm3, %xmm13
addpd %xmm12, %xmm13
movd %xmm15, %edx
notl %edx
testb $0x1, %dl
je 0x38de
movapd %xmm0, %xmm12
mulsd %xmm13, %xmm12
movsd %xmm12, 0x8(%r15,%rcx,8)
pxor %xmm11, %xmm15
pextrw $0x4, %xmm15, %edx
testb $0x1, %dl
je 0x38ff
unpckhpd %xmm13, %xmm13          # xmm13 = xmm13[1,1]
mulsd %xmm0, %xmm13
movsd %xmm13, 0x10(%r15,%rcx,8)
addq $0x2, %rcx
paddd 0x58a4(%rip), %xmm8     # 0x91b0
cmpq %rcx, %rax
jne 0x382a
cmpl $0x2, %r13d
jl 0x3b19
movl %r13d, %r12d
movl 0xc(%rsp), %r13d
xorps %xmm6, %xmm6
movsd 0x5726(%rip), %xmm0     # 0x9058
movl $0x1, %ebp
movsd 0x56e9(%rip), %xmm3     # 0x9028
movsd 0x5761(%rip), %xmm4     # 0x90a8
movsd 0x5761(%rip), %xmm5     # 0x90b0
xorps %xmm1, %xmm1
cvtss2sd 0x70(%rbx), %xmm1
ucomisd %xmm3, %xmm1
jbe 0x3a21
leal -0x1(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x50(%rsp), %xmm0
xorps %xmm3, %xmm3
cvtss2sd 0x68(%rbx), %xmm3
mulsd %xmm4, %xmm3
movsd 0x80(%rsp), %xmm2
mulsd %xmm2, %xmm3
mulsd %xmm2, %xmm3
mulsd %xmm5, %xmm3
movsd %xmm3, 0x10(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rbx), %xmm2
divsd %xmm2, %xmm0
callq 0x10b0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movss 0x6c(%rbx), %xmm0
addss 0x5760(%rip), %xmm0     # 0x912c
xorps %xmm1, %xmm1
cvtss2sd 0x8(%rbx), %xmm1
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x70(%rbx), %xmm1
callq 0x10b0
movsd 0x10(%rsp), %xmm6
movsd 0x56ad(%rip), %xmm5     # 0x90b0
movsd 0x569d(%rip), %xmm4     # 0x90a8
movsd 0x5615(%rip), %xmm3     # 0x9028
mulsd 0x40(%rsp), %xmm0
addsd 0x5637(%rip), %xmm0     # 0x9058
cmpl $0x2, 0xc(%rsp)
jl 0x3a53
movq 0x408(%rbx), %rax
movl $0x1, %ecx
movsd (%r15,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
addsd %xmm6, %xmm1
movq (%rax,%rcx,8), %rdx
movsd %xmm1, (%rdx,%rbp,8)
incq %rcx
cmpq %rcx, %r13
jne 0x3a34
movq 0x430(%rbx), %rax
movq 0x8(%rax), %rcx
cmpb $0x3, (%rcx,%rbp)
jne 0x3a92
xorps %xmm1, %xmm1
cvtss2sd 0x64(%rbx), %xmm1
mulsd %xmm4, %xmm1
mulsd 0x80(%rsp), %xmm1
mulsd %xmm5, %xmm1
movq 0x408(%rbx), %rcx
movq 0x8(%rcx), %rcx
addsd (%rcx,%rbp,8), %xmm1
movsd %xmm1, (%rcx,%rbp,8)
cmpl $0x2, 0xc(%rsp)
jl 0x3b0d
movl $0x1, %ecx
movq (%rax,%rcx,8), %rdx
cmpb $0x7, (%rdx,%rbp)
jne 0x3b05
movq 0x1468(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movsd (%rdx,%rbp,8), %xmm1
movq 0x1460(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
mulsd (%rdx,%rbp,8), %xmm1
movq 0x1458(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
mulsd (%rdx,%rbp,8), %xmm1
movq 0x1450(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
mulsd (%rdx,%rbp,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x408(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movsd (%rdx,%rbp,8), %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, (%rdx,%rbp,8)
incq %rcx
cmpq %rcx, %r13
jne 0x3a9e
incq %rbp
cmpq %r12, %rbp
jne 0x394f
movq %r15, %rdi
callq 0x1030
cmpl $0x2, 0xc(%rsp)
jl 0x3b46
movl $0x1, %r15d
movq 0x3f0(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq %r15, %r14
jne 0x3b2e
movq 0x3f0(%rbx), %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x3b67
leaq 0x6572(%rip), %rdi      # 0xa0cf
callq 0x1070
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cvttss2si 0x4(%rbx), %esi
movslq %esi, %rax
movss 0x44c(%rbx,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x3ba1
jp 0x3ba1
leaq 0x6455(%rip), %rdi      # 0x9fed
xorl %eax, %eax
callq 0x10f0
jmp 0x3b62
cmpl $0x2, 0xc(%rsp)
movl 0x8(%rsp), %r13d
jl 0x3915
movsd 0x54ef(%rip), %xmm0     # 0x90a8
movsd 0x80(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
mulsd 0x54de(%rip), %xmm0     # 0x90b0
leaq -0x1(%r14), %rax
xorl %ecx, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
mulss 0x50(%rsp), %xmm1
cvttss2si %xmm1, %edx
movslq %edx, %rdx
xorps %xmm1, %xmm1
cvtss2sd 0x44c(%rbx,%rdx,4), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%r15,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x3bd8
jmp 0x3915