#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);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
double log(float);
int /*<<< orphan*/ printf(char *, ...);
int sqrt(int);
int /*<<< orphan*/ stderr;
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];
  if (argc != 3)
    fprintf(stderr, "bad bad bad\n");
  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)
cmpl   $0x3,-0x8(%rbp)
je     11a8 <main+0x38>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    125d <main+0xed>
mov    -0x20(%rbp),%esi
add    $0x7ff1,%esi
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
lea    0xe63(%rip),%rdx
lea    0xe91(%rip),%rax
cmp    $0x10,%ecx
cmovl  %rax,%rdx
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1213 <main+0xa3>
lea    0xe69(%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     167f <main+0x50f>
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  0xd81(%rip),%xmm0
mulss  -0x200b4(%rbp),%xmm0
ff
movss  -0x200b4(%rbp),%xmm1
ff
mulss  %xmm1,%xmm0
movss  0xd61(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1080 <sqrt@plt>
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  0xd41(%rip),%xmm1
mulss  -0x200b4(%rbp),%xmm1
ff
divss  %xmm1,%xmm0
movss  %xmm0,-0x200b8(%rbp)
ff
movss  -0x200b8(%rbp),%xmm0
ff
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  0xced(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x200bc(%rbp)
ff
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xcd9(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
shl    $0x8,%eax
cvtsi2sd %eax,%xmm1
movsd  0xcb5(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1090 <floor@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x200b0(%rbp,%rax,4)
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xc83(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <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    1471 <main+0x301>
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xc3f(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
mov    %eax,-0x200cc(%rbp)
cvtsi2ssl -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc3b(%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   1050 <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   1050 <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    13a3 <main+0x233>
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xb7b(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
mov    %eax,-0x200d4(%rbp)
movss  -0x200bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0xb6c(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <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    15a9 <main+0x439>
movslq -0x20(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
ucomiss -0x200c4(%rbp),%xmm0
jbe    152f <main+0x3bf>
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  0xaf9(%rip),%xmm0
mulss  -0x60(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xabb(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1090 <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    1584 <main+0x414>
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    14f3 <main+0x383>
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    0xae7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    1646 <main+0x4d6>
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    0xa7a(%rip),%rdx
lea    0xaa8(%rip),%rax
cmp    $0x10,%ecx
cmovl  %rax,%rdx
lea    0xa94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    15e8 <main+0x478>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%edx
lea    0xa40(%rip),%rsi
lea    0xa6e(%rip),%rax
cmp    %edx,%ecx
cmovle %rax,%rsi
lea    0xa67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127c <main+0x10c>
lea    0xa50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xa32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1706 <main+0x596>
movslq -0x14(%rbp),%rax
mov    -0x200b0(%rbp,%rax,4),%esi
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%edi
lea    0x9b9(%rip),%rdx
lea    0x9e7(%rip),%rax
cmp    %edi,%ecx
cmovle %rax,%rdx
lea    0xa0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    16b6 <main+0x546>
lea    0x9c9(%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
cmp    $0x3,%edi
je     11ae <main+0x2e>
mov    0x2e40(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x8(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%r14d
lea    0xe91(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1(%rbp),%r12d
lea    0xea9(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb8(%rip),%rbx
lea    0xf00(%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    0xd6d(%rip),%r13
mov    %rbx,%rdi
mov    $0x8000,%esi
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdd1(%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    17c7 <main+0x647>
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    155b <main+0x3db>
nopw   0x0(%rax,%rax,1)
movslq %ebp,%rax
mov    0x40(%rsp,%rax,4),%ecx
sub    %r13d,%ecx
add    $0x8000,%ecx
mov    %ecx,0x40(%rsp,%rax,4)
lea    0xd06(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%r14d
lea    0xcf7(%rip),%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
lea    0xd39(%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    0xb79(%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    0xb85(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rbp
cmp    0x38(%rsp),%rbx
je     17ab <main+0x62b>
cvtsi2ss %ebp,%xmm1
divss  0x18(%rsp),%xmm1
movss  %xmm1,0x20(%rsp)
movaps %xmm1,%xmm0
mulss  0xa8a(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xa82(%rip),%xmm0
cvttss2si %xmm0,%edi
call   1090 <sqrt@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x20(%rsp),%xmm1
addss  %xmm1,%xmm1
divss  %xmm1,%xmm0
call   1070 <log@plt>
movsd  0xa60(%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  0xa42(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <exp@plt>
shl    $0x8,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xa2b(%rip),%xmm0
call   10a0 <floor@plt>
mov    %rbp,0x88(%rsp)
mov    %eax,0xd0(%rsp,%rbp,4)
movsd  0x9ff(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1060 <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   1060 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
movaps %xmm0,0x20(%rsp)
mov    %eax,%ebx
cvtss2sd %xmm0,%xmm0
addsd  0x9b6(%rip),%xmm0
xorpd  0x9c6(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <exp@plt>
mov    %eax,%r13d
movaps 0x20(%rsp),%xmm0
xorps  0x9b8(%rip),%xmm0
divss  0x1c(%rsp),%xmm0
cvttss2si %xmm0,%edi
call   1060 <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    1640 <main+0x4c0>
mov    %ebp,%edi
call   1060 <exp@plt>
mov    %eax,%ebx
movsd  0x95d(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <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  0x906(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x912(%rip),%xmm0
call   10a0 <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    179f <main+0x61f>
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  0x8a1(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x8ad(%rip),%xmm0
call   10a0 <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     13a0 <main+0x220>
test   $0x1,%r14b
jne    1740 <main+0x5c0>
movapd %xmm0,%xmm1
jmp    1740 <main+0x5c0>
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x90(%rsp)
mov    0x80(%rsp),%rbp
mov    0x14(%rsp),%r12d
lea    0x948(%rip),%rdi
call   1030 <puts@plt>
lea    0x8bb(%rip),%rdi
call   1030 <puts@plt>
lea    0x8ea(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
mov    0x30(%rsp),%r12
js     1859 <main+0x6d9>
mov    %r15,%rdx
cmove  %r13,%rdx
lea    0x8ed(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
je     1859 <main+0x6d9>
mov    $0x1,%eax
lea    0x8d1(%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    1830 <main+0x6b0>
lea    0x8b6(%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):
@stderr = global i32 0
@.str = [13 x i8] c"bad bad bad\0A\00"
@.str.1 = [58 x i8] c"/* This file is auto-generated using \22gen_cdf %d %d\22 */\0A\0A\00"
@.str.2 = [24 x i8] c"#include \22pvq_code.h\22\0A\0A\00"
@.str.3 = [42 x i8] c"const ogg_uint16_t cdf_table[%d][16] = {\0A\00"
@.str.4 = [4 x i8] c" {\00"
@.str.5 = [6 x i8] c"%5d%s\00"
@.str.6 = [2 x i8] c",\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [4 x i8] c"},\0A\00"
@.str.9 = [5 x i8] c"}%s\0A\00"
@.str.10 = [4 x i8] c"};\0A\00"
@.str.11 = [3 x i8] c"\0A\0A\00"
@.str.12 = [36 x i8] c"const unsigned char decayE[%d] = {\0A\00"
@.str.13 = [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 i32, i32* %4
%21 = icmp ne i32 %20, 3
br i1 %21, label %22, label %25
22: ; preds = %2
%23 = load i32, i32* @stderr
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %25
25: ; preds = %22, %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %7
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %8
%34 = load i32, i32* %7
%35 = load i32, i32* %8
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %34, i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %9
br label %42
42: ; preds = %54, %25
%43 = load i32, i32* %9
%44 = icmp slt i32 %43, 16
br i1 %44, label %45, label %57
45: ; preds = %42
%46 = load i32, i32* %9
%47 = add i32 32753, %46
%48 = load i32, i32* %9
%49 = add nsw i32 %48, 1
%50 = icmp slt i32 %49, 16
%51 = zext i1 %50 to i64
%52 = select i1 %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %47, i8* %52)
br label %54
54: ; preds = %45
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
br label %42
57: ; preds = %42
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%59 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 0
store i32 1, i32* %59
store i32 1, i32* %6
br label %60
60: ; preds = %239, %57
%61 = load i32, i32* %6
%62 = load i32, i32* %7
%63 = icmp sle i32 %61, %62
br i1 %63, label %64, label %242
64: ; preds = %60
%65 = load i32, i32* %6
%66 = sitofp i32 %65 to float
%67 = load i32, i32* %8
%68 = shl i32 1, %67
%69 = sitofp i32 %68 to float
%70 = fdiv float %66, %69
store float %70, float* %14
%71 = load float, float* %14
%72 = fmul float 4.000000e+00, %71
%73 = load float, float* %14
%74 = call float @llvm.fmuladd.f32(float %72, float %73, float 1.000000e+00)
%75 = fptosi float %74 to i32
%76 = call i32 @sqrt(i32 %75)
%77 = sub nsw i32 %76, 1
%78 = sitofp i32 %77 to float
%79 = load float, float* %14
%80 = fmul float 2.000000e+00, %79
%81 = fdiv float %78, %80
store float %81, float* %15
%82 = load float, float* %15
%83 = call double @log(float %82)
%84 = fdiv double -5.000000e-01, %83
%85 = fptrunc double %84 to float
store float %85, float* %16
%86 = load float, float* %16
%87 = fpext float %86 to double
%88 = fdiv double -1.000000e+00, %87
%89 = fptosi double %88 to i32
%90 = call i32 @exp(i32 %89)
%91 = mul nsw i32 256, %90
%92 = sitofp i32 %91 to double
%93 = fadd double 5.000000e-01, %92
%94 = call i32 @floor(double %93)
%95 = load i32, i32* %6
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 %96
store i32 %94, i32* %97
%98 = load float, float* %16
%99 = fpext float %98 to double
%100 = fdiv double -5.000000e-01, %99
%101 = fptosi double %100 to i32
%102 = call i32 @exp(i32 %101)
%103 = sub nsw i32 1, %102
%104 = sitofp i32 %103 to float
%105 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 0
store float %104, float* %105
store i32 1, i32* %9
br label %106
106: ; preds = %138, %64
%107 = load i32, i32* %9
%108 = icmp slt i32 %107, 15
br i1 %108, label %109, label %141
109: ; preds = %106
%110 = load float, float* %16
%111 = fpext float %110 to double
%112 = fdiv double -5.000000e-01, %111
%113 = fptosi double %112 to i32
%114 = call i32 @exp(i32 %113)
%115 = load i32, i32* %9
%116 = sitofp i32 %115 to float
%117 = fpext float %116 to double
%118 = fsub double %117, 1.000000e+00
%119 = fneg double %118
%120 = load float, float* %16
%121 = fpext float %120 to double
%122 = fdiv double %119, %121
%123 = fptosi double %122 to i32
%124 = call i32 @exp(i32 %123)
%125 = load i32, i32* %9
%126 = sitofp i32 %125 to float
%127 = fneg float %126
%128 = load float, float* %16
%129 = fdiv float %127, %128
%130 = fptosi float %129 to i32
%131 = call i32 @exp(i32 %130)
%132 = sub nsw i32 %124, %131
%133 = mul nsw i32 %114, %132
%134 = sitofp i32 %133 to float
%135 = load i32, i32* %9
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %136
store float %134, float* %137
br label %138
138: ; preds = %109
%139 = load i32, i32* %9
%140 = add nsw i32 %139, 1
store i32 %140, i32* %9
br label %106
141: ; preds = %106
%142 = load float, float* %16
%143 = fpext float %142 to double
%144 = fdiv double -5.000000e-01, %143
%145 = fptosi double %144 to i32
%146 = call i32 @exp(i32 %145)
%147 = load float, float* %16
%148 = fpext float %147 to double
%149 = fdiv double -1.400000e+01, %148
%150 = fptosi double %149 to i32
%151 = call i32 @exp(i32 %150)
%152 = mul nsw i32 %146, %151
%153 = sitofp i32 %152 to float
%154 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 15
store float %153, float* %154
store i32 0, i32* %12
store float 0.000000e+00, float* %18
store i32 0, i32* %19
store i32 0, i32* %9
br label %155
155: ; preds = %199, %141
%156 = load i32, i32* %9
%157 = icmp slt i32 %156, 16
br i1 %157, label %158, label %202
158: ; preds = %155
%159 = load i32, i32* %9
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %160
%162 = load float, float* %161
%163 = load float, float* %18
%164 = fcmp ogt float %162, %163
br i1 %164, label %165, label %171
165: ; preds = %158
%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
store float %169, float* %18
%170 = load i32, i32* %9
store i32 %170, i32* %19
br label %171
171: ; preds = %165, %158
%172 = load i32, i32* %9
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %173
%175 = load float, float* %174
%176 = fmul float 3.276800e+04, %175
%177 = fpext float %176 to double
%178 = fadd double 5.000000e-01, %177
%179 = call i32 @floor(double %178)
%180 = load i32, i32* %9
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %181
store i32 %179, i32* %182
%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
%186 = load i32, i32* %185
%187 = icmp eq i32 %186, 0
br i1 %187, label %188, label %192
188: ; preds = %171
%189 = load i32, i32* %9
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %190
store i32 1, i32* %191
br label %192
192: ; preds = %188, %171
%193 = load i32, i32* %9
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %194
%196 = load i32, i32* %195
%197 = load i32, i32* %12
%198 = add nsw i32 %197, %196
store i32 %198, i32* %12
br label %199
199: ; preds = %192
%200 = load i32, i32* %9
%201 = add nsw i32 %200, 1
store i32 %201, i32* %9
br label %155
202: ; preds = %155
%203 = load i32, i32* %12
%204 = sub nsw i32 32768, %203
%205 = load i32, i32* %19
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %206
%208 = load i32, i32* %207
%209 = add nsw i32 %208, %204
store i32 %209, i32* %207
store i32 0, i32* %17
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %9
br label %211
211: ; preds = %228, %202
%212 = load i32, i32* %9
%213 = icmp slt i32 %212, 16
br i1 %213, label %214, label %231
214: ; preds = %211
%215 = load i32, i32* %9
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %216
%218 = load i32, i32* %217
%219 = load i32, i32* %17
%220 = add nsw i32 %219, %218
store i32 %220, i32* %17
%221 = load i32, i32* %17
%222 = load i32, i32* %9
%223 = add nsw i32 %222, 1
%224 = icmp slt i32 %223, 16
%225 = zext i1 %224 to i64
%226 = select i1 %224, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %221, i8* %226)
br label %228
228: ; preds = %214
%229 = load i32, i32* %9
%230 = add nsw i32 %229, 1
store i32 %230, i32* %9
br label %211
231: ; preds = %211
%232 = load i32, i32* %6
%233 = add nsw i32 %232, 1
%234 = load i32, i32* %7
%235 = icmp sle i32 %233, %234
%236 = zext i1 %235 to i64
%237 = select i1 %235, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %237)
br label %239
239: ; preds = %231
%240 = load i32, i32* %6
%241 = add nsw i32 %240, 1
store i32 %241, i32* %6
br label %60
242: ; preds = %60
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%244 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%245 = load i32, i32* %7
%246 = add nsw i32 %245, 1
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i32 %246)
store i32 0, i32* %6
br label %248
248: ; preds = %264, %242
%249 = load i32, i32* %6
%250 = load i32, i32* %7
%251 = icmp sle i32 %249, %250
br i1 %251, label %252, label %267
252: ; preds = %248
%253 = load i32, i32* %6
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 %254
%256 = load i32, i32* %255
%257 = load i32, i32* %6
%258 = add nsw i32 %257, 1
%259 = load i32, i32* %7
%260 = icmp sle i32 %258, %259
%261 = zext i1 %260 to i64
%262 = select i1 %260, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%263 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 %256, i8* %262)
br label %264
264: ; preds = %252
%265 = load i32, i32* %6
%266 = add nsw i32 %265, 1
store i32 %266, i32* %6
br label %248
267: ; preds = %248
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

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