// File: /workspace/github_c_makefile_star2_O3/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: ev_relax_undep
int ev_relax_undep(MJD_Siggen_Setup *setup) {
  int    old = 1, new = 0, iter, r, z, bvn;
  float  grid = setup->xtal_grid;
  int    L  = lrint(setup->xtal_length/grid)+2;
  int    R  = lrint(setup->xtal_radius/grid)+2;
  double eps_sum, v_sum, save_dif, min;
  double dif, sum_dif=0, max_dif, bubble_volts=0;
  double ***v = setup->v, **eps_dr = setup->eps_dr, **eps_dz = setup->eps_dz;
  double ***dr = setup->dr, ***dz = setup->dz;
  double *s1 = setup->s1, *s2 = setup->s2;
  char   **undep = setup->undepleted;
  double e_over_E = 11.310; // e/epsilon; for 1 mm2, charge units 1e10 e/cm3, espilon = 16*epsilon0


  // save impurity value along passivated surface
  for (r = 1; r < R; r++)
    setup->impurity[0][r] = setup->impurity[1][r];

  /* initialise the undepleted array for use with bubble depletion */
  for (z = 1; z < L; z++) {
    for (r = 1; r < R; r++) {
      if (setup->point_type[z][r] >= INSIDE) undep[r][z] = 0;
    }
  }

  for (iter = 0; iter < setup->max_iterations; iter++) {

    double OR_fact = ((0.997 - 300.0/(L*R)) * (1.0 - 0.9/(double)(1+iter/6)));
    if (300.0/(L*R) > 0.5) OR_fact = (0.5 * (1.0 - 0.9/(double)(1+iter/6)));
    if (iter < 2) OR_fact = 0.0;

    old = new;
    new = 1 - new;
    sum_dif = 0;
    max_dif = 0;
    bubble_volts = 0;
    bvn = 0;

    if (setup->vacuum_gap > 0) {   // modify impurity value along passivated surface
      for (r = 1; r < R; r++)      //   due to surface charge induced by capacitance
        setup->impurity[1][r] = setup->impurity[0][r] -
          v[old][1][r] * 5.52e-4 * e_over_E * grid / setup->vacuum_gap;
    }

    /* start from z=1 and r=1 so that (z,r)=0 can be
       used for reflection symmetry around r=0 or z=0 */
    for (z = 1; z < L; z++) {
      /* manage r=0 reflection symmetry */
      setup->v[old][z][0] = setup->v[old][z][2];

      for (r = 1; r < R; r++) {
        if (setup->point_type[z][r] < INSIDE) continue;   // HV or point contact
        save_dif = v[old][z][r] - v[new][z][r];      // step difference from previous iteration

        if (setup->point_type[z][r] < DITCH) {       // normal bulk or passivated surface, no complications
          v_sum = (v[old][z+1][r] + v[old][z][r+1]*s1[r] +
                   v[old][z-1][r] + v[old][z][r-1]*s2[r]);
          if (r > 1) eps_sum = 4;
          else       eps_sum = 2 + s1[r] + s2[r];
        } else if (setup->point_type[z][r] == CONTACT_EDGE) {  // adjacent to the contact
          v_sum = (v[old][z+1][r]*dz[1][z][r] + v[old][z][r+1]*dr[1][z][r] +
                   v[old][z-1][r]*dz[0][z][r] + v[old][z][r-1]*dr[0][z][r]);
          eps_sum = dz[1][z][r] + dr[1][z][r] + dz[0][z][r] + dr[0][z][r];
        } else if (setup->point_type[z][r] >= DITCH) {  // in or adjacent to the ditch
          v_sum = (v[old][z+1][r]*eps_dz[z  ][r] + v[old][z][r+1]*eps_dr[z][r  ]*s1[r] +
                   v[old][z-1][r]*eps_dz[z-1][r] + v[old][z][r-1]*eps_dr[z][r-1]*s2[r]);
          eps_sum = (eps_dz[z][r]   + eps_dr[z][r]  *s1[r] +
                     eps_dz[z-1][r] + eps_dr[z][r-1]*s2[r]);
        }

        // calculate the interpolated mean potential and the effect of the space charge
        min = fminf(fminf(v[old][z+1][r], v[old][z][r+1]),
                    fminf(v[old][z-1][r], v[old][z][r-1]));
        v[new][z][r] = v_sum / eps_sum + setup->impurity[z][r];

        undep[r][z] /= 2;
        if (v[new][z][r] <= 0) {
          v[new][z][r] = 0;
          undep[r][z] = 4;  // do not do over-relaxation for 3 iterations
        } else if (v[new][z][r] <= min) {
          if (bubble_volts == 0) bubble_volts = min + 0.2*grid*grid; // finer grids require smaller increment here
          v[new][z][r] = bubble_volts;
          bvn++;
          undep[r][z] = 8;  // do not do over-relaxation for 4 iterations
        }

        // calculate difference from last iteration, for convergence check
        dif = v[old][z][r] - v[new][z][r];
        if (dif < 0) dif = -dif;
        sum_dif += dif;
        if (max_dif < dif) max_dif = dif;
        // do over-relaxation
        if (!undep[r][z])  v[new][z][r] += OR_fact*save_dif;
      }
    }

    // report results for some iterations
    if (iter < 10 || (iter < 600 && iter%100 == 0) || iter%1000 == 0) {
      if (0) {
        printf("%5d %d %d %.10f %.10f\n", iter, old, new, max_dif, sum_dif/(L-2)/(R-2));
      } else {
        printf("%5d %d %d %.10f %.10f ; %.10f %.10f bubble %.2f %d\n",
               iter, old, new, max_dif, sum_dif/(L-2)/(R-2),
               v[new][L/2][R/2], v[new][L/3][R/3], bubble_volts, bvn);
      }
    }
    // check for convergence
    if (max_dif < 0.00000008) break;
 
  }
  printf(">> %d %.16f\n\n", iter, sum_dif);

  setup->bubble_volts = bubble_volts;
  setup->fully_depleted = 1;
  for (r=1; r<R; r++) {
    for (z=1; z<L; z++) {
      if (setup->point_type[z][r] < INSIDE) {
        undep[r][z] = ' ';
      } else if (undep[r][z] == 0) {
        undep[r][z] = '.';
      } else {
        if (undep[r][z] > 4) undep[r][z] = 'B';  // identifies pinch-off
        else undep[r][z] = '*';
        setup->fully_depleted = 0;
      }
    }
  }

  if (setup->vacuum_gap > 0) {   // restore impurity value along passivated surface
    for (r = 1; r < R; r++)
      setup->impurity[1][r] = setup->impurity[0][r];
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movss 0x4(%rdi), %xmm0
movss 0x54(%rdi), %xmm1
movss %xmm1, 0x20(%rsp)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
movq %rax, 0x38(%rsp)
leal 0x2(%rax), %r13d
movss 0x8(%rbx), %xmm0
divss 0x20(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
leal 0x2(%rax), %edi
movq 0x3f8(%rbx), %rcx
movq %rcx, 0x98(%rsp)
movq 0x400(%rbx), %rcx
movq %rcx, 0x90(%rsp)
movq 0x418(%rbx), %rcx
movq %rcx, 0x10(%rsp)
movq 0x420(%rbx), %r12
movq 0x438(%rbx), %r14
movl %edi, %r8d
movq %rax, 0x8(%rsp)
cmpl $0x7ffffffd, %eax       # imm = 0x7FFFFFFD
ja 0x5b47
movq 0x408(%rbx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
movl $0x1, %esi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %r8
jne 0x5b35
movl %r13d, %eax
movq 0x38(%rsp), %r9
cmpl $0x7ffffffd, %r9d       # imm = 0x7FFFFFFD
ja 0x5b95
movl $0x1, %ecx
cmpl $0x7ffffffd, 0x8(%rsp)  # imm = 0x7FFFFFFD
ja 0x5b8d
movl $0x1, %edx
movq 0x430(%rbx), %rsi
movq (%rsi,%rcx,8), %rsi
cmpb $0x2, (%rsi,%rdx)
jl 0x5b85
movq (%r14,%rdx,8), %rsi
movb $0x0, (%rsi,%rcx)
incq %rdx
cmpq %rdx, %r8
jne 0x5b6c
incq %rcx
cmpq %rax, %rcx
jne 0x5b5d
cmpl $0x0, 0x78(%rbx)
movq %r8, 0x40(%rsp)
movq %rax, 0x48(%rsp)
jle 0x6327
movl %edi, %ecx
imull %r13d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x34fa(%rip), %xmm1     # 0x90b8
divsd %xmm0, %xmm1
movsd 0x34f6(%rip), %xmm0     # 0x90c0
subsd %xmm1, %xmm0
movsd 0x3462(%rip), %xmm2     # 0x9038
movapd %xmm2, %xmm3
cmpltsd %xmm1, %xmm3
movapd %xmm3, %xmm1
andnpd %xmm0, %xmm1
andpd %xmm2, %xmm3
orpd %xmm1, %xmm3
movapd %xmm3, 0xa0(%rsp)
xorps %xmm1, %xmm1
cvtss2sd 0x20(%rsp), %xmm1
movsd 0x347e(%rip), %xmm15    # 0x9088
mulsd %xmm1, %xmm15
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
movsd %xmm0, 0x78(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movl %r13d, %ecx
shrl $0x1f, %ecx
addl %r13d, %ecx
sarl %ecx
movslq %ecx, %rax
movq %rax, 0x68(%rsp)
movl %edi, %ecx
shrl $0x1f, %ecx
addl %edi, %ecx
sarl %ecx
movslq %ecx, %rax
movq %rax, 0x60(%rsp)
movslq %r13d, %rcx
imulq $0x55555556, %rcx, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
movslq %ecx, %rax
movq %rax, 0x58(%rsp)
movslq %edi, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
cltq
movq %rax, 0x50(%rsp)
leaq -0x1(%r8), %r13
xorl %edx, %edx
xorpd %xmm12, %xmm12
movsd %xmm1, 0x88(%rsp)
mulsd %xmm1, %xmm15
movapd 0x34b1(%rip), %xmm13    # 0x9160
movsd 0x3418(%rip), %xmm10    # 0x90d0
movsd 0x33e7(%rip), %xmm11    # 0x90a8
xorl %r10d, %r10d
movsd %xmm15, 0x80(%rsp)
movl %r10d, %eax
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x22, %rax
incl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x33d9(%rip), %xmm1     # 0x90c8
divsd %xmm0, %xmm1
addsd 0x335d(%rip), %xmm1     # 0x9058
xorpd %xmm0, %xmm0
cmpl $0x2, %r10d
jb 0x5d12
mulsd 0xa0(%rsp), %xmm1
movapd %xmm1, %xmm0
movss 0x50(%rbx), %xmm1
ucomiss 0x341a(%rip), %xmm1     # 0x9138
jbe 0x5d7d
cmpl $0x7ffffffd, 0x8(%rsp)  # imm = 0x7FFFFFFD
ja 0x5d7d
movq 0x408(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movl %edx, %esi
movq 0x3e0(%rbx,%rsi,8), %rsi
movq 0x8(%rsi), %rsi
cvtss2sd %xmm1, %xmm1
movl $0x1, %edi
movsd (%rsi,%rdi,8), %xmm2
mulsd %xmm10, %xmm2
mulsd %xmm11, %xmm2
mulsd 0x88(%rsp), %xmm2
divsd %xmm1, %xmm2
addsd (%rax,%rdi,8), %xmm2
movsd %xmm2, (%rcx,%rdi,8)
incq %rdi
cmpq %rdi, %r8
jne 0x5d4f
movl %r10d, 0x1c(%rsp)
movl $0x1, %eax
subl %edx, %eax
movl %eax, 0x18(%rsp)
movl %eax, %eax
cmpl $0x7ffffffd, %r9d       # imm = 0x7FFFFFFD
ja 0x61d5
movl %edx, %ecx
movq 0x3e0(%rbx,%rcx,8), %r10
xorps %xmm1, %xmm1
movaps %xmm1, 0x20(%rsp)
xorl %r8d, %r8d
movl $0x1, %esi
xorpd %xmm14, %xmm14
movq (%r10,%rsi,8), %rdi
movsd 0x10(%rdi), %xmm2
movsd %xmm2, (%rdi)
cmpl $0x7ffffffd, 0x8(%rsp)  # imm = 0x7FFFFFFD
ja 0x61be
xorl %edi, %edi
movq %rdi, %r9
incq %rdi
movq 0x430(%rbx), %r11
movq (%r11,%rsi,8), %r11
movb 0x1(%r11,%r9), %r15b
cmpb $0x2, %r15b
jge 0x5dfd
movapd %xmm1, %xmm4
jmp 0x61af
movq (%r10,%rsi,8), %r11
cmpb $0x4, %r15b
ja 0x5e78
movq -0x8(%r10,%rsi,8), %r15
movq 0x8(%r10,%rsi,8), %r10
movsd 0x8(%r10,%r9,8), %xmm3
movsd (%r11,%r9,8), %xmm2
movsd 0x10(%r11,%r9,8), %xmm4
movq 0x10(%rsp), %r10
movsd 0x8(%r10,%r9,8), %xmm6
movapd %xmm4, %xmm9
mulsd %xmm6, %xmm9
addsd %xmm3, %xmm9
movsd 0x8(%r15,%r9,8), %xmm5
addsd %xmm5, %xmm9
movsd 0x8(%r12,%r9,8), %xmm8
movapd %xmm2, %xmm7
mulsd %xmm8, %xmm7
addsd %xmm9, %xmm7
cmpq $0x1, %rdi
jbe 0x5f36
movsd 0x3265(%rip), %xmm6     # 0x90d8
jmp 0x6024
movq 0x8(%r10,%rsi,8), %rbp
movsd 0x8(%rbp,%r9,8), %xmm3
cmpb $0x7, %r15b
jne 0x5f48
movq 0x1468(%rbx), %r15
movq (%r15,%rsi,8), %r15
movsd 0x8(%r15,%r9,8), %xmm6
movsd (%r11,%r9,8), %xmm2
movsd 0x10(%r11,%r9,8), %xmm4
movq 0x1450(%rbx), %r15
movq 0x1458(%rbx), %rbp
movq (%rbp,%rsi,8), %rbp
movsd 0x8(%rbp,%r9,8), %xmm8
movapd %xmm4, %xmm5
mulsd %xmm8, %xmm5
movapd %xmm3, %xmm7
mulsd %xmm6, %xmm7
addsd %xmm5, %xmm7
movq -0x8(%r10,%rsi,8), %r10
movsd 0x8(%r10,%r9,8), %xmm5
movq 0x1460(%rbx), %r10
movq (%r10,%rsi,8), %r10
movsd 0x8(%r10,%r9,8), %xmm9
movapd %xmm5, %xmm10
mulsd %xmm9, %xmm10
addsd %xmm7, %xmm10
movq (%r15,%rsi,8), %r10
movsd 0x8(%r10,%r9,8), %xmm11
movapd %xmm2, %xmm7
mulsd %xmm11, %xmm7
addsd %xmm10, %xmm7
addsd %xmm8, %xmm6
addsd %xmm9, %xmm6
addsd %xmm11, %xmm6
jmp 0x6012
addsd 0x31a2(%rip), %xmm6     # 0x90e0
addsd %xmm8, %xmm6
jmp 0x6024
movq 0x90(%rsp), %rbp
movq -0x8(%rbp,%rsi,8), %r15
movq (%rbp,%rsi,8), %rbp
movsd 0x8(%rbp,%r9,8), %xmm9
movsd (%r11,%r9,8), %xmm2
movsd 0x10(%r11,%r9,8), %xmm4
movq 0x98(%rsp), %rbp
movq (%rbp,%rsi,8), %rbp
movsd (%rbp,%r9,8), %xmm6
movsd 0x8(%rbp,%r9,8), %xmm8
movapd %xmm4, %xmm5
mulsd %xmm8, %xmm5
movq 0x10(%rsp), %rbp
movsd 0x8(%rbp,%r9,8), %xmm10
mulsd %xmm10, %xmm5
movapd %xmm3, %xmm7
mulsd %xmm9, %xmm7
addsd %xmm5, %xmm7
movq -0x8(%r10,%rsi,8), %r10
movsd 0x8(%r10,%r9,8), %xmm5
movsd 0x8(%r15,%r9,8), %xmm11
movapd %xmm5, %xmm12
mulsd %xmm11, %xmm12
addsd %xmm7, %xmm12
movapd %xmm2, %xmm7
mulsd %xmm6, %xmm7
movsd 0x8(%r12,%r9,8), %xmm13
mulsd %xmm13, %xmm7
addsd %xmm12, %xmm7
xorpd %xmm12, %xmm12
mulsd %xmm10, %xmm8
addsd %xmm9, %xmm8
addsd %xmm11, %xmm8
mulsd %xmm13, %xmm6
movapd 0x3153(%rip), %xmm13    # 0x9160
addsd %xmm8, %xmm6
movsd 0x30b5(%rip), %xmm10    # 0x90d0
movsd 0x3084(%rip), %xmm11    # 0x90a8
divsd %xmm6, %xmm7
movsd 0x8(%r11,%r9,8), %xmm6
movq 0x3e0(%rbx,%rax,8), %r10
movq (%r10,%rsi,8), %r10
subsd 0x8(%r10,%r9,8), %xmm6
movq 0x408(%rbx), %r11
movq (%r11,%rsi,8), %r11
addsd 0x8(%r11,%r9,8), %xmm7
movsd %xmm7, 0x8(%r10,%r9,8)
movq 0x8(%r14,%r9,8), %r10
movb (%r10,%rsi), %r11b
movl %r11d, %ebp
shrb $0x7, %bpl
addb %r11b, %bpl
sarb %bpl
movb %bpl, (%r10,%rsi)
movq 0x3e0(%rbx,%rax,8), %r10
movq (%r10,%rsi,8), %r10
movsd 0x8(%r10,%r9,8), %xmm7
ucomisd %xmm7, %xmm12
jae 0x613f
xorps %xmm8, %xmm8
cvtsd2ss %xmm3, %xmm8
cvtsd2ss %xmm4, %xmm4
movaps %xmm8, %xmm3
cmpunordss %xmm8, %xmm3
movaps %xmm3, %xmm9
andps %xmm4, %xmm9
minss %xmm8, %xmm4
andnps %xmm4, %xmm3
xorps %xmm4, %xmm4
cvtsd2ss %xmm5, %xmm4
orps %xmm9, %xmm3
cvtsd2ss %xmm2, %xmm2
movaps %xmm4, %xmm5
cmpunordss %xmm4, %xmm5
movaps %xmm5, %xmm8
andps %xmm2, %xmm8
minss %xmm4, %xmm2
andnps %xmm2, %xmm5
orps %xmm8, %xmm5
movaps %xmm5, %xmm2
minss %xmm3, %xmm2
cmpunordss %xmm3, %xmm3
movaps %xmm3, %xmm4
andps %xmm5, %xmm4
andnps %xmm2, %xmm3
orps %xmm4, %xmm3
xorps %xmm2, %xmm2
cvtss2sd %xmm3, %xmm2
ucomisd %xmm7, %xmm2
jb 0x6154
addsd %xmm15, %xmm2
movapd 0x20(%rsp), %xmm4
movapd %xmm4, %xmm3
cmpeqsd %xmm12, %xmm3
andpd %xmm3, %xmm2
andnpd %xmm4, %xmm3
orpd %xmm2, %xmm3
movlpd %xmm3, 0x8(%r10,%r9,8)
incl %r8d
movb $0x8, %r10b
movapd %xmm3, 0x20(%rsp)
jmp 0x614b
movq $0x0, 0x8(%r10,%r9,8)
movb $0x4, %r10b
movq 0x8(%r14,%r9,8), %r11
movb %r10b, (%r11,%rsi)
movq 0x3e0(%rbx,%rcx,8), %r10
movq (%r10,%rsi,8), %r11
movsd 0x8(%r11,%r9,8), %xmm3
movq 0x3e0(%rbx,%rax,8), %r11
movq (%r11,%rsi,8), %r11
movsd 0x8(%r11,%r9,8), %xmm2
subsd %xmm2, %xmm3
movapd %xmm3, %xmm4
xorpd %xmm13, %xmm4
maxsd %xmm3, %xmm4
addsd %xmm4, %xmm14
maxsd %xmm1, %xmm4
movq 0x8(%r14,%r9,8), %r15
cmpb $0x0, (%r15,%rsi)
jne 0x61af
mulsd %xmm0, %xmm6
addsd %xmm2, %xmm6
movsd %xmm6, 0x8(%r11,%r9,8)
movapd %xmm4, %xmm1
cmpq %rdi, %r13
jne 0x5dd8
jmp 0x61c1
movaps %xmm1, %xmm4
incq %rsi
movapd %xmm4, %xmm1
cmpq 0x48(%rsp), %rsi
jne 0x5dbb
jmp 0x61eb
xorl %r8d, %r8d
xorpd %xmm14, %xmm14
xorpd %xmm4, %xmm4
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movl 0x1c(%rsp), %r10d
cmpl $0xa, %r10d
jae 0x6296
movapd %xmm14, %xmm1
divsd 0x78(%rsp), %xmm1
divsd 0x70(%rsp), %xmm1
movq 0x3e0(%rbx,%rax,8), %rax
movq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x60(%rsp), %rsi
movsd (%rcx,%rsi,8), %xmm2
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rsp), %rcx
movapd %xmm14, 0xc0(%rsp)
movsd (%rax,%rcx,8), %xmm3
leaq 0x3ad3(%rip), %rdi      # 0x9d1d
movl %r10d, %esi
movl 0x18(%rsp), %ecx
movapd %xmm4, %xmm0
movapd %xmm4, 0xb0(%rsp)
movaps 0x20(%rsp), %xmm4
movb $0x5, %al
callq 0x10f0
movapd 0xb0(%rsp), %xmm4
movapd 0xc0(%rsp), %xmm14
movsd 0x2e22(%rip), %xmm11    # 0x90a8
movsd 0x2e41(%rip), %xmm10    # 0x90d0
movl 0x1c(%rsp), %r10d
jmp 0x62d3
cmpl $0x258, %r10d           # imm = 0x258
setb %cl
imull $0xc28f5c29, %r10d, %esi # imm = 0xC28F5C29
rorl $0x2, %esi
cmpl $0x28f5c29, %esi        # imm = 0x28F5C29
setb %sil
imull $0x26e978d5, %r10d, %edi # imm = 0x26E978D5
rorl $0x3, %edi
cmpl $0x418938, %edi         # imm = 0x418938
jb 0x61fa
andb %sil, %cl
jne 0x61fa
movsd 0x2e15(%rip), %xmm0     # 0x90f0
ucomisd %xmm4, %xmm0
ja 0x6316
incl %r10d
movl 0x18(%rsp), %eax
movl %eax, %edx
cmpl 0x78(%rbx), %r10d
movq 0x40(%rsp), %r8
movq 0x38(%rsp), %r9
movsd 0x80(%rsp), %xmm15
xorpd %xmm12, %xmm12
movapd 0x2e50(%rip), %xmm13    # 0x9160
jl 0x5cce
xorps %xmm0, %xmm0
cvtsd2ss 0x20(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x6338
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
xorpd %xmm14, %xmm14
xorl %r10d, %r10d
leaq 0x3a12(%rip), %rdi      # 0x9d51
movl %r10d, %esi
movapd %xmm14, %xmm0
movb $0x1, %al
callq 0x10f0
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x444(%rbx)
movl $0x1, 0x440(%rbx)
cmpl $0x7ffffffd, 0x8(%rsp)  # imm = 0x7FFFFFFD
movq 0x40(%rsp), %r8
ja 0x642b
movl $0x1, %eax
movl $0x42, %ecx
movq 0x38(%rsp), %r9
movq 0x48(%rsp), %r10
cmpl $0x7ffffffd, %r9d       # imm = 0x7FFFFFFD
ja 0x63e7
movl $0x1, %edx
movq 0x430(%rbx), %rsi
movq (%rsi,%rdx,8), %rsi
cmpb $0x1, (%rsi,%rax)
movq (%r14,%rax,8), %rsi
jg 0x63b6
movb $0x20, (%rsi,%rdx)
jmp 0x63df
movb (%rsi,%rdx), %dil
testb %dil, %dil
je 0x63db
cmpb $0x5, %dil
movl $0x2a, %edi
cmovgel %ecx, %edi
movb %dil, (%rsi,%rdx)
movl $0x0, 0x440(%rbx)
jmp 0x63df
movb $0x2e, (%rsi,%rdx)
incq %rdx
cmpq %rdx, %r10
jne 0x639b
incq %rax
cmpq %r8, %rax
jne 0x638d
movss 0x50(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x642b
cmpl $0x7ffffffd, 0x8(%rsp)  # imm = 0x7FFFFFFD
ja 0x642b
movq 0x408(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movl $0x1, %edx
movsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %r8
jne 0x6419
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq