#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
scalar_t__ print_usrs(char const **, char const **);
int /*<<< orphan*/ stderr;
char *strtok(char *, char *);
int print_usrs_file(const char *file_name) {
  char line[2048];
  const char *args[128];
  unsigned numChars = 0;
  FILE *fp = fopen(file_name, "r");
  if (!fp) {
    fprintf(stderr, "error: cannot open '%s'\n", file_name);
    return 1;
  }
  while (!feof(fp)) {
    char c = fgetc(fp);
    if (c == '\n') {
      unsigned i = 0;
      const char *s = 0;
      if (numChars == 0)
        continue;
      line[numChars] = '\0';
      numChars = 0;
      if (line[0] == '/' && line[1] == '/')
        continue;
      s = strtok(line, " ");
      while (s) {
        args[i] = s;
        ++i;
        s = strtok(0, " ");
      }
      if (print_usrs(&args[0], &args[i]))
        return 1;
    } else
      line[numChars++] = c;
  }
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<print_usrs_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc30,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0xc14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe6c(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0xc20(%rbp)
cmpq   $0x0,-0xc20(%rbp)
jne    11d3 <print_usrs_file+0x63>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe40(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    135a <print_usrs_file+0x1ea>
jmp    11d8 <print_usrs_file+0x68>
mov    -0xc20(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11f9 <print_usrs_file+0x89>
jmp    1347 <print_usrs_file+0x1d7>
mov    -0xc20(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %al,-0xc21(%rbp)
movsbl -0xc21(%rbp),%eax
cmp    $0xa,%eax
jne    1322 <print_usrs_file+0x1b2>
movl   $0x0,-0xc28(%rbp)
movq   $0x0,-0xc30(%rbp)
cmpl   $0x0,-0xc14(%rbp)
jne    1242 <print_usrs_file+0xd2>
jmp    11d8 <print_usrs_file+0x68>
mov    -0xc14(%rbp),%eax
movb   $0x0,-0x810(%rbp,%rax,1)
movl   $0x0,-0xc14(%rbp)
movsbl -0x810(%rbp),%eax
cmp    $0x2f,%eax
jne    127f <print_usrs_file+0x10f>
movsbl -0x80f(%rbp),%eax
cmp    $0x2f,%eax
jne    127f <print_usrs_file+0x10f>
jmp    11d8 <print_usrs_file+0x68>
lea    -0x810(%rbp),%rdi
lea    0xd8e(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0xc30(%rbp)
cmpq   $0x0,-0xc30(%rbp)
je     12e7 <print_usrs_file+0x177>
mov    -0xc30(%rbp),%rcx
mov    -0xc28(%rbp),%eax
mov    %rcx,-0xc10(%rbp,%rax,8)
ff
mov    -0xc28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd45(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0xc30(%rbp)
jmp    1299 <print_usrs_file+0x129>
lea    -0xc10(%rbp),%rdi
mov    -0xc28(%rbp),%eax
lea    -0xc10(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
call   1050 <print_usrs@plt>
cmp    $0x0,%rax
je     131d <print_usrs_file+0x1ad>
movl   $0x1,-0x4(%rbp)
jmp    135a <print_usrs_file+0x1ea>
jmp    1342 <print_usrs_file+0x1d2>
mov    -0xc21(%rbp),%cl
mov    -0xc14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0xc14(%rbp)
mov    %eax,%eax
mov    %cl,-0x810(%rbp,%rax,1)
jmp    11d8 <print_usrs_file+0x68>
mov    -0xc20(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usrs_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc08,%rsp
mov    %rdi,%r14
lea    0xe75(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     11b0 <print_usrs_file+0x40>
mov    %rax,%r13
mov    %rax,%rdi
call   1070 <feof@plt>
test   %eax,%eax
je     11df <print_usrs_file+0x6f>
mov    %r13,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
jmp    11cd <print_usrs_file+0x5d>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0xe42(%rip),%rsi
mov    %r14,%rdx
call   1060 <fprintf@plt>
mov    $0x1,%eax
add    $0xc08,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
lea    0xe33(%rip),%r14
lea    0x400(%rsp),%r15
mov    %rsp,%r12
jmp    121c <print_usrs_file+0xac>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%ecx
add    $0x1,%ebx
mov    %al,0x400(%rsp,%rcx,1)
mov    %ebx,%ebp
mov    %r13,%rdi
call   1070 <feof@plt>
mov    %ebp,%ebx
test   %eax,%eax
jne    11a4 <print_usrs_file+0x34>
mov    %r13,%rdi
call   1040 <fgetc@plt>
cmp    $0xa,%al
jne    1200 <print_usrs_file+0x90>
xor    %ebp,%ebp
test   %ebx,%ebx
je     120e <print_usrs_file+0x9e>
mov    %ebx,%eax
movb   $0x0,0x400(%rsp,%rax,1)
cmpb   $0x2f,0x400(%rsp)
2f
jne    124c <print_usrs_file+0xdc>
cmpb   $0x2f,0x401(%rsp)
2f
je     120e <print_usrs_file+0x9e>
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <strtok@plt>
xor    %ebp,%ebp
mov    $0x0,%ebx
test   %rax,%rax
je     1288 <print_usrs_file+0x118>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%ecx
mov    %rax,(%rsp,%rcx,8)
add    $0x1,%ebx
xor    %edi,%edi
mov    %r14,%rsi
call   1090 <strtok@plt>
test   %rax,%rax
jne    1270 <print_usrs_file+0x100>
mov    %ebx,%eax
lea    (%rsp,%rax,8),%rsi
mov    %r12,%rdi
call   1050 <print_usrs@plt>
test   %rax,%rax
je     120e <print_usrs_file+0x9e>
jmp    11c8 <print_usrs_file+0x58>

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [25 x i8] c"error: cannot open '%s'\0A\00"
@.str.2 = [2 x i8] c" \00"
define i32 @print_usrs_file(i8* %0) {
%2 = alloca [2048 x i8]
%3 = alloca [128 x i8*]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%5 = bitcast [128 x i8*]* %3 to i8*
%6 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = call i32 @feof(i32* %6)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %56
11: ; preds = %8
%12 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 1
%13 = getelementptr inbounds [128 x i8*], [128 x i8*]* %3, i64 0, i64 0
br label %17
14: ; preds = %1
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %58
17: ; preds = %11, %52
%18 = phi i32 [ 0, %11 ], [ %53, %52 ]
%19 = call signext i8 @fgetc(i32* %6)
%20 = icmp eq i8 %19, 10
br i1 %20, label %21, label %48
21: ; preds = %17
%22 = icmp eq i32 %18, 0
br i1 %22, label %52, label %23
23: ; preds = %21
%24 = zext i32 %18 to i64
%25 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 %24
store i8 0, i8* %25
%26 = load i8, i8* %4
%27 = icmp eq i8 %26, 47
%28 = load i8, i8* %12
%29 = icmp eq i8 %28, 47
%30 = select i1 %27, i1 %29, i1 false
br i1 %30, label %52, label %31
31: ; preds = %23
%32 = call i8* @strtok(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp eq i8* %32, null
br i1 %33, label %42, label %34
34: ; preds = %31, %34
%35 = phi i8* [ %40, %34 ], [ %32, %31 ]
%36 = phi i32 [ %39, %34 ], [ 0, %31 ]
%37 = zext i32 %36 to i64
%38 = getelementptr inbounds [128 x i8*], [128 x i8*]* %3, i64 0, i64 %37
store i8* %35, i8** %38
%39 = add i32 %36, 1
%40 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %34
42: ; preds = %34, %31
%43 = phi i32 [ 0, %31 ], [ %39, %34 ]
%44 = zext i32 %43 to i64
%45 = getelementptr inbounds [128 x i8*], [128 x i8*]* %3, i64 0, i64 %44
%46 = call i64 @print_usrs(i8** %13, i8** %45)
%47 = icmp eq i64 %46, 0
br i1 %47, label %52, label %58
48: ; preds = %17
%49 = add i32 %18, 1
%50 = zext i32 %18 to i64
%51 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 %50
store i8 %19, i8* %51
br label %52
52: ; preds = %48, %42, %21, %23
%53 = phi i32 [ 0, %23 ], [ 0, %21 ], [ 0, %42 ], [ %49, %48 ]
%54 = call i32 @feof(i32* %6)
%55 = icmp eq i32 %54, 0
br i1 %55, label %17, label %56
56: ; preds = %52, %8
%57 = call i32 @fclose(i32* %6)
br label %58
58: ; preds = %42, %56, %14
%59 = phi i32 [ 0, %56 ], [ 1, %14 ], [ 1, %42 ]
ret i32 %59
}