#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 */
char EOF;
int /*<<< orphan*/ SEEK_SET;
int asciiLog2(int);
int asciiToBinary(int);
int /*<<< orphan*/ formatHashValue(int, char *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
FILE *type0Totype2Converter(FILE *type0, FILE *type2) {
  int type = 0, minHashValue = 0, maxHashValue = 0, currentHashValue = 0,
      currentBinaryValue = 0, globalOffset = -1, bitsPerPosition = 0, value = 0,
      minHashTemp = 0;
  char currentHashValueFormatted[64];
  char ch, tempchar;
  while (((ch = getc(type0)) != EOF) && (ch != ',')) {
    type = type * 10 + (ch - '0');
  }
  if (type != 0) {
    printf("Incorrect input file type %d", type);
    return type2;
  }
  while (((ch = getc(type0)) != EOF) && (ch != ',')) {
    if ((ch >= '0') && (ch <= '9')) {
      minHashValue = minHashValue * 10 + (ch - '0');
    }
  }
  while (((ch = getc(type0)) != EOF) && (ch != ',') && (ch != '\n') &&
         (ch != '\r')) {
    if ((ch >= '0') && (ch <= '9')) {
      maxHashValue = maxHashValue * 10 + (ch - '0');
    }
  }
  while (((ch = getc(type0)) != EOF) && (ch != '\n') && (ch != '\r')) {
  }
  fprintf(type2, "2,%d,%d,", minHashValue, maxHashValue);
  ch = getc(type0);
  currentHashValue = 0;
  minHashTemp = minHashValue;
  while (ch != EOF && globalOffset == -1) {
    if (ch >= '0' && ch <= '9') {
      currentHashValue = currentHashValue * 10 + (ch - '0');
    } else if (ch == ' ') {
      if (currentHashValue > minHashTemp) {
        globalOffset = minHashTemp;
      } else {
        minHashTemp += 1;
      }
      currentHashValue = 0;
    } else {
      currentHashValue = 0;
    }
    ch = getc(type0);
  }
  bitsPerPosition = asciiLog2(maxHashValue);
  fprintf(type2, "%d,%d\n", bitsPerPosition, globalOffset);
  if (fseek(type0, 0, SEEK_SET) == 0) {
    ch = getc(type0);
    while (ch != EOF && ch != '\n' && ch != '\r') {
      ch = getc(type0);
    }
    ch = getc(type0);
    while (ch != EOF) {
      if (ch >= '0' && ch <= '9') {
        currentHashValue = currentHashValue * 10 + (ch - '0');
      } else if (ch == ' ') {
        for (value = minHashValue;
             value < currentHashValue && minHashValue >= globalOffset;
             value++) {
          currentBinaryValue = asciiToBinary(value - globalOffset);
          formatHashValue(currentBinaryValue, currentHashValueFormatted,
                          bitsPerPosition);
          fprintf(type2, "%s", currentHashValueFormatted);
        }
        minHashValue = currentHashValue + 1;
        currentHashValue = 0;
      } else {
        currentHashValue = 0;
      }
      ch = getc(type0);
    }
    if (currentHashValue != maxHashValue) {
      currentHashValue += 1;
      minHashValue = currentHashValue;
      for (value = minHashValue; value <= maxHashValue; value++) {
        currentBinaryValue = asciiToBinary(value - globalOffset);
        formatHashValue(currentBinaryValue, currentHashValueFormatted,
                        bitsPerPosition);
        fprintf(type2, "%s", currentHashValueFormatted);
      }
    }
  }
  return type2;
}


x86 assembly (clang, -O0):
<type0Totype2Converter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0xffffffff,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movsbl %al,%ecx
mov    0x2e0d(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x83(%rbp)
je     1201 <type0Totype2Converter+0x91>
movsbl -0x81(%rbp),%eax
cmp    $0x2c,%eax
setne  %al
mov    %al,-0x83(%rbp)
mov    -0x83(%rbp),%al
test   $0x1,%al
jne    1214 <type0Totype2Converter+0xa4>
jmp    122c <type0Totype2Converter+0xbc>
imul   $0xa,-0x1c(%rbp),%eax
movsbl -0x81(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    11c2 <type0Totype2Converter+0x52>
cmpl   $0x0,-0x1c(%rbp)
je     1252 <type0Totype2Converter+0xe2>
mov    -0x1c(%rbp),%esi
lea    0xdc0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1782 <type0Totype2Converter+0x612>
jmp    1257 <type0Totype2Converter+0xe7>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movsbl %al,%ecx
mov    0x2d78(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x84(%rbp)
je     1296 <type0Totype2Converter+0x126>
movsbl -0x81(%rbp),%eax
cmp    $0x2c,%eax
setne  %al
mov    %al,-0x84(%rbp)
mov    -0x84(%rbp),%al
test   $0x1,%al
jne    12a9 <type0Totype2Converter+0x139>
jmp    12e1 <type0Totype2Converter+0x171>
movsbl -0x81(%rbp),%eax
cmp    $0x30,%eax
jl     12dc <type0Totype2Converter+0x16c>
movsbl -0x81(%rbp),%eax
cmp    $0x39,%eax
jg     12dc <type0Totype2Converter+0x16c>
imul   $0xa,-0x20(%rbp),%eax
movsbl -0x81(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
jmp    1257 <type0Totype2Converter+0xe7>
jmp    12e6 <type0Totype2Converter+0x176>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movsbl %al,%ecx
mov    0x2ce9(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x85(%rbp)
je     1355 <type0Totype2Converter+0x1e5>
movsbl -0x81(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2c,%ecx
mov    %al,-0x85(%rbp)
je     1355 <type0Totype2Converter+0x1e5>
movsbl -0x81(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x85(%rbp)
je     1355 <type0Totype2Converter+0x1e5>
movsbl -0x81(%rbp),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x85(%rbp)
mov    -0x85(%rbp),%al
test   $0x1,%al
jne    1368 <type0Totype2Converter+0x1f8>
jmp    13a0 <type0Totype2Converter+0x230>
movsbl -0x81(%rbp),%eax
cmp    $0x30,%eax
jl     139b <type0Totype2Converter+0x22b>
movsbl -0x81(%rbp),%eax
cmp    $0x39,%eax
jg     139b <type0Totype2Converter+0x22b>
imul   $0xa,-0x24(%rbp),%eax
movsbl -0x81(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    12e6 <type0Totype2Converter+0x176>
jmp    13a5 <type0Totype2Converter+0x235>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movsbl %al,%ecx
mov    0x2c2a(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x86(%rbp)
je     13fc <type0Totype2Converter+0x28c>
movsbl -0x81(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x86(%rbp)
je     13fc <type0Totype2Converter+0x28c>
movsbl -0x81(%rbp),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x86(%rbp)
mov    -0x86(%rbp),%al
test   $0x1,%al
jne    140f <type0Totype2Converter+0x29f>
jmp    1414 <type0Totype2Converter+0x2a4>
jmp    13a5 <type0Totype2Converter+0x235>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xbf8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movsbl -0x81(%rbp),%ecx
mov    0x2b92(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x87(%rbp)
je     1476 <type0Totype2Converter+0x306>
cmpl   $0xffffffff,-0x30(%rbp)
sete   %al
mov    %al,-0x87(%rbp)
mov    -0x87(%rbp),%al
test   $0x1,%al
jne    1489 <type0Totype2Converter+0x319>
jmp    151d <type0Totype2Converter+0x3ad>
movsbl -0x81(%rbp),%eax
cmp    $0x30,%eax
jl     14c1 <type0Totype2Converter+0x351>
movsbl -0x81(%rbp),%eax
cmp    $0x39,%eax
jg     14c1 <type0Totype2Converter+0x351>
imul   $0xa,-0x28(%rbp),%eax
movsbl -0x81(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
jmp    1509 <type0Totype2Converter+0x399>
movsbl -0x81(%rbp),%eax
cmp    $0x20,%eax
jne    14fd <type0Totype2Converter+0x38d>
mov    -0x28(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jle    14e8 <type0Totype2Converter+0x378>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    14f1 <type0Totype2Converter+0x381>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x28(%rbp)
jmp    1504 <type0Totype2Converter+0x394>
movl   $0x0,-0x28(%rbp)
jmp    1509 <type0Totype2Converter+0x399>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
jmp    1448 <type0Totype2Converter+0x2d8>
mov    -0x24(%rbp),%edi
call   1050 <asciiLog2@plt>
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xaed(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    0x2a8d(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1070 <fseek@plt>
cmp    $0x0,%rax
jne    177a <type0Totype2Converter+0x60a>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movsbl -0x81(%rbp),%ecx
mov    0x2a6d(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x88(%rbp)
je     15b9 <type0Totype2Converter+0x449>
movsbl -0x81(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x88(%rbp)
je     15b9 <type0Totype2Converter+0x449>
movsbl -0x81(%rbp),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x88(%rbp)
mov    -0x88(%rbp),%al
test   $0x1,%al
jne    15cc <type0Totype2Converter+0x45c>
jmp    15e0 <type0Totype2Converter+0x470>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
jmp    156d <type0Totype2Converter+0x3fd>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
movsbl -0x81(%rbp),%eax
mov    0x29eb(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1702 <type0Totype2Converter+0x592>
movsbl -0x81(%rbp),%eax
cmp    $0x30,%eax
jl     1640 <type0Totype2Converter+0x4d0>
movsbl -0x81(%rbp),%eax
cmp    $0x39,%eax
jg     1640 <type0Totype2Converter+0x4d0>
imul   $0xa,-0x28(%rbp),%eax
movsbl -0x81(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
jmp    16ee <type0Totype2Converter+0x57e>
movsbl -0x81(%rbp),%eax
cmp    $0x20,%eax
jne    16e2 <type0Totype2Converter+0x572>
mov    -0x20(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
xor    %eax,%eax
cmp    -0x28(%rbp),%ecx
mov    %al,-0x89(%rbp)
jge    1679 <type0Totype2Converter+0x509>
mov    -0x20(%rbp),%eax
cmp    -0x30(%rbp),%eax
setge  %al
mov    %al,-0x89(%rbp)
mov    -0x89(%rbp),%al
test   $0x1,%al
jne    168c <type0Totype2Converter+0x51c>
jmp    16cd <type0Totype2Converter+0x55d>
mov    -0x38(%rbp),%edi
sub    -0x30(%rbp),%edi
call   1040 <asciiToBinary@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1080 <formatHashValue@plt>
mov    -0x18(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0x975(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1656 <type0Totype2Converter+0x4e6>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
jmp    16e9 <type0Totype2Converter+0x579>
movl   $0x0,-0x28(%rbp)
jmp    16ee <type0Totype2Converter+0x57e>
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %al,-0x81(%rbp)
jmp    15ef <type0Totype2Converter+0x47f>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1775 <type0Totype2Converter+0x605>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1770 <type0Totype2Converter+0x600>
mov    -0x38(%rbp),%edi
sub    -0x30(%rbp),%edi
call   1040 <asciiToBinary@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1080 <formatHashValue@plt>
mov    -0x18(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0x8d2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1723 <type0Totype2Converter+0x5b3>
jmp    1775 <type0Totype2Converter+0x605>
jmp    177a <type0Totype2Converter+0x60a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type0Totype2Converter>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r12
mov    %rdi,%r13
call   10a0 <getc@plt>
mov    0x2e48(%rip),%r14
cmp    $0x2c,%al
je     11e4 <type0Totype2Converter+0x64>
cmp    (%r14),%al
je     11e4 <type0Totype2Converter+0x64>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl %al,%eax
lea    (%rbx,%rbx,4),%ecx
lea    (%rax,%rcx,2),%ebx
add    $0xffffffd0,%ebx
mov    %r13,%rdi
call   10a0 <getc@plt>
cmp    $0x2c,%al
je     11cd <type0Totype2Converter+0x4d>
cmp    (%r14),%al
jne    11b0 <type0Totype2Converter+0x30>
test   %ebx,%ebx
je     11e4 <type0Totype2Converter+0x64>
lea    0xe28(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1427 <type0Totype2Converter+0x2a7>
mov    %r13,%rdi
call   10a0 <getc@plt>
xor    %ebx,%ebx
mov    $0x0,%ebp
cmp    $0x2c,%al
je     1236 <type0Totype2Converter+0xb6>
mov    $0x0,%ebp
cmp    (%r14),%al
je     1236 <type0Totype2Converter+0xb6>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%ecx
movsbl %al,%eax
lea    -0x30(%rax),%edx
cmp    $0xa,%dl
lea    (%rcx,%rcx,4),%edx
lea    -0x30(%rax,%rdx,2),%ebp
cmovae %ecx,%ebp
mov    %r13,%rdi
call   10a0 <getc@plt>
cmp    $0x2c,%al
je     1236 <type0Totype2Converter+0xb6>
cmp    (%r14),%al
jne    1210 <type0Totype2Converter+0x90>
mov    %r13,%rdi
call   10a0 <getc@plt>
cmp    (%r14),%al
je     128f <type0Totype2Converter+0x10f>
xor    %ecx,%ecx
movabs $0x100000002400,%r15
jmp    1280 <type0Totype2Converter+0x100>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edx
add    $0xd0,%al
cmp    $0xa,%al
lea    (%rcx,%rcx,4),%eax
lea    -0x30(%rdx,%rax,2),%ebx
cmovae %ecx,%ebx
mov    %r13,%rdi
call   10a0 <getc@plt>
mov    %ebx,%ecx
cmp    (%r14),%al
je     128f <type0Totype2Converter+0x10f>
cmp    $0x2c,%al
ja     1260 <type0Totype2Converter+0xe0>
movzbl %al,%edx
bt     %rdx,%r15
jae    1260 <type0Totype2Converter+0xe0>
mov    %ecx,%ebx
mov    %ebx,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
call   10a0 <getc@plt>
cmp    (%r14),%al
je     12b5 <type0Totype2Converter+0x135>
cmp    $0xd,%al
je     12b5 <type0Totype2Converter+0x135>
cmp    $0xa,%al
jne    12a0 <type0Totype2Converter+0x120>
lea    0xd61(%rip),%rsi
xor    %r15d,%r15d
mov    %r12,%rdi
mov    %ebp,%edx
mov    0x8(%rsp),%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r13,%rdi
call   10a0 <getc@plt>
mov    $0xffffffff,%ebx
cmp    (%r14),%al
je     1348 <type0Totype2Converter+0x1c8>
xor    %r15d,%r15d
mov    %ebp,%r14d
nopw   0x0(%rax,%rax,1)
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     1310 <type0Totype2Converter+0x190>
movzbl %al,%eax
lea    (%r15,%r15,4),%ecx
lea    (%rax,%rcx,2),%r15d
add    $0xffffffd0,%r15d
mov    $0xffffffff,%ebx
jmp    1330 <type0Totype2Converter+0x1b0>
xchg   %ax,%ax
mov    $0xffffffff,%ebx
cmp    $0x20,%al
jne    132d <type0Totype2Converter+0x1ad>
xor    %eax,%eax
cmp    %r14d,%r15d
setle  %al
mov    $0xffffffff,%ebx
cmovg  %r14d,%ebx
add    %eax,%r14d
xor    %r15d,%r15d
mov    %r13,%rdi
call   10a0 <getc@plt>
mov    0x2ca9(%rip),%rcx
cmp    (%rcx),%al
je     1348 <type0Totype2Converter+0x1c8>
cmp    $0xffffffff,%ebx
je     12f0 <type0Totype2Converter+0x170>
mov    0x8(%rsp),%edi
call   1060 <asciiLog2@plt>
mov    %eax,%r14d
lea    0xccb(%rip),%rsi
mov    %r12,%rdi
mov    %eax,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2c68(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1080 <fseek@plt>
test   %rax,%rax
jne    1427 <type0Totype2Converter+0x2a7>
mov    %r14d,0xc(%rsp)
mov    %ebx,0x4(%rsp)
mov    %r13,%rdi
call   10a0 <getc@plt>
mov    0x2c4b(%rip),%rbx
cmp    (%rbx),%al
je     13c4 <type0Totype2Converter+0x244>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0xa,%al
je     13c4 <type0Totype2Converter+0x244>
cmp    $0xd,%al
je     13c4 <type0Totype2Converter+0x244>
mov    %r13,%rdi
call   10a0 <getc@plt>
cmp    (%rbx),%al
jne    13b0 <type0Totype2Converter+0x230>
mov    %r12,0x10(%rsp)
mov    %r13,%rdi
call   10a0 <getc@plt>
cmp    (%rbx),%al
mov    0x4(%rsp),%ecx
jne    1439 <type0Totype2Converter+0x2b9>
mov    %r15d,%ebx
mov    0x8(%rsp),%ebp
cmp    %ebp,%ebx
mov    0x10(%rsp),%r12
mov    0xc(%rsp),%r15d
jge    1427 <type0Totype2Converter+0x2a7>
sub    %ebx,%ebp
sub    0x4(%rsp),%ebx
add    $0x1,%ebx
lea    0x20(%rsp),%r14
nopl   0x0(%rax)
mov    %ebx,%edi
call   1050 <asciiToBinary@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %r15d,%edx
call   1090 <formatHashValue@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <fputs@plt>
add    $0x1,%ebx
add    $0xffffffff,%ebp
jne    1400 <type0Totype2Converter+0x280>
mov    %r12,%rax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15,%r14
mov    %r13,0x18(%rsp)
mov    %ecx,%r13d
neg    %r13d
lea    0x20(%rsp),%r15
mov    0xc(%rsp),%r12d
jmp    1489 <type0Totype2Converter+0x309>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl %al,%eax
lea    (%r14,%r14,4),%ecx
lea    (%rax,%rcx,2),%ebx
add    $0xffffffd0,%ebx
mov    0x18(%rsp),%rdi
call   10a0 <getc@plt>
mov    %ebx,%r14d
mov    0x2b67(%rip),%rcx
cmp    (%rcx),%al
je     13dc <type0Totype2Converter+0x25c>
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
jbe    1460 <type0Totype2Converter+0x2e0>
xor    %ebx,%ebx
cmp    $0x20,%al
jne    146d <type0Totype2Converter+0x2ed>
cmp    %r14d,%ebp
mov    0x10(%rsp),%rbx
jge    14da <type0Totype2Converter+0x35a>
cmp    0x4(%rsp),%ebp
jl     14da <type0Totype2Converter+0x35a>
nopw   0x0(%rax,%rax,1)
lea    0x0(%r13,%rbp,1),%edi
call   1050 <asciiToBinary@plt>
mov    %eax,%edi
mov    %r15,%rsi
mov    %r12d,%edx
call   1090 <formatHashValue@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <fputs@plt>
add    $0x1,%ebp
cmp    %r14d,%ebp
jl     14b0 <type0Totype2Converter+0x330>
add    $0x1,%r14d
mov    %r14d,%ebp
xor    %ebx,%ebx
jmp    146d <type0Totype2Converter+0x2ed>

LLVM IR (-O0):
@EOF = global i8 0
@.str = [29 x i8] c"Incorrect input file type %d\00"
@.str.1 = [9 x i8] c"2,%d,%d,\00"
@.str.2 = [7 x i8] c"%d,%d\0A\00"
@SEEK_SET = global i32 0
@.str.3 = [3 x i8] c"%s\00"
define i32* @type0Totype2Converter(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [64 x i8]
%16 = alloca i8
%17 = alloca i8
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 -1, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
br label %18
18: ; preds = %31, %2
%19 = load i32*, i32** %4
%20 = call signext i8 @getc(i32* %19)
store i8 %20, i8* %16
%21 = sext i8 %20 to i32
%22 = load i8, i8* @EOF
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %21, %23
br i1 %24, label %25, label %29
25: ; preds = %18
%26 = load i8, i8* %16
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 44
br label %29
29: ; preds = %25, %18
%30 = phi i1 [ false, %18 ], [ %28, %25 ]
br i1 %30, label %31, label %38
31: ; preds = %29
%32 = load i32, i32* %6
%33 = mul nsw i32 %32, 10
%34 = load i8, i8* %16
%35 = sext i8 %34 to i32
%36 = sub nsw i32 %35, 48
%37 = add nsw i32 %33, %36
store i32 %37, i32* %6
br label %18
38: ; preds = %29
%39 = load i32, i32* %6
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %38
%42 = load i32, i32* %6
%43 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %42)
%44 = load i32*, i32** %5
store i32* %44, i32** %3
br label %313
45: ; preds = %38
br label %46
46: ; preds = %74, %45
%47 = load i32*, i32** %4
%48 = call signext i8 @getc(i32* %47)
store i8 %48, i8* %16
%49 = sext i8 %48 to i32
%50 = load i8, i8* @EOF
%51 = sext i8 %50 to i32
%52 = icmp ne i32 %49, %51
br i1 %52, label %53, label %57
53: ; preds = %46
%54 = load i8, i8* %16
%55 = sext i8 %54 to i32
%56 = icmp ne i32 %55, 44
br label %57
57: ; preds = %53, %46
%58 = phi i1 [ false, %46 ], [ %56, %53 ]
br i1 %58, label %59, label %75
59: ; preds = %57
%60 = load i8, i8* %16
%61 = sext i8 %60 to i32
%62 = icmp sge i32 %61, 48
br i1 %62, label %63, label %74
63: ; preds = %59
%64 = load i8, i8* %16
%65 = sext i8 %64 to i32
%66 = icmp sle i32 %65, 57
br i1 %66, label %67, label %74
67: ; preds = %63
%68 = load i32, i32* %7
%69 = mul nsw i32 %68, 10
%70 = load i8, i8* %16
%71 = sext i8 %70 to i32
%72 = sub nsw i32 %71, 48
%73 = add nsw i32 %69, %72
store i32 %73, i32* %7
br label %74
74: ; preds = %67, %63, %59
br label %46
75: ; preds = %57
br label %76
76: ; preds = %112, %75
%77 = load i32*, i32** %4
%78 = call signext i8 @getc(i32* %77)
store i8 %78, i8* %16
%79 = sext i8 %78 to i32
%80 = load i8, i8* @EOF
%81 = sext i8 %80 to i32
%82 = icmp ne i32 %79, %81
br i1 %82, label %83, label %95
83: ; preds = %76
%84 = load i8, i8* %16
%85 = sext i8 %84 to i32
%86 = icmp ne i32 %85, 44
br i1 %86, label %87, label %95
87: ; preds = %83
%88 = load i8, i8* %16
%89 = sext i8 %88 to i32
%90 = icmp ne i32 %89, 10
br i1 %90, label %91, label %95
91: ; preds = %87
%92 = load i8, i8* %16
%93 = sext i8 %92 to i32
%94 = icmp ne i32 %93, 13
br label %95
95: ; preds = %91, %87, %83, %76
%96 = phi i1 [ false, %87 ], [ false, %83 ], [ false, %76 ], [ %94, %91 ]
br i1 %96, label %97, label %113
97: ; preds = %95
%98 = load i8, i8* %16
%99 = sext i8 %98 to i32
%100 = icmp sge i32 %99, 48
br i1 %100, label %101, label %112
101: ; preds = %97
%102 = load i8, i8* %16
%103 = sext i8 %102 to i32
%104 = icmp sle i32 %103, 57
br i1 %104, label %105, label %112
105: ; preds = %101
%106 = load i32, i32* %8
%107 = mul nsw i32 %106, 10
%108 = load i8, i8* %16
%109 = sext i8 %108 to i32
%110 = sub nsw i32 %109, 48
%111 = add nsw i32 %107, %110
store i32 %111, i32* %8
br label %112
112: ; preds = %105, %101, %97
br label %76
113: ; preds = %95
br label %114
114: ; preds = %131, %113
%115 = load i32*, i32** %4
%116 = call signext i8 @getc(i32* %115)
store i8 %116, i8* %16
%117 = sext i8 %116 to i32
%118 = load i8, i8* @EOF
%119 = sext i8 %118 to i32
%120 = icmp ne i32 %117, %119
br i1 %120, label %121, label %129
121: ; preds = %114
%122 = load i8, i8* %16
%123 = sext i8 %122 to i32
%124 = icmp ne i32 %123, 10
br i1 %124, label %125, label %129
125: ; preds = %121
%126 = load i8, i8* %16
%127 = sext i8 %126 to i32
%128 = icmp ne i32 %127, 13
br label %129
129: ; preds = %125, %121, %114
%130 = phi i1 [ false, %121 ], [ false, %114 ], [ %128, %125 ]
br i1 %130, label %131, label %132
131: ; preds = %129
br label %114
132: ; preds = %129
%133 = load i32*, i32** %5
%134 = load i32, i32* %7
%135 = load i32, i32* %8
%136 = call i32 (i32*, i8*, ...) @fprintf(i32* %133, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %134, i32 %135)
%137 = load i32*, i32** %4
%138 = call signext i8 @getc(i32* %137)
store i8 %138, i8* %16
store i32 0, i32* %9
%139 = load i32, i32* %7
store i32 %139, i32* %14
br label %140
140: ; preds = %182, %132
%141 = load i8, i8* %16
%142 = sext i8 %141 to i32
%143 = load i8, i8* @EOF
%144 = sext i8 %143 to i32
%145 = icmp ne i32 %142, %144
br i1 %145, label %146, label %149
146: ; preds = %140
%147 = load i32, i32* %11
%148 = icmp eq i32 %147, -1
br label %149
149: ; preds = %146, %140
%150 = phi i1 [ false, %140 ], [ %148, %146 ]
br i1 %150, label %151, label %185
151: ; preds = %149
%152 = load i8, i8* %16
%153 = sext i8 %152 to i32
%154 = icmp sge i32 %153, 48
br i1 %154, label %155, label %166
155: ; preds = %151
%156 = load i8, i8* %16
%157 = sext i8 %156 to i32
%158 = icmp sle i32 %157, 57
br i1 %158, label %159, label %166
159: ; preds = %155
%160 = load i32, i32* %9
%161 = mul nsw i32 %160, 10
%162 = load i8, i8* %16
%163 = sext i8 %162 to i32
%164 = sub nsw i32 %163, 48
%165 = add nsw i32 %161, %164
store i32 %165, i32* %9
br label %182
166: ; preds = %155, %151
%167 = load i8, i8* %16
%168 = sext i8 %167 to i32
%169 = icmp eq i32 %168, 32
br i1 %169, label %170, label %180
170: ; preds = %166
%171 = load i32, i32* %9
%172 = load i32, i32* %14
%173 = icmp sgt i32 %171, %172
br i1 %173, label %174, label %176
174: ; preds = %170
%175 = load i32, i32* %14
store i32 %175, i32* %11
br label %179
176: ; preds = %170
%177 = load i32, i32* %14
%178 = add nsw i32 %177, 1
store i32 %178, i32* %14
br label %179
179: ; preds = %176, %174
store i32 0, i32* %9
br label %181
180: ; preds = %166
store i32 0, i32* %9
br label %181
181: ; preds = %180, %179
br label %182
182: ; preds = %181, %159
%183 = load i32*, i32** %4
%184 = call signext i8 @getc(i32* %183)
store i8 %184, i8* %16
br label %140
185: ; preds = %149
%186 = load i32, i32* %8
%187 = call i32 @asciiLog2(i32 %186)
store i32 %187, i32* %12
%188 = load i32*, i32** %5
%189 = load i32, i32* %12
%190 = load i32, i32* %11
%191 = call i32 (i32*, i8*, ...) @fprintf(i32* %188, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %189, i32 %190)
%192 = load i32*, i32** %4
%193 = load i32, i32* @SEEK_SET
%194 = call i64 @fseek(i32* %192, i32 0, i32 %193)
%195 = icmp eq i64 %194, 0
br i1 %195, label %196, label %311
196: ; preds = %185
%197 = load i32*, i32** %4
%198 = call signext i8 @getc(i32* %197)
store i8 %198, i8* %16
br label %199
199: ; preds = %215, %196
%200 = load i8, i8* %16
%201 = sext i8 %200 to i32
%202 = load i8, i8* @EOF
%203 = sext i8 %202 to i32
%204 = icmp ne i32 %201, %203
br i1 %204, label %205, label %213
205: ; preds = %199
%206 = load i8, i8* %16
%207 = sext i8 %206 to i32
%208 = icmp ne i32 %207, 10
br i1 %208, label %209, label %213
209: ; preds = %205
%210 = load i8, i8* %16
%211 = sext i8 %210 to i32
%212 = icmp ne i32 %211, 13
br label %213
213: ; preds = %209, %205, %199
%214 = phi i1 [ false, %205 ], [ false, %199 ], [ %212, %209 ]
br i1 %214, label %215, label %218
215: ; preds = %213
%216 = load i32*, i32** %4
%217 = call signext i8 @getc(i32* %216)
store i8 %217, i8* %16
br label %199
218: ; preds = %213
%219 = load i32*, i32** %4
%220 = call signext i8 @getc(i32* %219)
store i8 %220, i8* %16
br label %221
221: ; preds = %278, %218
%222 = load i8, i8* %16
%223 = sext i8 %222 to i32
%224 = load i8, i8* @EOF
%225 = sext i8 %224 to i32
%226 = icmp ne i32 %223, %225
br i1 %226, label %227, label %281
227: ; preds = %221
%228 = load i8, i8* %16
%229 = sext i8 %228 to i32
%230 = icmp sge i32 %229, 48
br i1 %230, label %231, label %242
231: ; preds = %227
%232 = load i8, i8* %16
%233 = sext i8 %232 to i32
%234 = icmp sle i32 %233, 57
br i1 %234, label %235, label %242
235: ; preds = %231
%236 = load i32, i32* %9
%237 = mul nsw i32 %236, 10
%238 = load i8, i8* %16
%239 = sext i8 %238 to i32
%240 = sub nsw i32 %239, 48
%241 = add nsw i32 %237, %240
store i32 %241, i32* %9
br label %278
242: ; preds = %231, %227
%243 = load i8, i8* %16
%244 = sext i8 %243 to i32
%245 = icmp eq i32 %244, 32
br i1 %245, label %246, label %276
246: ; preds = %242
%247 = load i32, i32* %7
store i32 %247, i32* %13
br label %248
248: ; preds = %270, %246
%249 = load i32, i32* %13
%250 = load i32, i32* %9
%251 = icmp slt i32 %249, %250
br i1 %251, label %252, label %256
252: ; preds = %248
%253 = load i32, i32* %7
%254 = load i32, i32* %11
%255 = icmp sge i32 %253, %254
br label %256
256: ; preds = %252, %248
%257 = phi i1 [ false, %248 ], [ %255, %252 ]
br i1 %257, label %258, label %273
258: ; preds = %256
%259 = load i32, i32* %13
%260 = load i32, i32* %11
%261 = sub nsw i32 %259, %260
%262 = call i32 @asciiToBinary(i32 %261)
store i32 %262, i32* %10
%263 = load i32, i32* %10
%264 = getelementptr inbounds [64 x i8], [64 x i8]* %15, i64 0, i64 0
%265 = load i32, i32* %12
%266 = call i32 @formatHashValue(i32 %263, i8* %264, i32 %265)
%267 = load i32*, i32** %5
%268 = getelementptr inbounds [64 x i8], [64 x i8]* %15, i64 0, i64 0
%269 = call i32 (i32*, i8*, ...) @fprintf(i32* %267, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %268)
br label %270
270: ; preds = %258
%271 = load i32, i32* %13
%272 = add nsw i32 %271, 1
store i32 %272, i32* %13
br label %248
273: ; preds = %256
%274 = load i32, i32* %9
%275 = add nsw i32 %274, 1
store i32 %275, i32* %7
store i32 0, i32* %9
br label %277
276: ; preds = %242
store i32 0, i32* %9
br label %277
277: ; preds = %276, %273
br label %278
278: ; preds = %277, %235
%279 = load i32*, i32** %4
%280 = call signext i8 @getc(i32* %279)
store i8 %280, i8* %16
br label %221
281: ; preds = %221
%282 = load i32, i32* %9
%283 = load i32, i32* %8
%284 = icmp ne i32 %282, %283
br i1 %284, label %285, label %310
285: ; preds = %281
%286 = load i32, i32* %9
%287 = add nsw i32 %286, 1
store i32 %287, i32* %9
%288 = load i32, i32* %9
store i32 %288, i32* %7
%289 = load i32, i32* %7
store i32 %289, i32* %13
br label %290
290: ; preds = %306, %285
%291 = load i32, i32* %13
%292 = load i32, i32* %8
%293 = icmp sle i32 %291, %292
br i1 %293, label %294, label %309
294: ; preds = %290
%295 = load i32, i32* %13
%296 = load i32, i32* %11
%297 = sub nsw i32 %295, %296
%298 = call i32 @asciiToBinary(i32 %297)
store i32 %298, i32* %10
%299 = load i32, i32* %10
%300 = getelementptr inbounds [64 x i8], [64 x i8]* %15, i64 0, i64 0
%301 = load i32, i32* %12
%302 = call i32 @formatHashValue(i32 %299, i8* %300, i32 %301)
%303 = load i32*, i32** %5
%304 = getelementptr inbounds [64 x i8], [64 x i8]* %15, i64 0, i64 0
%305 = call i32 (i32*, i8*, ...) @fprintf(i32* %303, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %304)
br label %306
306: ; preds = %294
%307 = load i32, i32* %13
%308 = add nsw i32 %307, 1
store i32 %308, i32* %13
br label %290
309: ; preds = %290
br label %310
310: ; preds = %309, %281
br label %311
311: ; preds = %310, %185
%312 = load i32*, i32** %5
store i32* %312, i32** %3
br label %313
313: ; preds = %311, %41
%314 = load i32*, i32** %3
ret i32* %314
}

LLVM IR (-O2):
@EOF = global i8 0
@.str = [29 x i8] c"Incorrect input file type %d\00"
@.str.1 = [9 x i8] c"2,%d,%d,\00"
@.str.2 = [7 x i8] c"%d,%d\0A\00"
@SEEK_SET = global i32 0
define i32* @type0Totype2Converter(i32* nocapture %0, i32* returned %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = tail call signext i8 @getc(i32* %0)
%6 = load i8, i8* @EOF
%7 = icmp ne i8 %5, %6
%8 = icmp ne i8 %5, 44
%9 = and i1 %8, %7
br i1 %9, label %10, label %24
10: ; preds = %2, %10
%11 = phi i8 [ %17, %10 ], [ %5, %2 ]
%12 = phi i32 [ %16, %10 ], [ 0, %2 ]
%13 = sext i8 %11 to i32
%14 = mul nsw i32 %12, 10
%15 = add i32 %14, -48
%16 = add i32 %15, %13
%17 = tail call signext i8 @getc(i32* %0)
%18 = load i8, i8* @EOF
%19 = icmp ne i8 %17, %18
%20 = icmp ne i8 %17, 44
%21 = and i1 %20, %19
br i1 %21, label %10, label %22
22: ; preds = %10
%23 = icmp eq i32 %16, 0
br i1 %23, label %24, label %30
24: ; preds = %2, %22
%25 = tail call signext i8 @getc(i32* %0)
%26 = load i8, i8* @EOF
%27 = icmp ne i8 %25, %26
%28 = icmp ne i8 %25, 44
%29 = and i1 %28, %27
br i1 %29, label %38, label %32
30: ; preds = %22
%31 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %177
32: ; preds = %38, %24
%33 = phi i32 [ 0, %24 ], [ %47, %38 ]
%34 = tail call signext i8 @getc(i32* %0)
%35 = load i8, i8* @EOF
%36 = freeze i8 %35
%37 = icmp eq i8 %34, %36
br i1 %37, label %56, label %53
38: ; preds = %24, %38
%39 = phi i8 [ %48, %38 ], [ %25, %24 ]
%40 = phi i32 [ %47, %38 ], [ 0, %24 ]
%41 = sext i8 %39 to i32
%42 = add i8 %39, -48
%43 = icmp ult i8 %42, 10
%44 = mul nsw i32 %40, 10
%45 = add i32 %44, -48
%46 = add i32 %45, %41
%47 = select i1 %43, i32 %46, i32 %40
%48 = tail call signext i8 @getc(i32* %0)
%49 = load i8, i8* @EOF
%50 = icmp ne i8 %48, %49
%51 = icmp ne i8 %48, 44
%52 = and i1 %51, %50
br i1 %52, label %38, label %32
53: ; preds = %32, %58
%54 = phi i8 [ %66, %58 ], [ %34, %32 ]
%55 = phi i32 [ %65, %58 ], [ 0, %32 ]
switch i8 %54, label %58 [
i8 44, label %56
i8 13, label %56
i8 10, label %56
]
56: ; preds = %53, %53, %53, %58, %32
%57 = phi i32 [ 0, %32 ], [ %65, %58 ], [ %55, %53 ], [ %55, %53 ], [ %55, %53 ]
br label %70
58: ; preds = %53
%59 = sext i8 %54 to i32
%60 = add i8 %54, -48
%61 = icmp ult i8 %60, 10
%62 = mul nsw i32 %55, 10
%63 = add i32 %62, -48
%64 = add i32 %63, %59
%65 = select i1 %61, i32 %64, i32 %55
%66 = tail call signext i8 @getc(i32* %0)
%67 = load i8, i8* @EOF
%68 = freeze i8 %67
%69 = icmp eq i8 %66, %68
br i1 %69, label %56, label %53
70: ; preds = %56, %75
%71 = tail call signext i8 @getc(i32* %0)
%72 = load i8, i8* @EOF
%73 = freeze i8 %72
%74 = icmp eq i8 %71, %73
br i1 %74, label %76, label %75
75: ; preds = %70
switch i8 %71, label %70 [
i8 13, label %76
i8 10, label %76
]
76: ; preds = %75, %75, %70
%77 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %33, i32 %57)
%78 = tail call signext i8 @getc(i32* %0)
%79 = load i8, i8* @EOF
%80 = icmp eq i8 %78, %79
br i1 %80, label %109, label %81
81: ; preds = %76, %100
%82 = phi i8 [ %104, %100 ], [ %78, %76 ]
%83 = phi i32 [ %103, %100 ], [ %33, %76 ]
%84 = phi i32 [ %101, %100 ], [ 0, %76 ]
%85 = add i8 %82, -48
%86 = icmp ult i8 %85, 10
br i1 %86, label %87, label %92
87: ; preds = %81
%88 = zext i8 %82 to i32
%89 = mul nsw i32 %84, 10
%90 = add i32 %89, -48
%91 = add i32 %90, %88
br label %100
92: ; preds = %81
%93 = icmp eq i8 %82, 32
br i1 %93, label %94, label %100
94: ; preds = %92
%95 = icmp sgt i32 %84, %83
%96 = select i1 %95, i32 %83, i32 -1
%97 = xor i1 %95, true
%98 = zext i1 %97 to i32
%99 = add nsw i32 %83, %98
br label %100
100: ; preds = %92, %94, %87
%101 = phi i32 [ %91, %87 ], [ 0, %94 ], [ 0, %92 ]
%102 = phi i32 [ -1, %87 ], [ %96, %94 ], [ -1, %92 ]
%103 = phi i32 [ %83, %87 ], [ %99, %94 ], [ %83, %92 ]
%104 = tail call signext i8 @getc(i32* %0)
%105 = load i8, i8* @EOF
%106 = icmp ne i8 %104, %105
%107 = icmp eq i32 %102, -1
%108 = select i1 %106, i1 %107, i1 false
br i1 %108, label %81, label %109
109: ; preds = %100, %76
%110 = phi i32 [ 0, %76 ], [ %101, %100 ]
%111 = phi i32 [ -1, %76 ], [ %102, %100 ]
%112 = tail call i32 @asciiLog2(i32 %57)
%113 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %112, i32 %111)
%114 = load i32, i32* @SEEK_SET
%115 = tail call i64 @fseek(i32* %0, i32 0, i32 %114)
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %177
117: ; preds = %109
%118 = tail call signext i8 @getc(i32* %0)
%119 = load i8, i8* @EOF
%120 = freeze i8 %119
%121 = icmp eq i8 %118, %120
br i1 %121, label %129, label %122
122: ; preds = %117, %124
%123 = phi i8 [ %125, %124 ], [ %118, %117 ]
switch i8 %123, label %124 [
i8 13, label %129
i8 10, label %129
]
124: ; preds = %122
%125 = tail call signext i8 @getc(i32* %0)
%126 = load i8, i8* @EOF
%127 = freeze i8 %126
%128 = icmp eq i8 %125, %127
br i1 %128, label %129, label %122
129: ; preds = %124, %122, %122, %117
%130 = tail call signext i8 @getc(i32* %0)
%131 = load i8, i8* @EOF
%132 = icmp eq i8 %130, %131
br i1 %132, label %166, label %133
133: ; preds = %129, %160
%134 = phi i8 [ %163, %160 ], [ %130, %129 ]
%135 = phi i32 [ %162, %160 ], [ %110, %129 ]
%136 = phi i32 [ %161, %160 ], [ %33, %129 ]
%137 = add i8 %134, -48
%138 = icmp ult i8 %137, 10
br i1 %138, label %139, label %144
139: ; preds = %133
%140 = zext i8 %134 to i32
%141 = mul nsw i32 %135, 10
%142 = add i32 %141, -48
%143 = add i32 %142, %140
br label %160
144: ; preds = %133
%145 = icmp eq i8 %134, 32
br i1 %145, label %146, label %160
146: ; preds = %144
%147 = icmp sge i32 %136, %111
%148 = icmp slt i32 %136, %135
%149 = select i1 %148, i1 %147, i1 false
br i1 %149, label %150, label %158
150: ; preds = %146, %150
%151 = phi i32 [ %156, %150 ], [ %136, %146 ]
%152 = sub nsw i32 %151, %111
%153 = call i32 @asciiToBinary(i32 %152)
%154 = call i32 @formatHashValue(i32 %153, i8* %4, i32 %112)
%155 = call i32 @fputs(i8* %4, i32* %1)
%156 = add nsw i32 %151, 1
%157 = icmp slt i32 %156, %135
br i1 %157, label %150, label %158
158: ; preds = %150, %146
%159 = add nsw i32 %135, 1
br label %160
160: ; preds = %144, %158, %139
%161 = phi i32 [ %136, %139 ], [ %159, %158 ], [ %136, %144 ]
%162 = phi i32 [ %143, %139 ], [ 0, %158 ], [ 0, %144 ]
%163 = call signext i8 @getc(i32* %0)
%164 = load i8, i8* @EOF
%165 = icmp eq i8 %163, %164
br i1 %165, label %166, label %133
166: ; preds = %160, %129
%167 = phi i32 [ %110, %129 ], [ %162, %160 ]
%168 = icmp slt i32 %167, %57
br i1 %168, label %169, label %177
169: ; preds = %166, %169
%170 = phi i32 [ %171, %169 ], [ %167, %166 ]
%171 = add nsw i32 %170, 1
%172 = sub nsw i32 %171, %111
%173 = call i32 @asciiToBinary(i32 %172)
%174 = call i32 @formatHashValue(i32 %173, i8* %4, i32 %112)
%175 = call i32 @fputs(i8* %4, i32* %1)
%176 = icmp eq i32 %171, %57
br i1 %176, label %177, label %169
177: ; preds = %169, %109, %166, %30
ret i32* %1
}