long digitize_one(double c, double s, long nbin1, long idx, char *partition) {
  long is, ic, ir, ncol, nrow, nannuli, nsec;
  long one, nbin, nbin2, ibin1, ibin2;
  double angle, modulus, scaled, fs, fc, offset;
  nbin = nbin1 * nbin1;
  one = 0;
  if (idx == 0) {
    modulus = (c * c + s * s);
    modulus = sqrt(modulus);
    scaled = ((modulus + 1.0) / 2.0) * nbin;
    one = floor(scaled);
    if (one >= nbin)
      one = nbin - 1;
    else if (one < 0)
      one = 0;
  } else {
    if (strcmp(partition, "old") == 0) {
      modulus = (c * c + s * s);
      if (modulus < 0.0)
        modulus = 0.0;
      else if (modulus > 1.0)
        modulus = 1.0;
      modulus = sqrt(modulus);
      modulus = sqrt(modulus);
      modulus = sqrt(modulus);
      ibin1 = modulus * nbin1;
      if (ibin1 >= nbin1)
        ibin1 = nbin1 - 1;
      else if (ibin1 < 0)
        ibin1 = 0;
      nbin2 = 2 * ibin1 + 1;
      angle = 3.14159265358979323846 + atan2(s, c);
      ibin2 = nbin2 * (angle / (2 * 3.14159265358979323846));
      if (ibin2 >= nbin2)
        ibin2 = nbin2 - 1;
      else if (ibin2 < 0)
        ibin2 = 0;
      one = ibin1 * ibin1 + ibin2;
    } else if (strcmp(partition, "maze") == 0) {
      nannuli = sqrt((double)nbin);
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      modulus = sqrt(modulus);
      ir = (modulus * nannuli);
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      nsec = 2 * ir + 1;
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = nsec * (angle / (2.0 * 3.14159265358979323846));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      one = ir * ir + is;
    } else if (strcmp(partition, "dart") == 0) {
      nannuli = (long)sqrt((double)nbin);
      nsec = nannuli;
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      ir = (long)floor((modulus * nannuli));
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = (long)floor((double)nsec * (angle / (2.0 * 3.14159265358979323846)));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      one = ir * nsec + is;
    } else if (strcmp(partition, "stagger") == 0) {
      nannuli = (long)sqrt((double)nbin);
      nsec = nannuli;
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = (long)floor((double)nsec * (angle / (2.0 * 3.14159265358979323846)));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      if (is % 2)
        ir = (long)floor(modulus * nannuli);
      else
        ir = (long)floor(modulus * nannuli + 0.5);
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      one = ir * nsec + is;
    } else if (strcmp(partition, "spiral") == 0) {
      nannuli = (long)sqrt((double)nbin);
      nsec = nannuli;
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = (long)floor((double)nsec * (angle / (2.0 * 3.14159265358979323846)));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      offset = ((double)is) / ((double)nsec);
      ir = (long)floor(modulus * nannuli + offset);
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      one = ir * nsec + is;
    } else if (strcmp(partition, "chess") == 0) {
      nrow = (long)floor(sqrt((double)nbin));
      ncol = (long)floor(sqrt((double)nbin));
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      fs = 4.0 * (s + 0.125) * nrow;
      is = (long)floor(fs);
      fc = 4.0 * (c + 0.125) * ncol;
      ic = (long)floor(fc);
      if (is >= nrow)
        is = nrow - 1;
      else if (is < 0)
        is = 0;
      if (ic >= ncol)
        ic = ncol - 1;
      else if (ic < 0)
        ic = 0;
      one = is * ncol + ic;
    } else
      return (0);
  }
  return (one);
}


