#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 */
int /*<<< orphan*/ add_hash(unsigned int, char *);
int /*<<< orphan*/ cut_export_token(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned int, char *);
unsigned int hash(unsigned char *);
char *load_from_file(char const *);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int process_file(const char *name, FILE *out_txt) {
  char *cursym;
  char *cur = load_from_file(name);
  if (cur == 0) {
    printf("makeexport: file not found '%s'\n", name);
    return 0;
  }
  for (; *cur;) {
    for (; *cur == 9 || *cur == ' '; cur++)
      ;
    if (*cur == '(') {
      for (cur++; *cur && *cur != ')'; cur++)
        ;
      for (; *cur == 9 || *cur == ' ' || *cur == ')'; cur++)
        ;
    }
    int is_address = 0;
    if (*cur == '&') {
      is_address = 1;
      for (cur++; *cur == 9 || *cur == ' '; cur++)
        ;
    }
    cursym = cur;
    for (; (*cur >= 'A' && *cur <= 'Z') || (*cur >= 'a' && *cur <= 'z') ||
           (*cur >= '0' && *cur <= '9') || *cur == '_';
         cur++)
      ;
    if (cursym != cur) {
      char symbol[256], full_symbol[257];
      int size = cur - cursym;
      if (size > 255) {
        size = 255;
      }
      memcpy(symbol, cursym, size);
      symbol[size] = 0;
      full_symbol[0] = 0;
      if (is_address)
        strcpy(full_symbol, "&");
      strcat(full_symbol, symbol);
      cut_export_token(symbol);
      unsigned int hash_val = hash((unsigned char *)symbol);
      add_hash(hash_val, full_symbol);
      fprintf(out_txt, "%08x %s\n", hash_val, symbol);
      for (; size >= 0; size--) {
        if (symbol[size] >= 'a' && symbol[size] <= 'z')
          symbol[size] -= 0x20;
      }
    }
    for (; *cur && *cur != 10; cur++)
      ;
    for (; *cur == 10; cur++)
      ;
  }
  return 1;
}


