#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 /*<<< orphan*/ dump_array16(int *, int);
double floor(double);
int opj_int_max(int /*<<< orphan*/, int);
double pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int t1_init_ctxno_sc(int);
int t1_init_ctxno_zc(int, int);
int t1_init_spb(int);
int main(int argc, char **argv) {
  int i, j;
  double u, v, t;
  int lut_ctxno_zc[1024];
  int lut_nmsedec_sig[1 << 7];
  int lut_nmsedec_sig0[1 << 7];
  int lut_nmsedec_ref[1 << 7];
  int lut_nmsedec_ref0[1 << 7];
  (void)argc;
  (void)argv;
  printf(
      "/* This file was automatically generated by t1_generate_luts.c */\n\n");
  for (j = 0; j < 4; ++j) {
    for (i = 0; i < 256; ++i) {
      int orient = j;
      if (orient == 2) {
        orient = 1;
      } else if (orient == 1) {
        orient = 2;
      }
      lut_ctxno_zc[(orient << 8) | i] = t1_init_ctxno_zc(i, j);
    }
  }
  printf("static OPJ_BYTE lut_ctxno_zc[1024] = {\n  ");
  for (i = 0; i < 1023; ++i) {
    printf("%i, ", lut_ctxno_zc[i]);
    if (!((i + 1) & 0x1f))
      printf("\n  ");
  }
  printf("%i\n};\n\n", lut_ctxno_zc[1023]);
  printf("static OPJ_BYTE lut_ctxno_sc[256] = {\n  ");
  for (i = 0; i < 255; ++i) {
    printf("0x%x, ", t1_init_ctxno_sc(i << 4));
    if (!((i + 1) & 0xf))
      printf("\n  ");
  }
  printf("0x%x\n};\n\n", t1_init_ctxno_sc(255 << 4));
  printf("static OPJ_BYTE lut_spb[256] = {\n  ");
  for (i = 0; i < 255; ++i) {
    printf("%i, ", t1_init_spb(i << 4));
    if (!((i + 1) & 0x1f))
      printf("\n  ");
  }
  printf("%i\n};\n\n", t1_init_spb(255 << 4));
  for (i = 0; i < (1 << 7); ++i) {
    t = i / pow(2, (7 - 1));
    u = t;
    v = t - 1.5;
    lut_nmsedec_sig[i] =
        opj_int_max(0, (int)(floor((u * u - v * v) * pow(2, (7 - 1)) + 0.5) /
                             pow(2, (7 - 1)) * 8192.0));
    lut_nmsedec_sig0[i] =
        opj_int_max(0, (int)(floor((u * u) * pow(2, (7 - 1)) + 0.5) /
                             pow(2, (7 - 1)) * 8192.0));
    u = t - 1.0;
    if (i & (1 << (7 - 1))) {
      v = t - 1.5;
    } else {
      v = t - 0.5;
    }
    lut_nmsedec_ref[i] =
        opj_int_max(0, (int)(floor((u * u - v * v) * pow(2, (7 - 1)) + 0.5) /
                             pow(2, (7 - 1)) * 8192.0));
    lut_nmsedec_ref0[i] =
        opj_int_max(0, (int)(floor((u * u) * pow(2, (7 - 1)) + 0.5) /
                             pow(2, (7 - 1)) * 8192.0));
  }
  printf("static OPJ_INT16 lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\n  ");
  dump_array16(lut_nmsedec_sig, 1 << 7);
  printf("static OPJ_INT16 lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\n  ");
  dump_array16(lut_nmsedec_sig0, 1 << 7);
  printf("static OPJ_INT16 lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\n  ");
  dump_array16(lut_nmsedec_ref, 1 << 7);
  printf("static OPJ_INT16 lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\n  ");
  dump_array16(lut_nmsedec_ref0, 1 << 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1880,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    1250 <main+0xd0>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    123d <main+0xbd>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1834(%rbp)
cmpl   $0x2,-0x1834(%rbp)
jne    11f1 <main+0x71>
movl   $0x1,-0x1834(%rbp)
jmp    120d <main+0x8d>
cmpl   $0x1,-0x1834(%rbp)
jne    1208 <main+0x88>
movl   $0x2,-0x1834(%rbp)
jmp    120d <main+0x8d>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1080 <t1_init_ctxno_zc@plt>
mov    %eax,%ecx
mov    -0x1834(%rbp),%eax
shl    $0x8,%eax
or     -0x14(%rbp),%eax
cltq
mov    %ecx,-0x1030(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11bf <main+0x3f>
jmp    1242 <main+0xc2>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11ae <main+0x2e>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3ff,-0x14(%rbp)
jge    12be <main+0x13e>
movslq -0x14(%rbp),%rax
mov    -0x1030(%rbp,%rax,4),%esi
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
and    $0x1f,%eax
cmp    $0x0,%eax
jne    12ab <main+0x12b>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12b0 <main+0x130>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1265 <main+0xe5>
mov    -0x34(%rbp),%esi
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xff,-0x14(%rbp)
jge    133f <main+0x1bf>
mov    -0x14(%rbp),%edi
shl    $0x4,%edi
call   1030 <t1_init_ctxno_sc@plt>
mov    %eax,%esi
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
and    $0xf,%eax
cmp    $0x0,%eax
jne    132c <main+0x1ac>
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1331 <main+0x1b1>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12e4 <main+0x164>
mov    $0xff0,%edi
call   1030 <t1_init_ctxno_sc@plt>
mov    %eax,%esi
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xff,-0x14(%rbp)
jge    13c9 <main+0x249>
mov    -0x14(%rbp),%edi
shl    $0x4,%edi
call   1050 <t1_init_spb@plt>
mov    %eax,%esi
lea    0xcff(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
and    $0x1f,%eax
cmp    $0x0,%eax
jne    13b6 <main+0x236>
lea    0xcdb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13bb <main+0x23b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    136e <main+0x1ee>
mov    $0xff0,%edi
call   1050 <t1_init_spb@plt>
mov    %eax,%esi
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x80,-0x14(%rbp)
jge    1729 <main+0x5a9>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x1860(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1860(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xbda(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1858(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1858(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xb68(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x1850(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1850(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  0xb29(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
xor    %edi,%edi
call   1060 <opj_int_max@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x1230(%rbp,%rax,4)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x1848(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1848(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xadd(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x1840(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1840(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  0xa9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
xor    %edi,%edi
call   1060 <opj_int_max@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x1430(%rbp,%rax,4)
movsd  -0x30(%rbp),%xmm0
movsd  0xa6d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     15c6 <main+0x446>
movsd  -0x30(%rbp),%xmm0
movsd  0xa60(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    15dc <main+0x45c>
movsd  -0x30(%rbp),%xmm0
movsd  0xa3d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1880(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1880(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0x9d3(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x1878(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1878(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  0x994(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
xor    %edi,%edi
call   1060 <opj_int_max@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x1630(%rbp,%rax,4)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x1870(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1870(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0x948(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1090 <floor@plt>
movsd  %xmm0,-0x1868(%rbp)
ff
mov    $0x2,%edi
mov    $0x6,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1868(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  0x909(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
xor    %edi,%edi
call   1060 <opj_int_max@plt>
mov    %eax,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x1830(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13ea <main+0x26a>
lea    0x9c9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1230(%rbp),%rdi
mov    $0x80,%esi
call   10a0 <dump_array16@plt>
lea    0x9e8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1430(%rbp),%rdi
mov    $0x80,%esi
call   10a0 <dump_array16@plt>
lea    0xa08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1630(%rbp),%rdi
mov    $0x80,%esi
call   10a0 <dump_array16@plt>
lea    0xa27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x1830(%rbp),%rdi
mov    $0x80,%esi
call   10a0 <dump_array16@plt>
xor    %eax,%eax
add    $0x1880,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1828,%rsp
lea    0x1013(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
xor    %esi,%esi
call   1090 <t1_init_ctxno_zc@plt>
mov    %eax,0x820(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    11b0 <main+0x20>
xor    %ebx,%ebx
nop
mov    %ebx,%edi
mov    $0x1,%esi
call   1090 <t1_init_ctxno_zc@plt>
mov    %ebx,%ecx
or     $0x200,%ecx
mov    %eax,0x820(%rsp,%rcx,4)
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    11d0 <main+0x40>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    $0x2,%esi
call   1090 <t1_init_ctxno_zc@plt>
mov    %ebx,%ecx
or     $0x100,%ecx
mov    %eax,0x820(%rsp,%rcx,4)
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1200 <main+0x70>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    $0x3,%esi
call   1090 <t1_init_ctxno_zc@plt>
mov    %ebx,%ecx
or     $0x300,%ecx
mov    %eax,0x820(%rsp,%rcx,4)
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1230 <main+0xa0>
lea    0xdcb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebp
lea    0xde2(%rip),%rbx
lea    0xdd7(%rip),%r14
jmp    128d <main+0xfd>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    $0x400,%rbp
je     12b0 <main+0x120>
mov    0x81c(%rsp,%rbp,4),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   $0x1f,%bpl
jne    1280 <main+0xf0>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1280 <main+0xf0>
mov    0x181c(%rsp),%esi
lea    0xd99(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd93(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebx
lea    0xda9(%rip),%r15
lea    0xd68(%rip),%r14
xor    %ebp,%ebp
jmp    12fe <main+0x16e>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
add    $0x10,%ebp
cmp    $0x100,%ebx
je     1322 <main+0x192>
mov    %ebp,%edi
call   1040 <t1_init_ctxno_sc@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   $0xf,%bl
jne    12f0 <main+0x160>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12f0 <main+0x160>
mov    $0xff0,%edi
call   1040 <t1_init_ctxno_sc@plt>
lea    0xd5c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd56(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebx
lea    0xcfc(%rip),%r15
lea    0xcf1(%rip),%r14
xor    %ebp,%ebp
jmp    137e <main+0x1ee>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
add    $0x10,%ebp
cmp    $0x100,%ebx
je     13a2 <main+0x212>
mov    %ebp,%edi
call   1060 <t1_init_spb@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   $0x1f,%bl
jne    1370 <main+0x1e0>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1370 <main+0x1e0>
mov    $0xff0,%edi
call   1060 <t1_init_spb@plt>
lea    0xca4(%rip),%rdi
xor    %ebx,%ebx
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    14b0 <main+0x320>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
mulsd  (%rsp),%xmm0
movsd  0xc05(%rip),%xmm1
addsd  %xmm1,%xmm0
call   10a0 <floor@plt>
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0xbdf(%rip),%xmm0
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
xor    %edi,%edi
call   1070 <opj_int_max@plt>
mov    %eax,0x220(%rsp,%rbx,4)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0xba4(%rip),%xmm0
call   10a0 <floor@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xb80(%rip),%xmm1
cvttsd2si %xmm1,%esi
xor    %edi,%edi
call   1070 <opj_int_max@plt>
mov    %eax,0x20(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x80,%rbx
je     15ee <main+0x45e>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
addsd  0xb18(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
movsd  %xmm1,(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0xae6(%rip),%xmm1
addsd  %xmm1,%xmm0
call   10a0 <floor@plt>
movsd  %xmm0,0x10(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0xabe(%rip),%xmm0
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
xor    %edi,%edi
call   1070 <opj_int_max@plt>
mov    %eax,0x620(%rsp,%rbx,4)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
mulsd  (%rsp),%xmm0
addsd  0xa84(%rip),%xmm0
call   10a0 <floor@plt>
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
mov    $0x6,%esi
call   1080 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xa62(%rip),%xmm1
cvttsd2si %xmm1,%esi
xor    %edi,%edi
call   1070 <opj_int_max@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,0x420(%rsp,%rbx,4)
movapd %xmm0,%xmm1
addsd  0xa46(%rip),%xmm1
addsd  0xa46(%rip),%xmm0
test   $0x40,%bl
je     13d0 <main+0x240>
movsd  0x18(%rsp),%xmm0
jmp    13d0 <main+0x240>
lea    0xac8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x620(%rsp),%rdi
mov    $0x80,%esi
call   10b0 <dump_array16@plt>
lea    0xae6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x420(%rsp),%rdi
mov    $0x80,%esi
call   10b0 <dump_array16@plt>
lea    0xb05(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x220(%rsp),%rdi
mov    $0x80,%esi
call   10b0 <dump_array16@plt>
lea    0xb23(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x20(%rsp),%rdi
mov    $0x80,%esi
call   10b0 <dump_array16@plt>
xor    %eax,%eax
add    $0x1828,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [68 x i8] c"/* This file was automatically generated by t1_generate_luts.c */\0A\0A\00"
@.str.1 = [42 x i8] c"static OPJ_BYTE lut_ctxno_zc[1024] = {\0A \00"
@.str.2 = [5 x i8] c"%i, \00"
@.str.3 = [4 x i8] c"\0A \00"
@.str.4 = [8 x i8] c"%i\0A};\0A\0A\00"
@.str.5 = [41 x i8] c"static OPJ_BYTE lut_ctxno_sc[256] = {\0A \00"
@.str.6 = [7 x i8] c"0x%x, \00"
@.str.7 = [10 x i8] c"0x%x\0A};\0A\0A\00"
@.str.8 = [36 x i8] c"static OPJ_BYTE lut_spb[256] = {\0A \00"
@.str.9 = [62 x i8] c"static OPJ_INT16 lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\0A \00"
@.str.10 = [63 x i8] c"static OPJ_INT16 lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\0A \00"
@.str.11 = [62 x i8] c"static OPJ_INT16 lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\0A \00"
@.str.12 = [63 x i8] c"static OPJ_INT16 lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\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 double
%9 = alloca double
%10 = alloca double
%11 = alloca [1024 x i32]
%12 = alloca [128 x i32]
%13 = alloca [128 x i32]
%14 = alloca [128 x i32]
%15 = alloca [128 x i32]
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i32, i32* %4
%18 = load i8**, i8*** %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %7
br label %20
20: ; preds = %51, %2
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 4
br i1 %22, label %23, label %54
23: ; preds = %20
store i32 0, i32* %6
br label %24
24: ; preds = %47, %23
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 256
br i1 %26, label %27, label %50
27: ; preds = %24
%28 = load i32, i32* %7
store i32 %28, i32* %16
%29 = load i32, i32* %16
%30 = icmp eq i32 %29, 2
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 1, i32* %16
br label %37
32: ; preds = %27
%33 = load i32, i32* %16
%34 = icmp eq i32 %33, 1
br i1 %34, label %35, label %36
35: ; preds = %32
store i32 2, i32* %16
br label %36
36: ; preds = %35, %32
br label %37
37: ; preds = %36, %31
%38 = load i32, i32* %6
%39 = load i32, i32* %7
%40 = call i32 @t1_init_ctxno_zc(i32 %38, i32 %39)
%41 = load i32, i32* %16
%42 = shl i32 %41, 8
%43 = load i32, i32* %6
%44 = or i32 %42, %43
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [1024 x i32], [1024 x i32]* %11, i64 0, i64 %45
store i32 %40, i32* %46
br label %47
47: ; preds = %37
%48 = load i32, i32* %6
%49 = add nsw i32 %48, 1
store i32 %49, i32* %6
br label %24
50: ; preds = %24
br label %51
51: ; preds = %50
%52 = load i32, i32* %7
%53 = add nsw i32 %52, 1
store i32 %53, i32* %7
br label %20
54: ; preds = %20
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %56
56: ; preds = %72, %54
%57 = load i32, i32* %6
%58 = icmp slt i32 %57, 1023
br i1 %58, label %59, label %75
59: ; preds = %56
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [1024 x i32], [1024 x i32]* %11, i64 0, i64 %61
%63 = load i32, i32* %62
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %63)
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
%67 = and i32 %66, 31
%68 = icmp ne i32 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %59
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %71
71: ; preds = %69, %59
br label %72
72: ; preds = %71
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %56
75: ; preds = %56
%76 = getelementptr inbounds [1024 x i32], [1024 x i32]* %11, i64 0, i64 1023
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %77)
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %6
br label %80
80: ; preds = %95, %75
%81 = load i32, i32* %6
%82 = icmp slt i32 %81, 255
br i1 %82, label %83, label %98
83: ; preds = %80
%84 = load i32, i32* %6
%85 = shl i32 %84, 4
%86 = call i32 @t1_init_ctxno_sc(i32 %85)
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %86)
%88 = load i32, i32* %6
%89 = add nsw i32 %88, 1
%90 = and i32 %89, 15
%91 = icmp ne i32 %90, 0
br i1 %91, label %94, label %92
92: ; preds = %83
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %94
94: ; preds = %92, %83
br label %95
95: ; preds = %94
%96 = load i32, i32* %6
%97 = add nsw i32 %96, 1
store i32 %97, i32* %6
br label %80
98: ; preds = %80
%99 = call i32 @t1_init_ctxno_sc(i32 4080)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %99)
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %6
br label %102
102: ; preds = %117, %98
%103 = load i32, i32* %6
%104 = icmp slt i32 %103, 255
br i1 %104, label %105, label %120
105: ; preds = %102
%106 = load i32, i32* %6
%107 = shl i32 %106, 4
%108 = call i32 @t1_init_spb(i32 %107)
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %108)
%110 = load i32, i32* %6
%111 = add nsw i32 %110, 1
%112 = and i32 %111, 31
%113 = icmp ne i32 %112, 0
br i1 %113, label %116, label %114
114: ; preds = %105
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %116
116: ; preds = %114, %105
br label %117
117: ; preds = %116
%118 = load i32, i32* %6
%119 = add nsw i32 %118, 1
store i32 %119, i32* %6
br label %102
120: ; preds = %102
%121 = call i32 @t1_init_spb(i32 4080)
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %121)
store i32 0, i32* %6
br label %123
123: ; preds = %210, %120
%124 = load i32, i32* %6
%125 = icmp slt i32 %124, 128
br i1 %125, label %126, label %213
126: ; preds = %123
%127 = load i32, i32* %6
%128 = sitofp i32 %127 to double
%129 = call double @pow(i32 2, i32 6)
%130 = fdiv double %128, %129
store double %130, double* %10
%131 = load double, double* %10
store double %131, double* %8
%132 = load double, double* %10
%133 = fsub double %132, 1.500000e+00
store double %133, double* %9
%134 = load double, double* %8
%135 = load double, double* %8
%136 = load double, double* %9
%137 = load double, double* %9
%138 = fmul double %136, %137
%139 = fneg double %138
%140 = call double @llvm.fmuladd.f64(double %134, double %135, double %139)
%141 = call double @pow(i32 2, i32 6)
%142 = call double @llvm.fmuladd.f64(double %140, double %141, double 5.000000e-01)
%143 = call double @llvm.floor.f64(double %142)
%144 = call double @pow(i32 2, i32 6)
%145 = fdiv double %143, %144
%146 = fmul double %145, 8.192000e+03
%147 = fptosi double %146 to i32
%148 = call i32 @opj_int_max(i32 0, i32 %147)
%149 = load i32, i32* %6
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [128 x i32], [128 x i32]* %12, i64 0, i64 %150
store i32 %148, i32* %151
%152 = load double, double* %8
%153 = load double, double* %8
%154 = fmul double %152, %153
%155 = call double @pow(i32 2, i32 6)
%156 = call double @llvm.fmuladd.f64(double %154, double %155, double 5.000000e-01)
%157 = call double @llvm.floor.f64(double %156)
%158 = call double @pow(i32 2, i32 6)
%159 = fdiv double %157, %158
%160 = fmul double %159, 8.192000e+03
%161 = fptosi double %160 to i32
%162 = call i32 @opj_int_max(i32 0, i32 %161)
%163 = load i32, i32* %6
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [128 x i32], [128 x i32]* %13, i64 0, i64 %164
store i32 %162, i32* %165
%166 = load double, double* %10
%167 = fsub double %166, 1.000000e+00
store double %167, double* %8
%168 = load i32, i32* %6
%169 = and i32 %168, 64
%170 = icmp ne i32 %169, 0
br i1 %170, label %171, label %174
171: ; preds = %126
%172 = load double, double* %10
%173 = fsub double %172, 1.500000e+00
store double %173, double* %9
br label %177
174: ; preds = %126
%175 = load double, double* %10
%176 = fsub double %175, 5.000000e-01
store double %176, double* %9
br label %177
177: ; preds = %174, %171
%178 = load double, double* %8
%179 = load double, double* %8
%180 = load double, double* %9
%181 = load double, double* %9
%182 = fmul double %180, %181
%183 = fneg double %182
%184 = call double @llvm.fmuladd.f64(double %178, double %179, double %183)
%185 = call double @pow(i32 2, i32 6)
%186 = call double @llvm.fmuladd.f64(double %184, double %185, double 5.000000e-01)
%187 = call double @llvm.floor.f64(double %186)
%188 = call double @pow(i32 2, i32 6)
%189 = fdiv double %187, %188
%190 = fmul double %189, 8.192000e+03
%191 = fptosi double %190 to i32
%192 = call i32 @opj_int_max(i32 0, i32 %191)
%193 = load i32, i32* %6
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [128 x i32], [128 x i32]* %14, i64 0, i64 %194
store i32 %192, i32* %195
%196 = load double, double* %8
%197 = load double, double* %8
%198 = fmul double %196, %197
%199 = call double @pow(i32 2, i32 6)
%200 = call double @llvm.fmuladd.f64(double %198, double %199, double 5.000000e-01)
%201 = call double @llvm.floor.f64(double %200)
%202 = call double @pow(i32 2, i32 6)
%203 = fdiv double %201, %202
%204 = fmul double %203, 8.192000e+03
%205 = fptosi double %204 to i32
%206 = call i32 @opj_int_max(i32 0, i32 %205)
%207 = load i32, i32* %6
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds [128 x i32], [128 x i32]* %15, i64 0, i64 %208
store i32 %206, i32* %209
br label %210
210: ; preds = %177
%211 = load i32, i32* %6
%212 = add nsw i32 %211, 1
store i32 %212, i32* %6
br label %123
213: ; preds = %123
%214 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%215 = getelementptr inbounds [128 x i32], [128 x i32]* %12, i64 0, i64 0
%216 = call i32 @dump_array16(i32* %215, i32 128)
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0))
%218 = getelementptr inbounds [128 x i32], [128 x i32]* %13, i64 0, i64 0
%219 = call i32 @dump_array16(i32* %218, i32 128)
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%221 = getelementptr inbounds [128 x i32], [128 x i32]* %14, i64 0, i64 0
%222 = call i32 @dump_array16(i32* %221, i32 128)
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%224 = getelementptr inbounds [128 x i32], [128 x i32]* %15, i64 0, i64 0
%225 = call i32 @dump_array16(i32* %224, i32 128)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [42 x i8] c"static OPJ_BYTE lut_ctxno_zc[1024] = {\0A \00"
@.str.2 = [5 x i8] c"%i, \00"
@.str.3 = [4 x i8] c"\0A \00"
@.str.4 = [8 x i8] c"%i\0A};\0A\0A\00"
@.str.5 = [41 x i8] c"static OPJ_BYTE lut_ctxno_sc[256] = {\0A \00"
@.str.6 = [7 x i8] c"0x%x, \00"
@.str.7 = [10 x i8] c"0x%x\0A};\0A\0A\00"
@.str.8 = [36 x i8] c"static OPJ_BYTE lut_spb[256] = {\0A \00"
@.str.9 = [62 x i8] c"static OPJ_INT16 lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\0A \00"
@.str.10 = [63 x i8] c"static OPJ_INT16 lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\0A \00"
@.str.11 = [62 x i8] c"static OPJ_INT16 lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\0A \00"
@.str.12 = [63 x i8] c"static OPJ_INT16 lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\0A \00"
@str = [67 x i8] c"/* This file was automatically generated by t1_generate_luts.c */\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i32]
%4 = alloca [128 x i32]
%5 = alloca [128 x i32]
%6 = alloca [128 x i32]
%7 = alloca [128 x i32]
%8 = bitcast [1024 x i32]* %3 to i8*
%9 = bitcast [128 x i32]* %4 to i8*
%10 = bitcast [128 x i32]* %5 to i8*
%11 = bitcast [128 x i32]* %6 to i8*
%12 = bitcast [128 x i32]* %7 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %2, %14
%15 = phi i64 [ 0, %2 ], [ %19, %14 ]
%16 = trunc i64 %15 to i32
%17 = tail call i32 @t1_init_ctxno_zc(i32 %16, i32 0)
%18 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 %15
store i32 %17, i32* %18
%19 = add nuw nsw i64 %15, 1
%20 = icmp eq i64 %19, 256
br i1 %20, label %21, label %14
21: ; preds = %14, %21
%22 = phi i32 [ %27, %21 ], [ 0, %14 ]
%23 = tail call i32 @t1_init_ctxno_zc(i32 %22, i32 1)
%24 = or i32 %22, 512
%25 = zext i32 %24 to i64
%26 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 %25
store i32 %23, i32* %26
%27 = add nuw nsw i32 %22, 1
%28 = icmp eq i32 %27, 256
br i1 %28, label %29, label %21
29: ; preds = %21, %29
%30 = phi i32 [ %35, %29 ], [ 0, %21 ]
%31 = tail call i32 @t1_init_ctxno_zc(i32 %30, i32 2)
%32 = or i32 %30, 256
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 %33
store i32 %31, i32* %34
%35 = add nuw nsw i32 %30, 1
%36 = icmp eq i32 %35, 256
br i1 %36, label %37, label %29
37: ; preds = %29, %37
%38 = phi i32 [ %43, %37 ], [ 0, %29 ]
%39 = tail call i32 @t1_init_ctxno_zc(i32 %38, i32 3)
%40 = or i32 %38, 768
%41 = zext i32 %40 to i64
%42 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 %41
store i32 %39, i32* %42
%43 = add nuw nsw i32 %38, 1
%44 = icmp eq i32 %43, 256
br i1 %44, label %45, label %37
45: ; preds = %37
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %47
47: ; preds = %45, %57
%48 = phi i64 [ 0, %45 ], [ %52, %57 ]
%49 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %50)
%52 = add nuw nsw i64 %48, 1
%53 = and i64 %52, 31
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %47
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %57
57: ; preds = %47, %55
%58 = icmp eq i64 %52, 1023
br i1 %58, label %59, label %47
59: ; preds = %57
%60 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 1023
%61 = load i32, i32* %60
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %61)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
br label %64
64: ; preds = %59, %74
%65 = phi i32 [ 0, %59 ], [ %69, %74 ]
%66 = shl nuw nsw i32 %65, 4
%67 = tail call i32 @t1_init_ctxno_sc(i32 %66)
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %67)
%69 = add nuw nsw i32 %65, 1
%70 = and i32 %69, 15
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %64
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %74
74: ; preds = %64, %72
%75 = icmp eq i32 %69, 255
br i1 %75, label %76, label %64
76: ; preds = %74
%77 = tail call i32 @t1_init_ctxno_sc(i32 4080)
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %77)
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
br label %80
80: ; preds = %76, %90
%81 = phi i32 [ 0, %76 ], [ %85, %90 ]
%82 = shl nuw nsw i32 %81, 4
%83 = tail call i32 @t1_init_spb(i32 %82)
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %83)
%85 = add nuw nsw i32 %81, 1
%86 = and i32 %85, 31
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %80
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %90
90: ; preds = %80, %88
%91 = icmp eq i32 %85, 255
br i1 %91, label %92, label %80
92: ; preds = %90
%93 = tail call i32 @t1_init_spb(i32 4080)
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %93)
br label %95
95: ; preds = %92, %95
%96 = phi i64 [ 0, %92 ], [ %151, %95 ]
%97 = trunc i64 %96 to i32
%98 = sitofp i32 %97 to double
%99 = tail call double @pow(i32 2, i32 6)
%100 = fdiv double %98, %99
%101 = fadd double %100, -1.500000e+00
%102 = fneg double %101
%103 = fmul double %101, %102
%104 = tail call double @llvm.fmuladd.f64(double %100, double %100, double %103)
%105 = tail call double @pow(i32 2, i32 6)
%106 = tail call double @llvm.fmuladd.f64(double %104, double %105, double 5.000000e-01)
%107 = tail call double @llvm.floor.f64(double %106)
%108 = tail call double @pow(i32 2, i32 6)
%109 = fdiv double %107, %108
%110 = fmul double %109, 8.192000e+03
%111 = fptosi double %110 to i32
%112 = tail call i32 @opj_int_max(i32 0, i32 %111)
%113 = getelementptr inbounds [128 x i32], [128 x i32]* %4, i64 0, i64 %96
store i32 %112, i32* %113
%114 = fmul double %100, %100
%115 = tail call double @pow(i32 2, i32 6)
%116 = tail call double @llvm.fmuladd.f64(double %114, double %115, double 5.000000e-01)
%117 = tail call double @llvm.floor.f64(double %116)
%118 = tail call double @pow(i32 2, i32 6)
%119 = fdiv double %117, %118
%120 = fmul double %119, 8.192000e+03
%121 = fptosi double %120 to i32
%122 = tail call i32 @opj_int_max(i32 0, i32 %121)
%123 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 %96
store i32 %122, i32* %123
%124 = fadd double %100, -1.000000e+00
%125 = and i32 %97, 64
%126 = icmp eq i32 %125, 0
%127 = fadd double %100, -5.000000e-01
%128 = select i1 %126, double %127, double %101
%129 = fneg double %128
%130 = fmul double %128, %129
%131 = tail call double @llvm.fmuladd.f64(double %124, double %124, double %130)
%132 = tail call double @pow(i32 2, i32 6)
%133 = tail call double @llvm.fmuladd.f64(double %131, double %132, double 5.000000e-01)
%134 = tail call double @llvm.floor.f64(double %133)
%135 = tail call double @pow(i32 2, i32 6)
%136 = fdiv double %134, %135
%137 = fmul double %136, 8.192000e+03
%138 = fptosi double %137 to i32
%139 = tail call i32 @opj_int_max(i32 0, i32 %138)
%140 = getelementptr inbounds [128 x i32], [128 x i32]* %6, i64 0, i64 %96
store i32 %139, i32* %140
%141 = fmul double %124, %124
%142 = tail call double @pow(i32 2, i32 6)
%143 = tail call double @llvm.fmuladd.f64(double %141, double %142, double 5.000000e-01)
%144 = tail call double @llvm.floor.f64(double %143)
%145 = tail call double @pow(i32 2, i32 6)
%146 = fdiv double %144, %145
%147 = fmul double %146, 8.192000e+03
%148 = fptosi double %147 to i32
%149 = tail call i32 @opj_int_max(i32 0, i32 %148)
%150 = getelementptr inbounds [128 x i32], [128 x i32]* %7, i64 0, i64 %96
store i32 %149, i32* %150
%151 = add nuw nsw i64 %96, 1
%152 = icmp eq i64 %151, 128
br i1 %152, label %153, label %95
153: ; preds = %95
%154 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%155 = getelementptr inbounds [128 x i32], [128 x i32]* %4, i64 0, i64 0
%156 = call i32 @dump_array16(i32* %155, i32 128)
%157 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0))
%158 = getelementptr inbounds [128 x i32], [128 x i32]* %5, i64 0, i64 0
%159 = call i32 @dump_array16(i32* %158, i32 128)
%160 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%161 = getelementptr inbounds [128 x i32], [128 x i32]* %6, i64 0, i64 0
%162 = call i32 @dump_array16(i32* %161, i32 128)
%163 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%164 = getelementptr inbounds [128 x i32], [128 x i32]* %7, i64 0, i64 0
%165 = call i32 @dump_array16(i32* %164, i32 128)
ret i32 0
}