#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 floor(double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int pow(float, int);
int /*<<< orphan*/ printf(char *, ...);
int sqrt(float);
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, "usage: gen_laplace_tables <nb entries> <shift>\n");
    return 1;
  }
  N = atoi(argv[1]);
  shift = atoi(argv[2]);
  printf("/* This file is auto-generated using \"gen_laplace_tables %d %d\" "
         "*/\n\n",
         N, shift);
  printf("#include \"pvq_code.h\"\n\n");
  printf("const ogg_uint16_t exp_cdf_table[%d][16] = {\n", N);
  printf("  {");
  for (j = 0; j < 16; j++) {
    printf("%5d%s", 32768U - 15 + j, j + 1 < 16 ? "," : "");
  }
  printf("},\n");
  aN[0] = 1;
  aN[0] = 0;
  for (i = 1; i < N; i++) {
    float r;
    int cdf;
    float maxp;
    int maxj;
    r = i / (float)(1 << shift);
    p[0] = 1 - r;
    for (j = 1; j < 15; j++)
      p[j] = (1 - r) * pow(r, j);
    p[15] = pow(r, 15);
    aN[i] = 32768 * (p[0] - p[0] * sqrt(r) / (1 + sqrt(r)));
    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 ogg_uint16_t laplace_offset[%d] = {\n", N);
  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    $0x200d0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11a4 <main+0x44>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
lea    0xe7d(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    160c <main+0x4ac>
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    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    1256 <main+0xf6>
mov    -0x20(%rbp),%esi
add    $0x7ff1,%esi
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
lea    0xe70(%rip),%rdx
lea    0xea2(%rip),%rax
cmp    $0x10,%ecx
cmovl  %rax,%rdx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    120c <main+0xac>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x200b0(%rbp)
movl   $0x0,-0x200b0(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1573 <main+0x413>
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  0xd4e(%rip),%xmm0
subss  -0x200b4(%rbp),%xmm0
ff
movss  %xmm0,-0x60(%rbp)
movl   $0x1,-0x20(%rbp)
cmpl   $0xf,-0x20(%rbp)
jge    1320 <main+0x1c0>
movss  0xd28(%rip),%xmm0
subss  -0x200b4(%rbp),%xmm0
ff
movss  %xmm0,-0x200c4(%rbp)
ff
movss  -0x200b4(%rbp),%xmm0
ff
mov    -0x20(%rbp),%edi
call   1050 <pow@plt>
movss  -0x200c4(%rbp),%xmm0
ff
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movslq -0x20(%rbp),%rax
movss  %xmm0,-0x60(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12c6 <main+0x166>
movss  -0x200b4(%rbp),%xmm0
ff
mov    $0xf,%edi
call   1050 <pow@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x200c8(%rbp)
ff
movss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x200d0(%rbp)
ff
movss  -0x200b4(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movss  -0x200d0(%rbp),%xmm0
ff
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x200cc(%rbp)
ff
movss  -0x200b4(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movss  -0x200cc(%rbp),%xmm0
ff
movss  -0x200c8(%rbp),%xmm1
ff
add    $0x1,%eax
cvtsi2ss %eax,%xmm2
divss  %xmm2,%xmm0
subss  %xmm0,%xmm1
movss  0xc56(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x200b0(%rbp,%rax,4)
movl   $0x0,-0xa4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x200bc(%rbp)
ff
movl   $0x0,-0x200c0(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    149d <main+0x33d>
movslq -0x20(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
ucomiss -0x200bc(%rbp),%xmm0
jbe    1423 <main+0x2c3>
movslq -0x20(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x200bc(%rbp)
ff
mov    -0x20(%rbp),%eax
mov    %eax,-0x200c0(%rbp)
movslq -0x20(%rbp),%rax
movss  0xbd5(%rip),%xmm0
mulss  -0x60(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xbc7(%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    1478 <main+0x318>
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    13e7 <main+0x287>
mov    $0x8000,%ecx
sub    -0xa4(%rbp),%ecx
movslq -0x200c0(%rbp),%rax
add    -0xa0(%rbp,%rax,4),%ecx
mov    %ecx,-0xa0(%rbp,%rax,4)
movl   $0x0,-0x200b8(%rbp)
lea    0xbfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    153a <main+0x3da>
movslq -0x20(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%eax
add    -0x200b8(%rbp),%eax
mov    %eax,-0x200b8(%rbp)
mov    -0x200b8(%rbp),%esi
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
lea    0xb8c(%rip),%rdx
lea    0xbbe(%rip),%rax
cmp    $0x10,%ecx
cmovl  %rax,%rdx
lea    0xbaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    14dc <main+0x37c>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%edx
lea    0xb52(%rip),%rsi
lea    0xb84(%rip),%rax
cmp    %edx,%ecx
cmovle %rax,%rsi
lea    0xb7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127f <main+0x11f>
lea    0xb66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xb4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    15f7 <main+0x497>
movslq -0x14(%rbp),%rax
mov    -0x200b0(%rbp,%rax,4),%esi
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%edi
lea    0xace(%rip),%rdx
lea    0xb00(%rip),%rax
cmp    %edi,%ecx
cmovle %rax,%rdx
lea    0xb2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    15a7 <main+0x447>
lea    0xae2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x200d8,%rsp
cmp    $0x3,%edi
jne    181d <main+0x6ad>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%r15d
mov    0x10(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%r14d
lea    0xe94(%rip),%rdi
mov    %r15d,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rbp
lea    0xf1c(%rip),%rbx
mov    %rbp,%rdi
mov    $0x7ff1,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff2,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff3,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff4,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff5,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff6,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff7,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff8,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ff9,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ffa,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ffb,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ffc,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ffd,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7ffe,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x7fff,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd7e(%rip),%rdx
mov    %rbp,%rdi
mov    $0x8000,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdf0(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0xd0(%rsp)
mov    %r15d,%ebx
cmp    $0x2,%r15d
jl     1850 <main+0x6e0>
mov    %r15d,0x28(%rsp)
mov    $0x1,%r13d
mov    $0x1,%eax
mov    %r14d,%ecx
shl    %cl,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x2c(%rsp)
mov    $0x1,%r15d
mov    %rbx,0x88(%rsp)
jmp    1519 <main+0x3a9>
nopl   0x0(%rax,%rax,1)
movslq %r12d,%rax
mov    0x40(%rsp,%rax,4),%ecx
sub    %ebp,%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    0xd63(%rip),%rbp
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x44(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x48(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x4c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x50(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x54(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x58(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x5c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x60(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x64(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x68(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x6c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x70(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x74(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x78(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    0x7c(%rsp),%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
lea    0xb98(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15
lea    0xbbf(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x88(%rsp),%rbx
cmp    %rbx,%r15
je     183d <main+0x6cd>
cvtsi2ss %r15d,%xmm1
divss  0x2c(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
movss  0xace(%rip),%xmm0
subss  %xmm1,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
mov    $0x1,%edi
call   1060 <pow@plt>
mov    %eax,%r14d
movss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
mov    $0x3,%edi
call   1060 <pow@plt>
mov    %eax,%ebp
movss  0xc(%rsp),%xmm0
mov    $0x4,%edi
call   1060 <pow@plt>
movd   %r14d,%xmm0
movd   %ebx,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebp,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
cvtdq2ps %xmm0,%xmm0
movaps 0x10(%rsp),%xmm1
shufps $0x0,%xmm1,%xmm1
movaps %xmm1,0x30(%rsp)
mulps  %xmm1,%xmm0
movups %xmm0,0x94(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0x5,%edi
call   1060 <pow@plt>
mov    %eax,%r14d
movss  0xc(%rsp),%xmm0
mov    $0x6,%edi
call   1060 <pow@plt>
mov    %eax,%ebp
movss  0xc(%rsp),%xmm0
mov    $0x7,%edi
call   1060 <pow@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
mov    $0x8,%edi
call   1060 <pow@plt>
movd   %r14d,%xmm0
movd   %ebp,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebx,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
cvtdq2ps %xmm0,%xmm0
mulps  0x30(%rsp),%xmm0
movups %xmm0,0xa4(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0x9,%edi
call   1060 <pow@plt>
mov    %eax,%r14d
movss  0xc(%rsp),%xmm0
mov    $0xa,%edi
call   1060 <pow@plt>
mov    %eax,%ebp
movss  0xc(%rsp),%xmm0
mov    $0xb,%edi
call   1060 <pow@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
mov    $0xc,%edi
call   1060 <pow@plt>
movd   %r14d,%xmm0
movd   %ebp,%xmm1
punpckldq %xmm1,%xmm0
movd   %ebx,%xmm1
movd   %eax,%xmm2
punpckldq %xmm2,%xmm1
punpcklqdq %xmm1,%xmm0
cvtdq2ps %xmm0,%xmm0
mulps  0x30(%rsp),%xmm0
movups %xmm0,0xb4(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0xd,%edi
call   1060 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0xc4(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0xe,%edi
call   1060 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0xc8(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0xf,%edi
call   1060 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xcc(%rsp)
movss  0xc(%rsp),%xmm0
call   1080 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x30(%rsp)
movss  0xc(%rsp),%xmm0
call   1080 <sqrt@plt>
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x30(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps 0x10(%rsp),%xmm2
movaps %xmm2,%xmm0
subss  %xmm1,%xmm0
movss  0x8a7(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
seta   %r14b
mov    %eax,0xd0(%rsp,%r15,4)
movaps %xmm2,%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x87e(%rip),%xmm0
call   1090 <floor@plt>
xorps  %xmm1,%xmm1
mov    %eax,%ebp
test   %eax,%eax
cmove  %r13d,%ebp
mov    %ebp,0x40(%rsp)
mov    $0x1,%ebx
xor    %r12d,%r12d
movaps 0x10(%rsp),%xmm0
jmp    1812 <main+0x6a2>
nopl   (%rax)
movss  %xmm0,0xc(%rsp)
movss  0x90(%rsp,%rbx,4),%xmm1
movss  %xmm1,0x30(%rsp)
ucomiss %xmm0,%xmm1
seta   %r14b
cmova  %ebx,%r12d
movaps %xmm1,%xmm0
mulss  0x829(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0x821(%rip),%xmm0
call   1090 <floor@plt>
test   %eax,%eax
cmove  %r13d,%eax
mov    %eax,0x40(%rsp,%rbx,4)
add    %eax,%ebp
add    $0x1,%rbx
movss  0xc(%rsp),%xmm1
movss  0x30(%rsp),%xmm0
cmp    $0x10,%rbx
je     1370 <main+0x200>
test   $0x1,%r14b
jne    17b0 <main+0x640>
movaps %xmm1,%xmm0
jmp    17b0 <main+0x640>
mov    0x27bc(%rip),%rax
mov    (%rax),%edi
lea    0x7e3(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%r14d
jmp    18e9 <main+0x779>
movaps 0x10(%rsp),%xmm0
movss  %xmm0,0x90(%rsp)
mov    0x28(%rsp),%r15d
lea    0x8b8(%rip),%rdi
call   1030 <puts@plt>
lea    0x820(%rip),%rdi
call   1030 <puts@plt>
lea    0x853(%rip),%rdi
xor    %r14d,%r14d
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r15d,%r15d
jle    18dd <main+0x76d>
lea    0x865(%rip),%rdi
lea    0x87e(%rip),%rdx
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%r15d
je     18dd <main+0x76d>
mov    $0x1,%ebp
lea    0x843(%rip),%r15
lea    0x85c(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0xd0(%rsp,%rbp,4),%esi
add    $0x1,%rbp
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %rbp,%rbx
jne    18c0 <main+0x750>
lea    0x82b(%rip),%rdi
call   1030 <puts@plt>
mov    %r14d,%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 = [48 x i8] c"usage: gen_laplace_tables <nb entries> <shift>\0A\00"
@.str.1 = [69 x i8] c"/* This file is auto-generated using \22gen_laplace_tables %d %d\22 */\0A\0A\00"
@.str.2 = [24 x i8] c"#include \22pvq_code.h\22\0A\0A\00"
@.str.3 = [46 x i8] c"const ogg_uint16_t exp_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 = [43 x i8] c"const ogg_uint16_t laplace_offset[%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 i32
%16 = alloca float
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 3
br i1 %19, label %20, label %23
20: ; preds = %2
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %226
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %7
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i32 @atoi(i8* %30)
store i32 %31, i32* %8
%32 = load i32, i32* %7
%33 = load i32, i32* %8
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0), i32 %32, i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%36 = load i32, i32* %7
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = 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 %39
39: ; preds = %51, %23
%40 = load i32, i32* %9
%41 = icmp slt i32 %40, 16
br i1 %41, label %42, label %54
42: ; preds = %39
%43 = load i32, i32* %9
%44 = add i32 32753, %43
%45 = load i32, i32* %9
%46 = add nsw i32 %45, 1
%47 = icmp slt i32 %46, 16
%48 = zext i1 %47 to i64
%49 = select i1 %47, 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)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %44, i8* %49)
br label %51
51: ; preds = %42
%52 = load i32, i32* %9
%53 = add nsw i32 %52, 1
store i32 %53, i32* %9
br label %39
54: ; preds = %39
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%56 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 0
store i32 1, i32* %56
%57 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 0
store i32 0, i32* %57
store i32 1, i32* %6
br label %58
58: ; preds = %197, %54
%59 = load i32, i32* %6
%60 = load i32, i32* %7
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %200
62: ; preds = %58
%63 = load i32, i32* %6
%64 = sitofp i32 %63 to float
%65 = load i32, i32* %8
%66 = shl i32 1, %65
%67 = sitofp i32 %66 to float
%68 = fdiv float %64, %67
store float %68, float* %14
%69 = load float, float* %14
%70 = fsub float 1.000000e+00, %69
%71 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 0
store float %70, float* %71
store i32 1, i32* %9
br label %72
72: ; preds = %86, %62
%73 = load i32, i32* %9
%74 = icmp slt i32 %73, 15
br i1 %74, label %75, label %89
75: ; preds = %72
%76 = load float, float* %14
%77 = fsub float 1.000000e+00, %76
%78 = load float, float* %14
%79 = load i32, i32* %9
%80 = call i32 @pow(float %78, i32 %79)
%81 = sitofp i32 %80 to float
%82 = fmul float %77, %81
%83 = load i32, i32* %9
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %84
store float %82, float* %85
br label %86
86: ; preds = %75
%87 = load i32, i32* %9
%88 = add nsw i32 %87, 1
store i32 %88, i32* %9
br label %72
89: ; preds = %72
%90 = load float, float* %14
%91 = call i32 @pow(float %90, i32 15)
%92 = sitofp i32 %91 to float
%93 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 15
store float %92, float* %93
%94 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 0
%95 = load float, float* %94
%96 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 0
%97 = load float, float* %96
%98 = load float, float* %14
%99 = call i32 @sqrt(float %98)
%100 = sitofp i32 %99 to float
%101 = fmul float %97, %100
%102 = load float, float* %14
%103 = call i32 @sqrt(float %102)
%104 = add nsw i32 1, %103
%105 = sitofp i32 %104 to float
%106 = fdiv float %101, %105
%107 = fsub float %95, %106
%108 = fmul float 3.276800e+04, %107
%109 = fptosi float %108 to i32
%110 = load i32, i32* %6
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 %111
store i32 %109, i32* %112
store i32 0, i32* %12
store float 0.000000e+00, float* %16
store i32 0, i32* %17
store i32 0, i32* %9
br label %113
113: ; preds = %157, %89
%114 = load i32, i32* %9
%115 = icmp slt i32 %114, 16
br i1 %115, label %116, label %160
116: ; preds = %113
%117 = load i32, i32* %9
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %118
%120 = load float, float* %119
%121 = load float, float* %16
%122 = fcmp ogt float %120, %121
br i1 %122, label %123, label %129
123: ; preds = %116
%124 = load i32, i32* %9
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %125
%127 = load float, float* %126
store float %127, float* %16
%128 = load i32, i32* %9
store i32 %128, i32* %17
br label %129
129: ; preds = %123, %116
%130 = load i32, i32* %9
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [16 x float], [16 x float]* %10, i64 0, i64 %131
%133 = load float, float* %132
%134 = fmul float 3.276800e+04, %133
%135 = fpext float %134 to double
%136 = fadd double 5.000000e-01, %135
%137 = call i32 @floor(double %136)
%138 = load i32, i32* %9
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %139
store i32 %137, i32* %140
%141 = load i32, i32* %9
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %142
%144 = load i32, i32* %143
%145 = icmp eq i32 %144, 0
br i1 %145, label %146, label %150
146: ; preds = %129
%147 = load i32, i32* %9
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %148
store i32 1, i32* %149
br label %150
150: ; preds = %146, %129
%151 = load i32, i32* %9
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %152
%154 = load i32, i32* %153
%155 = load i32, i32* %12
%156 = add nsw i32 %155, %154
store i32 %156, i32* %12
br label %157
157: ; preds = %150
%158 = load i32, i32* %9
%159 = add nsw i32 %158, 1
store i32 %159, i32* %9
br label %113
160: ; preds = %113
%161 = load i32, i32* %12
%162 = sub nsw i32 32768, %161
%163 = load i32, i32* %17
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %164
%166 = load i32, i32* %165
%167 = add nsw i32 %166, %162
store i32 %167, i32* %165
store i32 0, i32* %15
%168 = 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 %169
169: ; preds = %186, %160
%170 = load i32, i32* %9
%171 = icmp slt i32 %170, 16
br i1 %171, label %172, label %189
172: ; preds = %169
%173 = load i32, i32* %9
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 %174
%176 = load i32, i32* %175
%177 = load i32, i32* %15
%178 = add nsw i32 %177, %176
store i32 %178, i32* %15
%179 = load i32, i32* %15
%180 = load i32, i32* %9
%181 = add nsw i32 %180, 1
%182 = icmp slt i32 %181, 16
%183 = zext i1 %182 to i64
%184 = select i1 %182, 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)
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %179, i8* %184)
br label %186
186: ; preds = %172
%187 = load i32, i32* %9
%188 = add nsw i32 %187, 1
store i32 %188, i32* %9
br label %169
189: ; preds = %169
%190 = load i32, i32* %6
%191 = add nsw i32 %190, 1
%192 = load i32, i32* %7
%193 = icmp sle i32 %191, %192
%194 = zext i1 %193 to i64
%195 = select i1 %193, 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)
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %195)
br label %197
197: ; preds = %189
%198 = load i32, i32* %6
%199 = add nsw i32 %198, 1
store i32 %199, i32* %6
br label %58
200: ; preds = %58
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%203 = load i32, i32* %7
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0), i32 %203)
store i32 0, i32* %6
br label %205
205: ; preds = %221, %200
%206 = load i32, i32* %6
%207 = load i32, i32* %7
%208 = icmp slt i32 %206, %207
br i1 %208, label %209, label %224
209: ; preds = %205
%210 = load i32, i32* %6
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [32768 x i32], [32768 x i32]* %13, i64 0, i64 %211
%213 = load i32, i32* %212
%214 = load i32, i32* %6
%215 = add nsw i32 %214, 1
%216 = load i32, i32* %7
%217 = icmp sle i32 %215, %216
%218 = zext i1 %217 to i64
%219 = select i1 %217, 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)
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 %213, i8* %219)
br label %221
221: ; preds = %209
%222 = load i32, i32* %6
%223 = add nsw i32 %222, 1
store i32 %223, i32* %6
br label %205
224: ; preds = %205
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %3
br label %226
226: ; preds = %224, %20
%227 = load i32, i32* %3
ret i32 %227
}

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