#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 */

/* Variables and functions */
int EOF;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getchar();
int /*<<< orphan*/ stderr;
int dump_header(void) {
  int acyl, asid, lcyl, lsid, lsec, llen, c, count;
  acyl = getchar();
  if (acyl == EOF)
    return -1;
  asid = getchar();
  if (asid == EOF)
    return -1;
  lcyl = getchar();
  if (lcyl == EOF)
    return -1;
  lsid = getchar();
  if (lsid == EOF)
    return -1;
  lsec = getchar();
  if (lsec == EOF)
    return -1;
  llen = getchar();
  if (llen == EOF)
    return -1;
  c = getchar();
  if (c == EOF)
    return -1;
  count = c;
  c = getchar();
  if (c == EOF)
    return -1;
  count |= (c << 8);
  fprintf(stderr, "H/C/S: %d/%d/%d\n", lsid, lcyl, lsec);
  fprintf(stderr, "+------+------+------+------+------+------+-----------+\n");
  fprintf(stderr, "| acyl | asid | lcyl | lsid | lsec | llen |     count |\n");
  fprintf(stderr, "|  %3d |  %3d |  %3d |  %3d |  %3d |  %3d | %9d |\n", acyl,
          asid, lcyl, lsid, lsec, llen, count);
  fprintf(stderr, "+------+------+------+------+------+------+-----------+\n");
  return count;
}


