#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 {
  char *pw_name;
  char *pw_passwd;
  int pw_uid;
  int pw_gid;
  char *pw_gecos;
  char *pw_dir;
  char *pw_shell;
};

/* Variables and functions */
int /*<<< orphan*/ endpwent();
scalar_t__ errno;
int getegid();
int geteuid();
int getgid();
struct passwd *getpwent();
struct passwd *getpwnam(char *);
struct passwd *getpwuid(int);
int getuid();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setpwent();
int main(int argc, char *argv[]) {
  int myid;
  int myeid;
  int gid;
  int egid;
  struct passwd *pwp;
  myid = getuid();
  myeid = geteuid();
  gid = getgid();
  egid = getegid();
  printf("My ID is %d\n", myid);
  printf("My effective ID is %d\n", myeid);
  printf("Group ID is %d", gid);
  printf("Effective Group ID is %d\n", egid);
  errno = 0;
  pwp = getpwent();
  while ((pwp = getpwent()) != NULL) {
    printf("Here is the inforamtion of the first record in password\n"
           " database\n");
    printf("User name: '%s'\n", pwp->pw_name);
    printf("User password: '%s'\n", pwp->pw_passwd);
    printf("User ID: %d\n", pwp->pw_uid);
    printf("Group ID: %d\n", pwp->pw_gid);
    printf("Comment field: '%s'\n", pwp->pw_gecos);
    printf("Home dir: '%s'\n", pwp->pw_dir);
    printf("Shell: '%s'\n\n", pwp->pw_shell);
  }
  if (errno != 0) {
    perror("getpwent() failed");
    return 1;
  } else {
    printf("EOF reached\n");
  }
  setpwent();
  myid = getuid();
  pwp = getpwuid(myid);
  if (pwp != NULL) {
    printf("User name is '%s'\n", pwp->pw_name);
    printf("other infor has been omitted\n");
  } else {
    if (errno != 0) {
      perror("No password entry found!");
      return 0;
    }
  }
  pwp = getpwnam("root");
  if (pwp != NULL) {
    printf("User shell is '%s'\n", pwp->pw_shell);
    printf("other infor omitted \n");
  }
  endpwent();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10a0 <getgid@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   10c0 <getegid@plt>
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2da7(%rip),%rax
movq   $0x0,(%rax)
mov    $0x0,%al
call   1090 <getpwent@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1090 <getpwent@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     130a <main+0x15a>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rsi
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x20(%rax),%rsi
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%rsi
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    124b <main+0x9b>
mov    0x2ccf(%rip),%rax
cmpq   $0x0,(%rax)
je     1333 <main+0x183>
lea    0xde2(%rip),%rdi
call   10d0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    140c <main+0x25c>
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <setpwent@plt>
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1391 <main+0x1e1>
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13bf <main+0x20f>
mov    0x2c48(%rip),%rax
cmpq   $0x0,(%rax)
je     13ba <main+0x20a>
lea    0xdab(%rip),%rdi
call   10d0 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    140c <main+0x25c>
jmp    13bf <main+0x20f>
lea    0xda7(%rip),%rdi
call   1070 <getpwnam@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     13fe <main+0x24e>
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%rsi
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <endpwent@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <getuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <geteuid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   10b0 <getgid@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   10d0 <getegid@plt>
mov    %eax,%r15d
lea    0xe08(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe05(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe0c(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe0a(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2da6(%rip),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
call   10a0 <getpwent@plt>
xor    %eax,%eax
call   10a0 <getpwent@plt>
test   %rax,%rax
je     1307 <main+0x147>
mov    %rax,%rbp
lea    0xe11(%rip),%r13
lea    0xe17(%rip),%rbx
lea    0xe1e(%rip),%r14
lea    0xe2c(%rip),%r15
lea    0xe35(%rip),%r12
xchg   %ax,%ax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    0x0(%rbp),%rsi
lea    0xdb6(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%rbp),%rsi
lea    0xdb5(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rbp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x14(%rbp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x18(%rbp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x20(%rbp),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x28(%rbp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <getpwent@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1280 <main+0xc0>
mov    0x2cd2(%rip),%rbx
cmpq   $0x0,(%rbx)
jne    13ac <main+0x1ec>
lea    0xdf9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1090 <setpwent@plt>
xor    %eax,%eax
call   1050 <getuid@plt>
mov    %eax,%edi
call   1040 <getpwuid@plt>
test   %rax,%rax
je     135d <main+0x19d>
mov    (%rax),%rsi
lea    0xd8b(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xde3(%rip),%rdi
call   1030 <puts@plt>
jmp    1363 <main+0x1a3>
cmpq   $0x0,(%rbx)
jne    13bf <main+0x1ff>
lea    0xd95(%rip),%rdi
call   1080 <getpwnam@plt>
test   %rax,%rax
je     1392 <main+0x1d2>
mov    0x28(%rax),%rsi
lea    0xd85(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd97(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   10c0 <endpwent@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd0e(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%ebx
jmp    139b <main+0x1db>
lea    0xd20(%rip),%rdi
call   10e0 <perror@plt>
xor    %ebx,%ebx
jmp    139b <main+0x1db>

LLVM IR (-O0):
%struct.passwd = type { i8*, i8*, i32, i32, i8*, i8*, i8* }
@.str = [13 x i8] c"My ID is %d\0A\00"
@.str.1 = [23 x i8] c"My effective ID is %d\0A\00"
@.str.2 = [15 x i8] c"Group ID is %d\00"
@.str.3 = [26 x i8] c"Effective Group ID is %d\0A\00"
@errno = global i64 0
@.str.4 = [67 x i8] c"Here is the inforamtion of the first record in password\0A database\0A\00"
@.str.5 = [17 x i8] c"User name: '%s'\0A\00"
@.str.6 = [21 x i8] c"User password: '%s'\0A\00"
@.str.7 = [13 x i8] c"User ID: %d\0A\00"
@.str.8 = [14 x i8] c"Group ID: %d\0A\00"
@.str.9 = [21 x i8] c"Comment field: '%s'\0A\00"
@.str.10 = [16 x i8] c"Home dir: '%s'\0A\00"
@.str.11 = [14 x i8] c"Shell: '%s'\0A\0A\00"
@.str.12 = [18 x i8] c"getpwent() failed\00"
@.str.13 = [13 x i8] c"EOF reached\0A\00"
@.str.14 = [19 x i8] c"User name is '%s'\0A\00"
@.str.15 = [30 x i8] c"other infor has been omitted\0A\00"
@.str.16 = [25 x i8] c"No password entry found!\00"
@.str.17 = [5 x i8] c"root\00"
@.str.18 = [20 x i8] c"User shell is '%s'\0A\00"
@.str.19 = [22 x i8] c"other infor omitted \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.passwd*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (...) @getuid()
store i32 %11, i32* %6
%12 = call i32 (...) @geteuid()
store i32 %12, i32* %7
%13 = call i32 (...) @getgid()
store i32 %13, i32* %8
%14 = call i32 (...) @getegid()
store i32 %14, i32* %9
%15 = load i32, i32* %6
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %9
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %21)
store i64 0, i64* @errno
%23 = call %struct.passwd* (...) @getpwent()
store %struct.passwd* %23, %struct.passwd** %10
br label %24
24: ; preds = %27, %2
%25 = call %struct.passwd* (...) @getpwent()
store %struct.passwd* %25, %struct.passwd** %10
%26 = icmp ne %struct.passwd* %25, null
br i1 %26, label %27, label %57
27: ; preds = %24
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0))
%29 = load %struct.passwd*, %struct.passwd** %10
%30 = getelementptr inbounds %struct.passwd, %struct.passwd* %29, i32 0, i32 0
%31 = load i8*, i8** %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %31)
%33 = load %struct.passwd*, %struct.passwd** %10
%34 = getelementptr inbounds %struct.passwd, %struct.passwd* %33, i32 0, i32 1
%35 = load i8*, i8** %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %35)
%37 = load %struct.passwd*, %struct.passwd** %10
%38 = getelementptr inbounds %struct.passwd, %struct.passwd* %37, i32 0, i32 2
%39 = load i32, i32* %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %39)
%41 = load %struct.passwd*, %struct.passwd** %10
%42 = getelementptr inbounds %struct.passwd, %struct.passwd* %41, i32 0, i32 3
%43 = load i32, i32* %42
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %43)
%45 = load %struct.passwd*, %struct.passwd** %10
%46 = getelementptr inbounds %struct.passwd, %struct.passwd* %45, i32 0, i32 4
%47 = load i8*, i8** %46
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %47)
%49 = load %struct.passwd*, %struct.passwd** %10
%50 = getelementptr inbounds %struct.passwd, %struct.passwd* %49, i32 0, i32 5
%51 = load i8*, i8** %50
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i8* %51)
%53 = load %struct.passwd*, %struct.passwd** %10
%54 = getelementptr inbounds %struct.passwd, %struct.passwd* %53, i32 0, i32 6
%55 = load i8*, i8** %54
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* %55)
br label %24
57: ; preds = %24
%58 = load i64, i64* @errno
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
store i32 1, i32* %3
br label %95
62: ; preds = %57
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
br label %64
64: ; preds = %62
%65 = call i32 (...) @setpwent()
%66 = call i32 (...) @getuid()
store i32 %66, i32* %6
%67 = load i32, i32* %6
%68 = call %struct.passwd* @getpwuid(i32 %67)
store %struct.passwd* %68, %struct.passwd** %10
%69 = load %struct.passwd*, %struct.passwd** %10
%70 = icmp ne %struct.passwd* %69, null
br i1 %70, label %71, label %77
71: ; preds = %64
%72 = load %struct.passwd*, %struct.passwd** %10
%73 = getelementptr inbounds %struct.passwd, %struct.passwd* %72, i32 0, i32 0
%74 = load i8*, i8** %73
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* %74)
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
br label %83
77: ; preds = %64
%78 = load i64, i64* @errno
%79 = icmp ne i64 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
store i32 0, i32* %3
br label %95
82: ; preds = %77
br label %83
83: ; preds = %82, %71
%84 = call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
store %struct.passwd* %84, %struct.passwd** %10
%85 = load %struct.passwd*, %struct.passwd** %10
%86 = icmp ne %struct.passwd* %85, null
br i1 %86, label %87, label %93
87: ; preds = %83
%88 = load %struct.passwd*, %struct.passwd** %10
%89 = getelementptr inbounds %struct.passwd, %struct.passwd* %88, i32 0, i32 6
%90 = load i8*, i8** %89
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0), i8* %90)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0))
br label %93
93: ; preds = %87, %83
%94 = call i32 (...) @endpwent()
store i32 0, i32* %3
br label %95
95: ; preds = %93, %80, %60
%96 = load i32, i32* %3
ret i32 %96
}

