#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 */
struct passwd {
  int pw_uid;
  char *pw_name;
};

/* Variables and functions */
int atoi(char *);
struct passwd *getpwent();
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  struct passwd *pw;
  int minuid = 0;
  if (argc == 2)
    minuid = atoi(argv[1]);
  while ((pw = getpwent()))
    if (pw->pw_uid > minuid)
      printf("%s\n", pw->pw_name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1167 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
jmp    116c <main+0x3c>
mov    $0x0,%al
call   1040 <getpwent@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11a9 <main+0x79>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
cmp    -0x1c(%rbp),%eax
jle    11a4 <main+0x74>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <main+0x3c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
cmp    $0x2,%edi
jne    1146 <main+0x16>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getpwent@plt>
test   %rax,%rax
je     117e <main+0x4e>
lea    0xea7(%rip),%r14
jmp    116c <main+0x3c>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getpwent@plt>
test   %rax,%rax
je     117e <main+0x4e>
cmp    %ebx,(%rax)
jle    1160 <main+0x30>
mov    0x8(%rax),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.passwd = type { i32, i8* }
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.passwd*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %7
br label %15
15: ; preds = %10, %2
br label %16
16: ; preds = %30, %15
%17 = call %struct.passwd* (...) @getpwent()
store %struct.passwd* %17, %struct.passwd** %6
%18 = icmp ne %struct.passwd* %17, null
br i1 %18, label %19, label %31
19: ; preds = %16
%20 = load %struct.passwd*, %struct.passwd** %6
%21 = getelementptr inbounds %struct.passwd, %struct.passwd* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = load i32, i32* %7
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %30
25: ; preds = %19
%26 = load %struct.passwd*, %struct.passwd** %6
%27 = getelementptr inbounds %struct.passwd, %struct.passwd* %26, i32 0, i32 1
%28 = load i8*, i8** %27
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %28)
br label %30
30: ; preds = %25, %19
br label %16
31: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
%struct.passwd = type { i32, i8* }
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
%10 = tail call %struct.passwd* (...) @getpwent()
%11 = icmp eq %struct.passwd* %10, null
br i1 %11, label %24, label %12
12: ; preds = %8, %21
%13 = phi %struct.passwd* [ %22, %21 ], [ %10, %8 ]
%14 = getelementptr inbounds %struct.passwd, %struct.passwd* %13, i64 0, i32 0
%15 = load i32, i32* %14
%16 = icmp sgt i32 %15, %9
br i1 %16, label %17, label %21
17: ; preds = %12
%18 = getelementptr inbounds %struct.passwd, %struct.passwd* %13, i64 0, i32 1
%19 = load i8*, i8** %18
%20 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %17, %12
%22 = tail call %struct.passwd* (...) @getpwent()
%23 = icmp eq %struct.passwd* %22, null
br i1 %23, label %24, label %12
24: ; preds = %21, %8
ret i32 0
}