#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int atoi(char *);
int exp(int);
int floor(double);
double log(float);
int /*<<< orphan*/ printf(char *, ...);
int sqrt(int);
int main(int argc, char **argv) {
  int i;
  int N;
  int shift;
  int j;
  float p[16];
  int pi[16];
  int sum;
  int aN[32768];
  N = atoi(argv[1]);
  shift = atoi(argv[2]);
  printf("/* This file is auto-generated using \"gen_cdf %d %d\" */\n\n", N,
         shift);
  printf("#include \"pvq_code.h\"\n\n");
  printf("const ogg_uint16_t cdf_table[%d][16] = {\n", N + 1);
  printf("  {");
  for (j = 0; j < 16; j++) {
    printf("%5d%s", 32768U - 15 + j, j + 1 < 16 ? "," : "");
  }
  printf("},\n");
  aN[0] = 1;
  for (i = 1; i <= N; i++) {
    float Ex;
    float gamma;
    float a;
    int cdf;
    float maxp;
    int maxj;
    Ex = (float)i / (1 << shift);
    gamma = (sqrt(1 + 4 * Ex * Ex) - 1) / (2 * Ex);
    a = -.5 / log(gamma);
    aN[i] = floor(.5 + 256 * exp(-1. / a));
    p[0] = 1 - exp(-.5 / a);
    for (j = 1; j < 15; j++)
      p[j] = exp(-.5 / a) * (exp(-((float)j - 1.) / a) - exp(-(float)j / a));
    p[15] = exp(-.5 / a) * exp(-14. / a);
    sum = 0;
    maxp = 0;
    maxj = 0;
    for (j = 0; j < 16; j++) {
      if (p[j] > maxp) {
        maxp = p[j];
        maxj = j;
      }
      pi[j] = floor(.5 + 32768 * p[j]);
      if (pi[j] == 0)
        pi[j] = 1;
      sum += pi[j];
    }
    pi[maxj] += 32768 - sum;
    cdf = 0;
    printf("  {");
    for (j = 0; j < 16; j++) {
      cdf += pi[j];
      printf("%5d%s", cdf, j + 1 < 16 ? "," : "");
    }
    printf("}%s\n", i + 1 <= N ? "," : "");
  }
  printf("};\n");
  printf("\n\n");
  printf("const unsigned char decayE[%d] = {\n", N + 1);
  for (i = 0; i <= N; i++)
    printf("  %d%s\n", aN[i], i + 1 <= N ? "," : "");
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    122e <main+0xce>
mov    -0x20(%rbp),%esi
add    $0x7ff1,%esi
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
lea    0xe85(%rip),%rdx
lea    0xeb3(%rip),%rax
cmp    $0x10,%ecx
cmovl  %rax,%rdx
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11e4 <main+0x84>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x200b0(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1650 <main+0x4f0>
cvtsi2ssl -0x14(%rbp),%xmm0
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x200b4(%rbp)
ff
movss  0xdb0(%rip),%xmm0
mulss  -0x200b4(%rbp),%xmm0
ff
movss  -0x200b4(%rbp),%xmm1
ff
mulss  %xmm1,%xmm0
movss  0xd90(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1070 <sqrt@plt>
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  0xd70(%rip),%xmm1
mulss  -0x200b4(%rbp),%xmm1
ff
divss  %xmm1,%xmm0
movss  %xmm0,-0x200b8(%rbp)
ff
movss  -0x200b8(%rbp),%xmm0
ff
call   1050 <log@plt>
movaps %xmm0,%xmm1
movsd  0xd1c(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x200bc(%rbp)
ff
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xd08(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
shl    $0x8,%eax
cvtsi2sd %eax,%xmm1
movsd  0xce4(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1080 <floor@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x200b0(%rbp,%rax,4)
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xcb2(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x60(%rbp)
movl   $0x1,-0x20(%rbp)
cmpl   $0xf,-0x20(%rbp)
jge    1442 <main+0x2e2>
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xc6e(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
mov    %eax,-0x200cc(%rbp)
cvtsi2ssl -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc6a(%rip),%xmm1
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movss  -0x200bc(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
mov    %eax,-0x200d0(%rbp)
cvtsi2ssl -0x20(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
divss  -0x200bc(%rbp),%xmm0
ff
cvttss2si %xmm0,%edi
call   1040 <exp@plt>
mov    -0x200d0(%rbp),%ecx
mov    %eax,%edx
mov    -0x200cc(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
movslq -0x20(%rbp),%rax
movss  %xmm0,-0x60(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1374 <main+0x214>
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xbaa(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
mov    %eax,-0x200d4(%rbp)
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xb9b(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
mov    %eax,%ecx
mov    -0x200d4(%rbp),%eax
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x0,-0xa4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x200c4(%rbp)
ff
movl   $0x0,-0x200c8(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    157a <main+0x41a>
movslq -0x20(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
ucomiss -0x200c4(%rbp),%xmm0
jbe    1500 <main+0x3a0>
movslq -0x20(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x200c4(%rbp)
ff
mov    -0x20(%rbp),%eax
mov    %eax,-0x200c8(%rbp)
movslq -0x20(%rbp),%rax
movss  0xb28(%rip),%xmm0
mulss  -0x60(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xaea(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1080 <floor@plt>
mov    %eax,%ecx
movslq -0x20(%rbp),%rax
mov    %ecx,-0xa0(%rbp,%rax,4)
movslq -0x20(%rbp),%rax
cmpl   $0x0,-0xa0(%rbp,%rax,4)
jne    1555 <main+0x3f5>
movslq -0x20(%rbp),%rax
movl   $0x1,-0xa0(%rbp,%rax,4)
movslq -0x20(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%eax
add    -0xa4(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    14c4 <main+0x364>
mov    $0x8000,%ecx
sub    -0xa4(%rbp),%ecx
movslq -0x200c8(%rbp),%rax
add    -0xa0(%rbp,%rax,4),%ecx
mov    %ecx,-0xa0(%rbp,%rax,4)
movl   $0x0,-0x200c0(%rbp)
lea    0xb09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    1617 <main+0x4b7>
movslq -0x20(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%eax
add    -0x200c0(%rbp),%eax
mov    %eax,-0x200c0(%rbp)
mov    -0x200c0(%rbp),%esi
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
lea    0xa9c(%rip),%rdx
lea    0xaca(%rip),%rax
cmp    $0x10,%ecx
cmovl  %rax,%rdx
lea    0xab6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    15b9 <main+0x459>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%edx
lea    0xa62(%rip),%rsi
lea    0xa90(%rip),%rax
cmp    %edx,%ecx
cmovle %rax,%rsi
lea    0xa89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    124d <main+0xed>
lea    0xa72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xa54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     16d7 <main+0x577>
movslq -0x14(%rbp),%rax
mov    -0x200b0(%rbp,%rax,4),%esi
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%edi
lea    0x9db(%rip),%rdx
lea    0xa09(%rip),%rax
cmp    %edi,%ecx
cmovle %rax,%rdx
lea    0xa2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1687 <main+0x527>
lea    0x9eb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x200e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x200d8,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%r14d
lea    0xeae(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1(%rbp),%r12d
lea    0xec6(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed5(%rip),%rbx
lea    0xf1d(%rip),%r15
mov    %rbx,%rdi
mov    $0x7ff1,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff2,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff3,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff4,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff5,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff6,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff7,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff8,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ff9,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ffa,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ffb,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ffc,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ffd,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7ffe,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7fff,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd8a(%rip),%r13
mov    %rbx,%rdi
mov    $0x8000,%esi
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdee(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,0xd0(%rsp)
mov    %ebp,%eax
mov    %rax,0x30(%rsp)
mov    %r12d,%eax
mov    %rax,0x38(%rsp)
test   %ebp,%ebp
jle    1797 <main+0x627>
mov    %r12d,0x14(%rsp)
mov    %rbp,0x80(%rsp)
mov    $0x1,%r12d
mov    $0x1,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x18(%rsp)
mov    $0x1,%ebp
jmp    152b <main+0x3bb>
movslq %ebp,%rax
mov    0x40(%rsp,%rax,4),%ecx
sub    %r13d,%ecx
add    $0x8000,%ecx
mov    %ecx,0x40(%rsp,%rax,4)
lea    0xd29(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%r14d
lea    0xd1a(%rip),%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
lea    0xd5c(%rip),%r15
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x44(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x48(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x4c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x50(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x54(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x58(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x5c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x60(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x64(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x68(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x6c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x70(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x74(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x78(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x7c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
lea    0xb9c(%rip),%r13
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x88(%rsp),%rax
lea    0x1(%rax),%rbx
cmp    0x30(%rsp),%rax
mov    %r13,%rsi
cmovb  %r15,%rsi
lea    0xba8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rbp
cmp    0x38(%rsp),%rbx
je     177b <main+0x60b>
cvtsi2ss %ebp,%xmm1
divss  0x18(%rsp),%xmm1
movss  %xmm1,0x20(%rsp)
movaps %xmm1,%xmm0
mulss  0xaba(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xab2(%rip),%xmm0
cvttss2si %xmm0,%edi
call   1080 <sqrt@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x20(%rsp),%xmm1
addss  %xmm1,%xmm1
divss  %xmm1,%xmm0
call   1060 <log@plt>
movsd  0xa90(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x1c(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xa72(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
shl    $0x8,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xa5b(%rip),%xmm0
call   1090 <floor@plt>
mov    %rbp,0x88(%rsp)
mov    %eax,0xd0(%rsp,%rbp,4)
movsd  0xa2f(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1050 <exp@plt>
mov    %eax,%r14d
mov    $0x1,%eax
sub    %r14d,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x4(%rsp)
mov    $0x1,%r15d
mov    %ebp,%edi
call   1050 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
movaps %xmm0,0x20(%rsp)
mov    %eax,%ebx
cvtss2sd %xmm0,%xmm0
addsd  0x9e6(%rip),%xmm0
xorpd  0x9f6(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
mov    %eax,%r13d
movaps 0x20(%rsp),%xmm0
xorps  0x9e8(%rip),%xmm0
divss  0x1c(%rsp),%xmm0
cvttss2si %xmm0,%edi
call   1050 <exp@plt>
sub    %eax,%r13d
imul   %ebx,%r13d
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
movss  %xmm0,0x90(%rsp,%r15,4)
add    $0x1,%r15
cmp    $0xf,%r15
jne    1610 <main+0x4a0>
mov    %ebp,%edi
call   1050 <exp@plt>
mov    %eax,%ebx
movsd  0x98d(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xcc(%rsp)
test   %r14d,%r14d
setle  %r14b
movss  0x4(%rsp),%xmm0
mulss  0x936(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x942(%rip),%xmm0
call   1090 <floor@plt>
mov    %eax,%r13d
test   %eax,%eax
cmove  %r12d,%r13d
mov    %r13d,0x40(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
mov    $0x1,%ebx
movss  0x4(%rsp),%xmm1
jmp    176f <main+0x5ff>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  %xmm1,0x8(%rsp)
movss  0x90(%rsp,%rbx,4),%xmm0
movss  %xmm0,0x20(%rsp)
ucomiss %xmm1,%xmm0
seta   %r14b
cmova  %ebx,%ebp
mulss  0x8d1(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x8dd(%rip),%xmm0
call   1090 <floor@plt>
test   %eax,%eax
cmove  %r12d,%eax
mov    %eax,0x40(%rsp,%rbx,4)
add    %eax,%r13d
add    $0x1,%rbx
movss  0x8(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
cmp    $0x10,%rbx
je     1370 <main+0x200>
test   $0x1,%r14b
jne    1710 <main+0x5a0>
movapd %xmm0,%xmm1
jmp    1710 <main+0x5a0>
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x90(%rsp)
mov    0x80(%rsp),%rbp
mov    0x14(%rsp),%r12d
lea    0x96b(%rip),%rdi
call   1030 <puts@plt>
lea    0x8de(%rip),%rdi
call   1030 <puts@plt>
lea    0x90d(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
mov    0x30(%rsp),%r12
js     1829 <main+0x6b9>
mov    %r15,%rdx
cmove  %r13,%rdx
lea    0x910(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
je     1829 <main+0x6b9>
mov    $0x1,%eax
lea    0x8f4(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0xd0(%rsp,%rax,4),%esi
lea    0x1(%rax),%rbx
cmp    %r12,%rax
mov    %r13,%rdx
cmovb  %r15,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rax
cmp    %rbx,0x38(%rsp)
jne    1800 <main+0x690>
lea    0x8d9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x200d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [58 x i8] c"/* This file is auto-generated using \22gen_cdf %d %d\22 */\0A\0A\00"
@.str.1 = [24 x i8] c"#include \22pvq_code.h\22\0A\0A\00"
@.str.2 = [42 x i8] c"const ogg_uint16_t cdf_table[%d][16] = {\0A\00"
@.str.3 = [4 x i8] c" {\00"
@.str.4 = [6 x i8] c"%5d%s\00"
@.str.5 = [2 x i8] c",\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [4 x i8] c"},\0A\00"
@.str.8 = [5 x i8] c"}%s\0A\00"
@.str.9 = [4 x i8] c"};\0A\00"
@.str.10 = [3 x i8] c"\0A\0A\00"
@.str.11 = [36 x i8] c"const unsigned char decayE[%d] = {\0A\00"
@.str.12 = [8 x i8] c" %d%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [16 x float]
%11 = alloca [16 x i32]
%12 = alloca i32
%13 = alloca [32768 x i32]
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca i32
%18 = alloca float
%19 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @atoi(i8* %22)
store i32 %23, i32* %7
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 2
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %8
%28 = load i32, i32* %7
%29 = load i32, i32* %8
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %9
br label %36
36: ; preds = %48, %2
%37 = load i32, i32* %9
%38 = icmp slt i32 %37, 16
br i1 %38, label %39, label %51
39: ; preds = %36
%40 = load i32, i32* %9
%41 = add i32 32753, %40
%42 = load i32, i32* %9
%43 = add nsw i32 %42, 1
%44 = icmp slt i32 %43, 16
%45 = zext i1 %44 to i64
%46 = select i1 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %41, i8* %46)
br label %48
48: ; preds = %39
%49 = load i32, i32* %9
%50 = add nsw i32 %49, 1
store i32 %50, i32* %9
br label %36
51: ; preds = %36
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%53 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 0
store i32 1, i32* %53
store i32 1, i32* %6
br label %54
54: ; preds = %233, %51
%55 = load i32, i32* %6
%56 = load i32, i32* %7
%57 = icmp sle i32 %55, %56
br i1 %57, label %58, label %236
58: ; preds = %54
%59 = load i32, i32* %6
%60 = sitofp i32 %59 to float
%61 = load i32, i32* %8
%62 = shl i32 1, %61
%63 = sitofp i32 %62 to float
%64 = fdiv float %60, %63
store float %64, float* %14
%65 = load float, float* %14
%66 = fmul float 4.000000e+00, %65
%67 = load float, float* %14
%68 = call float @llvm.fmuladd.f32(float %66, float %67, float 1.000000e+00)
%69 = fptosi float %68 to i32
%70 = call i32 @sqrt(i32 %69)
%71 = sub nsw i32 %70, 1
%72 = sitofp i32 %71 to float
%73 = load float, float* %14
%74 = fmul float 2.000000e+00, %73
%75 = fdiv float %72, %74
store float %75, float* %15
%76 = load float, float* %15
%77 = call double @log(float %76)
%78 = fdiv double -5.000000e-01, %77
%79 = fptrunc double %78 to float
store float %79, float* %16
%80 = load float, float* %16
%81 = fpext float %80 to double
%82 = fdiv double -1.000000e+00, %81
%83 = fptosi double %82 to i32
%84 = call i32 @exp(i32 %83)
%85 = mul nsw i32 256, %84
%86 = sitofp i32 %85 to double
%87 = fadd double 5.000000e-01, %86
%88 = call i32 @floor(double %87)
%89 = load i32, i32* %6
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 %90
store i32 %88, i32* %91
%92 = load float, float* %16
%93 = fpext float %92 to double
%94 = fdiv double -5.000000e-01, %93
%95 = fptosi double %94 to i32
%96 = call i32 @exp(i32 %95)
%97 = sub nsw i32 1, %96
%98 = sitofp i32 %97 to float
%99 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 0
store float %98, float* %99
store i32 1, i32* %9
br label %100
100: ; preds = %132, %58
%101 = load i32, i32* %9
%102 = icmp slt i32 %101, 15
br i1 %102, label %103, label %135
103: ; preds = %100
%104 = load float, float* %16
%105 = fpext float %104 to double
%106 = fdiv double -5.000000e-01, %105
%107 = fptosi double %106 to i32
%108 = call i32 @exp(i32 %107)
%109 = load i32, i32* %9
%110 = sitofp i32 %109 to float
%111 = fpext float %110 to double
%112 = fsub double %111, 1.000000e+00
%113 = fneg double %112
%114 = load float, float* %16
%115 = fpext float %114 to double
%116 = fdiv double %113, %115
%117 = fptosi double %116 to i32
%118 = call i32 @exp(i32 %117)
%119 = load i32, i32* %9
%120 = sitofp i32 %119 to float
%121 = fneg float %120
%122 = load float, float* %16
%123 = fdiv float %121, %122
%124 = fptosi float %123 to i32
%125 = call i32 @exp(i32 %124)
%126 = sub nsw i32 %118, %125
%127 = mul nsw i32 %108, %126
%128 = sitofp i32 %127 to float
%129 = load i32, i32* %9
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %130
store float %128, float* %131
br label %132
132: ; preds = %103
%133 = load i32, i32* %9
%134 = add nsw i32 %133, 1
store i32 %134, i32* %9
br label %100
135: ; preds = %100
%136 = load float, float* %16
%137 = fpext float %136 to double
%138 = fdiv double -5.000000e-01, %137
%139 = fptosi double %138 to i32
%140 = call i32 @exp(i32 %139)
%141 = load float, float* %16
%142 = fpext float %141 to double
%143 = fdiv double -1.400000e+01, %142
%144 = fptosi double %143 to i32
%145 = call i32 @exp(i32 %144)
%146 = mul nsw i32 %140, %145
%147 = sitofp i32 %146 to float
%148 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 15
store float %147, float* %148
store i32 0, i32* %12
store float 0.000000e+00, float* %18
store i32 0, i32* %19
store i32 0, i32* %9
br label %149
149: ; preds = %193, %135
%150 = load i32, i32* %9
%151 = icmp slt i32 %150, 16
br i1 %151, label %152, label %196
152: ; preds = %149
%153 = load i32, i32* %9
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %154
%156 = load float, float* %155
%157 = load float, float* %18
%158 = fcmp ogt float %156, %157
br i1 %158, label %159, label %165
159: ; preds = %152
%160 = load i32, i32* %9
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %161
%163 = load float, float* %162
store float %163, float* %18
%164 = load i32, i32* %9
store i32 %164, i32* %19
br label %165
165: ; preds = %159, %152
%166 = load i32, i32* %9
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %167
%169 = load float, float* %168
%170 = fmul float 3.276800e+04, %169
%171 = fpext float %170 to double
%172 = fadd double 5.000000e-01, %171
%173 = call i32 @floor(double %172)
%174 = load i32, i32* %9
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %175
store i32 %173, i32* %176
%177 = load i32, i32* %9
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %178
%180 = load i32, i32* %179
%181 = icmp eq i32 %180, 0
br i1 %181, label %182, label %186
182: ; preds = %165
%183 = load i32, i32* %9
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %184
store i32 1, i32* %185
br label %186
186: ; preds = %182, %165
%187 = load i32, i32* %9
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %188
%190 = load i32, i32* %189
%191 = load i32, i32* %12
%192 = add nsw i32 %191, %190
store i32 %192, i32* %12
br label %193
193: ; preds = %186
%194 = load i32, i32* %9
%195 = add nsw i32 %194, 1
store i32 %195, i32* %9
br label %149
196: ; preds = %149
%197 = load i32, i32* %12
%198 = sub nsw i32 32768, %197
%199 = load i32, i32* %19
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %200
%202 = load i32, i32* %201
%203 = add nsw i32 %202, %198
store i32 %203, i32* %201
store i32 0, i32* %17
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %9
br label %205
205: ; preds = %222, %196
%206 = load i32, i32* %9
%207 = icmp slt i32 %206, 16
br i1 %207, label %208, label %225
208: ; preds = %205
%209 = load i32, i32* %9
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %210
%212 = load i32, i32* %211
%213 = load i32, i32* %17
%214 = add nsw i32 %213, %212
store i32 %214, i32* %17
%215 = load i32, i32* %17
%216 = load i32, i32* %9
%217 = add nsw i32 %216, 1
%218 = icmp slt i32 %217, 16
%219 = zext i1 %218 to i64
%220 = select i1 %218, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %215, i8* %220)
br label %222
222: ; preds = %208
%223 = load i32, i32* %9
%224 = add nsw i32 %223, 1
store i32 %224, i32* %9
br label %205
225: ; preds = %205
%226 = load i32, i32* %6
%227 = add nsw i32 %226, 1
%228 = load i32, i32* %7
%229 = icmp sle i32 %227, %228
%230 = zext i1 %229 to i64
%231 = select i1 %229, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %231)
br label %233
233: ; preds = %225
%234 = load i32, i32* %6
%235 = add nsw i32 %234, 1
store i32 %235, i32* %6
br label %54
236: ; preds = %54
%237 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%239 = load i32, i32* %7
%240 = add nsw i32 %239, 1
%241 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %240)
store i32 0, i32* %6
br label %242
242: ; preds = %258, %236
%243 = load i32, i32* %6
%244 = load i32, i32* %7
%245 = icmp sle i32 %243, %244
br i1 %245, label %246, label %261
246: ; preds = %242
%247 = load i32, i32* %6
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 %248
%250 = load i32, i32* %249
%251 = load i32, i32* %6
%252 = add nsw i32 %251, 1
%253 = load i32, i32* %7
%254 = icmp sle i32 %252, %253
%255 = zext i1 %254 to i64
%256 = select i1 %254, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%257 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %250, i8* %256)
br label %258
258: ; preds = %246
%259 = load i32, i32* %6
%260 = add nsw i32 %259, 1
store i32 %260, i32* %6
br label %242
261: ; preds = %242
%262 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [58 x i8] c"/* This file is auto-generated using \22gen_cdf %d %d\22 */\0A\0A\00"
@.str.2 = [42 x i8] c"const ogg_uint16_t cdf_table[%d][16] = {\0A\00"
@.str.3 = [4 x i8] c" {\00"
@.str.4 = [6 x i8] c"%5d%s\00"
@.str.5 = [2 x i8] c",\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.8 = [5 x i8] c"}%s\0A\00"
@.str.11 = [36 x i8] c"const unsigned char decayE[%d] = {\0A\00"
@.str.12 = [8 x i8] c" %d%s\0A\00"
@str = [23 x i8] c"#include \22pvq_code.h\22\0A\00"
@str.13 = [3 x i8] c"},\00"
@str.15 = [2 x i8] c"\0A\00"
@str.16 = [3 x i8] c"};\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x float]
%4 = alloca [16 x i32]
%5 = alloca [32768 x i32]
%6 = bitcast [16 x float]* %3 to i8*
%7 = bitcast [16 x i32]* %4 to i8*
%8 = bitcast [32768 x i32]* %5 to i8*
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %14)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%17 = add i32 %11, 1
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32753, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32754, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32755, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32756, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32757, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32758, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32759, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32760, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32761, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32762, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32763, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32764, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32765, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32766, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32767, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 32768, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.13, i64 0, i64 0))
%37 = getelementptr inbounds [32768 x i32], [32768 x i32]* %5, i64 0, i64 0
store i32 1, i32* %37
%38 = icmp slt i32 %11, 1
br i1 %38, label %211, label %39
39: ; preds = %2
%40 = shl nuw i32 1, %14
%41 = sitofp i32 %40 to float
%42 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 0
%43 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 15
%44 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 0
%45 = zext i32 %11 to i64
%46 = zext i32 %17 to i64
%47 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 1
%48 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 2
%49 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 3
%50 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 4
%51 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 5
%52 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 6
%53 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 7
%54 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 8
%55 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 9
%56 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 10
%57 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 11
%58 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 12
%59 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 13
%60 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 14
%61 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 15
%62 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 0
br label %63
63: ; preds = %39, %151
%64 = phi i64 [ 1, %39 ], [ %205, %151 ]
%65 = trunc i64 %64 to i32
%66 = sitofp i32 %65 to float
%67 = fdiv float %66, %41
%68 = fmul float %67, 4.000000e+00
%69 = tail call float @llvm.fmuladd.f32(float %68, float %67, float 1.000000e+00)
%70 = fptosi float %69 to i32
%71 = tail call i32 @sqrt(i32 %70)
%72 = add nsw i32 %71, -1
%73 = sitofp i32 %72 to float
%74 = fmul float %67, 2.000000e+00
%75 = fdiv float %73, %74
%76 = tail call double @log(float %75)
%77 = fdiv double -5.000000e-01, %76
%78 = fptrunc double %77 to float
%79 = fpext float %78 to double
%80 = fdiv double -1.000000e+00, %79
%81 = fptosi double %80 to i32
%82 = tail call i32 @exp(i32 %81)
%83 = shl nsw i32 %82, 8
%84 = sitofp i32 %83 to double
%85 = fadd double %84, 5.000000e-01
%86 = tail call i32 @floor(double %85)
%87 = getelementptr inbounds [32768 x i32], [32768 x i32]* %5, i64 0, i64 %64
store i32 %86, i32* %87
%88 = fdiv double -5.000000e-01, %79
%89 = fptosi double %88 to i32
%90 = tail call i32 @exp(i32 %89)
%91 = sub nsw i32 1, %90
%92 = sitofp i32 %91 to float
br label %93
93: ; preds = %63, %93
%94 = phi i64 [ 1, %63 ], [ %112, %93 ]
%95 = tail call i32 @exp(i32 %89)
%96 = trunc i64 %94 to i32
%97 = sitofp i32 %96 to float
%98 = fpext float %97 to double
%99 = fadd double %98, -1.000000e+00
%100 = fneg double %99
%101 = fdiv double %100, %79
%102 = fptosi double %101 to i32
%103 = tail call i32 @exp(i32 %102)
%104 = fneg float %97
%105 = fdiv float %104, %78
%106 = fptosi float %105 to i32
%107 = tail call i32 @exp(i32 %106)
%108 = sub nsw i32 %103, %107
%109 = mul nsw i32 %108, %95
%110 = sitofp i32 %109 to float
%111 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 %94
store float %110, float* %111
%112 = add nuw nsw i64 %94, 1
%113 = icmp eq i64 %112, 15
br i1 %113, label %114, label %93
114: ; preds = %93
%115 = tail call i32 @exp(i32 %89)
%116 = fdiv double -1.400000e+01, %79
%117 = fptosi double %116 to i32
%118 = tail call i32 @exp(i32 %117)
%119 = mul nsw i32 %118, %115
%120 = sitofp i32 %119 to float
store float %120, float* %43
%121 = icmp slt i32 %90, 1
%122 = fmul float %92, 3.276800e+04
%123 = fpext float %122 to double
%124 = fadd double %123, 5.000000e-01
%125 = tail call i32 @floor(double %124)
%126 = icmp eq i32 %125, 0
%127 = select i1 %126, i32 1, i32 %125
store i32 %127, i32* %62
br label %128
128: ; preds = %114, %128
%129 = phi i64 [ 1, %114 ], [ %149, %128 ]
%130 = phi i32 [ %127, %114 ], [ %148, %128 ]
%131 = phi i32 [ 0, %114 ], [ %140, %128 ]
%132 = phi i1 [ %121, %114 ], [ %138, %128 ]
%133 = phi float [ 0.000000e+00, %114 ], [ %135, %128 ]
%134 = phi float [ %92, %114 ], [ %137, %128 ]
%135 = select i1 %132, float %134, float %133
%136 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 %129
%137 = load float, float* %136
%138 = fcmp ogt float %137, %135
%139 = trunc i64 %129 to i32
%140 = select i1 %138, i32 %139, i32 %131
%141 = fmul float %137, 3.276800e+04
%142 = fpext float %141 to double
%143 = fadd double %142, 5.000000e-01
%144 = tail call i32 @floor(double %143)
%145 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 %129
%146 = icmp eq i32 %144, 0
%147 = select i1 %146, i32 1, i32 %144
store i32 %147, i32* %145
%148 = add nsw i32 %147, %130
%149 = add nuw nsw i64 %129, 1
%150 = icmp eq i64 %149, 16
br i1 %150, label %151, label %128
151: ; preds = %128
%152 = sub i32 32768, %148
%153 = sext i32 %140 to i64
%154 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 %153
%155 = load i32, i32* %154
%156 = add nsw i32 %152, %155
store i32 %156, i32* %154
%157 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%158 = load i32, i32* %44
%159 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %158, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%160 = load i32, i32* %47
%161 = add nsw i32 %160, %158
%162 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %161, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%163 = load i32, i32* %48
%164 = add nsw i32 %163, %161
%165 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %164, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%166 = load i32, i32* %49
%167 = add nsw i32 %166, %164
%168 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %167, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%169 = load i32, i32* %50
%170 = add nsw i32 %169, %167
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %170, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%172 = load i32, i32* %51
%173 = add nsw i32 %172, %170
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %173, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%175 = load i32, i32* %52
%176 = add nsw i32 %175, %173
%177 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %176, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%178 = load i32, i32* %53
%179 = add nsw i32 %178, %176
%180 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %179, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%181 = load i32, i32* %54
%182 = add nsw i32 %181, %179
%183 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %182, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%184 = load i32, i32* %55
%185 = add nsw i32 %184, %182
%186 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %185, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%187 = load i32, i32* %56
%188 = add nsw i32 %187, %185
%189 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %188, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%190 = load i32, i32* %57
%191 = add nsw i32 %190, %188
%192 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %191, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%193 = load i32, i32* %58
%194 = add nsw i32 %193, %191
%195 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %194, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%196 = load i32, i32* %59
%197 = add nsw i32 %196, %194
%198 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %197, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%199 = load i32, i32* %60
%200 = add nsw i32 %199, %197
%201 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %200, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%202 = load i32, i32* %61
%203 = add nsw i32 %202, %200
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %203, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%205 = add nuw nsw i64 %64, 1
%206 = icmp ult i64 %64, %45
%207 = select i1 %206, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%208 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %207)
%209 = icmp eq i64 %205, %46
br i1 %209, label %210, label %63
210: ; preds = %151
store float %92, float* %42
br label %211
211: ; preds = %210, %2
%212 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.16, i64 0, i64 0))
%213 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.15, i64 0, i64 0))
%214 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %17)
%215 = icmp slt i32 %11, 0
br i1 %215, label %232, label %216
216: ; preds = %211
%217 = zext i32 %11 to i64
%218 = zext i32 %17 to i64
%219 = icmp eq i32 %11, 0
%220 = select i1 %219, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%221 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 1, i8* %220)
%222 = icmp eq i32 %11, 0
br i1 %222, label %232, label %223
223: ; preds = %216, %223
%224 = phi i64 [ %227, %223 ], [ 1, %216 ]
%225 = getelementptr inbounds [32768 x i32], [32768 x i32]* %5, i64 0, i64 %224
%226 = load i32, i32* %225
%227 = add nuw nsw i64 %224, 1
%228 = icmp ult i64 %224, %217
%229 = select i1 %228, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%230 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %226, i8* %229)
%231 = icmp eq i64 %227, %218
br i1 %231, label %232, label %223
232: ; preds = %223, %216, %211
%233 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.16, i64 0, i64 0))
ret i32 0
}