#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t Slinear2ulaw(int);
int /*<<< orphan*/ error_exit(char *, int, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int **long2d(unsigned int, unsigned int);
int /*<<< orphan*/ perror_exit(char *, char *, char *);
int main() {
  FILE *fout;
  char *filename = "bitshift.h", *writemode = "w";
  int shift, i;
  int tab[256];
  int sample;
  int **forwardmap = long2d((unsigned int)13, (unsigned int)256);
  int **reversemap = long2d((unsigned int)13, (unsigned int)256);
  fout = fopen(filename, writemode);
  if (fout == NULL)
    perror_exit("fopen(\"%s\", \"%s\")", filename, writemode);
  for (i = 0; i < 256; i++)
    tab[i] = 0;
  for (shift = 0; shift < 13; shift++)
    for (sample = -(1L << 15); sample < (1L << 15); sample += 1 << (shift + 3))
      tab[Slinear2ulaw(sample)] = shift;
  fprintf(fout, "char ulaw_maxshift[%d] = {", 256);
  for (i = 0; i < 256 - 1; i++)
    fprintf(fout, "%d,", tab[i]);
  fprintf(fout, "%d};\n\n", tab[256 - 1]);
  for (shift = 0; shift < 13; shift++) {
    int nused;
    nused = 0;
    for (i = 255; i >= 128; i--)
      if (tab[i] >= shift)
        forwardmap[shift][i] = nused++;
    for (i = 255; i >= 128; i--)
      if (tab[i] < shift)
        forwardmap[shift][i] = nused++;
    nused = -1;
    for (i = 126; i >= 0; i--)
      if (tab[i] >= shift)
        forwardmap[shift][i] = nused--;
    forwardmap[shift][127] = nused--;
    for (i = 126; i >= 0; i--)
      if (tab[i] < shift)
        forwardmap[shift][i] = nused--;
    for (i = 0; i < 256; i++)
      reversemap[shift][forwardmap[shift][i] + 128] = i;
  }
  for (shift = 0; shift < 13; shift++)
    for (i = 0; i < 256; i++)
      if (forwardmap[shift][reversemap[shift][i]] != i - 128)
        error_exit("identity maping failed for shift: %d\tindex: %d\n", shift,
                   i);
  fprintf(fout, "schar ulaw_inward[%d][%d] = {\n", 13, 256);
  for (shift = 0; shift < 13; shift++) {
    fprintf(fout, "{");
    for (i = 0; i < 256 - 1; i++)
      fprintf(fout, "%ld,", forwardmap[shift][i]);
    if (shift != 13 - 1)
      fprintf(fout, "%ld},\n", forwardmap[shift][256 - 1]);
    else
      fprintf(fout, "%ld}\n};\n", forwardmap[shift][256 - 1]);
  }
  fprintf(fout, "\n");
  fprintf(fout, "uchar ulaw_outward[%d][%d] = {\n", 13, 256);
  for (shift = 0; shift < 13; shift++) {
    fprintf(fout, "{");
    for (i = 0; i < 256 - 1; i++)
      fprintf(fout, "%ld,", reversemap[shift][i]);
    if (shift != 13 - 1)
      fprintf(fout, "%ld},\n", reversemap[shift][256 - 1]);
    else
      fprintf(fout, "%ld}\n};\n", reversemap[shift][256 - 1]);
  }
  fclose(fout);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe77(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe77(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    $0xd,%edi
mov    $0x100,%esi
call   1060 <long2d@plt>
mov    %rax,-0x440(%rbp)
mov    $0xd,%edi
mov    $0x100,%esi
call   1060 <long2d@plt>
mov    %rax,-0x448(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11f4 <main+0x84>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe1e(%rip),%rdi
call   1090 <perror_exit@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x100,-0x28(%rbp)
jge    1225 <main+0xb5>
movslq -0x28(%rbp),%rax
movl   $0x0,-0x430(%rbp,%rax,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11fb <main+0x8b>
movl   $0x0,-0x24(%rbp)
cmpl   $0xd,-0x24(%rbp)
jge    12a5 <main+0x135>
movl   $0xffff8000,-0x434(%rbp)
80 ff ff
movslq -0x434(%rbp),%rax
cmp    $0x8000,%rax
jge    1292 <main+0x122>
mov    -0x24(%rbp),%eax
mov    %eax,-0x450(%rbp)
mov    -0x434(%rbp),%edi
call   1040 <Slinear2ulaw@plt>
mov    -0x450(%rbp),%ecx
mov    %ecx,-0x430(%rbp,%rax,4)
mov    -0x24(%rbp),%ecx
add    $0x3,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    -0x434(%rbp),%eax
mov    %eax,-0x434(%rbp)
jmp    1240 <main+0xd0>
jmp    1297 <main+0x127>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    122c <main+0xbc>
mov    -0x10(%rbp),%rdi
lea    0xd6f(%rip),%rsi
mov    $0x100,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0xff,-0x28(%rbp)
jge    12fb <main+0x18b>
mov    -0x10(%rbp),%rdi
movslq -0x28(%rbp),%rax
mov    -0x430(%rbp,%rax,4),%edx
lea    0xd54(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12c3 <main+0x153>
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%edx
lea    0xd35(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xd,-0x24(%rbp)
jge    1546 <main+0x3d6>
movl   $0x0,-0x44c(%rbp)
movl   $0xff,-0x28(%rbp)
cmpl   $0x80,-0x28(%rbp)
jl     138d <main+0x21d>
movslq -0x28(%rbp),%rax
mov    -0x430(%rbp,%rax,4),%eax
cmp    -0x24(%rbp),%eax
jl     137a <main+0x20a>
mov    -0x44c(%rbp),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,-0x44c(%rbp)
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    137f <main+0x20f>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    1332 <main+0x1c2>
movl   $0xff,-0x28(%rbp)
cmpl   $0x80,-0x28(%rbp)
jl     13ef <main+0x27f>
movslq -0x28(%rbp),%rax
mov    -0x430(%rbp,%rax,4),%eax
cmp    -0x24(%rbp),%eax
jge    13dc <main+0x26c>
mov    -0x44c(%rbp),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,-0x44c(%rbp)
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    13e1 <main+0x271>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    1394 <main+0x224>
movl   $0xffffffff,-0x44c(%rbp)
ff ff ff
movl   $0x7e,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     1458 <main+0x2e8>
movslq -0x28(%rbp),%rax
mov    -0x430(%rbp,%rax,4),%eax
cmp    -0x24(%rbp),%eax
jl     1445 <main+0x2d5>
mov    -0x44c(%rbp),%edx
mov    %edx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x44c(%rbp)
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    144a <main+0x2da>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    1400 <main+0x290>
mov    -0x44c(%rbp),%ecx
mov    %ecx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x44c(%rbp)
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x1fc(%rax)
movl   $0x7e,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     14dd <main+0x36d>
movslq -0x28(%rbp),%rax
mov    -0x430(%rbp,%rax,4),%eax
cmp    -0x24(%rbp),%eax
jge    14ca <main+0x35a>
mov    -0x44c(%rbp),%edx
mov    %edx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x44c(%rbp)
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    14cf <main+0x35f>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    1485 <main+0x315>
movl   $0x0,-0x28(%rbp)
cmpl   $0x100,-0x28(%rbp)
jge    1533 <main+0x3c3>
mov    -0x28(%rbp),%edx
mov    -0x448(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x440(%rbp),%rcx
movslq -0x24(%rbp),%rsi
mov    (%rcx,%rsi,8),%rcx
movslq -0x28(%rbp),%rsi
mov    (%rcx,%rsi,4),%ecx
add    $0x80,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    14e4 <main+0x374>
jmp    1538 <main+0x3c8>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1317 <main+0x1a7>
movl   $0x0,-0x24(%rbp)
cmpl   $0xd,-0x24(%rbp)
jge    15dd <main+0x46d>
movl   $0x0,-0x28(%rbp)
cmpl   $0x100,-0x28(%rbp)
jge    15ca <main+0x45a>
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x448(%rbp),%rcx
movslq -0x24(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
movslq -0x28(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x28(%rbp),%ecx
sub    $0x80,%ecx
cmp    %ecx,%eax
je     15b7 <main+0x447>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xa93(%rip),%rdi
call   1050 <error_exit@plt>
jmp    15bc <main+0x44c>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    155e <main+0x3ee>
jmp    15cf <main+0x45f>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    154d <main+0x3dd>
mov    -0x10(%rbp),%rdi
lea    0xa8d(%rip),%rsi
mov    $0xd,%edx
mov    $0x100,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xd,-0x24(%rbp)
jge    16d6 <main+0x566>
mov    -0x10(%rbp),%rdi
lea    0xa23(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0xff,-0x28(%rbp)
jge    1666 <main+0x4f6>
mov    -0x10(%rbp),%rdi
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xa43(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1623 <main+0x4b3>
cmpl   $0xc,-0x24(%rbp)
je     169c <main+0x52c>
mov    -0x10(%rbp),%rdi
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x3fc(%rax),%edx
lea    0xa09(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    16c3 <main+0x553>
mov    -0x10(%rbp),%rdi
mov    -0x440(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x3fc(%rax),%edx
lea    0x9e4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    16c8 <main+0x558>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1600 <main+0x490>
mov    -0x10(%rbp),%rdi
lea    0x962(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0x9b6(%rip),%rsi
mov    $0xd,%edx
mov    $0x100,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xd,-0x24(%rbp)
jge    17e1 <main+0x671>
mov    -0x10(%rbp),%rdi
lea    0x918(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0xff,-0x28(%rbp)
jge    1771 <main+0x601>
mov    -0x10(%rbp),%rdi
mov    -0x448(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0x938(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    172e <main+0x5be>
cmpl   $0xc,-0x24(%rbp)
je     17a7 <main+0x637>
mov    -0x10(%rbp),%rdi
mov    -0x448(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x3fc(%rax),%edx
lea    0x8fe(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17ce <main+0x65e>
mov    -0x10(%rbp),%rdi
mov    -0x448(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x3fc(%rax),%edx
lea    0x8d9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17d3 <main+0x663>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    170b <main+0x59b>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    $0xd,%edi
mov    $0x100,%esi
call   1080 <long2d@plt>
mov    %rax,%r12
mov    $0xd,%edi
mov    $0x100,%esi
call   1080 <long2d@plt>
mov    %rax,%r14
lea    0xe34(%rip),%rdi
lea    0xe38(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
jne    11fa <main+0x6a>
lea    0xe26(%rip),%rdi
lea    0xe12(%rip),%rsi
lea    0xe16(%rip),%rdx
call   10b0 <perror_exit@plt>
mov    %rsp,%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    $0xffff7ff8,%ebx
xchg   %ax,%ax
add    $0x8,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x0,(%rsp,%rax,4)
cmp    $0x7ff8,%ebx
jl     1210 <main+0x80>
mov    $0xffff7ff0,%ebx
xchg   %ax,%ax
add    $0x10,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x1,(%rsp,%rax,4)
cmp    $0x7ff0,%ebx
jl     1230 <main+0xa0>
mov    $0xffff7fe0,%ebx
xchg   %ax,%ax
add    $0x20,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x2,(%rsp,%rax,4)
cmp    $0x7fe0,%ebx
jl     1250 <main+0xc0>
mov    $0xffff7fc0,%ebx
xchg   %ax,%ax
add    $0x40,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x3,(%rsp,%rax,4)
cmp    $0x7fc0,%ebx
jl     1270 <main+0xe0>
mov    $0xffff7f80,%ebx
xchg   %ax,%ax
sub    $0xffffff80,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x4,(%rsp,%rax,4)
cmp    $0x7f80,%ebx
jl     1290 <main+0x100>
mov    $0xffff7f00,%ebx
xchg   %ax,%ax
add    $0x100,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x5,(%rsp,%rax,4)
cmp    $0x7f00,%ebx
jl     12b0 <main+0x120>
mov    $0xffff7e00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x200,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x6,(%rsp,%rax,4)
cmp    $0x7e00,%ebx
jl     12e0 <main+0x150>
mov    $0xffff7c00,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x400,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x7,(%rsp,%rax,4)
cmp    $0x7c00,%ebx
jl     1310 <main+0x180>
mov    $0xffff7800,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x800,%ebx
mov    %ebx,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x8,(%rsp,%rax,4)
cmp    $0x7800,%ebx
jl     1340 <main+0x1b0>
mov    $0xffff8000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffff9000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffffa000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffffb000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffffc000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffffd000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffffe000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xfffff000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
xor    %edi,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x1000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x2000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x3000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x4000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x5000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x6000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0x7000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0x9,(%rsp,%rax,4)
mov    $0xffff8000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0xffffa000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0xffffc000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0xffffe000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
xor    %edi,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0x2000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0x4000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0x6000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xa,(%rsp,%rax,4)
mov    $0xffff8000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xb,(%rsp,%rax,4)
mov    $0xffffc000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xb,(%rsp,%rax,4)
xor    %edi,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xb,(%rsp,%rax,4)
mov    $0x4000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xb,(%rsp,%rax,4)
mov    $0xffff8000,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xc,(%rsp,%rax,4)
xor    %edi,%edi
call   1040 <Slinear2ulaw@plt>
movl   $0xc,(%rsp,%rax,4)
lea    0xaca(%rip),%rsi
mov    %r15,%rdi
mov    $0x100,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xacf(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
mov    (%rsp,%rbp,4),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%rbp
cmp    $0xff,%rbp
jne    1570 <main+0x3e0>
mov    0x3fc(%rsp),%edx
lea    0xaa3(%rip),%rsi
xor    %ebx,%ebx
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
nopw   0x0(%rax,%rax,1)
mov    $0x100,%ecx
xor    %eax,%eax
jmp    15cd <main+0x43d>
nopl   0x0(%rax)
add    $0xfffffffffffffffe,%rcx
cmp    $0x80,%rcx
jbe    1600 <main+0x470>
movslq -0x4(%rsp,%rcx,4),%rdx
cmp    %rdx,%rbx
jg     15e2 <main+0x452>
mov    (%r12,%rbx,8),%rdx
mov    %eax,-0x4(%rdx,%rcx,4)
add    $0x1,%eax
movslq -0x8(%rsp,%rcx,4),%rdx
cmp    %rdx,%rbx
jg     15c0 <main+0x430>
mov    (%r12,%rbx,8),%rdx
mov    %eax,-0x8(%rdx,%rcx,4)
add    $0x1,%eax
jmp    15c0 <main+0x430>
nopl   0x0(%rax)
mov    $0x100,%ecx
jmp    161d <main+0x48d>
nopw   0x0(%rax,%rax,1)
add    $0xfffffffffffffffe,%rcx
cmp    $0x80,%rcx
jbe    1650 <main+0x4c0>
movslq -0x4(%rsp,%rcx,4),%rdx
cmp    %rdx,%rbx
jle    1632 <main+0x4a2>
mov    (%r12,%rbx,8),%rdx
mov    %eax,-0x4(%rdx,%rcx,4)
add    $0x1,%eax
movslq -0x8(%rsp,%rcx,4),%rdx
cmp    %rdx,%rbx
jle    1610 <main+0x480>
mov    (%r12,%rbx,8),%rdx
mov    %eax,-0x8(%rdx,%rcx,4)
add    $0x1,%eax
jmp    1610 <main+0x480>
nopl   0x0(%rax)
mov    $0xffffffff,%eax
mov    $0x1f8,%ecx
jmp    1664 <main+0x4d4>
nopl   0x0(%rax)
add    $0xfffffffffffffff8,%rcx
movslq (%rsp,%rcx,1),%rdx
cmp    %rdx,%rbx
jg     1677 <main+0x4e7>
mov    (%r12,%rbx,8),%rdx
mov    %eax,(%rdx,%rcx,1)
add    $0xffffffff,%eax
test   %rcx,%rcx
je     16a0 <main+0x510>
movslq -0x4(%rsp,%rcx,1),%rdx
cmp    %rdx,%rbx
jg     1660 <main+0x4d0>
mov    (%r12,%rbx,8),%rdx
mov    %eax,-0x4(%rdx,%rcx,1)
add    $0xffffffff,%eax
jmp    1660 <main+0x4d0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rbx,8),%rcx
mov    %eax,0x1fc(%rcx)
add    $0xffffffff,%eax
mov    $0x1f8,%edx
jmp    16c4 <main+0x534>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xfffffffffffffff8,%rdx
movslq (%rsp,%rdx,1),%rsi
cmp    %rsi,%rbx
jle    16d3 <main+0x543>
mov    %eax,(%rcx,%rdx,1)
add    $0xffffffff,%eax
test   %rdx,%rdx
je     16f0 <main+0x560>
movslq -0x4(%rsp,%rdx,1),%rsi
cmp    %rsi,%rbx
jle    16c0 <main+0x530>
mov    %eax,-0x4(%rcx,%rdx,1)
add    $0xffffffff,%eax
jmp    16c0 <main+0x530>
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movslq (%rcx,%rdx,4),%rsi
mov    %edx,0x200(%rax,%rsi,4)
movslq 0x4(%rcx,%rdx,4),%rsi
lea    0x1(%rdx),%edi
mov    %edi,0x200(%rax,%rsi,4)
movslq 0x8(%rcx,%rdx,4),%rsi
lea    0x2(%rdx),%edi
mov    %edi,0x200(%rax,%rsi,4)
movslq 0xc(%rcx,%rdx,4),%rsi
lea    0x3(%rdx),%edi
mov    %edi,0x200(%rax,%rsi,4)
add    $0x4,%rdx
cmp    $0x100,%rdx
jne    1700 <main+0x570>
add    $0x1,%rbx
cmp    $0xd,%rbx
jne    15b0 <main+0x420>
xor    %ebx,%ebx
lea    0x8e9(%rip),%r13
jmp    176a <main+0x5da>
xchg   %ax,%ax
add    $0x1,%rbx
cmp    $0xd,%rbx
je     179f <main+0x60f>
xor    %ebp,%ebp
jmp    177d <main+0x5ed>
xchg   %ax,%ax
add    $0x1,%rbp
cmp    $0x100,%rbp
je     1760 <main+0x5d0>
mov    (%r12,%rbx,8),%rax
mov    (%r14,%rbx,8),%rcx
movslq (%rcx,%rbp,4),%rcx
lea    -0x80(%rbp),%edx
cmp    (%rax,%rcx,4),%edx
je     1770 <main+0x5e0>
mov    %r13,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1070 <error_exit@plt>
jmp    1770 <main+0x5e0>
lea    0x8cf(%rip),%rsi
mov    %r15,%rdi
mov    $0xd,%edx
mov    $0x100,%ecx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x8d3(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x7b,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
xor    %r13d,%r13d
mov    (%r12,%rbp,8),%rax
mov    (%rax,%r13,4),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%r13
cmp    $0xff,%r13
jne    17e0 <main+0x650>
cmp    $0xc,%rbp
je     1829 <main+0x699>
mov    (%r12,%rbp,8),%rax
mov    0x3fc(%rax),%edx
mov    %r15,%rdi
lea    0x87d(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%rbp
jmp    17d0 <main+0x640>
mov    0x60(%r12),%rax
mov    0x3fc(%rax),%edx
lea    0x865(%rip),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
lea    0x850(%rip),%rsi
mov    %r15,%rdi
mov    $0xd,%edx
mov    $0x100,%ecx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x820(%rip),%r13
lea    0x81e(%rip),%r12
xor    %ebp,%ebp
nopl   (%rax)
mov    $0x7b,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
xor    %ebx,%ebx
nop
mov    (%r14,%rbp,8),%rax
mov    (%rax,%rbx,4),%edx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%rbx
cmp    $0xff,%rbx
jne    1890 <main+0x700>
cmp    $0xc,%rbp
je     18d4 <main+0x744>
mov    (%r14,%rbp,8),%rax
mov    0x3fc(%rax),%edx
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%rbp
jmp    1880 <main+0x6f0>
mov    0x60(%r14),%rax
mov    0x3fc(%rax),%edx
lea    0x7bb(%rip),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r15,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"bitshift.h\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [18 x i8] c"fopen(\22%s\22, \22%s\22)\00"
@.str.3 = [27 x i8] c"char ulaw_maxshift[%d] = {\00"
@.str.4 = [4 x i8] c"%d,\00"
@.str.5 = [7 x i8] c"%d};\0A\0A\00"
@.str.6 = [48 x i8] c"identity maping failed for shift: %d\09index: %d\0A\00"
@.str.7 = [31 x i8] c"schar ulaw_inward[%d][%d] = {\0A\00"
@.str.8 = [2 x i8] c"{\00"
@.str.9 = [5 x i8] c"%ld,\00"
@.str.10 = [7 x i8] c"%ld},\0A\00"
@.str.11 = [9 x i8] c"%ld}\0A};\0A\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [32 x i8] c"uchar ulaw_outward[%d][%d] = {\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [256 x i32]
%8 = alloca i32
%9 = alloca i32**
%10 = alloca i32**
%11 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %4
%12 = call i32** @long2d(i32 13, i32 256)
store i32** %12, i32*** %9
%13 = call i32** @long2d(i32 13, i32 256)
store i32** %13, i32*** %10
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32* @fopen(i8* %14, i8* %15)
store i32* %16, i32** %2
%17 = load i32*, i32** %2
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %23
19: ; preds = %0
%20 = load i8*, i8** %3
%21 = load i8*, i8** %4
%22 = call i32 @perror_exit(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %20, i8* %21)
br label %23
23: ; preds = %19, %0
store i32 0, i32* %6
br label %24
24: ; preds = %31, %23
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 256
br i1 %26, label %27, label %34
27: ; preds = %24
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %29
store i32 0, i32* %30
br label %31
31: ; preds = %27
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %24
34: ; preds = %24
store i32 0, i32* %5
br label %35
35: ; preds = %55, %34
%36 = load i32, i32* %5
%37 = icmp slt i32 %36, 13
br i1 %37, label %38, label %58
38: ; preds = %35
store i32 -32768, i32* %8
br label %39
39: ; preds = %48, %38
%40 = load i32, i32* %8
%41 = sext i32 %40 to i64
%42 = icmp slt i64 %41, 32768
br i1 %42, label %43, label %54
43: ; preds = %39
%44 = load i32, i32* %5
%45 = load i32, i32* %8
%46 = call i64 @Slinear2ulaw(i32 %45)
%47 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %46
store i32 %44, i32* %47
br label %48
48: ; preds = %43
%49 = load i32, i32* %5
%50 = add nsw i32 %49, 3
%51 = shl i32 1, %50
%52 = load i32, i32* %8
%53 = add nsw i32 %52, %51
store i32 %53, i32* %8
br label %39
54: ; preds = %39
br label %55
55: ; preds = %54
%56 = load i32, i32* %5
%57 = add nsw i32 %56, 1
store i32 %57, i32* %5
br label %35
58: ; preds = %35
%59 = load i32*, i32** %2
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 256)
store i32 0, i32* %6
br label %61
61: ; preds = %71, %58
%62 = load i32, i32* %6
%63 = icmp slt i32 %62, 255
br i1 %63, label %64, label %74
64: ; preds = %61
%65 = load i32*, i32** %2
%66 = load i32, i32* %6
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %69)
br label %71
71: ; preds = %64
%72 = load i32, i32* %6
%73 = add nsw i32 %72, 1
store i32 %73, i32* %6
br label %61
74: ; preds = %61
%75 = load i32*, i32** %2
%76 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 255
%77 = load i32, i32* %76
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %77)
store i32 0, i32* %5
br label %79
79: ; preds = %221, %74
%80 = load i32, i32* %5
%81 = icmp slt i32 %80, 13
br i1 %81, label %82, label %224
82: ; preds = %79
store i32 0, i32* %11
store i32 255, i32* %6
br label %83
83: ; preds = %105, %82
%84 = load i32, i32* %6
%85 = icmp sge i32 %84, 128
br i1 %85, label %86, label %108
86: ; preds = %83
%87 = load i32, i32* %6
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %88
%90 = load i32, i32* %89
%91 = load i32, i32* %5
%92 = icmp sge i32 %90, %91
br i1 %92, label %93, label %104
93: ; preds = %86
%94 = load i32, i32* %11
%95 = add nsw i32 %94, 1
store i32 %95, i32* %11
%96 = load i32**, i32*** %9
%97 = load i32, i32* %5
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i32*, i32** %96, i64 %98
%100 = load i32*, i32** %99
%101 = load i32, i32* %6
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i32, i32* %100, i64 %102
store i32 %94, i32* %103
br label %104
104: ; preds = %93, %86
br label %105
105: ; preds = %104
%106 = load i32, i32* %6
%107 = add nsw i32 %106, -1
store i32 %107, i32* %6
br label %83
108: ; preds = %83
store i32 255, i32* %6
br label %109
109: ; preds = %131, %108
%110 = load i32, i32* %6
%111 = icmp sge i32 %110, 128
br i1 %111, label %112, label %134
112: ; preds = %109
%113 = load i32, i32* %6
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %114
%116 = load i32, i32* %115
%117 = load i32, i32* %5
%118 = icmp slt i32 %116, %117
br i1 %118, label %119, label %130
119: ; preds = %112
%120 = load i32, i32* %11
%121 = add nsw i32 %120, 1
store i32 %121, i32* %11
%122 = load i32**, i32*** %9
%123 = load i32, i32* %5
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i32*, i32** %122, i64 %124
%126 = load i32*, i32** %125
%127 = load i32, i32* %6
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
store i32 %120, i32* %129
br label %130
130: ; preds = %119, %112
br label %131
131: ; preds = %130
%132 = load i32, i32* %6
%133 = add nsw i32 %132, -1
store i32 %133, i32* %6
br label %109
134: ; preds = %109
store i32 -1, i32* %11
store i32 126, i32* %6
br label %135
135: ; preds = %157, %134
%136 = load i32, i32* %6
%137 = icmp sge i32 %136, 0
br i1 %137, label %138, label %160
138: ; preds = %135
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %140
%142 = load i32, i32* %141
%143 = load i32, i32* %5
%144 = icmp sge i32 %142, %143
br i1 %144, label %145, label %156
145: ; preds = %138
%146 = load i32, i32* %11
%147 = add nsw i32 %146, -1
store i32 %147, i32* %11
%148 = load i32**, i32*** %9
%149 = load i32, i32* %5
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32*, i32** %148, i64 %150
%152 = load i32*, i32** %151
%153 = load i32, i32* %6
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i32, i32* %152, i64 %154
store i32 %146, i32* %155
br label %156
156: ; preds = %145, %138
br label %157
157: ; preds = %156
%158 = load i32, i32* %6
%159 = add nsw i32 %158, -1
store i32 %159, i32* %6
br label %135
160: ; preds = %135
%161 = load i32, i32* %11
%162 = add nsw i32 %161, -1
store i32 %162, i32* %11
%163 = load i32**, i32*** %9
%164 = load i32, i32* %5
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i32*, i32** %163, i64 %165
%167 = load i32*, i32** %166
%168 = getelementptr inbounds i32, i32* %167, i64 127
store i32 %161, i32* %168
store i32 126, i32* %6
br label %169
169: ; preds = %191, %160
%170 = load i32, i32* %6
%171 = icmp sge i32 %170, 0
br i1 %171, label %172, label %194
172: ; preds = %169
%173 = load i32, i32* %6
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [256 x i32], [256 x i32]* %7, i64 0, i64 %174
%176 = load i32, i32* %175
%177 = load i32, i32* %5
%178 = icmp slt i32 %176, %177
br i1 %178, label %179, label %190
179: ; preds = %172
%180 = load i32, i32* %11
%181 = add nsw i32 %180, -1
store i32 %181, i32* %11
%182 = load i32**, i32*** %9
%183 = load i32, i32* %5
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i32*, i32** %182, i64 %184
%186 = load i32*, i32** %185
%187 = load i32, i32* %6
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds i32, i32* %186, i64 %188
store i32 %180, i32* %189
br label %190
190: ; preds = %179, %172
br label %191
191: ; preds = %190
%192 = load i32, i32* %6
%193 = add nsw i32 %192, -1
store i32 %193, i32* %6
br label %169
194: ; preds = %169
store i32 0, i32* %6
br label %195
195: ; preds = %217, %194
%196 = load i32, i32* %6
%197 = icmp slt i32 %196, 256
br i1 %197, label %198, label %220
198: ; preds = %195
%199 = load i32, i32* %6
%200 = load i32**, i32*** %10
%201 = load i32, i32* %5
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds i32*, i32** %200, i64 %202
%204 = load i32*, i32** %203
%205 = load i32**, i32*** %9
%206 = load i32, i32* %5
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds i32*, i32** %205, i64 %207
%209 = load i32*, i32** %208
%210 = load i32, i32* %6
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds i32, i32* %209, i64 %211
%213 = load i32, i32* %212
%214 = add nsw i32 %213, 128
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i32, i32* %204, i64 %215
store i32 %199, i32* %216
br label %217
217: ; preds = %198
%218 = load i32, i32* %6
%219 = add nsw i32 %218, 1
store i32 %219, i32* %6
br label %195
220: ; preds = %195
br label %221
221: ; preds = %220
%222 = load i32, i32* %5
%223 = add nsw i32 %222, 1
store i32 %223, i32* %5
br label %79
224: ; preds = %79
store i32 0, i32* %5
br label %225
225: ; preds = %262, %224
%226 = load i32, i32* %5
%227 = icmp slt i32 %226, 13
br i1 %227, label %228, label %265
228: ; preds = %225
store i32 0, i32* %6
br label %229
229: ; preds = %258, %228
%230 = load i32, i32* %6
%231 = icmp slt i32 %230, 256
br i1 %231, label %232, label %261
232: ; preds = %229
%233 = load i32**, i32*** %9
%234 = load i32, i32* %5
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds i32*, i32** %233, i64 %235
%237 = load i32*, i32** %236
%238 = load i32**, i32*** %10
%239 = load i32, i32* %5
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i32*, i32** %238, i64 %240
%242 = load i32*, i32** %241
%243 = load i32, i32* %6
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i32, i32* %242, i64 %244
%246 = load i32, i32* %245
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds i32, i32* %237, i64 %247
%249 = load i32, i32* %248
%250 = load i32, i32* %6
%251 = sub nsw i32 %250, 128
%252 = icmp ne i32 %249, %251
br i1 %252, label %253, label %257
253: ; preds = %232
%254 = load i32, i32* %5
%255 = load i32, i32* %6
%256 = call i32 @error_exit(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i32 %254, i32 %255)
br label %257
257: ; preds = %253, %232
br label %258
258: ; preds = %257
%259 = load i32, i32* %6
%260 = add nsw i32 %259, 1
store i32 %260, i32* %6
br label %229
261: ; preds = %229
br label %262
262: ; preds = %261
%263 = load i32, i32* %5
%264 = add nsw i32 %263, 1
store i32 %264, i32* %5
br label %225
265: ; preds = %225
%266 = load i32*, i32** %2
%267 = call i32 (i32*, i8*, ...) @fprintf(i32* %266, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 13, i32 256)
store i32 0, i32* %5
br label %268
268: ; preds = %316, %265
%269 = load i32, i32* %5
%270 = icmp slt i32 %269, 13
br i1 %270, label %271, label %319
271: ; preds = %268
%272 = load i32*, i32** %2
%273 = call i32 (i32*, i8*, ...) @fprintf(i32* %272, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %6
br label %274
274: ; preds = %289, %271
%275 = load i32, i32* %6
%276 = icmp slt i32 %275, 255
br i1 %276, label %277, label %292
277: ; preds = %274
%278 = load i32*, i32** %2
%279 = load i32**, i32*** %9
%280 = load i32, i32* %5
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds i32*, i32** %279, i64 %281
%283 = load i32*, i32** %282
%284 = load i32, i32* %6
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds i32, i32* %283, i64 %285
%287 = load i32, i32* %286
%288 = call i32 (i32*, i8*, ...) @fprintf(i32* %278, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %287)
br label %289
289: ; preds = %277
%290 = load i32, i32* %6
%291 = add nsw i32 %290, 1
store i32 %291, i32* %6
br label %274
292: ; preds = %274
%293 = load i32, i32* %5
%294 = icmp ne i32 %293, 12
br i1 %294, label %295, label %305
295: ; preds = %292
%296 = load i32*, i32** %2
%297 = load i32**, i32*** %9
%298 = load i32, i32* %5
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds i32*, i32** %297, i64 %299
%301 = load i32*, i32** %300
%302 = getelementptr inbounds i32, i32* %301, i64 255
%303 = load i32, i32* %302
%304 = call i32 (i32*, i8*, ...) @fprintf(i32* %296, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %303)
br label %315
305: ; preds = %292
%306 = load i32*, i32** %2
%307 = load i32**, i32*** %9
%308 = load i32, i32* %5
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds i32*, i32** %307, i64 %309
%311 = load i32*, i32** %310
%312 = getelementptr inbounds i32, i32* %311, i64 255
%313 = load i32, i32* %312
%314 = call i32 (i32*, i8*, ...) @fprintf(i32* %306, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %313)
br label %315
315: ; preds = %305, %295
br label %316
316: ; preds = %315
%317 = load i32, i32* %5
%318 = add nsw i32 %317, 1
store i32 %318, i32* %5
br label %268
319: ; preds = %268
%320 = load i32*, i32** %2
%321 = call i32 (i32*, i8*, ...) @fprintf(i32* %320, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%322 = load i32*, i32** %2
%323 = call i32 (i32*, i8*, ...) @fprintf(i32* %322, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i32 13, i32 256)
store i32 0, i32* %5
br label %324
324: ; preds = %372, %319
%325 = load i32, i32* %5
%326 = icmp slt i32 %325, 13
br i1 %326, label %327, label %375
327: ; preds = %324
%328 = load i32*, i32** %2
%329 = call i32 (i32*, i8*, ...) @fprintf(i32* %328, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %6
br label %330
330: ; preds = %345, %327
%331 = load i32, i32* %6
%332 = icmp slt i32 %331, 255
br i1 %332, label %333, label %348
333: ; preds = %330
%334 = load i32*, i32** %2
%335 = load i32**, i32*** %10
%336 = load i32, i32* %5
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds i32*, i32** %335, i64 %337
%339 = load i32*, i32** %338
%340 = load i32, i32* %6
%341 = sext i32 %340 to i64
%342 = getelementptr inbounds i32, i32* %339, i64 %341
%343 = load i32, i32* %342
%344 = call i32 (i32*, i8*, ...) @fprintf(i32* %334, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %343)
br label %345
345: ; preds = %333
%346 = load i32, i32* %6
%347 = add nsw i32 %346, 1
store i32 %347, i32* %6
br label %330
348: ; preds = %330
%349 = load i32, i32* %5
%350 = icmp ne i32 %349, 12
br i1 %350, label %351, label %361
351: ; preds = %348
%352 = load i32*, i32** %2
%353 = load i32**, i32*** %10
%354 = load i32, i32* %5
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds i32*, i32** %353, i64 %355
%357 = load i32*, i32** %356
%358 = getelementptr inbounds i32, i32* %357, i64 255
%359 = load i32, i32* %358
%360 = call i32 (i32*, i8*, ...) @fprintf(i32* %352, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %359)
br label %371
361: ; preds = %348
%362 = load i32*, i32** %2
%363 = load i32**, i32*** %10
%364 = load i32, i32* %5
%365 = sext i32 %364 to i64
%366 = getelementptr inbounds i32*, i32** %363, i64 %365
%367 = load i32*, i32** %366
%368 = getelementptr inbounds i32, i32* %367, i64 255
%369 = load i32, i32* %368
%370 = call i32 (i32*, i8*, ...) @fprintf(i32* %362, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %369)
br label %371
371: ; preds = %361, %351
br label %372
372: ; preds = %371
%373 = load i32, i32* %5
%374 = add nsw i32 %373, 1
store i32 %374, i32* %5
br label %324
375: ; preds = %324
%376 = load i32*, i32** %2
%377 = call i32 @fclose(i32* %376)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"bitshift.h\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [18 x i8] c"fopen(\22%s\22, \22%s\22)\00"
@.str.3 = [27 x i8] c"char ulaw_maxshift[%d] = {\00"
@.str.4 = [4 x i8] c"%d,\00"
@.str.5 = [7 x i8] c"%d};\0A\0A\00"
@.str.6 = [48 x i8] c"identity maping failed for shift: %d\09index: %d\0A\00"
@.str.7 = [31 x i8] c"schar ulaw_inward[%d][%d] = {\0A\00"
@.str.9 = [5 x i8] c"%ld,\00"
@.str.10 = [7 x i8] c"%ld},\0A\00"
@.str.11 = [9 x i8] c"%ld}\0A};\0A\00"
@.str.13 = [32 x i8] c"uchar ulaw_outward[%d][%d] = {\0A\00"
define i32 @main() {
%1 = alloca [256 x i32]
%2 = bitcast [256 x i32]* %1 to i8*
%3 = tail call i32** @long2d(i32 13, i32 256)
%4 = tail call i32** @long2d(i32 13, i32 256)
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = tail call i32 @perror_exit(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
br label %10
10: ; preds = %9, %10
%11 = phi i32 [ -32768, %9 ], [ %14, %10 ]
%12 = tail call i64 @Slinear2ulaw(i32 %11)
%13 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %12
store i32 0, i32* %13
%14 = add nsw i32 %11, 8
%15 = icmp slt i32 %11, 32760
br i1 %15, label %10, label %16
16: ; preds = %10, %16
%17 = phi i32 [ %20, %16 ], [ -32768, %10 ]
%18 = tail call i64 @Slinear2ulaw(i32 %17)
%19 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %18
store i32 1, i32* %19
%20 = add nsw i32 %17, 16
%21 = icmp slt i32 %17, 32752
br i1 %21, label %16, label %22
22: ; preds = %16, %22
%23 = phi i32 [ %26, %22 ], [ -32768, %16 ]
%24 = tail call i64 @Slinear2ulaw(i32 %23)
%25 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %24
store i32 2, i32* %25
%26 = add nsw i32 %23, 32
%27 = icmp slt i32 %23, 32736
br i1 %27, label %22, label %28
28: ; preds = %22, %28
%29 = phi i32 [ %32, %28 ], [ -32768, %22 ]
%30 = tail call i64 @Slinear2ulaw(i32 %29)
%31 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %30
store i32 3, i32* %31
%32 = add nsw i32 %29, 64
%33 = icmp slt i32 %29, 32704
br i1 %33, label %28, label %34
34: ; preds = %28, %34
%35 = phi i32 [ %38, %34 ], [ -32768, %28 ]
%36 = tail call i64 @Slinear2ulaw(i32 %35)
%37 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %36
store i32 4, i32* %37
%38 = add nsw i32 %35, 128
%39 = icmp slt i32 %35, 32640
br i1 %39, label %34, label %40
40: ; preds = %34, %40
%41 = phi i32 [ %44, %40 ], [ -32768, %34 ]
%42 = tail call i64 @Slinear2ulaw(i32 %41)
%43 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %42
store i32 5, i32* %43
%44 = add nsw i32 %41, 256
%45 = icmp slt i32 %41, 32512
br i1 %45, label %40, label %46
46: ; preds = %40, %46
%47 = phi i32 [ %50, %46 ], [ -32768, %40 ]
%48 = tail call i64 @Slinear2ulaw(i32 %47)
%49 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %48
store i32 6, i32* %49
%50 = add nsw i32 %47, 512
%51 = icmp slt i32 %47, 32256
br i1 %51, label %46, label %52
52: ; preds = %46, %52
%53 = phi i32 [ %56, %52 ], [ -32768, %46 ]
%54 = tail call i64 @Slinear2ulaw(i32 %53)
%55 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %54
store i32 7, i32* %55
%56 = add nsw i32 %53, 1024
%57 = icmp slt i32 %53, 31744
br i1 %57, label %52, label %58
58: ; preds = %52, %58
%59 = phi i32 [ %62, %58 ], [ -32768, %52 ]
%60 = tail call i64 @Slinear2ulaw(i32 %59)
%61 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %60
store i32 8, i32* %61
%62 = add nsw i32 %59, 2048
%63 = icmp slt i32 %59, 30720
br i1 %63, label %58, label %64
64: ; preds = %58
%65 = tail call i64 @Slinear2ulaw(i32 -32768)
%66 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %65
store i32 9, i32* %66
%67 = tail call i64 @Slinear2ulaw(i32 -28672)
%68 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %67
store i32 9, i32* %68
%69 = tail call i64 @Slinear2ulaw(i32 -24576)
%70 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %69
store i32 9, i32* %70
%71 = tail call i64 @Slinear2ulaw(i32 -20480)
%72 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %71
store i32 9, i32* %72
%73 = tail call i64 @Slinear2ulaw(i32 -16384)
%74 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %73
store i32 9, i32* %74
%75 = tail call i64 @Slinear2ulaw(i32 -12288)
%76 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %75
store i32 9, i32* %76
%77 = tail call i64 @Slinear2ulaw(i32 -8192)
%78 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %77
store i32 9, i32* %78
%79 = tail call i64 @Slinear2ulaw(i32 -4096)
%80 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %79
store i32 9, i32* %80
%81 = tail call i64 @Slinear2ulaw(i32 0)
%82 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %81
store i32 9, i32* %82
%83 = tail call i64 @Slinear2ulaw(i32 4096)
%84 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %83
store i32 9, i32* %84
%85 = tail call i64 @Slinear2ulaw(i32 8192)
%86 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %85
store i32 9, i32* %86
%87 = tail call i64 @Slinear2ulaw(i32 12288)
%88 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %87
store i32 9, i32* %88
%89 = tail call i64 @Slinear2ulaw(i32 16384)
%90 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %89
store i32 9, i32* %90
%91 = tail call i64 @Slinear2ulaw(i32 20480)
%92 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %91
store i32 9, i32* %92
%93 = tail call i64 @Slinear2ulaw(i32 24576)
%94 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %93
store i32 9, i32* %94
%95 = tail call i64 @Slinear2ulaw(i32 28672)
%96 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %95
store i32 9, i32* %96
%97 = tail call i64 @Slinear2ulaw(i32 -32768)
%98 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %97
store i32 10, i32* %98
%99 = tail call i64 @Slinear2ulaw(i32 -24576)
%100 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %99
store i32 10, i32* %100
%101 = tail call i64 @Slinear2ulaw(i32 -16384)
%102 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %101
store i32 10, i32* %102
%103 = tail call i64 @Slinear2ulaw(i32 -8192)
%104 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %103
store i32 10, i32* %104
%105 = tail call i64 @Slinear2ulaw(i32 0)
%106 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %105
store i32 10, i32* %106
%107 = tail call i64 @Slinear2ulaw(i32 8192)
%108 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %107
store i32 10, i32* %108
%109 = tail call i64 @Slinear2ulaw(i32 16384)
%110 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %109
store i32 10, i32* %110
%111 = tail call i64 @Slinear2ulaw(i32 24576)
%112 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %111
store i32 10, i32* %112
%113 = tail call i64 @Slinear2ulaw(i32 -32768)
%114 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %113
store i32 11, i32* %114
%115 = tail call i64 @Slinear2ulaw(i32 -16384)
%116 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %115
store i32 11, i32* %116
%117 = tail call i64 @Slinear2ulaw(i32 0)
%118 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %117
store i32 11, i32* %118
%119 = tail call i64 @Slinear2ulaw(i32 16384)
%120 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %119
store i32 11, i32* %120
%121 = tail call i64 @Slinear2ulaw(i32 -32768)
%122 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %121
store i32 12, i32* %122
%123 = tail call i64 @Slinear2ulaw(i32 0)
%124 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %123
store i32 12, i32* %124
%125 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 256)
br label %126
126: ; preds = %64, %126
%127 = phi i64 [ 0, %64 ], [ %131, %126 ]
%128 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %127
%129 = load i32, i32* %128
%130 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %129)
%131 = add nuw nsw i64 %127, 1
%132 = icmp eq i64 %131, 255
br i1 %132, label %133, label %126
133: ; preds = %126
%134 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 255
%135 = load i32, i32* %134
%136 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %135)
br label %137
137: ; preds = %133, %282
%138 = phi i64 [ 0, %133 ], [ %283, %282 ]
%139 = getelementptr inbounds i32*, i32** %3, i64 %138
br label %140
140: ; preds = %162, %137
%141 = phi i64 [ 255, %137 ], [ %164, %162 ]
%142 = phi i32 [ 0, %137 ], [ %163, %162 ]
%143 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %141
%144 = load i32, i32* %143
%145 = sext i32 %144 to i64
%146 = icmp sgt i64 %138, %145
br i1 %146, label %151, label %147
147: ; preds = %140
%148 = add nsw i32 %142, 1
%149 = load i32*, i32** %139
%150 = getelementptr inbounds i32, i32* %149, i64 %141
store i32 %142, i32* %150
br label %151
151: ; preds = %140, %147
%152 = phi i32 [ %148, %147 ], [ %142, %140 ]
%153 = add nsw i64 %141, -1
%154 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %153
%155 = load i32, i32* %154
%156 = sext i32 %155 to i64
%157 = icmp sgt i64 %138, %156
br i1 %157, label %162, label %158
158: ; preds = %151
%159 = add nsw i32 %152, 1
%160 = load i32*, i32** %139
%161 = getelementptr inbounds i32, i32* %160, i64 %153
store i32 %152, i32* %161
br label %162
162: ; preds = %158, %151
%163 = phi i32 [ %159, %158 ], [ %152, %151 ]
%164 = add nsw i64 %141, -2
%165 = icmp ugt i64 %153, 128
br i1 %165, label %140, label %166
166: ; preds = %162, %188
%167 = phi i64 [ %190, %188 ], [ 255, %162 ]
%168 = phi i32 [ %189, %188 ], [ %163, %162 ]
%169 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %167
%170 = load i32, i32* %169
%171 = sext i32 %170 to i64
%172 = icmp sgt i64 %138, %171
br i1 %172, label %173, label %177
173: ; preds = %166
%174 = add nsw i32 %168, 1
%175 = load i32*, i32** %139
%176 = getelementptr inbounds i32, i32* %175, i64 %167
store i32 %168, i32* %176
br label %177
177: ; preds = %166, %173
%178 = phi i32 [ %174, %173 ], [ %168, %166 ]
%179 = add nsw i64 %167, -1
%180 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %179
%181 = load i32, i32* %180
%182 = sext i32 %181 to i64
%183 = icmp sgt i64 %138, %182
br i1 %183, label %184, label %188
184: ; preds = %177
%185 = add nsw i32 %178, 1
%186 = load i32*, i32** %139
%187 = getelementptr inbounds i32, i32* %186, i64 %179
store i32 %178, i32* %187
br label %188
188: ; preds = %184, %177
%189 = phi i32 [ %185, %184 ], [ %178, %177 ]
%190 = add nsw i64 %167, -2
%191 = icmp ugt i64 %179, 128
br i1 %191, label %166, label %192
192: ; preds = %188, %216
%193 = phi i64 [ %218, %216 ], [ 126, %188 ]
%194 = phi i32 [ %217, %216 ], [ -1, %188 ]
%195 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %193
%196 = load i32, i32* %195
%197 = sext i32 %196 to i64
%198 = icmp sgt i64 %138, %197
br i1 %198, label %203, label %199
199: ; preds = %192
%200 = add nsw i32 %194, -1
%201 = load i32*, i32** %139
%202 = getelementptr inbounds i32, i32* %201, i64 %193
store i32 %194, i32* %202
br label %203
203: ; preds = %192, %199
%204 = phi i32 [ %200, %199 ], [ %194, %192 ]
%205 = add nsw i64 %193, -1
%206 = icmp eq i64 %193, 0
br i1 %206, label %219, label %207
207: ; preds = %203
%208 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %205
%209 = load i32, i32* %208
%210 = sext i32 %209 to i64
%211 = icmp sgt i64 %138, %210
br i1 %211, label %216, label %212
212: ; preds = %207
%213 = add nsw i32 %204, -1
%214 = load i32*, i32** %139
%215 = getelementptr inbounds i32, i32* %214, i64 %205
store i32 %204, i32* %215
br label %216
216: ; preds = %212, %207
%217 = phi i32 [ %213, %212 ], [ %204, %207 ]
%218 = add nsw i64 %193, -2
br label %192
219: ; preds = %203
%220 = add nsw i32 %204, -1
%221 = load i32*, i32** %139
%222 = getelementptr inbounds i32, i32* %221, i64 127
store i32 %204, i32* %222
br label %226
223: ; preds = %236
%224 = getelementptr inbounds i32*, i32** %4, i64 %138
%225 = load i32*, i32** %224
br label %251
226: ; preds = %248, %219
%227 = phi i64 [ 126, %219 ], [ %250, %248 ]
%228 = phi i32 [ %220, %219 ], [ %249, %248 ]
%229 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %227
%230 = load i32, i32* %229
%231 = sext i32 %230 to i64
%232 = icmp sgt i64 %138, %231
br i1 %232, label %233, label %236
233: ; preds = %226
%234 = add nsw i32 %228, -1
%235 = getelementptr inbounds i32, i32* %221, i64 %227
store i32 %228, i32* %235
br label %236
236: ; preds = %226, %233
%237 = phi i32 [ %234, %233 ], [ %228, %226 ]
%238 = add nsw i64 %227, -1
%239 = icmp eq i64 %227, 0
br i1 %239, label %223, label %240
240: ; preds = %236
%241 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 %238
%242 = load i32, i32* %241
%243 = sext i32 %242 to i64
%244 = icmp sgt i64 %138, %243
br i1 %244, label %245, label %248
245: ; preds = %240
%246 = add nsw i32 %237, -1
%247 = getelementptr inbounds i32, i32* %221, i64 %238
store i32 %237, i32* %247
br label %248
248: ; preds = %245, %240
%249 = phi i32 [ %246, %245 ], [ %237, %240 ]
%250 = add nsw i64 %227, -2
br label %226
251: ; preds = %251, %223
%252 = phi i64 [ 0, %223 ], [ %280, %251 ]
%253 = getelementptr inbounds i32, i32* %221, i64 %252
%254 = load i32, i32* %253
%255 = add nsw i32 %254, 128
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds i32, i32* %225, i64 %256
%258 = trunc i64 %252 to i32
store i32 %258, i32* %257
%259 = or i64 %252, 1
%260 = getelementptr inbounds i32, i32* %221, i64 %259
%261 = load i32, i32* %260
%262 = add nsw i32 %261, 128
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds i32, i32* %225, i64 %263
%265 = trunc i64 %259 to i32
store i32 %265, i32* %264
%266 = or i64 %252, 2
%267 = getelementptr inbounds i32, i32* %221, i64 %266
%268 = load i32, i32* %267
%269 = add nsw i32 %268, 128
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds i32, i32* %225, i64 %270
%272 = trunc i64 %266 to i32
store i32 %272, i32* %271
%273 = or i64 %252, 3
%274 = getelementptr inbounds i32, i32* %221, i64 %273
%275 = load i32, i32* %274
%276 = add nsw i32 %275, 128
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds i32, i32* %225, i64 %277
%279 = trunc i64 %273 to i32
store i32 %279, i32* %278
%280 = add nuw nsw i64 %252, 4
%281 = icmp eq i64 %280, 256
br i1 %281, label %282, label %251
282: ; preds = %251
%283 = add nuw nsw i64 %138, 1
%284 = icmp eq i64 %283, 13
br i1 %284, label %285, label %137
285: ; preds = %282, %308
%286 = phi i64 [ %309, %308 ], [ 0, %282 ]
%287 = getelementptr inbounds i32*, i32** %3, i64 %286
%288 = getelementptr inbounds i32*, i32** %4, i64 %286
%289 = trunc i64 %286 to i32
br label %290
290: ; preds = %285, %305
%291 = phi i64 [ 0, %285 ], [ %306, %305 ]
%292 = load i32*, i32** %287
%293 = load i32*, i32** %288
%294 = getelementptr inbounds i32, i32* %293, i64 %291
%295 = load i32, i32* %294
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds i32, i32* %292, i64 %296
%298 = load i32, i32* %297
%299 = trunc i64 %291 to i32
%300 = add i32 %299, -128
%301 = icmp eq i32 %298, %300
br i1 %301, label %305, label %302
302: ; preds = %290
%303 = trunc i64 %291 to i32
%304 = tail call i32 @error_exit(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i32 %289, i32 %303)
br label %305
305: ; preds = %290, %302
%306 = add nuw nsw i64 %291, 1
%307 = icmp eq i64 %306, 256
br i1 %307, label %308, label %290
308: ; preds = %305
%309 = add nuw nsw i64 %286, 1
%310 = icmp eq i64 %309, 13
br i1 %310, label %311, label %285
311: ; preds = %308
%312 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 13, i32 256)
%313 = getelementptr inbounds i32*, i32** %3, i64 12
br label %314
314: ; preds = %328, %311
%315 = phi i64 [ 0, %311 ], [ %333, %328 ]
%316 = tail call i32 @fputc(i32 123, i32* %5)
%317 = getelementptr inbounds i32*, i32** %3, i64 %315
br label %318
318: ; preds = %314, %318
%319 = phi i64 [ 0, %314 ], [ %324, %318 ]
%320 = load i32*, i32** %317
%321 = getelementptr inbounds i32, i32* %320, i64 %319
%322 = load i32, i32* %321
%323 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %322)
%324 = add nuw nsw i64 %319, 1
%325 = icmp eq i64 %324, 255
br i1 %325, label %326, label %318
326: ; preds = %318
%327 = icmp eq i64 %315, 12
br i1 %327, label %334, label %328
328: ; preds = %326
%329 = load i32*, i32** %317
%330 = getelementptr inbounds i32, i32* %329, i64 255
%331 = load i32, i32* %330
%332 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %331)
%333 = add nuw nsw i64 %315, 1
br label %314
334: ; preds = %326
%335 = load i32*, i32** %313
%336 = getelementptr inbounds i32, i32* %335, i64 255
%337 = load i32, i32* %336
%338 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %337)
%339 = tail call i32 @fputc(i32 10, i32* %5)
%340 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i32 13, i32 256)
br label %341
341: ; preds = %355, %334
%342 = phi i64 [ 0, %334 ], [ %360, %355 ]
%343 = tail call i32 @fputc(i32 123, i32* %5)
%344 = getelementptr inbounds i32*, i32** %4, i64 %342
br label %345
345: ; preds = %341, %345
%346 = phi i64 [ 0, %341 ], [ %351, %345 ]
%347 = load i32*, i32** %344
%348 = getelementptr inbounds i32, i32* %347, i64 %346
%349 = load i32, i32* %348
%350 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %349)
%351 = add nuw nsw i64 %346, 1
%352 = icmp eq i64 %351, 255
br i1 %352, label %353, label %345
353: ; preds = %345
%354 = icmp eq i64 %342, 12
br i1 %354, label %361, label %355
355: ; preds = %353
%356 = load i32*, i32** %344
%357 = getelementptr inbounds i32, i32* %356, i64 255
%358 = load i32, i32* %357
%359 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %358)
%360 = add nuw nsw i64 %342, 1
br label %341
361: ; preds = %353
%362 = getelementptr inbounds i32*, i32** %4, i64 12
%363 = load i32*, i32** %362
%364 = getelementptr inbounds i32, i32* %363, i64 255
%365 = load i32, i32* %364
%366 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %365)
%367 = tail call i32 @fclose(i32* %5)
ret i32 0
}