LLVM IR (-O2):
%struct.passwd = type { i8*, i8*, i32, i32, i8*, i8*, i8* }
@.str = [13 x i8] c"My ID is %d\0A\00"
@.str.1 = [23 x i8] c"My effective ID is %d\0A\00"
@.str.2 = [15 x i8] c"Group ID is %d\00"
@.str.3 = [26 x i8] c"Effective Group ID is %d\0A\00"
@errno = global i64 0
@.str.5 = [17 x i8] c"User name: '%s'\0A\00"
@.str.6 = [21 x i8] c"User password: '%s'\0A\00"
@.str.7 = [13 x i8] c"User ID: %d\0A\00"
@.str.8 = [14 x i8] c"Group ID: %d\0A\00"
@.str.9 = [21 x i8] c"Comment field: '%s'\0A\00"
@.str.10 = [16 x i8] c"Home dir: '%s'\0A\00"
@.str.11 = [14 x i8] c"Shell: '%s'\0A\0A\00"
@.str.12 = [18 x i8] c"getpwent() failed\00"
@.str.14 = [19 x i8] c"User name is '%s'\0A\00"
@.str.16 = [25 x i8] c"No password entry found!\00"
@.str.17 = [5 x i8] c"root\00"
@.str.18 = [20 x i8] c"User shell is '%s'\0A\00"
@str = [12 x i8] c"EOF reached\00"
@str.20 = [21 x i8] c"other infor omitted \00"
@str.21 = [29 x i8] c"other infor has been omitted\00"
@str.22 = [66 x i8] c"Here is the inforamtion of the first record in password\0A database\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getuid()
%4 = tail call i32 (...) @geteuid()
%5 = tail call i32 (...) @getgid()
%6 = tail call i32 (...) @getegid()
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %6)
store i64 0, i64* @errno
%11 = tail call %struct.passwd* (...) @getpwent()
%12 = tail call %struct.passwd* (...) @getpwent()
%13 = icmp eq %struct.passwd* %12, null
br i1 %13, label %40, label %14
14: ; preds = %2, %14
%15 = phi %struct.passwd* [ %38, %14 ], [ %12, %2 ]
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.22, i64 0, i64 0))
%17 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 0
%18 = load i8*, i8** %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 1
%21 = load i8*, i8** %20
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %21)
%23 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 2
%24 = load i32, i32* %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 3
%27 = load i32, i32* %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 4
%30 = load i8*, i8** %29
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %30)
%32 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 5
%33 = load i8*, i8** %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i8* %33)
%35 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i64 0, i32 6
%36 = load i8*, i8** %35
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* %36)
%38 = tail call %struct.passwd* (...) @getpwent()
%39 = icmp eq %struct.passwd* %38, null
br i1 %39, label %40, label %14
40: ; preds = %14, %2
%41 = load i64, i64* @errno
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
br label %71
45: ; preds = %40
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%47 = tail call i32 (...) @setpwent()
%48 = tail call i32 (...) @getuid()
%49 = tail call %struct.passwd* @getpwuid(i32 %48)
%50 = icmp eq %struct.passwd* %49, null
br i1 %50, label %56, label %51
51: ; preds = %45
%52 = getelementptr inbounds %struct.passwd, %struct.passwd* %49, i64 0, i32 0
%53 = load i8*, i8** %52
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* %53)
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.21, i64 0, i64 0))
br label %61
56: ; preds = %45
%57 = load i64, i64* @errno
%58 = icmp eq i64 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %56
%60 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
br label %71
61: ; preds = %56, %51
%62 = tail call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%63 = icmp eq %struct.passwd* %62, null
br i1 %63, label %69, label %64
64: ; preds = %61
%65 = getelementptr inbounds %struct.passwd, %struct.passwd* %62, i64 0, i32 6
%66 = load i8*, i8** %65
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0), i8* %66)
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.20, i64 0, i64 0))
br label %69
69: ; preds = %64, %61
%70 = tail call i32 (...) @endpwent()
br label %71
71: ; preds = %69, %59, %43
%72 = phi i32 [ 1, %43 ], [ 0, %69 ], [ 0, %59 ]
ret i32 %72
}