#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*/ ckfree(char *);
unsigned long get_line(char **, unsigned long *, int /*<<< orphan*/ *);
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
scalar_t__ islower(char);
int /*<<< orphan*/ isspace(char);
scalar_t__ isupper(char);
int /*<<< orphan*/ printf(char *, ...);
char *skip_whitespace(char *);
scalar_t__ strncmplax(char *, char *, int);
char toupper(int /*<<< orphan*/);
void ProcessFile(char *fName, FILE *f) {
  char *buffer = NULL;
  unsigned long bufferLen = 0;
  unsigned long lineLen = 0;
  char *s;
  int chrNumber;
  char chrCh;
  while (1) {
    lineLen = get_line(&buffer, &bufferLen, f);
    if (lineLen == (unsigned long)-1)
      break;
    if (lineLen == 0)
      continue;
    if (buffer[lineLen - 1] == '\n')
      buffer[--lineLen] = 0;
    s = skip_whitespace(buffer);
    if (*s == '#') {
      s++;
      printf("0");
      goto fractional_part;
    }
    if (strncmplax(s, "chr", 3) != 0) {
      printf("300");
      goto fractional_part;
    }
    s += 3;
    if ((!isdigit(*s)) && (!isalpha(*s))) {
      printf("200");
      goto fractional_part;
    }
    if (isalpha(*s)) {
      chrCh = toupper(*(s++));
      switch (chrCh) {
      case 'X':
        chrNumber = 101;
        break;
      case 'Y':
        chrNumber = 102;
        break;
      case 'W':
        chrNumber = 103;
        break;
      case 'Z':
        chrNumber = 104;
        break;
      case 'M':
        chrNumber = 105;
        break;
      default:
        chrNumber = 106 + chrCh - 'A';
      }
    } else {
      chrNumber = *(s++) - '0';
      if (isdigit(*s))
        chrNumber = 10 * chrNumber + *(s++) - '0';
      chrNumber += 1;
    }
    printf("%d", chrNumber);
    if ((*s != 0) && (!isspace(*s))) {
    fractional_part:
      printf(".");
      for (; (*s != 0) && (!isspace(*s)); s++) {
        if (isdigit(*s))
          printf("0%c", *s);
        else if (isupper(*s))
          printf("%03d", 100 + 2 * (*s - 'A'));
        else if (islower(*s))
          printf("%03d", 101 + 2 * (*s - 'a'));
        else
          printf("%03d", 200 + (*s));
      }
    }
    printf("%s\n", s);
  }
  ckfree(buffer);
}