x86 assembly (clang, -O0):
<process_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <load_from_file@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11d7 <process_file+0x47>
mov    -0x10(%rbp),%rsi
lea    0xe3a(%rip),%rdi
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    164d <process_file+0x4bd>
jmp    11dc <process_file+0x4c>
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1646 <process_file+0x4b6>
jmp    11ee <process_file+0x5e>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x249(%rbp)
je     1219 <process_file+0x89>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x249(%rbp)
mov    -0x249(%rbp),%al
test   $0x1,%al
jne    122c <process_file+0x9c>
jmp    1242 <process_file+0xb2>
jmp    1231 <process_file+0xa1>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11ee <process_file+0x5e>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    1328 <process_file+0x198>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x24a(%rbp)
je     1289 <process_file+0xf9>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
setne  %al
mov    %al,-0x24a(%rbp)
mov    -0x24a(%rbp),%al
test   $0x1,%al
jne    129c <process_file+0x10c>
jmp    12b2 <process_file+0x122>
jmp    12a1 <process_file+0x111>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    125e <process_file+0xce>
jmp    12b7 <process_file+0x127>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x24b(%rbp)
je     12fa <process_file+0x16a>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x24b(%rbp)
je     12fa <process_file+0x16a>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
sete   %al
mov    %al,-0x24b(%rbp)
mov    -0x24b(%rbp),%al
test   $0x1,%al
jne    130d <process_file+0x17d>
jmp    1323 <process_file+0x193>
jmp    1312 <process_file+0x182>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    12b7 <process_file+0x127>
jmp    1328 <process_file+0x198>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x26,%eax
jne    13ab <process_file+0x21b>
movl   $0x1,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x24c(%rbp)
je     137d <process_file+0x1ed>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x24c(%rbp)
mov    -0x24c(%rbp),%al
test   $0x1,%al
jne    1390 <process_file+0x200>
jmp    13a6 <process_file+0x216>
jmp    1395 <process_file+0x205>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1352 <process_file+0x1c2>
jmp    13ab <process_file+0x21b>
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     13db <process_file+0x24b>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x24d(%rbp)
jle    143e <process_file+0x2ae>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     1403 <process_file+0x273>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x24d(%rbp)
jle    143e <process_file+0x2ae>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     142b <process_file+0x29b>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x24d(%rbp)
jle    143e <process_file+0x2ae>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x24d(%rbp)
mov    -0x24d(%rbp),%al
test   $0x1,%al
jne    1451 <process_file+0x2c1>
jmp    1467 <process_file+0x2d7>
jmp    1456 <process_file+0x2c6>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    13b3 <process_file+0x223>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     15bd <process_file+0x42d>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x244(%rbp)
cmpl   $0xff,-0x244(%rbp)
jle    14a0 <process_file+0x310>
movl   $0xff,-0x244(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x244(%rbp),%edx
call   1080 <memcpy@plt>
movslq -0x244(%rbp),%rax
movb   $0x0,-0x130(%rbp,%rax,1)
movb   $0x0,-0x240(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     14e9 <process_file+0x359>
lea    -0x240(%rbp),%rdi
lea    0xb3d(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x240(%rbp),%rdi
lea    -0x130(%rbp),%rsi
call   10a0 <strcat@plt>
lea    -0x130(%rbp),%rdi
call   1090 <cut_export_token@plt>
lea    -0x130(%rbp),%rdi
call   1050 <hash@plt>
mov    %eax,-0x248(%rbp)
mov    -0x248(%rbp),%edi
lea    -0x240(%rbp),%rsi
call   10b0 <add_hash@plt>
mov    -0x18(%rbp),%rdi
mov    -0x248(%rbp),%edx
lea    -0x130(%rbp),%rcx
lea    0xadf(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x0,-0x244(%rbp)
jl     15b8 <process_file+0x428>
movslq -0x244(%rbp),%rax
movsbl -0x130(%rbp,%rax,1),%eax
ff
cmp    $0x61,%eax
jl     159f <process_file+0x40f>
movslq -0x244(%rbp),%rax
movsbl -0x130(%rbp,%rax,1),%eax
ff
cmp    $0x7a,%eax
jg     159f <process_file+0x40f>
movslq -0x244(%rbp),%rax
movsbl -0x130(%rbp,%rax,1),%ecx
ff
sub    $0x20,%ecx
mov    %cl,-0x130(%rbp,%rax,1)
jmp    15a4 <process_file+0x414>
mov    -0x244(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x244(%rbp)
jmp    1549 <process_file+0x3b9>
jmp    15bd <process_file+0x42d>
jmp    15c2 <process_file+0x432>
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x24e(%rbp)
je     15ed <process_file+0x45d>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x24e(%rbp)
mov    -0x24e(%rbp),%al
test   $0x1,%al
jne    1600 <process_file+0x470>
jmp    1616 <process_file+0x486>
jmp    1605 <process_file+0x475>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    15c2 <process_file+0x432>
jmp    161b <process_file+0x48b>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1641 <process_file+0x4b1>
jmp    1630 <process_file+0x4a0>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    161b <process_file+0x48b>
jmp    11dc <process_file+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
mov    %rsi,0x8(%rsp)
mov    %rdi,%rbx
call   1040 <load_from_file@plt>
test   %rax,%rax
je     1553 <process_file+0x3c3>
mov    %rax,%rbp
mov    (%rax),%bl
test   %bl,%bl
je     154c <process_file+0x3bc>
movabs $0x20100000200,%rdx
lea    0x10(%rsp),%r14
jmp    11e7 <process_file+0x57>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x1(%rbp),%bl
add    $0x1,%rbp
cmp    $0x9,%bl
je     11e0 <process_file+0x50>
cmp    $0x20,%bl
je     11e0 <process_file+0x50>
cmp    $0x28,%bl
jne    1236 <process_file+0xa6>
cs nopw 0x0(%rax,%rax,1)
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
cmp    $0x29,%bl
je     1228 <process_file+0x98>
test   %bl,%bl
jne    1200 <process_file+0x70>
jmp    1228 <process_file+0x98>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
cmp    $0x29,%bl
ja     1236 <process_file+0xa6>
movzbl %bl,%eax
bt     %rax,%rdx
jb     1220 <process_file+0x90>
cmp    $0x26,%bl
jne    1260 <process_file+0xd0>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
movzbl 0x0(%rbp),%eax
cmp    $0x20,%al
je     1240 <process_file+0xb0>
cmp    $0x9,%al
je     1240 <process_file+0xb0>
jmp    1262 <process_file+0xd2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%eax
xor    %r15d,%r15d
xor    %r13d,%r13d
jmp    127e <process_file+0xee>
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rbp,%r13,1),%eax
add    $0x1,%r13
add    $0x1,%r15d
mov    %eax,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
cmp    $0x1a,%cl
jb     1270 <process_file+0xe0>
lea    -0x30(%rax),%ecx
cmp    $0x5f,%al
je     1270 <process_file+0xe0>
cmp    $0x9,%cl
jbe    1270 <process_file+0xe0>
test   %r13,%r13
je     14ea <process_file+0x35a>
cmp    $0xff,%r13d
mov    $0xff,%r12d
cmovl  %r13d,%r12d
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
call   1080 <memcpy@plt>
movslq %r12d,%rax
movb   $0x0,0x10(%rsp,%rax,1)
movb   $0x0,0x110(%rsp)
cmp    $0x26,%bl
jne    12e8 <process_file+0x158>
lea    0x110(%rsp),%rdi
lea    0xd5e(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x110(%rsp),%rdi
mov    %r14,%rsi
call   10a0 <strcat@plt>
mov    %r14,%rdi
call   1090 <cut_export_token@plt>
mov    %r14,%rdi
call   1050 <hash@plt>
mov    %r14,%rbx
mov    %eax,%r14d
mov    %eax,%edi
lea    0x110(%rsp),%rsi
call   10b0 <add_hash@plt>
mov    0x8(%rsp),%rdi
lea    0xd1a(%rip),%rsi
mov    %r14d,%edx
mov    %rbx,%r14
mov    %rbx,%rcx
call   1070 <fprintf@plt>
test   %r12d,%r12d
movdqa 0xcbe(%rip),%xmm4
pxor   %xmm5,%xmm5
movdqa 0xcc2(%rip),%xmm6
pcmpeqd %xmm7,%xmm7
js     14e0 <process_file+0x350>
mov    %r12d,%eax
cmp    $0x7,%r12d
jb     1527 <process_file+0x397>
lea    0x1(%rax),%r8
mov    %r8,%rdx
and    $0xfffffffffffffff8,%rdx
sub    %rdx,%rax
cmp    $0xff,%r15d
mov    $0xff,%ecx
cmovge %ecx,%r15d
lea    0x1(%r15),%rsi
and    $0xfffffffffffffff8,%rsi
neg    %rsi
lea    0x9(%rsp),%rcx
add    %rcx,%r15
xor    %edi,%edi
jmp    13ad <process_file+0x21d>
nopw   0x0(%rax,%rax,1)
add    $0xfffffffffffffff8,%rdi
cmp    %rdi,%rsi
je     14da <process_file+0x34a>
movq   (%r15,%rdi,1),%xmm1
movdqa %xmm1,%xmm0
paddb  %xmm4,%xmm0
punpcklbw %xmm5,%xmm0
pshufd $0x4e,%xmm0,%xmm0
pshuflw $0x1b,%xmm0,%xmm0
pshufhw $0x1b,%xmm0,%xmm0
packuswb %xmm0,%xmm0
movdqa %xmm0,%xmm2
pmaxub %xmm6,%xmm2
pcmpeqb %xmm0,%xmm2
movd   %xmm2,%ecx
not    %cl
pextrw $0x3,%xmm1,%ebx
test   $0x1,%cl
je     13fb <process_file+0x26b>
mov    %ebx,%ecx
shr    $0x8,%ecx
add    $0xe0,%cl
mov    %cl,0x7(%r15,%rdi,1)
movdqa %xmm2,%xmm0
pxor   %xmm7,%xmm0
movdqa %xmm0,%xmm3
pslld  $0x8,%xmm3
movd   %xmm3,%ecx
shr    $0x10,%ecx
test   $0x1,%cl
je     1420 <process_file+0x290>
add    $0xe0,%bl
mov    %bl,0x6(%r15,%rdi,1)
pshuflw $0x55,%xmm2,%xmm3
pxor   %xmm7,%xmm3
pextrw $0x2,%xmm3,%ecx
pextrw $0x2,%xmm1,%ebx
test   $0x1,%cl
je     1445 <process_file+0x2b5>
mov    %ebx,%ecx
shr    $0x8,%ecx
add    $0xe0,%cl
mov    %cl,0x5(%r15,%rdi,1)
movdqa %xmm0,%xmm3
psllq  $0x18,%xmm3
pextrw $0x3,%xmm3,%ecx
test   $0x1,%cl
je     1460 <process_file+0x2d0>
add    $0xe0,%bl
mov    %bl,0x4(%r15,%rdi,1)
pshufd $0x55,%xmm2,%xmm2
pxor   %xmm7,%xmm2
pextrw $0x4,%xmm2,%ecx
movd   %xmm1,%ebx
test   $0x1,%cl
je     1484 <process_file+0x2f4>
mov    %ebx,%ecx
shr    $0x18,%ecx
add    $0xe0,%cl
mov    %cl,0x3(%r15,%rdi,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%ecx
test   $0x1,%cl
je     14a4 <process_file+0x314>
mov    %ebx,%ecx
shr    $0x10,%ecx
add    $0xe0,%cl
mov    %cl,0x2(%r15,%rdi,1)
pextrw $0x3,%xmm0,%ecx
test   $0x1,%cl
je     14bb <process_file+0x32b>
mov    %ebx,%ecx
shr    $0x8,%ecx
add    $0xe0,%cl
mov    %cl,0x1(%r15,%rdi,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%ecx
test   $0x1,%cl
je     13a0 <process_file+0x210>
add    $0xe0,%bl
mov    %bl,(%r15,%rdi,1)
jmp    13a0 <process_file+0x210>
cmp    %rdx,%r8
jne    1527 <process_file+0x397>
nop
movabs $0x20100000200,%rdx
add    %r13,%rbp
nopl   (%rax)
movzbl 0x0(%rbp),%ebx
test   %bl,%bl
je     151d <process_file+0x38d>
cmp    $0xa,%bl
je     1510 <process_file+0x380>
add    $0x1,%rbp
jmp    14f0 <process_file+0x360>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
cmp    $0xa,%bl
je     1510 <process_file+0x380>
test   %bl,%bl
jne    11e7 <process_file+0x57>
jmp    154c <process_file+0x3bc>
add    $0x1,%rax
jmp    1536 <process_file+0x3a6>
nopl   (%rax)
add    $0xffffffffffffffff,%rax
jle    14e0 <process_file+0x350>
movzbl 0xf(%rsp,%rax,1),%ecx
lea    -0x61(%rcx),%edx
cmp    $0x19,%dl
ja     1530 <process_file+0x3a0>
add    $0xe0,%cl
mov    %cl,0xf(%rsp,%rax,1)
jmp    1530 <process_file+0x3a0>
mov    $0x1,%eax
jmp    1564 <process_file+0x3d4>
lea    0xac6(%rip),%rdi
mov    %rbx,%rsi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"makeexport: file not found '%s'\0A\00"
@.str.1 = [2 x i8] c"&\00"
@.str.2 = [9 x i8] c"%08x %s\0A\00"
define i32 @process_file(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [256 x i8]
%10 = alloca [257 x i8]
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
%13 = load i8*, i8** %4
%14 = call i8* @load_from_file(i8* %13)
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i8*, i8** %4
%19 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 0, i32* %3
br label %259
20: ; preds = %2
br label %21
21: ; preds = %257, %20
%22 = load i8*, i8** %7
%23 = load i8, i8* %22
%24 = icmp ne i8 %23, 0
br i1 %24, label %25, label %258
25: ; preds = %21
br label %26
26: ; preds = %39, %25
%27 = load i8*, i8** %7
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 9
br i1 %30, label %36, label %31
31: ; preds = %26
%32 = load i8*, i8** %7
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 32
br label %36
36: ; preds = %31, %26
%37 = phi i1 [ true, %26 ], [ %35, %31 ]
br i1 %37, label %38, label %42
38: ; preds = %36
br label %39
39: ; preds = %38
%40 = load i8*, i8** %7
%41 = getelementptr inbounds i8, i8* %40, i32 1
store i8* %41, i8** %7
br label %26
42: ; preds = %36
%43 = load i8*, i8** %7
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 40
br i1 %46, label %47, label %89
47: ; preds = %42
%48 = load i8*, i8** %7
%49 = getelementptr inbounds i8, i8* %48, i32 1
store i8* %49, i8** %7
br label %50
50: ; preds = %63, %47
%51 = load i8*, i8** %7
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %60
55: ; preds = %50
%56 = load i8*, i8** %7
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp ne i32 %58, 41
br label %60
60: ; preds = %55, %50
%61 = phi i1 [ false, %50 ], [ %59, %55 ]
br i1 %61, label %62, label %66
62: ; preds = %60
br label %63
63: ; preds = %62
%64 = load i8*, i8** %7
%65 = getelementptr inbounds i8, i8* %64, i32 1
store i8* %65, i8** %7
br label %50
66: ; preds = %60
br label %67
67: ; preds = %85, %66
%68 = load i8*, i8** %7
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 9
br i1 %71, label %82, label %72
72: ; preds = %67
%73 = load i8*, i8** %7
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 32
br i1 %76, label %82, label %77
77: ; preds = %72
%78 = load i8*, i8** %7
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 41
br label %82
82: ; preds = %77, %72, %67
%83 = phi i1 [ true, %72 ], [ true, %67 ], [ %81, %77 ]
br i1 %83, label %84, label %88
84: ; preds = %82
br label %85
85: ; preds = %84
%86 = load i8*, i8** %7
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %7
br label %67
88: ; preds = %82
br label %89
89: ; preds = %88, %42
store i32 0, i32* %8
%90 = load i8*, i8** %7
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 38
br i1 %93, label %94, label %114
94: ; preds = %89
store i32 1, i32* %8
%95 = load i8*, i8** %7
%96 = getelementptr inbounds i8, i8* %95, i32 1
store i8* %96, i8** %7
br label %97
97: ; preds = %110, %94
%98 = load i8*, i8** %7
%99 = load i8, i8* %98
%100 = sext i8 %99 to i32
%101 = icmp eq i32 %100, 9
br i1 %101, label %107, label %102
102: ; preds = %97
%103 = load i8*, i8** %7
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 32
br label %107
107: ; preds = %102, %97
%108 = phi i1 [ true, %97 ], [ %106, %102 ]
br i1 %108, label %109, label %113
109: ; preds = %107
br label %110
110: ; preds = %109
%111 = load i8*, i8** %7
%112 = getelementptr inbounds i8, i8* %111, i32 1
store i8* %112, i8** %7
br label %97
113: ; preds = %107
br label %114
114: ; preds = %113, %89
%115 = load i8*, i8** %7
store i8* %115, i8** %6
br label %116
116: ; preds = %154, %114
%117 = load i8*, i8** %7
%118 = load i8, i8* %117
%119 = sext i8 %118 to i32
%120 = icmp sge i32 %119, 65
br i1 %120, label %121, label %126
121: ; preds = %116
%122 = load i8*, i8** %7
%123 = load i8, i8* %122
%124 = sext i8 %123 to i32
%125 = icmp sle i32 %124, 90
br i1 %125, label %151, label %126
126: ; preds = %121, %116
%127 = load i8*, i8** %7
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp sge i32 %129, 97
br i1 %130, label %131, label %136
131: ; preds = %126
%132 = load i8*, i8** %7
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = icmp sle i32 %134, 122
br i1 %135, label %151, label %136
136: ; preds = %131, %126
%137 = load i8*, i8** %7
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp sge i32 %139, 48
br i1 %140, label %141, label %146
141: ; preds = %136
%142 = load i8*, i8** %7
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp sle i32 %144, 57
br i1 %145, label %151, label %146
146: ; preds = %141, %136
%147 = load i8*, i8** %7
%148 = load i8, i8* %147
%149 = sext i8 %148 to i32
%150 = icmp eq i32 %149, 95
br label %151
151: ; preds = %146, %141, %131, %121
%152 = phi i1 [ true, %141 ], [ true, %131 ], [ true, %121 ], [ %150, %146 ]
br i1 %152, label %153, label %157
153: ; preds = %151
br label %154
154: ; preds = %153
%155 = load i8*, i8** %7
%156 = getelementptr inbounds i8, i8* %155, i32 1
store i8* %156, i8** %7
br label %116
157: ; preds = %151
%158 = load i8*, i8** %6
%159 = load i8*, i8** %7
%160 = icmp ne i8* %158, %159
br i1 %160, label %161, label %230
161: ; preds = %157
%162 = load i8*, i8** %7
%163 = load i8*, i8** %6
%164 = ptrtoint i8* %162 to i64
%165 = ptrtoint i8* %163 to i64
%166 = sub i64 %164, %165
%167 = trunc i64 %166 to i32
store i32 %167, i32* %11
%168 = load i32, i32* %11
%169 = icmp sgt i32 %168, 255
br i1 %169, label %170, label %171
170: ; preds = %161
store i32 255, i32* %11
br label %171
171: ; preds = %170, %161
%172 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%173 = load i8*, i8** %6
%174 = load i32, i32* %11
%175 = call i32 @memcpy(i8* %172, i8* %173, i32 %174)
%176 = load i32, i32* %11
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 %177
store i8 0, i8* %178
%179 = getelementptr inbounds [257 x i8], [257 x i8]* %10, i64 0, i64 0
store i8 0, i8* %179
%180 = load i32, i32* %8
%181 = icmp ne i32 %180, 0
br i1 %181, label %182, label %185
182: ; preds = %171
%183 = getelementptr inbounds [257 x i8], [257 x i8]* %10, i64 0, i64 0
%184 = call i32 @strcpy(i8* %183, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %185
185: ; preds = %182, %171
%186 = getelementptr inbounds [257 x i8], [257 x i8]* %10, i64 0, i64 0
%187 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%188 = call i32 @strcat(i8* %186, i8* %187)
%189 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%190 = call i32 @cut_export_token(i8* %189)
%191 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%192 = call i32 @hash(i8* %191)
store i32 %192, i32* %12
%193 = load i32, i32* %12
%194 = getelementptr inbounds [257 x i8], [257 x i8]* %10, i64 0, i64 0
%195 = call i32 @add_hash(i32 %193, i8* %194)
%196 = load i32*, i32** %5
%197 = load i32, i32* %12
%198 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%199 = call i32 @fprintf(i32* %196, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %197, i8* %198)
br label %200
200: ; preds = %226, %185
%201 = load i32, i32* %11
%202 = icmp sge i32 %201, 0
br i1 %202, label %203, label %229
203: ; preds = %200
%204 = load i32, i32* %11
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 %205
%207 = load i8, i8* %206
%208 = sext i8 %207 to i32
%209 = icmp sge i32 %208, 97
br i1 %209, label %210, label %225
210: ; preds = %203
%211 = load i32, i32* %11
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 %212
%214 = load i8, i8* %213
%215 = sext i8 %214 to i32
%216 = icmp sle i32 %215, 122
br i1 %216, label %217, label %225
217: ; preds = %210
%218 = load i32, i32* %11
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 %219
%221 = load i8, i8* %220
%222 = sext i8 %221 to i32
%223 = sub nsw i32 %222, 32
%224 = trunc i32 %223 to i8
store i8 %224, i8* %220
br label %225
225: ; preds = %217, %210, %203
br label %226
226: ; preds = %225
%227 = load i32, i32* %11
%228 = add nsw i32 %227, -1
store i32 %228, i32* %11
br label %200
229: ; preds = %200
br label %230
230: ; preds = %229, %157
br label %231
231: ; preds = %244, %230
%232 = load i8*, i8** %7
%233 = load i8, i8* %232
%234 = sext i8 %233 to i32
%235 = icmp ne i32 %234, 0
br i1 %235, label %236, label %241
236: ; preds = %231
%237 = load i8*, i8** %7
%238 = load i8, i8* %237
%239 = sext i8 %238 to i32
%240 = icmp ne i32 %239, 10
br label %241
241: ; preds = %236, %231
%242 = phi i1 [ false, %231 ], [ %240, %236 ]
br i1 %242, label %243, label %247
243: ; preds = %241
br label %244
244: ; preds = %243
%245 = load i8*, i8** %7
%246 = getelementptr inbounds i8, i8* %245, i32 1
store i8* %246, i8** %7
br label %231
247: ; preds = %241
br label %248
248: ; preds = %254, %247
%249 = load i8*, i8** %7
%250 = load i8, i8* %249
%251 = sext i8 %250 to i32
%252 = icmp eq i32 %251, 10
br i1 %252, label %253, label %257
253: ; preds = %248
br label %254
254: ; preds = %253
%255 = load i8*, i8** %7
%256 = getelementptr inbounds i8, i8* %255, i32 1
store i8* %256, i8** %7
br label %248
257: ; preds = %248
br label %21
258: ; preds = %21
store i32 1, i32* %3
br label %259
259: ; preds = %258, %17
%260 = load i32, i32* %3
ret i32 %260
}

LLVM IR (-O2):
@.str = [33 x i8] c"makeexport: file not found '%s'\0A\00"
@.str.1 = [2 x i8] c"&\00"
@.str.2 = [9 x i8] c"%08x %s\0A\00"
define i32 @process_file(i8* %0, i32* nocapture %1) {
%3 = alloca [256 x i8]
%4 = alloca [257 x i8]
%5 = tail call i8* @load_from_file(i8* %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %187
9: ; preds = %2
%10 = load i8, i8* %5
%11 = icmp eq i8 %10, 0
br i1 %11, label %187, label %12
12: ; preds = %9
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 0
br label %19
15: ; preds = %177, %182
%16 = phi i8 [ %185, %182 ], [ %179, %177 ]
%17 = phi i8* [ %184, %182 ], [ %178, %177 ]
%18 = icmp eq i8 %16, 0
br i1 %18, label %187, label %25
19: ; preds = %25, %12
%20 = phi i8 [ %10, %12 ], [ %26, %25 ]
%21 = phi i8* [ %5, %12 ], [ %27, %25 ]
switch i8 %20, label %39 [
i8 9, label %22
i8 32, label %22
i8 40, label %28
]
22: ; preds = %19, %19
%23 = getelementptr inbounds i8, i8* %21, i64 1
%24 = load i8, i8* %23
br label %25
25: ; preds = %22, %15
%26 = phi i8 [ %24, %22 ], [ %16, %15 ]
%27 = phi i8* [ %23, %22 ], [ %17, %15 ]
br label %19
28: ; preds = %19, %28
%29 = phi i8* [ %30, %28 ], [ %21, %19 ]
%30 = getelementptr inbounds i8, i8* %29, i64 1
%31 = load i8, i8* %30
switch i8 %31, label %28 [
i8 0, label %32
i8 41, label %32
]
32: ; preds = %28, %28
br label %33
33: ; preds = %32, %36
%34 = phi i8 [ %38, %36 ], [ %31, %32 ]
%35 = phi i8* [ %37, %36 ], [ %30, %32 ]
switch i8 %34, label %39 [
i8 9, label %36
i8 32, label %36
i8 41, label %36
]
36: ; preds = %33, %33, %33
%37 = getelementptr inbounds i8, i8* %35, i64 1
%38 = load i8, i8* %37
br label %33
39: ; preds = %33, %19
%40 = phi i8 [ %20, %19 ], [ %34, %33 ]
%41 = phi i8* [ %21, %19 ], [ %35, %33 ]
%42 = icmp eq i8 %40, 38
br i1 %42, label %43, label %48
43: ; preds = %39, %47
%44 = phi i8* [ %45, %47 ], [ %41, %39 ]
%45 = getelementptr inbounds i8, i8* %44, i64 1
%46 = load i8, i8* %45
switch i8 %46, label %48 [
i8 9, label %47
i8 32, label %47
]
47: ; preds = %43, %43
br label %43
48: ; preds = %43, %39
%49 = phi i8 [ %40, %39 ], [ %46, %43 ]
%50 = phi i8* [ %41, %39 ], [ %45, %43 ]
br label %51
51: ; preds = %62, %48
%52 = phi i8 [ %49, %48 ], [ %64, %62 ]
%53 = phi i8* [ %50, %48 ], [ %63, %62 ]
%54 = and i8 %52, -33
%55 = add i8 %54, -65
%56 = icmp ult i8 %55, 26
br i1 %56, label %62, label %57
57: ; preds = %51
%58 = add i8 %52, -48
%59 = icmp ult i8 %58, 10
%60 = icmp eq i8 %52, 95
%61 = or i1 %60, %59
br i1 %61, label %62, label %65
62: ; preds = %57, %51
%63 = getelementptr inbounds i8, i8* %53, i64 1
%64 = load i8, i8* %63
br label %51
65: ; preds = %57
%66 = icmp eq i8* %50, %53
br i1 %66, label %176, label %67
67: ; preds = %65
%68 = ptrtoint i8* %53 to i64
%69 = ptrtoint i8* %50 to i64
%70 = sub i64 %68, %69
%71 = trunc i64 %70 to i32
%72 = icmp slt i32 %71, 255
%73 = select i1 %72, i32 %71, i32 255
%74 = call i32 @memcpy(i8* %13, i8* %50, i32 %73)
%75 = sext i32 %73 to i64
%76 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %75
store i8 0, i8* %76
store i8 0, i8* %14
br i1 %42, label %77, label %79
77: ; preds = %67
%78 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %79
79: ; preds = %77, %67
%80 = call i32 @strcat(i8* %14, i8* %13)
%81 = call i32 @cut_export_token(i8* %13)
%82 = call i32 @hash(i8* %13)
%83 = call i32 @add_hash(i32 %82, i8* %14)
%84 = call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %82, i8* %13)
%85 = icmp sgt i32 %73, -1
br i1 %85, label %86, label %175
86: ; preds = %79
%87 = zext i32 %73 to i64
%88 = add nuw nsw i64 %87, 1
%89 = icmp ult i32 %73, 7
br i1 %89, label %162, label %90
90: ; preds = %86
%91 = and i64 %88, 8589934584
%92 = sub nsw i64 %87, %91
br label %93
93: ; preds = %157, %90
%94 = phi i64 [ 0, %90 ], [ %158, %157 ]
%95 = sub i64 %87, %94
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %95
%97 = getelementptr inbounds i8, i8* %96, i64 -7
%98 = bitcast i8* %97 to <8 x i8>*
%99 = load <8 x i8>, <8 x i8>* %98
%100 = add <8 x i8> %99, <i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97>
%101 = shufflevector <8 x i8> %100, <8 x i8> poison, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
%102 = icmp ult <8 x i8> %101, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
%103 = extractelement <8 x i1> %102, i64 0
br i1 %103, label %104, label %108
104: ; preds = %93
%105 = extractelement <8 x i8> %99, i64 7
%106 = add nsw i8 %105, -32
%107 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %95
store i8 %106, i8* %107
br label %108
108: ; preds = %104, %93
%109 = extractelement <8 x i1> %102, i64 1
br i1 %109, label %110, label %115
110: ; preds = %108
%111 = add i64 %95, -1
%112 = extractelement <8 x i8> %99, i64 6
%113 = add nsw i8 %112, -32
%114 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %111
store i8 %113, i8* %114
br label %115
115: ; preds = %110, %108
%116 = extractelement <8 x i1> %102, i64 2
br i1 %116, label %117, label %122
117: ; preds = %115
%118 = add i64 %95, -2
%119 = extractelement <8 x i8> %99, i64 5
%120 = add nsw i8 %119, -32
%121 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %118
store i8 %120, i8* %121
br label %122
122: ; preds = %117, %115
%123 = extractelement <8 x i1> %102, i64 3
br i1 %123, label %124, label %129
124: ; preds = %122
%125 = add i64 %95, -3
%126 = extractelement <8 x i8> %99, i64 4
%127 = add nsw i8 %126, -32
%128 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %125
store i8 %127, i8* %128
br label %129
129: ; preds = %124, %122
%130 = extractelement <8 x i1> %102, i64 4
br i1 %130, label %131, label %136
131: ; preds = %129
%132 = add i64 %95, -4
%133 = extractelement <8 x i8> %99, i64 3
%134 = add nsw i8 %133, -32
%135 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %132
store i8 %134, i8* %135
br label %136
136: ; preds = %131, %129
%137 = extractelement <8 x i1> %102, i64 5
br i1 %137, label %138, label %143
138: ; preds = %136
%139 = add i64 %95, -5
%140 = extractelement <8 x i8> %99, i64 2
%141 = add nsw i8 %140, -32
%142 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %139
store i8 %141, i8* %142
br label %143
143: ; preds = %138, %136
%144 = extractelement <8 x i1> %102, i64 6
br i1 %144, label %145, label %150
145: ; preds = %143
%146 = add i64 %95, -6
%147 = extractelement <8 x i8> %99, i64 1
%148 = add nsw i8 %147, -32
%149 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %146
store i8 %148, i8* %149
br label %150
150: ; preds = %145, %143
%151 = extractelement <8 x i1> %102, i64 7
br i1 %151, label %152, label %157
152: ; preds = %150
%153 = add i64 %95, -7
%154 = extractelement <8 x i8> %99, i64 0
%155 = add nsw i8 %154, -32
%156 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %153
store i8 %155, i8* %156
br label %157
157: ; preds = %152, %150
%158 = add nuw i64 %94, 8
%159 = icmp eq i64 %158, %91
br i1 %159, label %160, label %93
160: ; preds = %157
%161 = icmp eq i64 %88, %91
br i1 %161, label %175, label %162
162: ; preds = %86, %160
%163 = phi i64 [ %87, %86 ], [ %92, %160 ]
br label %164
164: ; preds = %162, %172
%165 = phi i64 [ %173, %172 ], [ %163, %162 ]
%166 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %165
%167 = load i8, i8* %166
%168 = add i8 %167, -97
%169 = icmp ult i8 %168, 26
br i1 %169, label %170, label %172
170: ; preds = %164
%171 = add nsw i8 %167, -32
store i8 %171, i8* %166
br label %172
172: ; preds = %164, %170
%173 = add nsw i64 %165, -1
%174 = icmp sgt i64 %165, 0
br i1 %174, label %164, label %175
175: ; preds = %172, %160, %79
br label %176
176: ; preds = %175, %65
br label %177
177: ; preds = %176, %180
%178 = phi i8* [ %181, %180 ], [ %53, %176 ]
%179 = load i8, i8* %178
switch i8 %179, label %180 [
i8 10, label %182
i8 0, label %15
]
180: ; preds = %177
%181 = getelementptr inbounds i8, i8* %178, i64 1
br label %177
182: ; preds = %177, %182
%183 = phi i8* [ %184, %182 ], [ %178, %177 ]
%184 = getelementptr inbounds i8, i8* %183, i64 1
%185 = load i8, i8* %184
%186 = icmp eq i8 %185, 10
br i1 %186, label %182, label %15
187: ; preds = %15, %9, %7
%188 = phi i32 [ 0, %7 ], [ 1, %9 ], [ 1, %15 ]
ret i32 %188
}