x86 assembly (clang, -O0):
<digitize_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    -0x20(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x70(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    123a <digitize_one+0xfa>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xe5e(%rip),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
movsd  0xe5e(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdq -0x78(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
cmp    -0x78(%rbp),%rax
jl     121d <digitize_one+0xdd>
mov    -0x78(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    1235 <digitize_one+0xf5>
cmpq   $0x0,-0x70(%rbp)
jge    1230 <digitize_one+0xf0>
movq   $0x0,-0x70(%rbp)
jmp    1235 <digitize_one+0xf5>
jmp    1c59 <digitize_one+0xb19>
mov    -0x30(%rbp),%rdi
lea    0xdf3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    142c <digitize_one+0x2ec>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jbe    1298 <digitize_one+0x158>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    12c7 <digitize_one+0x187>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0xd78(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12c2 <digitize_one+0x182>
movsd  0xd66(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    12c7 <digitize_one+0x187>
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdq -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
cmp    -0x20(%rbp),%rax
jl     1349 <digitize_one+0x209>
mov    -0x20(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    1367 <digitize_one+0x227>
cmpq   $0x0,-0x88(%rbp)
jge    1362 <digitize_one+0x222>
movq   $0x0,-0x88(%rbp)
jmp    1367 <digitize_one+0x227>
mov    -0x88(%rbp),%rax
shl    $0x1,%rax
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movaps %xmm0,%xmm1
movsd  0xc94(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdq -0x80(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xc5a(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
cmp    -0x80(%rbp),%rax
jl     13ef <digitize_one+0x2af>
mov    -0x80(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x90(%rbp)
jmp    140d <digitize_one+0x2cd>
cmpq   $0x0,-0x90(%rbp)
jge    1408 <digitize_one+0x2c8>
movq   $0x0,-0x90(%rbp)
jmp    140d <digitize_one+0x2cd>
mov    -0x88(%rbp),%rax
imul   -0x88(%rbp),%rax
ff
add    -0x90(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1c54 <digitize_one+0xb14>
mov    -0x30(%rbp),%rdi
lea    0xc05(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    15bd <digitize_one+0x47d>
cvtsi2sdq -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdq -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x60(%rbp),%rax
jl     14e1 <digitize_one+0x3a1>
mov    -0x60(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    14f9 <digitize_one+0x3b9>
cmpq   $0x0,-0x48(%rbp)
jge    14f4 <digitize_one+0x3b4>
movq   $0x0,-0x48(%rbp)
jmp    14f9 <digitize_one+0x3b9>
mov    -0x48(%rbp),%rax
shl    $0x1,%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1549 <digitize_one+0x409>
movsd  0xad7(%rip),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdq -0x68(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xab1(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x68(%rbp),%rax
jl     158f <digitize_one+0x44f>
mov    -0x68(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    15a7 <digitize_one+0x467>
cmpq   $0x0,-0x38(%rbp)
jge    15a2 <digitize_one+0x462>
movq   $0x0,-0x38(%rbp)
jmp    15a7 <digitize_one+0x467>
mov    -0x48(%rbp),%rax
imul   -0x48(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1c4f <digitize_one+0xb0f>
mov    -0x30(%rbp),%rdi
lea    0xa79(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    173b <digitize_one+0x5fb>
cvtsi2sdq -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdq -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x60(%rbp),%rax
jl     166a <digitize_one+0x52a>
mov    -0x60(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1682 <digitize_one+0x542>
cmpq   $0x0,-0x48(%rbp)
jge    167d <digitize_one+0x53d>
movq   $0x0,-0x48(%rbp)
jmp    1682 <digitize_one+0x542>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    16c2 <digitize_one+0x582>
movsd  0x95e(%rip),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdq -0x68(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0x938(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x68(%rbp),%rax
jl     170d <digitize_one+0x5cd>
mov    -0x68(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1725 <digitize_one+0x5e5>
cmpq   $0x0,-0x38(%rbp)
jge    1720 <digitize_one+0x5e0>
movq   $0x0,-0x38(%rbp)
jmp    1725 <digitize_one+0x5e5>
mov    -0x48(%rbp),%rax
imul   -0x68(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1c4a <digitize_one+0xb0a>
mov    -0x30(%rbp),%rdi
lea    0x900(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1902 <digitize_one+0x7c2>
cvtsi2sdq -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    17e9 <digitize_one+0x6a9>
movsd  0x837(%rip),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdq -0x68(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0x811(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x68(%rbp),%rax
jl     1834 <digitize_one+0x6f4>
mov    -0x68(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    184c <digitize_one+0x70c>
cmpq   $0x0,-0x38(%rbp)
jge    1847 <digitize_one+0x707>
movq   $0x0,-0x38(%rbp)
jmp    184c <digitize_one+0x70c>
mov    -0x38(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     1889 <digitize_one+0x749>
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdq -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
jmp    18b5 <digitize_one+0x775>
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdq -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x775(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x60(%rbp),%rax
jl     18d4 <digitize_one+0x794>
mov    -0x60(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    18ec <digitize_one+0x7ac>
cmpq   $0x0,-0x48(%rbp)
jge    18e7 <digitize_one+0x7a7>
movq   $0x0,-0x48(%rbp)
jmp    18ec <digitize_one+0x7ac>
mov    -0x48(%rbp),%rax
imul   -0x68(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1c45 <digitize_one+0xb05>
mov    -0x30(%rbp),%rdi
lea    0x741(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1aa4 <digitize_one+0x964>
cvtsi2sdq -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    19b0 <digitize_one+0x870>
movsd  0x670(%rip),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdq -0x68(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0x64a(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x68(%rbp),%rax
jl     19fb <digitize_one+0x8bb>
mov    -0x68(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1a13 <digitize_one+0x8d3>
cmpq   $0x0,-0x38(%rbp)
jge    1a0e <digitize_one+0x8ce>
movq   $0x0,-0x38(%rbp)
jmp    1a13 <digitize_one+0x8d3>
cvtsi2sdq -0x38(%rbp),%xmm0
cvtsi2sdq -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sdq -0x60(%rbp),%xmm2
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x60(%rbp),%rax
jl     1a76 <digitize_one+0x936>
mov    -0x60(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1a8e <digitize_one+0x94e>
cmpq   $0x0,-0x48(%rbp)
jge    1a89 <digitize_one+0x949>
movq   $0x0,-0x48(%rbp)
jmp    1a8e <digitize_one+0x94e>
mov    -0x48(%rbp),%rax
imul   -0x68(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1c40 <digitize_one+0xb00>
mov    -0x30(%rbp),%rdi
lea    0x5a6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1c2e <digitize_one+0xaee>
cvtsi2sdq -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x58(%rbp)
cvtsi2sdq -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x4d8(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  0x4c3(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdq -0x58(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x38(%rbp)
movsd  0x497(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0x482(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdq -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x58(%rbp),%rax
jl     1bc9 <digitize_one+0xa89>
mov    -0x58(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1be1 <digitize_one+0xaa1>
cmpq   $0x0,-0x38(%rbp)
jge    1bdc <digitize_one+0xa9c>
movq   $0x0,-0x38(%rbp)
jmp    1be1 <digitize_one+0xaa1>
mov    -0x40(%rbp),%rax
cmp    -0x50(%rbp),%rax
jl     1c00 <digitize_one+0xac0>
mov    -0x50(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1c18 <digitize_one+0xad8>
cmpq   $0x0,-0x40(%rbp)
jge    1c13 <digitize_one+0xad3>
movq   $0x0,-0x40(%rbp)
jmp    1c18 <digitize_one+0xad8>
mov    -0x38(%rbp),%rax
imul   -0x50(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    1c3b <digitize_one+0xafb>
movq   $0x0,-0x8(%rbp)
jmp    1c61 <digitize_one+0xb21>
jmp    1c40 <digitize_one+0xb00>
jmp    1c45 <digitize_one+0xb05>
jmp    1c4a <digitize_one+0xb0a>
jmp    1c4f <digitize_one+0xb0f>
jmp    1c54 <digitize_one+0xb14>
jmp    1c59 <digitize_one+0xb19>
mov    -0x70(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitize_one>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
imul   %rdi,%rbx
test   %rsi,%rsi
je     11fe <digitize_one+0xbe>
mov    %rdx,%r15
mov    %rdi,%r14
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0xec4(%rip),%rsi
mov    %rdx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     121a <digitize_one+0xda>
lea    0xeb1(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12a8 <digitize_one+0x168>
lea    0xe9f(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1370 <digitize_one+0x230>
lea    0xe8d(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     148f <digitize_one+0x34f>
lea    0xe7e(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1584 <digitize_one+0x444>
lea    0xe6e(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     16ad <digitize_one+0x56d>
xor    %ebx,%ebx
jmp    169e <digitize_one+0x55e>
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     125d <digitize_one+0x11d>
sqrtsd %xmm0,%xmm0
jmp    1262 <digitize_one+0x122>
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xde6(%rip),%xmm0
minsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12c7 <digitize_one+0x187>
sqrtsd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    12d6 <digitize_one+0x196>
call   1050 <sqrt@plt>
jmp    12da <digitize_one+0x19a>
call   1050 <sqrt@plt>
addsd  0xdb6(%rip),%xmm0
mulsd  0xda6(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %rbx,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
cmp    %rax,%rbx
jle    129f <digitize_one+0x15f>
xor    %ebx,%ebx
test   %rax,%rax
cmovns %rax,%rbx
jmp    169e <digitize_one+0x55e>
add    $0xffffffffffffffff,%rbx
jmp    169e <digitize_one+0x55e>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jb     138f <digitize_one+0x24f>
sqrtsd %xmm0,%xmm2
jmp    139c <digitize_one+0x25c>
call   1050 <sqrt@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1256 <digitize_one+0x116>
sqrtsd %xmm0,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12ea <digitize_one+0x1aa>
sqrtsd %xmm0,%xmm0
jmp    12ef <digitize_one+0x1af>
call   1050 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
cvtsi2sd %r14,%xmm2
mulsd  %xmm0,%xmm2
cvttsd2si %xmm2,%rax
lea    -0x1(%r14),%rcx
xor    %r15d,%r15d
test   %rax,%rax
mov    $0x0,%ebx
cmovns %rax,%rbx
cmp    %r14,%rax
cmovge %rcx,%rbx
lea    (%rbx,%rbx,1),%r14
lea    (%rbx,%rbx,1),%r12
add    $0x1,%r12
movapd %xmm3,%xmm0
call   1030 <atan2@plt>
addsd  0xce8(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r12,%xmm1
divsd  0xcc0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
test   %rax,%rax
cmovns %rax,%r15
cmp    %rax,%r12
cmovle %r14,%r15
imul   %rbx,%rbx
jmp    169b <digitize_one+0x55b>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jb     14ae <digitize_one+0x36e>
sqrtsd %xmm0,%xmm0
jmp    14b7 <digitize_one+0x377>
call   1050 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm2
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
jb     13c0 <digitize_one+0x280>
sqrtsd %xmm0,%xmm0
jmp    13d1 <digitize_one+0x291>
movsd  %xmm2,0x18(%rsp)
call   1050 <sqrt@plt>
movsd  0x18(%rsp),%xmm2
cvttsd2si %xmm2,%r15
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13e6 <digitize_one+0x2a6>
sqrtsd %xmm0,%xmm0
jmp    13eb <digitize_one+0x2ab>
call   1050 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
xorps  %xmm2,%xmm2
cvtsi2sd %r15,%xmm2
mulsd  %xmm0,%xmm2
cvttsd2si %xmm2,%rax
lea    -0x1(%r15),%rcx
xor    %r14d,%r14d
test   %rax,%rax
mov    $0x0,%ebx
cmovns %rax,%rbx
cmp    %r15,%rax
cmovge %rcx,%rbx
lea    (%rbx,%rbx,1),%r15
lea    (%rbx,%rbx,1),%r12
add    $0x1,%r12
movapd %xmm3,%xmm0
call   1030 <atan2@plt>
movsd  0xbd1(%rip),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm0,%xmm3
cmpltsd 0xbdc(%rip),%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm0,%xmm3
orpd   %xmm2,%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %r12,%xmm0
divsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
cvttsd2si %xmm3,%rax
test   %rax,%rax
cmovns %rax,%r14
cmp    %rax,%r12
cmovle %r15,%r14
imul   %rbx,%rbx
add    %r14,%rbx
jmp    169e <digitize_one+0x55e>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm0
jb     15a3 <digitize_one+0x463>
sqrtsd %xmm0,%xmm0
jmp    15ac <digitize_one+0x46c>
call   1050 <sqrt@plt>
xorpd  %xmm3,%xmm3
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
cvttsd2si %xmm0,%r14
mulsd  %xmm1,%xmm1
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
jb     14e4 <digitize_one+0x3a4>
sqrtsd %xmm0,%xmm0
jmp    14e9 <digitize_one+0x3a9>
call   1050 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r14,%xmm1
movsd  %xmm1,0x18(%rsp)
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
xor    %r15d,%r15d
test   %rax,%rax
mov    $0x0,%ebx
cmovns %rax,%rbx
lea    -0x1(%r14),%r12
cmp    %r14,%rax
cmovge %r12,%rbx
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <atan2@plt>
movsd  0xad8(%rip),%xmm2
movapd %xmm0,%xmm3
addsd  %xmm2,%xmm3
xorpd  %xmm4,%xmm4
movapd %xmm0,%xmm1
cmpltsd %xmm4,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm1
orpd   %xmm3,%xmm1
divsd  %xmm2,%xmm1
mulsd  0x18(%rsp),%xmm1
movapd %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
test   %rax,%rax
cmovns %rax,%r15
cmp    %r14,%rax
cmovge %r12,%r15
jmp    1697 <digitize_one+0x557>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm0
jb     17a1 <digitize_one+0x661>
sqrtsd %xmm0,%xmm0
jmp    17aa <digitize_one+0x66a>
call   1050 <sqrt@plt>
xorpd  %xmm4,%xmm4
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
cvttsd2si %xmm0,%r14
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm4,%xmm0
jb     15dd <digitize_one+0x49d>
sqrtsd %xmm0,%xmm0
jmp    15ee <digitize_one+0x4ae>
call   1050 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
movsd  %xmm0,0x18(%rsp)
movapd %xmm3,%xmm0
call   1030 <atan2@plt>
movsd  0xa0b(%rip),%xmm2
movapd %xmm0,%xmm3
addsd  %xmm2,%xmm3
xorpd  %xmm4,%xmm4
movapd %xmm0,%xmm1
cmpltsd %xmm4,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm1
orpd   %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
lea    -0x1(%r14),%rbx
xor    %r12d,%r12d
test   %rax,%rax
mov    $0x0,%r15d
cmovns %rax,%r15
cmp    %r14,%rax
cmovge %rbx,%r15
movsd  0x18(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
test   $0x1,%r15b
jne    167f <digitize_one+0x53f>
addsd  0x999(%rip),%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
test   %rax,%rax
cmovns %rax,%r12
cmp    %r14,%rax
cmovl  %r12,%rbx
imul   %r14,%rbx
add    %r15,%rbx
mov    %rbx,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
xorps  %xmm1,%xmm1
cvtsi2sd %rbx,%xmm1
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
xorpd  %xmm2,%xmm2
movsd  %xmm1,0x18(%rsp)
ucomisd %xmm2,%xmm1
movsd  %xmm0,0x20(%rsp)
jae    16dd <digitize_one+0x59d>
movsd  0x18(%rsp),%xmm0
call   1050 <sqrt@plt>
call   1060 <floor@plt>
cvttsd2si %xmm0,%r14
movsd  0x18(%rsp),%xmm0
ucomisd 0x93b(%rip),%xmm0
movsd  0x20(%rsp),%xmm0
jae    1708 <digitize_one+0x5c8>
movsd  0x18(%rsp),%xmm0
call   1050 <sqrt@plt>
call   1060 <floor@plt>
cvttsd2si %xmm0,%r15
movsd  0x10(%rsp),%xmm1
addsd  0x8e0(%rip),%xmm1
mulsd  0x8e0(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%r12
movsd  0x8(%rsp),%xmm1
addsd  0x8b4(%rip),%xmm1
mulsd  0x8b4(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r15,%xmm0
mulsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
lea    -0x1(%r14),%rcx
xor    %edx,%edx
test   %r12,%r12
mov    $0x0,%ebx
cmovns %r12,%rbx
cmp    %r14,%r12
cmovge %rcx,%rbx
lea    -0x1(%r15),%rcx
test   %rax,%rax
cmovns %rax,%rdx
cmp    %r15,%rax
cmovge %rcx,%rdx
imul   %r15,%rbx
add    %rdx,%rbx
jmp    169e <digitize_one+0x55e>
call   1050 <sqrt@plt>
xorpd  %xmm4,%xmm4
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
cvttsd2si %xmm0,%r14
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm4,%xmm0
jb     17db <digitize_one+0x69b>
sqrtsd %xmm0,%xmm0
jmp    17ec <digitize_one+0x6ac>
call   1050 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
movsd  %xmm0,0x18(%rsp)
movapd %xmm3,%xmm0
call   1030 <atan2@plt>
movsd  0x80d(%rip),%xmm2
movapd %xmm0,%xmm3
addsd  %xmm2,%xmm3
xorpd  %xmm4,%xmm4
movapd %xmm0,%xmm1
cmpltsd %xmm4,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm1
orpd   %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
lea    -0x1(%r14),%r15
xor    %ebx,%ebx
test   %rax,%rax
mov    $0x0,%r12d
cmovns %rax,%r12
cmp    %r14,%rax
cmovge %r15,%r12
xorps  %xmm1,%xmm1
cvtsi2sd %r12,%xmm1
movsd  0x8(%rsp),%xmm2
divsd  %xmm2,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
cvttsd2si %xmm0,%rax
test   %rax,%rax
cmovns %rax,%rbx
cmp    %r14,%rax
cmovge %r15,%rbx
imul   %r14,%rbx
add    %r12,%rbx
jmp    169e <digitize_one+0x55e>

LLVM IR (-O0):
@.str = [4 x i8] c"old\00"
@.str.1 = [5 x i8] c"maze\00"
@.str.2 = [5 x i8] c"dart\00"
@.str.3 = [8 x i8] c"stagger\00"
@.str.4 = [7 x i8] c"spiral\00"
@.str.5 = [6 x i8] c"chess\00"
define i64 @digitize_one(double %0, double %1, i64 %2, i64 %3, i8* %4) {
%6 = alloca i64
%7 = alloca double
%8 = alloca double
%9 = alloca i64
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
store double %0, double* %7
store double %1, double* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i8* %4, i8** %11
%30 = load i64, i64* %9
%31 = load i64, i64* %9
%32 = mul nsw i64 %30, %31
store i64 %32, i64* %20
store i64 0, i64* %19
%33 = load i64, i64* %10
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %65
35: ; preds = %5
%36 = load double, double* %7
%37 = load double, double* %7
%38 = load double, double* %8
%39 = load double, double* %8
%40 = fmul double %38, %39
%41 = call double @llvm.fmuladd.f64(double %36, double %37, double %40)
store double %41, double* %25
%42 = load double, double* %25
%43 = call double @sqrt(double %42)
store double %43, double* %25
%44 = load double, double* %25
%45 = fadd double %44, 1.000000e+00
%46 = fdiv double %45, 2.000000e+00
%47 = load i64, i64* %20
%48 = sitofp i64 %47 to double
%49 = fmul double %46, %48
store double %49, double* %26
%50 = load double, double* %26
%51 = call double @llvm.floor.f64(double %50)
%52 = fptosi double %51 to i64
store i64 %52, i64* %19
%53 = load i64, i64* %19
%54 = load i64, i64* %20
%55 = icmp sge i64 %53, %54
br i1 %55, label %56, label %59
56: ; preds = %35
%57 = load i64, i64* %20
%58 = sub nsw i64 %57, 1
store i64 %58, i64* %19
br label %64
59: ; preds = %35
%60 = load i64, i64* %19
%61 = icmp slt i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %59
store i64 0, i64* %19
br label %63
63: ; preds = %62, %59
br label %64
64: ; preds = %63, %56
br label %511
65: ; preds = %5
%66 = load i8*, i8** %11
%67 = call i32 @strcmp(i8* %66, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %138
69: ; preds = %65
%70 = load double, double* %7
%71 = load double, double* %7
%72 = load double, double* %8
%73 = load double, double* %8
%74 = fmul double %72, %73
%75 = call double @llvm.fmuladd.f64(double %70, double %71, double %74)
store double %75, double* %25
%76 = load double, double* %25
%77 = fcmp olt double %76, 0.000000e+00
br i1 %77, label %78, label %79
78: ; preds = %69
store double 0.000000e+00, double* %25
br label %84
79: ; preds = %69
%80 = load double, double* %25
%81 = fcmp ogt double %80, 1.000000e+00
br i1 %81, label %82, label %83
82: ; preds = %79
store double 1.000000e+00, double* %25
br label %83
83: ; preds = %82, %79
br label %84
84: ; preds = %83, %78
%85 = load double, double* %25
%86 = call double @sqrt(double %85)
store double %86, double* %25
%87 = load double, double* %25
%88 = call double @sqrt(double %87)
store double %88, double* %25
%89 = load double, double* %25
%90 = call double @sqrt(double %89)
store double %90, double* %25
%91 = load double, double* %25
%92 = load i64, i64* %9
%93 = sitofp i64 %92 to double
%94 = fmul double %91, %93
%95 = fptosi double %94 to i64
store i64 %95, i64* %22
%96 = load i64, i64* %22
%97 = load i64, i64* %9
%98 = icmp sge i64 %96, %97
br i1 %98, label %99, label %102
99: ; preds = %84
%100 = load i64, i64* %9
%101 = sub nsw i64 %100, 1
store i64 %101, i64* %22
br label %107
102: ; preds = %84
%103 = load i64, i64* %22
%104 = icmp slt i64 %103, 0
br i1 %104, label %105, label %106
105: ; preds = %102
store i64 0, i64* %22
br label %106
106: ; preds = %105, %102
br label %107
107: ; preds = %106, %99
%108 = load i64, i64* %22
%109 = mul nsw i64 2, %108
%110 = add nsw i64 %109, 1
store i64 %110, i64* %21
%111 = load double, double* %8
%112 = load double, double* %7
%113 = call double @atan2(double %111, double %112)
%114 = fadd double 0x400921FB54442D18, %113
store double %114, double* %24
%115 = load i64, i64* %21
%116 = sitofp i64 %115 to double
%117 = load double, double* %24
%118 = fdiv double %117, 0x401921FB54442D18
%119 = fmul double %116, %118
%120 = fptosi double %119 to i64
store i64 %120, i64* %23
%121 = load i64, i64* %23
%122 = load i64, i64* %21
%123 = icmp sge i64 %121, %122
br i1 %123, label %124, label %127
124: ; preds = %107
%125 = load i64, i64* %21
%126 = sub nsw i64 %125, 1
store i64 %126, i64* %23
br label %132
127: ; preds = %107
%128 = load i64, i64* %23
%129 = icmp slt i64 %128, 0
br i1 %129, label %130, label %131
130: ; preds = %127
store i64 0, i64* %23
br label %131
131: ; preds = %130, %127
br label %132
132: ; preds = %131, %124
%133 = load i64, i64* %22
%134 = load i64, i64* %22
%135 = mul nsw i64 %133, %134
%136 = load i64, i64* %23
%137 = add nsw i64 %135, %136
store i64 %137, i64* %19
br label %510
138: ; preds = %65
%139 = load i8*, i8** %11
%140 = call i32 @strcmp(i8* %139, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%141 = icmp eq i32 %140, 0
br i1 %141, label %142, label %209
142: ; preds = %138
%143 = load i64, i64* %20
%144 = sitofp i64 %143 to double
%145 = call double @sqrt(double %144)
%146 = fptosi double %145 to i64
store i64 %146, i64* %17
%147 = load double, double* %7
%148 = load double, double* %7
%149 = load double, double* %8
%150 = load double, double* %8
%151 = fmul double %149, %150
%152 = call double @llvm.fmuladd.f64(double %147, double %148, double %151)
store double %152, double* %25
%153 = load double, double* %25
%154 = call double @sqrt(double %153)
store double %154, double* %25
%155 = load double, double* %25
%156 = call double @sqrt(double %155)
store double %156, double* %25
%157 = load double, double* %25
%158 = load i64, i64* %17
%159 = sitofp i64 %158 to double
%160 = fmul double %157, %159
%161 = fptosi double %160 to i64
store i64 %161, i64* %14
%162 = load i64, i64* %14
%163 = load i64, i64* %17
%164 = icmp sge i64 %162, %163
br i1 %164, label %165, label %168
165: ; preds = %142
%166 = load i64, i64* %17
%167 = sub nsw i64 %166, 1
store i64 %167, i64* %14
br label %173
168: ; preds = %142
%169 = load i64, i64* %14
%170 = icmp slt i64 %169, 0
br i1 %170, label %171, label %172
171: ; preds = %168
store i64 0, i64* %14
br label %172
172: ; preds = %171, %168
br label %173
173: ; preds = %172, %165
%174 = load i64, i64* %14
%175 = mul nsw i64 2, %174
%176 = add nsw i64 %175, 1
store i64 %176, i64* %18
%177 = load double, double* %8
%178 = load double, double* %7
%179 = call double @atan2(double %177, double %178)
store double %179, double* %24
%180 = load double, double* %24
%181 = fcmp olt double %180, 0.000000e+00
br i1 %181, label %182, label %185
182: ; preds = %173
%183 = load double, double* %24
%184 = fadd double %183, 0x401921FB54442D18
store double %184, double* %24
br label %185
185: ; preds = %182, %173
%186 = load i64, i64* %18
%187 = sitofp i64 %186 to double
%188 = load double, double* %24
%189 = fdiv double %188, 0x401921FB54442D18
%190 = fmul double %187, %189
%191 = fptosi double %190 to i64
store i64 %191, i64* %12
%192 = load i64, i64* %12
%193 = load i64, i64* %18
%194 = icmp sge i64 %192, %193
br i1 %194, label %195, label %198
195: ; preds = %185
%196 = load i64, i64* %18
%197 = sub nsw i64 %196, 1
store i64 %197, i64* %12
br label %203
198: ; preds = %185
%199 = load i64, i64* %12
%200 = icmp slt i64 %199, 0
br i1 %200, label %201, label %202
201: ; preds = %198
store i64 0, i64* %12
br label %202
202: ; preds = %201, %198
br label %203
203: ; preds = %202, %195
%204 = load i64, i64* %14
%205 = load i64, i64* %14
%206 = mul nsw i64 %204, %205
%207 = load i64, i64* %12
%208 = add nsw i64 %206, %207
store i64 %208, i64* %19
br label %509
209: ; preds = %138
%210 = load i8*, i8** %11
%211 = call i32 @strcmp(i8* %210, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%212 = icmp eq i32 %211, 0
br i1 %212, label %213, label %278
213: ; preds = %209
%214 = load i64, i64* %20
%215 = sitofp i64 %214 to double
%216 = call double @sqrt(double %215)
%217 = fptosi double %216 to i64
store i64 %217, i64* %17
%218 = load i64, i64* %17
store i64 %218, i64* %18
%219 = load double, double* %7
%220 = load double, double* %7
%221 = load double, double* %8
%222 = load double, double* %8
%223 = fmul double %221, %222
%224 = call double @llvm.fmuladd.f64(double %219, double %220, double %223)
store double %224, double* %25
%225 = load double, double* %25
%226 = call double @sqrt(double %225)
store double %226, double* %25
%227 = load double, double* %25
%228 = load i64, i64* %17
%229 = sitofp i64 %228 to double
%230 = fmul double %227, %229
%231 = call double @llvm.floor.f64(double %230)
%232 = fptosi double %231 to i64
store i64 %232, i64* %14
%233 = load i64, i64* %14
%234 = load i64, i64* %17
%235 = icmp sge i64 %233, %234
br i1 %235, label %236, label %239
236: ; preds = %213
%237 = load i64, i64* %17
%238 = sub nsw i64 %237, 1
store i64 %238, i64* %14
br label %244
239: ; preds = %213
%240 = load i64, i64* %14
%241 = icmp slt i64 %240, 0
br i1 %241, label %242, label %243
242: ; preds = %239
store i64 0, i64* %14
br label %243
243: ; preds = %242, %239
br label %244
244: ; preds = %243, %236
%245 = load double, double* %8
%246 = load double, double* %7
%247 = call double @atan2(double %245, double %246)
store double %247, double* %24
%248 = load double, double* %24
%249 = fcmp olt double %248, 0.000000e+00
br i1 %249, label %250, label %253
250: ; preds = %244
%251 = load double, double* %24
%252 = fadd double %251, 0x401921FB54442D18
store double %252, double* %24
br label %253
253: ; preds = %250, %244
%254 = load i64, i64* %18
%255 = sitofp i64 %254 to double
%256 = load double, double* %24
%257 = fdiv double %256, 0x401921FB54442D18
%258 = fmul double %255, %257
%259 = call double @llvm.floor.f64(double %258)
%260 = fptosi double %259 to i64
store i64 %260, i64* %12
%261 = load i64, i64* %12
%262 = load i64, i64* %18
%263 = icmp sge i64 %261, %262
br i1 %263, label %264, label %267
264: ; preds = %253
%265 = load i64, i64* %18
%266 = sub nsw i64 %265, 1
store i64 %266, i64* %12
br label %272
267: ; preds = %253
%268 = load i64, i64* %12
%269 = icmp slt i64 %268, 0
br i1 %269, label %270, label %271
270: ; preds = %267
store i64 0, i64* %12
br label %271
271: ; preds = %270, %267
br label %272
272: ; preds = %271, %264
%273 = load i64, i64* %14
%274 = load i64, i64* %18
%275 = mul nsw i64 %273, %274
%276 = load i64, i64* %12
%277 = add nsw i64 %275, %276
store i64 %277, i64* %19
br label %508
278: ; preds = %209
%279 = load i8*, i8** %11
%280 = call i32 @strcmp(i8* %279, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%281 = icmp eq i32 %280, 0
br i1 %281, label %282, label %359
282: ; preds = %278
%283 = load i64, i64* %20
%284 = sitofp i64 %283 to double
%285 = call double @sqrt(double %284)
%286 = fptosi double %285 to i64
store i64 %286, i64* %17
%287 = load i64, i64* %17
store i64 %287, i64* %18
%288 = load double, double* %7
%289 = load double, double* %7
%290 = load double, double* %8
%291 = load double, double* %8
%292 = fmul double %290, %291
%293 = call double @llvm.fmuladd.f64(double %288, double %289, double %292)
store double %293, double* %25
%294 = load double, double* %25
%295 = call double @sqrt(double %294)
store double %295, double* %25
%296 = load double, double* %8
%297 = load double, double* %7
%298 = call double @atan2(double %296, double %297)
store double %298, double* %24
%299 = load double, double* %24
%300 = fcmp olt double %299, 0.000000e+00
br i1 %300, label %301, label %304
301: ; preds = %282
%302 = load double, double* %24
%303 = fadd double %302, 0x401921FB54442D18
store double %303, double* %24
br label %304
304: ; preds = %301, %282
%305 = load i64, i64* %18
%306 = sitofp i64 %305 to double
%307 = load double, double* %24
%308 = fdiv double %307, 0x401921FB54442D18
%309 = fmul double %306, %308
%310 = call double @llvm.floor.f64(double %309)
%311 = fptosi double %310 to i64
store i64 %311, i64* %12
%312 = load i64, i64* %12
%313 = load i64, i64* %18
%314 = icmp sge i64 %312, %313
br i1 %314, label %315, label %318
315: ; preds = %304
%316 = load i64, i64* %18
%317 = sub nsw i64 %316, 1
store i64 %317, i64* %12
br label %323
318: ; preds = %304
%319 = load i64, i64* %12
%320 = icmp slt i64 %319, 0
br i1 %320, label %321, label %322
321: ; preds = %318
store i64 0, i64* %12
br label %322
322: ; preds = %321, %318
br label %323
323: ; preds = %322, %315
%324 = load i64, i64* %12
%325 = srem i64 %324, 2
%326 = icmp ne i64 %325, 0
br i1 %326, label %327, label %334
327: ; preds = %323
%328 = load double, double* %25
%329 = load i64, i64* %17
%330 = sitofp i64 %329 to double
%331 = fmul double %328, %330
%332 = call double @llvm.floor.f64(double %331)
%333 = fptosi double %332 to i64
store i64 %333, i64* %14
br label %341
334: ; preds = %323
%335 = load double, double* %25
%336 = load i64, i64* %17
%337 = sitofp i64 %336 to double
%338 = call double @llvm.fmuladd.f64(double %335, double %337, double 5.000000e-01)
%339 = call double @llvm.floor.f64(double %338)
%340 = fptosi double %339 to i64
store i64 %340, i64* %14
br label %341
341: ; preds = %334, %327
%342 = load i64, i64* %14
%343 = load i64, i64* %17
%344 = icmp sge i64 %342, %343
br i1 %344, label %345, label %348
345: ; preds = %341
%346 = load i64, i64* %17
%347 = sub nsw i64 %346, 1
store i64 %347, i64* %14
br label %353
348: ; preds = %341
%349 = load i64, i64* %14
%350 = icmp slt i64 %349, 0
br i1 %350, label %351, label %352
351: ; preds = %348
store i64 0, i64* %14
br label %352
352: ; preds = %351, %348
br label %353
353: ; preds = %352, %345
%354 = load i64, i64* %14
%355 = load i64, i64* %18
%356 = mul nsw i64 %354, %355
%357 = load i64, i64* %12
%358 = add nsw i64 %356, %357
store i64 %358, i64* %19
br label %507
359: ; preds = %278
%360 = load i8*, i8** %11
%361 = call i32 @strcmp(i8* %360, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%362 = icmp eq i32 %361, 0
br i1 %362, label %363, label %434
363: ; preds = %359
%364 = load i64, i64* %20
%365 = sitofp i64 %364 to double
%366 = call double @sqrt(double %365)
%367 = fptosi double %366 to i64
store i64 %367, i64* %17
%368 = load i64, i64* %17
store i64 %368, i64* %18
%369 = load double, double* %7
%370 = load double, double* %7
%371 = load double, double* %8
%372 = load double, double* %8
%373 = fmul double %371, %372
%374 = call double @llvm.fmuladd.f64(double %369, double %370, double %373)
store double %374, double* %25
%375 = load double, double* %25
%376 = call double @sqrt(double %375)
store double %376, double* %25
%377 = load double, double* %8
%378 = load double, double* %7
%379 = call double @atan2(double %377, double %378)
store double %379, double* %24
%380 = load double, double* %24
%381 = fcmp olt double %380, 0.000000e+00
br i1 %381, label %382, label %385
382: ; preds = %363
%383 = load double, double* %24
%384 = fadd double %383, 0x401921FB54442D18
store double %384, double* %24
br label %385
385: ; preds = %382, %363
%386 = load i64, i64* %18
%387 = sitofp i64 %386 to double
%388 = load double, double* %24
%389 = fdiv double %388, 0x401921FB54442D18
%390 = fmul double %387, %389
%391 = call double @llvm.floor.f64(double %390)
%392 = fptosi double %391 to i64
store i64 %392, i64* %12
%393 = load i64, i64* %12
%394 = load i64, i64* %18
%395 = icmp sge i64 %393, %394
br i1 %395, label %396, label %399
396: ; preds = %385
%397 = load i64, i64* %18
%398 = sub nsw i64 %397, 1
store i64 %398, i64* %12
br label %404
399: ; preds = %385
%400 = load i64, i64* %12
%401 = icmp slt i64 %400, 0
br i1 %401, label %402, label %403
402: ; preds = %399
store i64 0, i64* %12
br label %403
403: ; preds = %402, %399
br label %404
404: ; preds = %403, %396
%405 = load i64, i64* %12
%406 = sitofp i64 %405 to double
%407 = load i64, i64* %18
%408 = sitofp i64 %407 to double
%409 = fdiv double %406, %408
store double %409, double* %29
%410 = load double, double* %25
%411 = load i64, i64* %17
%412 = sitofp i64 %411 to double
%413 = load double, double* %29
%414 = call double @llvm.fmuladd.f64(double %410, double %412, double %413)
%415 = call double @llvm.floor.f64(double %414)
%416 = fptosi double %415 to i64
store i64 %416, i64* %14
%417 = load i64, i64* %14
%418 = load i64, i64* %17
%419 = icmp sge i64 %417, %418
br i1 %419, label %420, label %423
420: ; preds = %404
%421 = load i64, i64* %17
%422 = sub nsw i64 %421, 1
store i64 %422, i64* %14
br label %428
423: ; preds = %404
%424 = load i64, i64* %14
%425 = icmp slt i64 %424, 0
br i1 %425, label %426, label %427
426: ; preds = %423
store i64 0, i64* %14
br label %427
427: ; preds = %426, %423
br label %428
428: ; preds = %427, %420
%429 = load i64, i64* %14
%430 = load i64, i64* %18
%431 = mul nsw i64 %429, %430
%432 = load i64, i64* %12
%433 = add nsw i64 %431, %432
store i64 %433, i64* %19
br label %506
434: ; preds = %359
%435 = load i8*, i8** %11
%436 = call i32 @strcmp(i8* %435, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%437 = icmp eq i32 %436, 0
br i1 %437, label %438, label %504
438: ; preds = %434
%439 = load i64, i64* %20
%440 = sitofp i64 %439 to double
%441 = call double @sqrt(double %440)
%442 = call double @llvm.floor.f64(double %441)
%443 = fptosi double %442 to i64
store i64 %443, i64* %16
%444 = load i64, i64* %20
%445 = sitofp i64 %444 to double
%446 = call double @sqrt(double %445)
%447 = call double @llvm.floor.f64(double %446)
%448 = fptosi double %447 to i64
store i64 %448, i64* %15
%449 = load double, double* %7
%450 = load double, double* %7
%451 = load double, double* %8
%452 = load double, double* %8
%453 = fmul double %451, %452
%454 = call double @llvm.fmuladd.f64(double %449, double %450, double %453)
store double %454, double* %25
%455 = load double, double* %25
%456 = call double @sqrt(double %455)
store double %456, double* %25
%457 = load double, double* %8
%458 = fadd double %457, 1.250000e-01
%459 = fmul double 4.000000e+00, %458
%460 = load i64, i64* %16
%461 = sitofp i64 %460 to double
%462 = fmul double %459, %461
store double %462, double* %27
%463 = load double, double* %27
%464 = call double @llvm.floor.f64(double %463)
%465 = fptosi double %464 to i64
store i64 %465, i64* %12
%466 = load double, double* %7
%467 = fadd double %466, 1.250000e-01
%468 = fmul double 4.000000e+00, %467
%469 = load i64, i64* %15
%470 = sitofp i64 %469 to double
%471 = fmul double %468, %470
store double %471, double* %28
%472 = load double, double* %28
%473 = call double @llvm.floor.f64(double %472)
%474 = fptosi double %473 to i64
store i64 %474, i64* %13
%475 = load i64, i64* %12
%476 = load i64, i64* %16
%477 = icmp sge i64 %475, %476
br i1 %477, label %478, label %481
478: ; preds = %438
%479 = load i64, i64* %16
%480 = sub nsw i64 %479, 1
store i64 %480, i64* %12
br label %486
481: ; preds = %438
%482 = load i64, i64* %12
%483 = icmp slt i64 %482, 0
br i1 %483, label %484, label %485
484: ; preds = %481
store i64 0, i64* %12
br label %485
485: ; preds = %484, %481
br label %486
486: ; preds = %485, %478
%487 = load i64, i64* %13
%488 = load i64, i64* %15
%489 = icmp sge i64 %487, %488
br i1 %489, label %490, label %493
490: ; preds = %486
%491 = load i64, i64* %15
%492 = sub nsw i64 %491, 1
store i64 %492, i64* %13
br label %498
493: ; preds = %486
%494 = load i64, i64* %13
%495 = icmp slt i64 %494, 0
br i1 %495, label %496, label %497
496: ; preds = %493
store i64 0, i64* %13
br label %497
497: ; preds = %496, %493
br label %498
498: ; preds = %497, %490
%499 = load i64, i64* %12
%500 = load i64, i64* %15
%501 = mul nsw i64 %499, %500
%502 = load i64, i64* %13
%503 = add nsw i64 %501, %502
store i64 %503, i64* %19
br label %505
504: ; preds = %434
store i64 0, i64* %6
br label %513
505: ; preds = %498
br label %506
506: ; preds = %505, %428
br label %507
507: ; preds = %506, %353
br label %508
508: ; preds = %507, %272
br label %509
509: ; preds = %508, %203
br label %510
510: ; preds = %509, %132
br label %511
511: ; preds = %510, %64
%512 = load i64, i64* %19
store i64 %512, i64* %6
br label %513
513: ; preds = %511, %504
%514 = load i64, i64* %6
ret i64 %514
}

LLVM IR (-O2):
@.str = [4 x i8] c"old\00"
@.str.1 = [5 x i8] c"maze\00"
@.str.2 = [5 x i8] c"dart\00"
@.str.3 = [8 x i8] c"stagger\00"
@.str.4 = [7 x i8] c"spiral\00"
@.str.5 = [6 x i8] c"chess\00"
define i64 @digitize_one(double %0, double %1, i64 %2, i64 %3, i8* nocapture %4) {
%6 = mul nsw i64 %2, %2
%7 = icmp eq i64 %3, 0
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = fmul double %1, %1
%10 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %9)
%11 = tail call double @sqrt(double %10)
%12 = fadd double %11, 1.000000e+00
%13 = fmul double %12, 5.000000e-01
%14 = sitofp i64 %6 to double
%15 = fmul double %13, %14
%16 = tail call double @llvm.floor.f64(double %15)
%17 = fptosi double %16 to i64
%18 = icmp sgt i64 %6, %17
br i1 %18, label %21, label %19
19: ; preds = %8
%20 = add nsw i64 %6, -1
br label %232
21: ; preds = %8
%22 = icmp sgt i64 %17, 0
%23 = select i1 %22, i64 %17, i64 0
br label %232
24: ; preds = %5
%25 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %57
27: ; preds = %24
%28 = fmul double %1, %1
%29 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %28)
%30 = fcmp ogt double %29, 1.000000e+00
%31 = select i1 %30, double 1.000000e+00, double %29
%32 = tail call double @sqrt(double %31)
%33 = tail call double @sqrt(double %32)
%34 = tail call double @sqrt(double %33)
%35 = sitofp i64 %2 to double
%36 = fmul double %34, %35
%37 = fptosi double %36 to i64
%38 = icmp slt i64 %37, %2
%39 = add nsw i64 %2, -1
%40 = icmp sgt i64 %37, 0
%41 = select i1 %40, i64 %37, i64 0
%42 = select i1 %38, i64 %41, i64 %39
%43 = shl nsw i64 %42, 1
%44 = or i64 %43, 1
%45 = tail call double @atan2(double %1, double %0)
%46 = fadd double %45, 0x400921FB54442D18
%47 = sitofp i64 %44 to double
%48 = fdiv double %46, 0x401921FB54442D18
%49 = fmul double %48, %47
%50 = fptosi double %49 to i64
%51 = icmp sgt i64 %44, %50
%52 = icmp sgt i64 %50, 0
%53 = select i1 %52, i64 %50, i64 0
%54 = select i1 %51, i64 %53, i64 %43
%55 = mul nsw i64 %42, %42
%56 = add nsw i64 %54, %55
br label %232
57: ; preds = %24
%58 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %92
60: ; preds = %57
%61 = sitofp i64 %6 to double
%62 = tail call double @sqrt(double %61)
%63 = fptosi double %62 to i64
%64 = fmul double %1, %1
%65 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %64)
%66 = tail call double @sqrt(double %65)
%67 = tail call double @sqrt(double %66)
%68 = sitofp i64 %63 to double
%69 = fmul double %67, %68
%70 = fptosi double %69 to i64
%71 = icmp slt i64 %70, %63
%72 = add nsw i64 %63, -1
%73 = icmp sgt i64 %70, 0
%74 = select i1 %73, i64 %70, i64 0
%75 = select i1 %71, i64 %74, i64 %72
%76 = shl nsw i64 %75, 1
%77 = or i64 %76, 1
%78 = tail call double @atan2(double %1, double %0)
%79 = fcmp olt double %78, 0.000000e+00
%80 = fadd double %78, 0x401921FB54442D18
%81 = select i1 %79, double %80, double %78
%82 = sitofp i64 %77 to double
%83 = fdiv double %81, 0x401921FB54442D18
%84 = fmul double %83, %82
%85 = fptosi double %84 to i64
%86 = icmp sgt i64 %77, %85
%87 = icmp sgt i64 %85, 0
%88 = select i1 %87, i64 %85, i64 0
%89 = select i1 %86, i64 %88, i64 %76
%90 = mul nsw i64 %75, %75
%91 = add nsw i64 %89, %90
br label %232
92: ; preds = %57
%93 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %125
95: ; preds = %92
%96 = sitofp i64 %6 to double
%97 = tail call double @sqrt(double %96)
%98 = fptosi double %97 to i64
%99 = fmul double %1, %1
%100 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %99)
%101 = tail call double @sqrt(double %100)
%102 = sitofp i64 %98 to double
%103 = fmul double %101, %102
%104 = tail call double @llvm.floor.f64(double %103)
%105 = fptosi double %104 to i64
%106 = icmp slt i64 %105, %98
%107 = add nsw i64 %98, -1
%108 = icmp sgt i64 %105, 0
%109 = select i1 %108, i64 %105, i64 0
%110 = select i1 %106, i64 %109, i64 %107
%111 = tail call double @atan2(double %1, double %0)
%112 = fcmp olt double %111, 0.000000e+00
%113 = fadd double %111, 0x401921FB54442D18
%114 = select i1 %112, double %113, double %111
%115 = fdiv double %114, 0x401921FB54442D18
%116 = fmul double %115, %102
%117 = tail call double @llvm.floor.f64(double %116)
%118 = fptosi double %117 to i64
%119 = icmp slt i64 %118, %98
%120 = icmp sgt i64 %118, 0
%121 = select i1 %120, i64 %118, i64 0
%122 = select i1 %119, i64 %121, i64 %107
%123 = mul nsw i64 %110, %98
%124 = add nsw i64 %122, %123
br label %232
125: ; preds = %92
%126 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%127 = icmp eq i32 %126, 0
br i1 %127, label %128, label %162
128: ; preds = %125
%129 = sitofp i64 %6 to double
%130 = tail call double @sqrt(double %129)
%131 = fptosi double %130 to i64
%132 = fmul double %1, %1
%133 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %132)
%134 = tail call double @sqrt(double %133)
%135 = tail call double @atan2(double %1, double %0)
%136 = fcmp olt double %135, 0.000000e+00
%137 = fadd double %135, 0x401921FB54442D18
%138 = select i1 %136, double %137, double %135
%139 = sitofp i64 %131 to double
%140 = fdiv double %138, 0x401921FB54442D18
%141 = fmul double %140, %139
%142 = tail call double @llvm.floor.f64(double %141)
%143 = fptosi double %142 to i64
%144 = icmp slt i64 %143, %131
%145 = add nsw i64 %131, -1
%146 = icmp sgt i64 %143, 0
%147 = select i1 %146, i64 %143, i64 0
%148 = select i1 %144, i64 %147, i64 %145
%149 = and i64 %148, 1
%150 = icmp eq i64 %149, 0
%151 = tail call double @llvm.fmuladd.f64(double %134, double %139, double 5.000000e-01)
%152 = fmul double %134, %139
%153 = select i1 %150, double %151, double %152
%154 = tail call double @llvm.floor.f64(double %153)
%155 = fptosi double %154 to i64
%156 = icmp slt i64 %155, %131
%157 = icmp sgt i64 %155, 0
%158 = select i1 %157, i64 %155, i64 0
%159 = select i1 %156, i64 %158, i64 %145
%160 = mul nsw i64 %159, %131
%161 = add nsw i64 %160, %148
br label %232
162: ; preds = %125
%163 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %197
165: ; preds = %162
%166 = sitofp i64 %6 to double
%167 = tail call double @sqrt(double %166)
%168 = fptosi double %167 to i64
%169 = fmul double %1, %1
%170 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %169)
%171 = tail call double @sqrt(double %170)
%172 = tail call double @atan2(double %1, double %0)
%173 = fcmp olt double %172, 0.000000e+00
%174 = fadd double %172, 0x401921FB54442D18
%175 = select i1 %173, double %174, double %172
%176 = sitofp i64 %168 to double
%177 = fdiv double %175, 0x401921FB54442D18
%178 = fmul double %177, %176
%179 = tail call double @llvm.floor.f64(double %178)
%180 = fptosi double %179 to i64
%181 = icmp slt i64 %180, %168
%182 = add nsw i64 %168, -1
%183 = icmp sgt i64 %180, 0
%184 = select i1 %183, i64 %180, i64 0
%185 = select i1 %181, i64 %184, i64 %182
%186 = sitofp i64 %185 to double
%187 = fdiv double %186, %176
%188 = tail call double @llvm.fmuladd.f64(double %171, double %176, double %187)
%189 = tail call double @llvm.floor.f64(double %188)
%190 = fptosi double %189 to i64
%191 = icmp slt i64 %190, %168
%192 = icmp sgt i64 %190, 0
%193 = select i1 %192, i64 %190, i64 0
%194 = select i1 %191, i64 %193, i64 %182
%195 = mul nsw i64 %194, %168
%196 = add nsw i64 %195, %185
br label %232
197: ; preds = %162
%198 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%199 = icmp eq i32 %198, 0
br i1 %199, label %200, label %232
200: ; preds = %197
%201 = sitofp i64 %6 to double
%202 = tail call double @sqrt(double %201)
%203 = tail call double @llvm.floor.f64(double %202)
%204 = fptosi double %203 to i64
%205 = tail call double @sqrt(double %201)
%206 = tail call double @llvm.floor.f64(double %205)
%207 = fptosi double %206 to i64
%208 = fadd double %1, 1.250000e-01
%209 = fmul double %208, 4.000000e+00
%210 = sitofp i64 %204 to double
%211 = fmul double %209, %210
%212 = tail call double @llvm.floor.f64(double %211)
%213 = fptosi double %212 to i64
%214 = fadd double %0, 1.250000e-01
%215 = fmul double %214, 4.000000e+00
%216 = sitofp i64 %207 to double
%217 = fmul double %215, %216
%218 = tail call double @llvm.floor.f64(double %217)
%219 = fptosi double %218 to i64
%220 = icmp slt i64 %213, %204
%221 = add nsw i64 %204, -1
%222 = icmp sgt i64 %213, 0
%223 = select i1 %222, i64 %213, i64 0
%224 = select i1 %220, i64 %223, i64 %221
%225 = icmp slt i64 %219, %207
%226 = add nsw i64 %207, -1
%227 = icmp sgt i64 %219, 0
%228 = select i1 %227, i64 %219, i64 0
%229 = select i1 %225, i64 %228, i64 %226
%230 = mul nsw i64 %224, %207
%231 = add nsw i64 %230, %229
br label %232
232: ; preds = %21, %19, %60, %128, %200, %165, %95, %27, %197
%233 = phi i64 [ 0, %197 ], [ %20, %19 ], [ %23, %21 ], [ %56, %27 ], [ %91, %60 ], [ %124, %95 ], [ %161, %128 ], [ %196, %165 ], [ %231, %200 ]
ret i64 %233
}