#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 BUFSIZ;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int fgetl(int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  FILE *fd1;
  if (argc != 2) {
    fprintf(stderr, "usage: %s file\n", argv[0]);
    return (-1);
  }
  char *infile = argv[1];
  if ((fd1 = fopen(infile, "rb")) == NULL) {
    fprintf(stderr, "%s: %s\n", infile, strerror(errno));
    return (-1);
  }
  int offset;
  char line_buf1[BUFSIZ];
  char *ptr_skip;
  offset = 0;
  if ((fgetl(fd1, BUFSIZ, line_buf1)) == -1)
    memset(line_buf1, 0, BUFSIZ);
  ptr_skip = line_buf1;
  while (*ptr_skip++ == ' ') {
    offset++;
  }
  while (*ptr_skip++ != ' ') {
    offset++;
  }
  offset += 2;
  while (!feof(fd1)) {
    puts(line_buf1 + offset);
    if ((fgetl(fd1, BUFSIZ, line_buf1)) == -1)
      memset(line_buf1, 0, BUFSIZ);
  }
  fclose(fd1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11ca <main+0x4a>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe49(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1381 <main+0x201>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe2f(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    123a <main+0xba>
mov    0x2de5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    0x2dc1(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%rdx
mov    %rax,%rcx
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1381 <main+0x201>
mov    0x2d97(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2d60(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    129c <main+0x11c>
mov    -0x58(%rbp),%rdi
mov    0x2d45(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x58(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    12cd <main+0x14d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12a4 <main+0x124>
jmp    12d2 <main+0x152>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x40(%rbp)
movsbl (%rax),%eax
cmp    $0x20,%eax
je     12fb <main+0x17b>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12d2 <main+0x152>
mov    -0x24(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1322 <main+0x1a2>
jmp    136a <main+0x1ea>
mov    -0x58(%rbp),%rdi
movslq -0x24(%rbp),%rax
add    %rax,%rdi
call   1030 <puts@plt>
mov    -0x58(%rbp),%rdx
mov    -0x18(%rbp),%rdi
mov    0x2c97(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1365 <main+0x1e5>
mov    -0x58(%rbp),%rdi
mov    0x2c7c(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    1304 <main+0x184>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    1247 <main+0xc7>
mov    0x8(%rsi),%rbx
lea    0xe6e(%rip),%rsi
mov    %rbx,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     1263 <main+0xe3>
mov    %rax,%r15
mov    %rsp,%r12
mov    0x2e18(%rip),%r13
mov    0x0(%r13),%eax
mov    %rsp,%r14
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    0x0(%r13),%esi
mov    %r15,%rdi
mov    %r14,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    11f7 <main+0x77>
mov    0x0(%r13),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
lea    0x1(%r14),%rax
mov    $0xffffffff,%ebx
add    $0x1,%ebx
cmpb   $0x20,-0x1(%rax)
lea    0x1(%rax),%rax
je     1200 <main+0x80>
cmpb   $0x20,-0x1(%rax)
je     122c <main+0xac>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
jne    1220 <main+0xa0>
mov    %r15,%rdi
call   1070 <feof@plt>
test   %eax,%eax
je     12a6 <main+0x126>
mov    %r15,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
mov    %r12,%rsp
jmp    1297 <main+0x117>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xda6(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1292 <main+0x112>
mov    0x2d76(%rip),%rax
mov    (%rax),%r14d
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
lea    0xd91(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xffffffff,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebx,%eax
lea    (%rax,%r14,1),%rbx
add    $0x2,%rbx
jmp    12d0 <main+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
call   1070 <feof@plt>
test   %eax,%eax
jne    1238 <main+0xb8>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    0x0(%r13),%esi
mov    %r15,%rdi
mov    %r14,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    12c0 <main+0x140>
mov    0x0(%r13),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
jmp    12c0 <main+0x140>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"usage: %s file\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
@BUFSIZ = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 2
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 -1, i32* %3
br label %90
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
store i8* %23, i8** %7
%24 = load i8*, i8** %7
%25 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %25, i32** %6
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %33
27: ; preds = %20
%28 = load i32, i32* @stderr
%29 = load i8*, i8** %7
%30 = load i32, i32* @errno
%31 = call i8* @strerror(i32 %30)
%32 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %29, i8* %31)
store i32 -1, i32* %3
br label %90
33: ; preds = %20
%34 = load i32, i32* @BUFSIZ
%35 = zext i32 %34 to i64
%36 = call i8* @llvm.stacksave()
store i8* %36, i8** %9
%37 = alloca i8, i64 %35
store i64 %35, i64* %10
store i32 0, i32* %8
%38 = load i32*, i32** %6
%39 = load i32, i32* @BUFSIZ
%40 = call i32 @fgetl(i32* %38, i32 %39, i8* %37)
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %45
42: ; preds = %33
%43 = load i32, i32* @BUFSIZ
%44 = call i32 @memset(i8* %37, i32 0, i32 %43)
br label %45
45: ; preds = %42, %33
store i8* %37, i8** %11
br label %46
46: ; preds = %52, %45
%47 = load i8*, i8** %11
%48 = getelementptr inbounds i8, i8* %47, i32 1
store i8* %48, i8** %11
%49 = load i8, i8* %47
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 32
br i1 %51, label %52, label %55
52: ; preds = %46
%53 = load i32, i32* %8
%54 = add nsw i32 %53, 1
store i32 %54, i32* %8
br label %46
55: ; preds = %46
br label %56
56: ; preds = %62, %55
%57 = load i8*, i8** %11
%58 = getelementptr inbounds i8, i8* %57, i32 1
store i8* %58, i8** %11
%59 = load i8, i8* %57
%60 = sext i8 %59 to i32
%61 = icmp ne i32 %60, 32
br i1 %61, label %62, label %65
62: ; preds = %56
%63 = load i32, i32* %8
%64 = add nsw i32 %63, 1
store i32 %64, i32* %8
br label %56
65: ; preds = %56
%66 = load i32, i32* %8
%67 = add nsw i32 %66, 2
store i32 %67, i32* %8
br label %68
68: ; preds = %85, %65
%69 = load i32*, i32** %6
%70 = call i32 @feof(i32* %69)
%71 = icmp ne i32 %70, 0
%72 = xor i1 %71, true
br i1 %72, label %73, label %86
73: ; preds = %68
%74 = load i32, i32* %8
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %37, i64 %75
%77 = call i32 @puts(i8* %76)
%78 = load i32*, i32** %6
%79 = load i32, i32* @BUFSIZ
%80 = call i32 @fgetl(i32* %78, i32 %79, i8* %37)
%81 = icmp eq i32 %80, -1
br i1 %81, label %82, label %85
82: ; preds = %73
%83 = load i32, i32* @BUFSIZ
%84 = call i32 @memset(i8* %37, i32 0, i32 %83)
br label %85
85: ; preds = %82, %73
br label %68
86: ; preds = %68
%87 = load i32*, i32** %6
%88 = call i32 @fclose(i32* %87)
store i32 0, i32* %3
%89 = load i8*, i8** %9
br label %90
90: ; preds = %86, %27, %14
%91 = load i32, i32* %3
ret i32 %91
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"usage: %s file\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
@BUFSIZ = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %68
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = load i32, i32* @errno
%16 = tail call i8* @strerror(i32 %15)
%17 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %10, i8* %16)
br label %68
18: ; preds = %8
%19 = load i32, i32* @BUFSIZ
%20 = zext i32 %19 to i64
%21 = tail call i8* @llvm.stacksave()
%22 = alloca i8, i64 %20
%23 = load i32, i32* @BUFSIZ
%24 = call i32 @fgetl(i32* %11, i32 %23, i8* %22)
%25 = icmp eq i32 %24, -1
br i1 %25, label %26, label %29
26: ; preds = %18
%27 = load i32, i32* @BUFSIZ
%28 = call i32 @memset(i8* %22, i32 0, i32 %27)
br label %29
29: ; preds = %26, %18
br label %30
30: ; preds = %29, %30
%31 = phi i32 [ %36, %30 ], [ 0, %29 ]
%32 = phi i8* [ %33, %30 ], [ %22, %29 ]
%33 = getelementptr inbounds i8, i8* %32, i64 1
%34 = load i8, i8* %32
%35 = icmp eq i8 %34, 32
%36 = add nuw nsw i32 %31, 1
br i1 %35, label %30, label %37
37: ; preds = %30
%38 = load i8, i8* %33
%39 = icmp eq i8 %38, 32
br i1 %39, label %47, label %40
40: ; preds = %37, %40
%41 = phi i8* [ %43, %40 ], [ %33, %37 ]
%42 = phi i32 [ %44, %40 ], [ %31, %37 ]
%43 = getelementptr inbounds i8, i8* %41, i64 1
%44 = add nuw nsw i32 %42, 1
%45 = load i8, i8* %43
%46 = icmp eq i8 %45, 32
br i1 %46, label %47, label %40
47: ; preds = %40, %37
%48 = phi i32 [ %31, %37 ], [ %44, %40 ]
%49 = call i32 @feof(i32* %11)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %66
51: ; preds = %47
%52 = add nuw nsw i32 %48, 2
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %22, i64 %53
br label %55
55: ; preds = %51, %63
%56 = call i32 @puts(i8* %54)
%57 = load i32, i32* @BUFSIZ
%58 = call i32 @fgetl(i32* %11, i32 %57, i8* %22)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %63
60: ; preds = %55
%61 = load i32, i32* @BUFSIZ
%62 = call i32 @memset(i8* %22, i32 0, i32 %61)
br label %63
63: ; preds = %60, %55
%64 = call i32 @feof(i32* %11)
%65 = icmp eq i32 %64, 0
br i1 %65, label %55, label %66
66: ; preds = %63, %47
%67 = call i32 @fclose(i32* %11)
br label %68
68: ; preds = %13, %66, %4
%69 = phi i32 [ -1, %4 ], [ -1, %13 ], [ 0, %66 ]
ret i32 %69
}