x86 assembly (clang, -O0):
<dump_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
jne    1150 <dump_header+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%eax
jne    1178 <dump_header+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    0x2e5c(%rip),%rcx
cmp    (%rcx),%eax
jne    11a0 <dump_header+0x80>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e34(%rip),%rcx
cmp    (%rcx),%eax
jne    11c8 <dump_header+0xa8>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    0x2e0c(%rip),%rcx
cmp    (%rcx),%eax
jne    11f0 <dump_header+0xd0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2de4(%rip),%rcx
cmp    (%rcx),%eax
jne    1218 <dump_header+0xf8>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    0x2dbc(%rip),%rcx
cmp    (%rcx),%eax
jne    1240 <dump_header+0x120>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    0x2d8e(%rip),%rcx
cmp    (%rcx),%eax
jne    126e <dump_header+0x14e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1323 <dump_header+0x203>
mov    -0x20(%rbp),%eax
shl    $0x8,%eax
or     -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
lea    0xd66(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
lea    0xd88(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r11d
mov    -0x1c(%rbp),%r10d
mov    -0x24(%rbp),%eax
lea    0xd91(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
lea    0xcfb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_header>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <getchar@plt>
mov    0x2eac(%rip),%r13
mov    $0xffffffff,%ebp
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %eax,%r15d
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %eax,%r14d
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %eax,%r12d
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %rax,0x10(%rsp)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %rax,0x8(%rsp)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
mov    %eax,(%rsp)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    0x0(%r13),%eax
je     126f <dump_header+0x14f>
shl    $0x8,%eax
or     (%rsp),%eax
mov    %rax,(%rsp)
mov    0x2ded(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xe0b(%rip),%rsi
mov    %r12d,%edx
mov    %r14d,%ecx
mov    0x10(%rsp),%r13
mov    %r13d,%r8d
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xdfd(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe25(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
sub    $0x8,%rsp
lea    0xe49(%rip),%rsi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    %r12d,%r9d
xor    %eax,%eax
mov    0x8(%rsp),%rbx
push   %rbx
push   0x18(%rsp)
push   %r13
call   1040 <fprintf@plt>
add    $0x20,%rsp
mov    0x0(%rbp),%edi
lea    0xdab(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %ebx,%ebp
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
@stderr = global i32 0
@.str = [17 x i8] c"H/C/S: %d/%d/%d\0A\00"
@.str.1 = [57 x i8] c"+------+------+------+------+------+------+-----------+\0A\00"
@.str.2 = [57 x i8] c"| acyl | asid | lcyl | lsid | lsec | llen | count |\0A\00"
@.str.3 = [51 x i8] c"| %3d | %3d | %3d | %3d | %3d | %3d | %9d |\0A\00"
define i32 @dump_header() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = call i32 (...) @getchar()
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %0
store i32 -1, i32* %1
br label %84
15: ; preds = %0
%16 = call i32 (...) @getchar()
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = load i32, i32* @EOF
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %15
store i32 -1, i32* %1
br label %84
21: ; preds = %15
%22 = call i32 (...) @getchar()
store i32 %22, i32* %4
%23 = load i32, i32* %4
%24 = load i32, i32* @EOF
%25 = icmp eq i32 %23, %24
br i1 %25, label %26, label %27
26: ; preds = %21
store i32 -1, i32* %1
br label %84
27: ; preds = %21
%28 = call i32 (...) @getchar()
store i32 %28, i32* %5
%29 = load i32, i32* %5
%30 = load i32, i32* @EOF
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %33
32: ; preds = %27
store i32 -1, i32* %1
br label %84
33: ; preds = %27
%34 = call i32 (...) @getchar()
store i32 %34, i32* %6
%35 = load i32, i32* %6
%36 = load i32, i32* @EOF
%37 = icmp eq i32 %35, %36
br i1 %37, label %38, label %39
38: ; preds = %33
store i32 -1, i32* %1
br label %84
39: ; preds = %33
%40 = call i32 (...) @getchar()
store i32 %40, i32* %7
%41 = load i32, i32* %7
%42 = load i32, i32* @EOF
%43 = icmp eq i32 %41, %42
br i1 %43, label %44, label %45
44: ; preds = %39
store i32 -1, i32* %1
br label %84
45: ; preds = %39
%46 = call i32 (...) @getchar()
store i32 %46, i32* %8
%47 = load i32, i32* %8
%48 = load i32, i32* @EOF
%49 = icmp eq i32 %47, %48
br i1 %49, label %50, label %51
50: ; preds = %45
store i32 -1, i32* %1
br label %84
51: ; preds = %45
%52 = load i32, i32* %8
store i32 %52, i32* %9
%53 = call i32 (...) @getchar()
store i32 %53, i32* %8
%54 = load i32, i32* %8
%55 = load i32, i32* @EOF
%56 = icmp eq i32 %54, %55
br i1 %56, label %57, label %58
57: ; preds = %51
store i32 -1, i32* %1
br label %84
58: ; preds = %51
%59 = load i32, i32* %8
%60 = shl i32 %59, 8
%61 = load i32, i32* %9
%62 = or i32 %61, %60
store i32 %62, i32* %9
%63 = load i32, i32* @stderr
%64 = load i32, i32* %5
%65 = load i32, i32* %4
%66 = load i32, i32* %6
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %64, i32 %65, i32 %66)
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%72 = load i32, i32* @stderr
%73 = load i32, i32* %2
%74 = load i32, i32* %3
%75 = load i32, i32* %4
%76 = load i32, i32* %5
%77 = load i32, i32* %6
%78 = load i32, i32* %7
%79 = load i32, i32* %9
%80 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %73, i32 %74, i32 %75, i32 %76, i32 %77, i32 %78, i32 %79)
%81 = load i32, i32* @stderr
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%83 = load i32, i32* %9
store i32 %83, i32* %1
br label %84
84: ; preds = %58, %57, %50, %44, %38, %32, %26, %20, %14
%85 = load i32, i32* %1
ret i32 %85
}

LLVM IR (-O2):
@EOF = global i32 0
@stderr = global i32 0
@.str = [17 x i8] c"H/C/S: %d/%d/%d\0A\00"
@.str.1 = [57 x i8] c"+------+------+------+------+------+------+-----------+\0A\00"
@.str.2 = [57 x i8] c"| acyl | asid | lcyl | lsid | lsec | llen | count |\0A\00"
@.str.3 = [51 x i8] c"| %3d | %3d | %3d | %3d | %3d | %3d | %9d |\0A\00"
define i32 @dump_header() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %45, label %4
4: ; preds = %0
%5 = tail call i32 (...) @getchar()
%6 = load i32, i32* @EOF
%7 = icmp eq i32 %5, %6
br i1 %7, label %45, label %8
8: ; preds = %4
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %45, label %12
12: ; preds = %8
%13 = tail call i32 (...) @getchar()
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %45, label %16
16: ; preds = %12
%17 = tail call i32 (...) @getchar()
%18 = load i32, i32* @EOF
%19 = icmp eq i32 %17, %18
br i1 %19, label %45, label %20
20: ; preds = %16
%21 = tail call i32 (...) @getchar()
%22 = load i32, i32* @EOF
%23 = icmp eq i32 %21, %22
br i1 %23, label %45, label %24
24: ; preds = %20
%25 = tail call i32 (...) @getchar()
%26 = load i32, i32* @EOF
%27 = icmp eq i32 %25, %26
br i1 %27, label %45, label %28
28: ; preds = %24
%29 = tail call i32 (...) @getchar()
%30 = load i32, i32* @EOF
%31 = icmp eq i32 %29, %30
br i1 %31, label %45, label %32
32: ; preds = %28
%33 = shl i32 %29, 8
%34 = or i32 %33, %25
%35 = load i32, i32* @stderr
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %9, i32 %17)
%37 = load i32, i32* @stderr
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%41 = load i32, i32* @stderr
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %1, i32 %5, i32 %9, i32 %13, i32 %17, i32 %21, i32 %34)
%43 = load i32, i32* @stderr
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
br label %45
45: ; preds = %28, %24, %20, %16, %12, %8, %4, %0, %32
%46 = phi i32 [ %34, %32 ], [ -1, %0 ], [ -1, %4 ], [ -1, %8 ], [ -1, %12 ], [ -1, %16 ], [ -1, %20 ], [ -1, %24 ], [ -1, %28 ]
ret i32 %46
}