#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*/ CheckAscii(unsigned char *, int);
size_t GetTableHeader(int /*<<< orphan*/ *, unsigned char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strncmp(char *, char *, int);
int ListTables(char *InputPathname) {
  FILE *InputFile;
  char Buffer[256];
  size_t HeaderSize;
  unsigned char Header[48];
  int TableCount = 0;
  InputFile = fopen(InputPathname, "rt");
  if (!InputFile) {
    printf("Could not open %s\n", InputPathname);
    return -1;
  }
  printf("\nSignature Length  OemId     OemTableId   OemRevision CompilerId "
         "CompilerRevision\n\n");
  while (fgets(Buffer, 256, InputFile)) {
    if ((Buffer[0] == ' ') || (Buffer[0] == '\n')) {
      continue;
    }
    HeaderSize = GetTableHeader(InputFile, Header);
    if (HeaderSize < 16) {
      continue;
    }
    if (!strncmp((char *)Header, "RSD PTR ", 8)) {
      CheckAscii(&Header[9], 6);
      printf("%8.4s          \"%6.6s\"\n", "RSDP", &Header[9]);
      TableCount++;
      continue;
    }
    if (HeaderSize < 36) {
      continue;
    }
    TableCount++;
    printf("%8.4s % 7d", Header,
           ((Header)[4] | (Header)[(4) + 1] << 8 | (Header)[(4) + 2] << 16 |
            (Header)[(4) + 3] << 24));
    if (!strncmp((char *)Header, "FACS", 4)) {
      printf("\n");
      continue;
    }
    CheckAscii(&Header[10], 6);
    CheckAscii(&Header[16], 8);
    CheckAscii(&Header[28], 4);
    printf("  \"%6.6s\"  \"%8.8s\"    %8.8X    \"%4.4s\"     %8.8X\n",
           &Header[10], &Header[16],
           ((Header)[24] | (Header)[(24) + 1] << 8 | (Header)[(24) + 2] << 16 |
            (Header)[(24) + 3] << 24),
           &Header[28],
           ((Header)[32] | (Header)[(32) + 1] << 8 | (Header)[(32) + 2] << 16 |
            (Header)[(32) + 3] << 24));
  }
  printf("\nFound %d ACPI tables [%8.8X]\n", TableCount, 0x20110323);
  fclose(InputFile);
  return 0;
}


x86 assembly (clang, -O0):
<ListTables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x164(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe6c(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11c6 <ListTables+0x56>
mov    -0x10(%rbp),%rsi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1438 <ListTables+0x2c8>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x100,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     140f <ListTables+0x29f>
movsbl -0x120(%rbp),%eax
cmp    $0x20,%eax
je     1213 <ListTables+0xa3>
movsbl -0x120(%rbp),%eax
cmp    $0xa,%eax
jne    1218 <ListTables+0xa8>
jmp    11d4 <ListTables+0x64>
mov    -0x18(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   1070 <GetTableHeader@plt>
mov    %rax,-0x128(%rbp)
cmpq   $0x10,-0x128(%rbp)
10
jae    1242 <ListTables+0xd2>
jmp    11d4 <ListTables+0x64>
lea    -0x160(%rbp),%rdi
lea    0xe1a(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12ac <ListTables+0x13c>
lea    -0x160(%rbp),%rdi
add    $0x9,%rdi
mov    $0x6,%esi
call   1090 <CheckAscii@plt>
lea    -0x160(%rbp),%rdx
add    $0x9,%rdx
lea    0xde9(%rip),%rdi
lea    0xdfa(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x164(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x164(%rbp)
jmp    11d4 <ListTables+0x64>
cmpq   $0x24,-0x128(%rbp)
24
jae    12bf <ListTables+0x14f>
jmp    11d4 <ListTables+0x64>
mov    -0x164(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x164(%rbp)
lea    -0x160(%rbp),%rsi
movzbl -0x15c(%rbp),%edx
movzbl -0x15b(%rbp),%eax
shl    $0x8,%eax
or     %eax,%edx
movzbl -0x15a(%rbp),%eax
shl    $0x10,%eax
or     %eax,%edx
movzbl -0x159(%rbp),%eax
shl    $0x18,%eax
or     %eax,%edx
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x160(%rbp),%rdi
lea    0xd7f(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1342 <ListTables+0x1d2>
lea    0xd32(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11d4 <ListTables+0x64>
lea    -0x160(%rbp),%rdi
add    $0xa,%rdi
mov    $0x6,%esi
call   1090 <CheckAscii@plt>
lea    -0x160(%rbp),%rdi
add    $0x10,%rdi
mov    $0x8,%esi
call   1090 <CheckAscii@plt>
lea    -0x160(%rbp),%rdi
add    $0x1c,%rdi
mov    $0x4,%esi
call   1090 <CheckAscii@plt>
lea    -0x160(%rbp),%rsi
add    $0xa,%rsi
lea    -0x160(%rbp),%rdx
add    $0x10,%rdx
movzbl -0x148(%rbp),%ecx
movzbl -0x147(%rbp),%eax
shl    $0x8,%eax
or     %eax,%ecx
movzbl -0x146(%rbp),%eax
shl    $0x10,%eax
or     %eax,%ecx
movzbl -0x145(%rbp),%eax
shl    $0x18,%eax
or     %eax,%ecx
lea    -0x160(%rbp),%r8
add    $0x1c,%r8
movzbl -0x140(%rbp),%r9d
ff
movzbl -0x13f(%rbp),%eax
shl    $0x8,%eax
or     %eax,%r9d
movzbl -0x13e(%rbp),%eax
shl    $0x10,%eax
or     %eax,%r9d
movzbl -0x13d(%rbp),%eax
shl    $0x18,%eax
or     %eax,%r9d
lea    0xc9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11d4 <ListTables+0x64>
mov    -0x164(%rbp),%esi
lea    0xcb6(%rip),%rdi
mov    $0x20110323,%edx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ListTables>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %rdi,%rbp
lea    0xe55(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     11f4 <ListTables+0x64>
mov    %rax,%rbx
lea    0xede(%rip),%rdi
call   1050 <puts@plt>
lea    0x30(%rsp),%rdi
mov    $0x100,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
xor    %ebp,%ebp
mov    $0x0,%r15d
test   %rax,%rax
je     1331 <ListTables+0x1a1>
lea    0x30(%rsp),%r14
mov    %rsp,%r12
xor    %r15d,%r15d
jmp    1259 <ListTables+0xc9>
lea    0xe08(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%ebp
jmp    134f <ListTables+0x1bf>
lea    0x9(%rsp),%r13
mov    %r13,%rdi
mov    $0x6,%esi
call   10b0 <CheckAscii@plt>
lea    0xdf7(%rip),%rdi
lea    0xe08(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%r15d
nopl   (%rax)
mov    %r14,%rdi
mov    $0x100,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1331 <ListTables+0x1a1>
movzbl 0x30(%rsp),%eax
cmp    $0xa,%al
je     1240 <ListTables+0xb0>
cmp    $0x20,%al
je     1240 <ListTables+0xb0>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1090 <GetTableHeader@plt>
cmp    $0xf,%rax
jbe    1240 <ListTables+0xb0>
mov    %rax,%r13
mov    %r12,%rdi
lea    0xd92(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     120f <ListTables+0x7f>
cmp    $0x24,%r13
jb     1240 <ListTables+0xb0>
mov    0x4(%rsp),%edx
lea    0xd95(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
lea    0xd8c(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1322 <ListTables+0x192>
lea    0xa(%rsp),%rdi
mov    $0x6,%esi
call   10b0 <CheckAscii@plt>
lea    0x10(%rsp),%rdi
mov    $0x8,%esi
call   10b0 <CheckAscii@plt>
lea    0x1c(%rsp),%r13
mov    %r13,%rdi
mov    $0x4,%esi
call   10b0 <CheckAscii@plt>
mov    0x18(%rsp),%ecx
mov    0x20(%rsp),%r9d
lea    0xd43(%rip),%rdi
lea    0xa(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %r13,%r8
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1239 <ListTables+0xa9>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1239 <ListTables+0xa9>
lea    0xd46(%rip),%rdi
mov    %r15d,%esi
mov    $0x20110323,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    %ebp,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rt\00"
@.str.1 = [19 x i8] c"Could not open %s\0A\00"
@.str.2 = [84 x i8] c"\0ASignature Length OemId OemTableId OemRevision CompilerId CompilerRevision\0A\0A\00"
@.str.3 = [9 x i8] c"RSD PTR \00"
@.str.4 = [24 x i8] c"%8.4s \22%6.6s\22\0A\00"
@.str.5 = [5 x i8] c"RSDP\00"
@.str.6 = [11 x i8] c"%8.4s % 7d\00"
@.str.7 = [5 x i8] c"FACS\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [50 x i8] c" \22%6.6s\22 \22%8.8s\22 %8.8X \22%4.4s\22 %8.8X\0A\00"
@.str.10 = [31 x i8] c"\0AFound %d ACPI tables [%8.8X]\0A\00"
define i32 @ListTables(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [256 x i8]
%6 = alloca i64
%7 = alloca [48 x i8]
%8 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %8
%9 = load i8*, i8** %3
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %4
%11 = load i32*, i32** %4
%12 = icmp ne i32* %11, null
br i1 %12, label %16, label %13
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %14)
store i32 -1, i32* %2
br label %136
16: ; preds = %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %84, %82, %55, %45, %40, %33, %16
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%20 = load i32*, i32** %4
%21 = call i64 @fgets(i8* %19, i32 256, i32* %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %131
23: ; preds = %18
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 32
br i1 %27, label %33, label %28
28: ; preds = %23
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 10
br i1 %32, label %33, label %34
33: ; preds = %28, %23
br label %18
34: ; preds = %28
%35 = load i32*, i32** %4
%36 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%37 = call i64 @GetTableHeader(i32* %35, i8* %36)
store i64 %37, i64* %6
%38 = load i64, i64* %6
%39 = icmp ult i64 %38, 16
br i1 %39, label %40, label %41
40: ; preds = %34
br label %18
41: ; preds = %34
%42 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%43 = call i32 @strncmp(i8* %42, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 8)
%44 = icmp ne i32 %43, 0
br i1 %44, label %52, label %45
45: ; preds = %41
%46 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 9
%47 = call i32 @CheckAscii(i8* %46, i32 6)
%48 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 9
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %48)
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
br label %18
52: ; preds = %41
%53 = load i64, i64* %6
%54 = icmp ult i64 %53, 36
br i1 %54, label %55, label %56
55: ; preds = %52
br label %18
56: ; preds = %52
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
store i32 %58, i32* %8
%59 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%60 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 4
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 5
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = shl i32 %65, 8
%67 = or i32 %62, %66
%68 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 6
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = shl i32 %70, 16
%72 = or i32 %67, %71
%73 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 7
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = shl i32 %75, 24
%77 = or i32 %72, %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* %59, i32 %77)
%79 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%80 = call i32 @strncmp(i8* %79, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%81 = icmp ne i32 %80, 0
br i1 %81, label %84, label %82
82: ; preds = %56
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %18
84: ; preds = %56
%85 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 10
%86 = call i32 @CheckAscii(i8* %85, i32 6)
%87 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 16
%88 = call i32 @CheckAscii(i8* %87, i32 8)
%89 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 28
%90 = call i32 @CheckAscii(i8* %89, i32 4)
%91 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 10
%92 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 16
%93 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 24
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 25
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = shl i32 %98, 8
%100 = or i32 %95, %99
%101 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 26
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = shl i32 %103, 16
%105 = or i32 %100, %104
%106 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 27
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
%109 = shl i32 %108, 24
%110 = or i32 %105, %109
%111 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 28
%112 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 32
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 33
%116 = load i8, i8* %115
%117 = zext i8 %116 to i32
%118 = shl i32 %117, 8
%119 = or i32 %114, %118
%120 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 34
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = shl i32 %122, 16
%124 = or i32 %119, %123
%125 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 35
%126 = load i8, i8* %125
%127 = zext i8 %126 to i32
%128 = shl i32 %127, 24
%129 = or i32 %124, %128
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i8* %91, i8* %92, i32 %110, i8* %111, i32 %129)
br label %18
131: ; preds = %18
%132 = load i32, i32* %8
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %132, i32 537985827)
%134 = load i32*, i32** %4
%135 = call i32 @fclose(i32* %134)
store i32 0, i32* %2
br label %136
136: ; preds = %131, %13
%137 = load i32, i32* %2
ret i32 %137
}

LLVM IR (-O2):
@.str = [3 x i8] c"rt\00"
@.str.1 = [19 x i8] c"Could not open %s\0A\00"
@.str.3 = [9 x i8] c"RSD PTR \00"
@.str.4 = [24 x i8] c"%8.4s \22%6.6s\22\0A\00"
@.str.5 = [5 x i8] c"RSDP\00"
@.str.6 = [11 x i8] c"%8.4s % 7d\00"
@.str.7 = [5 x i8] c"FACS\00"
@.str.9 = [50 x i8] c" \22%6.6s\22 \22%8.8s\22 %8.8X \22%4.4s\22 %8.8X\0A\00"
@.str.10 = [31 x i8] c"\0AFound %d ACPI tables [%8.8X]\0A\00"
@str = [83 x i8] c"\0ASignature Length OemId OemTableId OemRevision CompilerId CompilerRevision\0A\00"
define i32 @ListTables(i8* %0) {
%2 = alloca [256 x i8]
%3 = alloca [48 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 0
%6 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %110
10: ; preds = %1
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str, i64 0, i64 0))
%12 = call i64 @fgets(i8* %4, i32 256, i32* %6)
%13 = icmp eq i64 %12, 0
br i1 %13, label %106, label %14
14: ; preds = %10
%15 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 4
%16 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 5
%17 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 6
%18 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 7
%19 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 10
%20 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 16
%21 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 28
%22 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 24
%23 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 25
%24 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 26
%25 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 27
%26 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 32
%27 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 33
%28 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 34
%29 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 35
%30 = getelementptr inbounds [48 x i8], [48 x i8]* %3, i64 0, i64 9
br label %31
31: ; preds = %14, %102
%32 = phi i32 [ 0, %14 ], [ %103, %102 ]
br label %33
33: ; preds = %31, %38
%34 = load i8, i8* %4
switch i8 %34, label %35 [
i8 32, label %38
i8 10, label %38
]
35: ; preds = %33
%36 = call i64 @GetTableHeader(i32* %6, i8* %5)
%37 = icmp ult i64 %36, 16
br i1 %37, label %38, label %41
38: ; preds = %35, %47, %33, %33
%39 = call i64 @fgets(i8* %4, i32 256, i32* %6)
%40 = icmp eq i64 %39, 0
br i1 %40, label %106, label %33
41: ; preds = %35
%42 = call i32 @strncmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 8)
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = call i32 @CheckAscii(i8* %30, i32 6)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %30)
br label %102
47: ; preds = %41
%48 = icmp ult i64 %36, 36
br i1 %48, label %38, label %49
49: ; preds = %47
%50 = load i8, i8* %15
%51 = zext i8 %50 to i32
%52 = load i8, i8* %16
%53 = zext i8 %52 to i32
%54 = shl nuw nsw i32 %53, 8
%55 = or i32 %54, %51
%56 = load i8, i8* %17
%57 = zext i8 %56 to i32
%58 = shl nuw nsw i32 %57, 16
%59 = or i32 %55, %58
%60 = load i8, i8* %18
%61 = zext i8 %60 to i32
%62 = shl nuw i32 %61, 24
%63 = or i32 %59, %62
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* %5, i32 %63)
%65 = call i32 @strncmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %49
%68 = call i32 @putchar(i32 10)
br label %102
69: ; preds = %49
%70 = call i32 @CheckAscii(i8* %19, i32 6)
%71 = call i32 @CheckAscii(i8* %20, i32 8)
%72 = call i32 @CheckAscii(i8* %21, i32 4)
%73 = load i8, i8* %22
%74 = zext i8 %73 to i32
%75 = load i8, i8* %23
%76 = zext i8 %75 to i32
%77 = shl nuw nsw i32 %76, 8
%78 = or i32 %77, %74
%79 = load i8, i8* %24
%80 = zext i8 %79 to i32
%81 = shl nuw nsw i32 %80, 16
%82 = or i32 %78, %81
%83 = load i8, i8* %25
%84 = zext i8 %83 to i32
%85 = shl nuw i32 %84, 24
%86 = or i32 %82, %85
%87 = load i8, i8* %26
%88 = zext i8 %87 to i32
%89 = load i8, i8* %27
%90 = zext i8 %89 to i32
%91 = shl nuw nsw i32 %90, 8
%92 = or i32 %91, %88
%93 = load i8, i8* %28
%94 = zext i8 %93 to i32
%95 = shl nuw nsw i32 %94, 16
%96 = or i32 %92, %95
%97 = load i8, i8* %29
%98 = zext i8 %97 to i32
%99 = shl nuw i32 %98, 24
%100 = or i32 %96, %99
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i8* %19, i8* %20, i32 %86, i8* %21, i32 %100)
br label %102
102: ; preds = %69, %67, %44
%103 = add nuw nsw i32 %32, 1
%104 = call i64 @fgets(i8* %4, i32 256, i32* %6)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %31
106: ; preds = %102, %38, %10
%107 = phi i32 [ 0, %10 ], [ %32, %38 ], [ %103, %102 ]
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %107, i32 537985827)
%109 = call i32 @fclose(i32* %6)
br label %110
110: ; preds = %106, %8
%111 = phi i32 [ 0, %106 ], [ -1, %8 ]
ret i32 %111
}