x86 assembly (clang, -O0):
<ProcessFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1070 <get_line@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0xffffffffffffffff,-0x28(%rbp)
jne    11fd <ProcessFile+0x4d>
jmp    1572 <ProcessFile+0x3c2>
cmpq   $0x0,-0x28(%rbp)
jne    120d <ProcessFile+0x5d>
jmp    11d8 <ProcessFile+0x28>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    123e <ProcessFile+0x8e>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x28(%rbp)
movb   $0x0,-0x1(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
call   10a0 <skip_whitespace@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    127a <ProcessFile+0xca>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    142f <ProcessFile+0x27f>
mov    -0x30(%rbp),%rdi
lea    0xdb3(%rip),%rsi
mov    $0x3,%edx
call   1060 <strncmplax@plt>
cmp    $0x0,%rax
je     12ac <ProcessFile+0xfc>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    142f <ProcessFile+0x27f>
mov    -0x30(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
jne    12f7 <ProcessFile+0x147>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   10c0 <isalpha@plt>
cmp    $0x0,%rax
jne    12f7 <ProcessFile+0x147>
lea    0xd55(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    142f <ProcessFile+0x27f>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   10c0 <isalpha@plt>
cmp    $0x0,%rax
je     139f <ProcessFile+0x1ef>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movsbl (%rax),%edi
call   1050 <toupper@plt>
mov    %al,-0x35(%rbp)
movsbl -0x35(%rbp),%eax
add    $0xffffffb3,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0xd,%eax
ja     138d <ProcessFile+0x1dd>
mov    -0x40(%rbp),%rax
lea    0xcb8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x65,-0x34(%rbp)
jmp    139a <ProcessFile+0x1ea>
movl   $0x66,-0x34(%rbp)
jmp    139a <ProcessFile+0x1ea>
movl   $0x67,-0x34(%rbp)
jmp    139a <ProcessFile+0x1ea>
movl   $0x68,-0x34(%rbp)
jmp    139a <ProcessFile+0x1ea>
movl   $0x69,-0x34(%rbp)
jmp    139a <ProcessFile+0x1ea>
movsbl -0x35(%rbp),%eax
add    $0x6a,%eax
sub    $0x41,%eax
mov    %eax,-0x34(%rbp)
jmp    13f4 <ProcessFile+0x244>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     13eb <ProcessFile+0x23b>
imul   $0xa,-0x34(%rbp),%eax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x30(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xc46(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     155b <ProcessFile+0x3ab>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1090 <isspace@plt>
cmp    $0x0,%eax
jne    155b <ProcessFile+0x3ab>
jmp    142f <ProcessFile+0x27f>
lea    0xc11(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x41(%rbp)
je     1469 <ProcessFile+0x2b9>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1090 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    1479 <ProcessFile+0x2c9>
jmp    1556 <ProcessFile+0x3a6>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     14a9 <ProcessFile+0x2f9>
mov    -0x30(%rbp),%rax
movsbl (%rax),%esi
lea    0xbac(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1540 <ProcessFile+0x390>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   10d0 <isupper@plt>
cmp    $0x0,%rax
je     14e2 <ProcessFile+0x332>
mov    -0x30(%rbp),%rax
movsbl (%rax),%esi
sub    $0x41,%esi
shl    $0x1,%esi
add    $0x64,%esi
lea    0xb77(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    153b <ProcessFile+0x38b>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1040 <islower@plt>
cmp    $0x0,%rax
je     151b <ProcessFile+0x36b>
mov    -0x30(%rbp),%rax
movsbl (%rax),%esi
sub    $0x61,%esi
shl    $0x1,%esi
add    $0x65,%esi
lea    0xb3e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1536 <ProcessFile+0x386>
mov    -0x30(%rbp),%rax
movsbl (%rax),%esi
add    $0xc8,%esi
lea    0xb1e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    153b <ProcessFile+0x38b>
jmp    1540 <ProcessFile+0x390>
jmp    1545 <ProcessFile+0x395>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    143d <ProcessFile+0x28d>
jmp    155b <ProcessFile+0x3ab>
mov    -0x30(%rbp),%rsi
lea    0xaec(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    11d8 <ProcessFile+0x28>
mov    -0x18(%rbp),%rdi
call   10b0 <ckfree@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ProcessFile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r13
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%r15
lea    0x10(%rsp),%rbx
lea    0xe43(%rip),%r12
jmp    1218 <ProcessFile+0x48>
mov    %rbx,%r15
lea    0x10(%rsp),%rbx
xchg   %ax,%ax
mov    %rbp,%rdi
call   1070 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1090 <get_line@plt>
test   %rax,%rax
je     1218 <ProcessFile+0x48>
cmp    $0xffffffffffffffff,%rax
je     1453 <ProcessFile+0x283>
mov    0x8(%rsp),%rdi
cmpb   $0xa,-0x1(%rax,%rdi,1)
jne    124b <ProcessFile+0x7b>
movb   $0x0,-0x1(%rdi,%rax,1)
mov    0x8(%rsp),%rdi
call   10c0 <skip_whitespace@plt>
mov    %rax,%r14
cmpb   $0x23,(%rax)
jne    1270 <ProcessFile+0xa0>
add    $0x1,%r14
mov    $0x30,%edi
call   1030 <putchar@plt>
jmp    129b <ProcessFile+0xcb>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
lea    0xdbe(%rip),%rsi
mov    $0x3,%edx
call   1080 <strncmplax@plt>
test   %rax,%rax
je     133a <ProcessFile+0x16a>
lea    0xda8(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %r14,%rbp
lea    0xda6(%rip),%r14
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    0x0(%rbp),%al
jmp    12d2 <ProcessFile+0x102>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
movzbl 0x1(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
je     1210 <ProcessFile+0x40>
movsbl %al,%edi
call   10b0 <isspace@plt>
test   %eax,%eax
jne    1210 <ProcessFile+0x40>
movsbl 0x0(%rbp),%edi
call   1040 <isdigit@plt>
movsbl 0x0(%rbp),%esi
test   %rax,%rax
jne    12c0 <ProcessFile+0xf0>
mov    %esi,%edi
call   10f0 <isupper@plt>
movsbl 0x0(%rbp),%edi
test   %rax,%rax
je     1317 <ProcessFile+0x147>
lea    (%rdi,%rdi,1),%esi
add    $0xffffffe2,%esi
mov    %r14,%rdi
jmp    12c3 <ProcessFile+0xf3>
call   1050 <islower@plt>
movsbl 0x0(%rbp),%esi
test   %rax,%rax
je     132f <ProcessFile+0x15f>
add    %esi,%esi
add    $0xffffffa3,%esi
mov    %r14,%rdi
jmp    12c3 <ProcessFile+0xf3>
add    $0xc8,%esi
mov    %r14,%rdi
jmp    12c3 <ProcessFile+0xf3>
movsbl 0x3(%r14),%edi
call   1040 <isdigit@plt>
test   %rax,%rax
jne    135f <ProcessFile+0x18f>
lea    0x3(%r14),%rbp
movsbl 0x0(%rbp),%edi
call   10e0 <isalpha@plt>
test   %rax,%rax
je     13e9 <ProcessFile+0x219>
mov    %r15,%rbx
movsbl 0x3(%r14),%edi
call   10e0 <isalpha@plt>
lea    0x4(%r14),%rbp
movsbl 0x3(%r14),%r15d
test   %rax,%rax
je     13b2 <ProcessFile+0x1e2>
mov    %r15d,%edi
call   1060 <toupper@plt>
movsbl %al,%eax
lea    -0x4d(%rax),%ecx
cmp    $0xd,%ecx
lea    0xcb9(%rip),%r14
ja     13fc <ProcessFile+0x22c>
mov    $0x65,%r15d
lea    0xc5f(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x69,%r15d
jmp    141a <ProcessFile+0x24a>
add    $0xffffffd0,%r15d
movsbl 0x0(%rbp),%edi
call   1040 <isdigit@plt>
test   %rax,%rax
je     13dc <ProcessFile+0x20c>
lea    (%r15,%r15,4),%eax
mov    %r14,%rbp
add    $0x5,%rbp
movsbl 0x4(%r14),%ecx
lea    (%rcx,%rax,2),%r15d
add    $0xffffffd0,%r15d
lea    0xc68(%rip),%r14
add    $0x1,%r15d
jmp    141a <ProcessFile+0x24a>
lea    0xc50(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
jmp    129e <ProcessFile+0xce>
add    $0x29,%eax
mov    %eax,%r15d
jmp    141a <ProcessFile+0x24a>
mov    $0x67,%r15d
jmp    141a <ProcessFile+0x24a>
mov    $0x66,%r15d
jmp    141a <ProcessFile+0x24a>
mov    $0x68,%r15d
lea    0xc23(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    0x0(%rbp),%al
test   %al,%al
je     1206 <ProcessFile+0x36>
movsbl %al,%edi
call   10b0 <isspace@plt>
test   %eax,%eax
mov    %rbx,%r15
lea    0x10(%rsp),%rbx
jne    1210 <ProcessFile+0x40>
jmp    12a5 <ProcessFile+0xd5>
mov    0x8(%rsp),%rdi
call   10d0 <ckfree@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [4 x i8] c"chr\00"
@.str.2 = [4 x i8] c"300\00"
@.str.3 = [4 x i8] c"200\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [2 x i8] c".\00"
@.str.6 = [4 x i8] c"0%c\00"
@.str.7 = [5 x i8] c"%03d\00"
@.str.8 = [4 x i8] c"%s\0A\00"
define void @ProcessFile(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8
store i8* %0, i8** %3
store i32* %1, i32** %4
store i8* null, i8** %5
store i64 0, i64* %6
store i64 0, i64* %7
br label %11
11: ; preds = %2, %20, %188
%12 = load i32*, i32** %4
%13 = call i64 @get_line(i8** %5, i64* %6, i32* %12)
store i64 %13, i64* %7
%14 = load i64, i64* %7
%15 = icmp eq i64 %14, -1
br i1 %15, label %16, label %17
16: ; preds = %11
br label %191
17: ; preds = %11
%18 = load i64, i64* %7
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
br label %11
21: ; preds = %17
%22 = load i8*, i8** %5
%23 = load i64, i64* %7
%24 = sub i64 %23, 1
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 10
br i1 %28, label %29, label %34
29: ; preds = %21
%30 = load i8*, i8** %5
%31 = load i64, i64* %7
%32 = add i64 %31, -1
store i64 %32, i64* %7
%33 = getelementptr inbounds i8, i8* %30, i64 %32
store i8 0, i8* %33
br label %34
34: ; preds = %29, %21
%35 = load i8*, i8** %5
%36 = call i8* @skip_whitespace(i8* %35)
store i8* %36, i8** %8
%37 = load i8*, i8** %8
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 35
br i1 %40, label %41, label %45
41: ; preds = %34
%42 = load i8*, i8** %8
%43 = getelementptr inbounds i8, i8* %42, i32 1
store i8* %43, i8** %8
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %124
45: ; preds = %34
%46 = load i8*, i8** %8
%47 = call i64 @strncmplax(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %124
51: ; preds = %45
%52 = load i8*, i8** %8
%53 = getelementptr inbounds i8, i8* %52, i64 3
store i8* %53, i8** %8
%54 = load i8*, i8** %8
%55 = load i8, i8* %54
%56 = call i64 @isdigit(i8 signext %55)
%57 = icmp ne i64 %56, 0
br i1 %57, label %65, label %58
58: ; preds = %51
%59 = load i8*, i8** %8
%60 = load i8, i8* %59
%61 = call i64 @isalpha(i8 signext %60)
%62 = icmp ne i64 %61, 0
br i1 %62, label %65, label %63
63: ; preds = %58
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %124
65: ; preds = %58, %51
%66 = load i8*, i8** %8
%67 = load i8, i8* %66
%68 = call i64 @isalpha(i8 signext %67)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %89
70: ; preds = %65
%71 = load i8*, i8** %8
%72 = getelementptr inbounds i8, i8* %71, i32 1
store i8* %72, i8** %8
%73 = load i8, i8* %71
%74 = sext i8 %73 to i32
%75 = call signext i8 @toupper(i32 %74)
store i8 %75, i8* %10
%76 = load i8, i8* %10
%77 = sext i8 %76 to i32
switch i32 %77, label %83 [
i32 88, label %78
i32 89, label %79
i32 87, label %80
i32 90, label %81
i32 77, label %82
]
78: ; preds = %70
store i32 101, i32* %9
br label %88
79: ; preds = %70
store i32 102, i32* %9
br label %88
80: ; preds = %70
store i32 103, i32* %9
br label %88
81: ; preds = %70
store i32 104, i32* %9
br label %88
82: ; preds = %70
store i32 105, i32* %9
br label %88
83: ; preds = %70
%84 = load i8, i8* %10
%85 = sext i8 %84 to i32
%86 = add nsw i32 106, %85
%87 = sub nsw i32 %86, 65
store i32 %87, i32* %9
br label %88
88: ; preds = %83, %82, %81, %80, %79, %78
br label %111
89: ; preds = %65
%90 = load i8*, i8** %8
%91 = getelementptr inbounds i8, i8* %90, i32 1
store i8* %91, i8** %8
%92 = load i8, i8* %90
%93 = sext i8 %92 to i32
%94 = sub nsw i32 %93, 48
store i32 %94, i32* %9
%95 = load i8*, i8** %8
%96 = load i8, i8* %95
%97 = call i64 @isdigit(i8 signext %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %108
99: ; preds = %89
%100 = load i32, i32* %9
%101 = mul nsw i32 10, %100
%102 = load i8*, i8** %8
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %8
%104 = load i8, i8* %102
%105 = sext i8 %104 to i32
%106 = add nsw i32 %101, %105
%107 = sub nsw i32 %106, 48
store i32 %107, i32* %9
br label %108
108: ; preds = %99, %89
%109 = load i32, i32* %9
%110 = add nsw i32 %109, 1
store i32 %110, i32* %9
br label %111
111: ; preds = %108, %88
%112 = load i32, i32* %9
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %112)
%114 = load i8*, i8** %8
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp ne i32 %116, 0
br i1 %117, label %118, label %188
118: ; preds = %111
%119 = load i8*, i8** %8
%120 = load i8, i8* %119
%121 = call i32 @isspace(i8 signext %120)
%122 = icmp ne i32 %121, 0
br i1 %122, label %188, label %123
123: ; preds = %118
br label %124
124: ; preds = %123, %63, %49, %41
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %126
126: ; preds = %184, %124
%127 = load i8*, i8** %8
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp ne i32 %129, 0
br i1 %130, label %131, label %137
131: ; preds = %126
%132 = load i8*, i8** %8
%133 = load i8, i8* %132
%134 = call i32 @isspace(i8 signext %133)
%135 = icmp ne i32 %134, 0
%136 = xor i1 %135, true
br label %137
137: ; preds = %131, %126
%138 = phi i1 [ false, %126 ], [ %136, %131 ]
br i1 %138, label %139, label %187
139: ; preds = %137
%140 = load i8*, i8** %8
%141 = load i8, i8* %140
%142 = call i64 @isdigit(i8 signext %141)
%143 = icmp ne i64 %142, 0
br i1 %143, label %144, label %149
144: ; preds = %139
%145 = load i8*, i8** %8
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %147)
br label %183
149: ; preds = %139
%150 = load i8*, i8** %8
%151 = load i8, i8* %150
%152 = call i64 @isupper(i8 signext %151)
%153 = icmp ne i64 %152, 0
br i1 %153, label %154, label %162
154: ; preds = %149
%155 = load i8*, i8** %8
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = sub nsw i32 %157, 65
%159 = mul nsw i32 2, %158
%160 = add nsw i32 100, %159
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %160)
br label %182
162: ; preds = %149
%163 = load i8*, i8** %8
%164 = load i8, i8* %163
%165 = call i64 @islower(i8 signext %164)
%166 = icmp ne i64 %165, 0
br i1 %166, label %167, label %175
167: ; preds = %162
%168 = load i8*, i8** %8
%169 = load i8, i8* %168
%170 = sext i8 %169 to i32
%171 = sub nsw i32 %170, 97
%172 = mul nsw i32 2, %171
%173 = add nsw i32 101, %172
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %173)
br label %181
175: ; preds = %162
%176 = load i8*, i8** %8
%177 = load i8, i8* %176
%178 = sext i8 %177 to i32
%179 = add nsw i32 200, %178
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %179)
br label %181
181: ; preds = %175, %167
br label %182
182: ; preds = %181, %154
br label %183
183: ; preds = %182, %144
br label %184
184: ; preds = %183
%185 = load i8*, i8** %8
%186 = getelementptr inbounds i8, i8* %185, i32 1
store i8* %186, i8** %8
br label %126
187: ; preds = %137
br label %188
188: ; preds = %187, %118, %111
%189 = load i8*, i8** %8
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %189)
br label %11
191: ; preds = %16
%192 = load i8*, i8** %5
%193 = call i32 @ckfree(i8* %192)
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"chr\00"
@.str.2 = [4 x i8] c"300\00"
@.str.3 = [4 x i8] c"200\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.6 = [4 x i8] c"0%c\00"
@.str.7 = [5 x i8] c"%03d\00"
define void @ProcessFile(i8* nocapture readnone %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%6 = bitcast i64* %4 to i8*
store i64 0, i64* %4
br label %7
7: ; preds = %128, %2
%8 = call i64 @get_line(i8** %3, i64* %4, i32* %1)
switch i64 %8, label %9 [
i64 -1, label %129
i64 0, label %128
]
9: ; preds = %7
%10 = load i8*, i8** %3
%11 = add i64 %8, -1
%12 = getelementptr inbounds i8, i8* %10, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 10
br i1 %14, label %15, label %17
15: ; preds = %9
store i8 0, i8* %12
%16 = load i8*, i8** %3
br label %17
17: ; preds = %15, %9
%18 = phi i8* [ %16, %15 ], [ %10, %9 ]
%19 = call i8* @skip_whitespace(i8* %18)
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 35
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = getelementptr inbounds i8, i8* %19, i64 1
%24 = call i32 @putchar(i32 48)
br label %82
25: ; preds = %17
%26 = call i64 @strncmplax(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %82
30: ; preds = %25
%31 = getelementptr inbounds i8, i8* %19, i64 3
%32 = load i8, i8* %31
%33 = call i64 @isdigit(i8 signext %32)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %30
%36 = load i8, i8* %31
%37 = call i64 @isalpha(i8 signext %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %82
41: ; preds = %35, %30
%42 = load i8, i8* %31
%43 = call i64 @isalpha(i8 signext %42)
%44 = icmp eq i64 %43, 0
%45 = getelementptr inbounds i8, i8* %19, i64 4
%46 = load i8, i8* %31
%47 = sext i8 %46 to i32
br i1 %44, label %57, label %48
48: ; preds = %41
%49 = call signext i8 @toupper(i32 %47)
%50 = sext i8 %49 to i32
switch i32 %50, label %55 [
i32 88, label %73
i32 89, label %51
i32 87, label %52
i32 90, label %53
i32 77, label %54
]
51: ; preds = %48
br label %73
52: ; preds = %48
br label %73
53: ; preds = %48
br label %73
54: ; preds = %48
br label %73
55: ; preds = %48
%56 = add nsw i32 %50, 41
br label %73
57: ; preds = %41
%58 = add nsw i32 %47, -48
%59 = load i8, i8* %45
%60 = call i64 @isdigit(i8 signext %59)
%61 = icmp eq i64 %60, 0
br i1 %61, label %69, label %62
62: ; preds = %57
%63 = mul nsw i32 %58, 10
%64 = getelementptr inbounds i8, i8* %19, i64 5
%65 = load i8, i8* %45
%66 = sext i8 %65 to i32
%67 = add nsw i32 %63, -48
%68 = add nsw i32 %67, %66
br label %69
69: ; preds = %62, %57
%70 = phi i8* [ %64, %62 ], [ %45, %57 ]
%71 = phi i32 [ %68, %62 ], [ %58, %57 ]
%72 = add nsw i32 %71, 1
br label %73
73: ; preds = %48, %51, %52, %53, %54, %55, %69
%74 = phi i8* [ %45, %55 ], [ %45, %54 ], [ %45, %53 ], [ %45, %52 ], [ %45, %51 ], [ %70, %69 ], [ %45, %48 ]
%75 = phi i32 [ %56, %55 ], [ 105, %54 ], [ 104, %53 ], [ 103, %52 ], [ 102, %51 ], [ %72, %69 ], [ 101, %48 ]
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %75)
%77 = load i8, i8* %74
%78 = icmp eq i8 %77, 0
br i1 %78, label %125, label %79
79: ; preds = %73
%80 = call i32 @isspace(i8 signext %77)
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %125
82: ; preds = %79, %39, %28, %22
%83 = phi i8* [ %23, %22 ], [ %19, %28 ], [ %74, %79 ], [ %31, %39 ]
%84 = call i32 @putchar(i32 46)
%85 = load i8, i8* %83
%86 = icmp eq i8 %85, 0
br i1 %86, label %125, label %87
87: ; preds = %82, %121
%88 = phi i8 [ %123, %121 ], [ %85, %82 ]
%89 = phi i8* [ %122, %121 ], [ %83, %82 ]
%90 = call i32 @isspace(i8 signext %88)
%91 = icmp eq i32 %90, 0
br i1 %91, label %92, label %125
92: ; preds = %87
%93 = load i8, i8* %89
%94 = call i64 @isdigit(i8 signext %93)
%95 = icmp eq i64 %94, 0
%96 = load i8, i8* %89
br i1 %95, label %100, label %97
97: ; preds = %92
%98 = sext i8 %96 to i32
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %98)
br label %121
100: ; preds = %92
%101 = call i64 @isupper(i8 signext %96)
%102 = icmp eq i64 %101, 0
%103 = load i8, i8* %89
br i1 %102, label %109, label %104
104: ; preds = %100
%105 = sext i8 %103 to i32
%106 = shl nsw i32 %105, 1
%107 = add nsw i32 %106, -30
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %107)
br label %121
109: ; preds = %100
%110 = call i64 @islower(i8 signext %103)
%111 = icmp eq i64 %110, 0
%112 = load i8, i8* %89
%113 = sext i8 %112 to i32
br i1 %111, label %118, label %114
114: ; preds = %109
%115 = shl nsw i32 %113, 1
%116 = add nsw i32 %115, -93
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %116)
br label %121
118: ; preds = %109
%119 = add nsw i32 %113, 200
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %119)
br label %121
121: ; preds = %97, %114, %118, %104
%122 = getelementptr inbounds i8, i8* %89, i64 1
%123 = load i8, i8* %122
%124 = icmp eq i8 %123, 0
br i1 %124, label %125, label %87
125: ; preds = %121, %87, %82, %79, %73
%126 = phi i8* [ %74, %79 ], [ %74, %73 ], [ %83, %82 ], [ %122, %121 ], [ %89, %87 ]
%127 = call i32 @puts(i8* %126)
br label %128
128: ; preds = %125, %7
br label %7
129: ; preds = %7
%130 = load i8*, i8** %3
%131 = call i32 @ckfree(i8* %130)
ret void
}