#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 spwd {
  int /*<<< orphan*/ sp_pwdp;
};
struct passwd {
  char *pw_name;
  int /*<<< orphan*/ pw_passwd;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _SC_LOGIN_NAME_MAX;
char *crypt(char *, int /*<<< orphan*/);
int /*<<< orphan*/ err_exit(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, long, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *getpass(char *);
struct passwd *getpwnam(char *);
struct spwd *getspnam(char *);
scalar_t__ malloc(long);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
size_t strlen(char *);
long sysconf(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *login, *password, *encrypted_password, *temp;
  struct passwd *pwd;
  struct spwd *shadow;
  long login_max;
  size_t len;
  login_max = sysconf(_SC_LOGIN_NAME_MAX);
  if (login_max == -1) {
    login_max = 256;
  }
  login = (char *)malloc(login_max);
  if (login == NULL) {
    err_exit("error on malloc, %s\n", strerror(errno));
  }
  fprintf(stdout, "Enter user login:\n");
  if (fgets(login, login_max, stdin) == NULL) {
    err_exit("eof reached, %s\n", strerror(errno));
  }
  len = strlen(login);
  if (login[len - 1] == '\n') {
    login[len - 1] = '\0';
  }
  pwd = getpwnam(login);
  if (pwd == NULL) {
    err_exit("could not read /etc/passwd, %s\n", strerror(errno));
  }
  shadow = getspnam(login);
  if (shadow == NULL) {
    err_exit("could not read /etc/shadow, %s\n", strerror(errno));
  } else {
    pwd->pw_passwd = shadow->sp_pwdp;
  }
  password = getpass("Enter password:");
  encrypted_password = crypt(password, pwd->pw_passwd);
  for (temp = password; *temp != '\0'; temp++) {
    *temp = '\0';
  }
  if (encrypted_password == NULL) {
    err_exit("error on crypt, %s\n", strerror(errno));
  }
  if (strcmp(pwd->pw_passwd, encrypted_password) == 0) {
    fprintf(stdout, "successfully authenticated user %s\n", pwd->pw_name);
  } else {
    fprintf(stdout, "incorrect password for %s\n", pwd->pw_name);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
call   10d0 <sysconf@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0xffffffffffffffff,-0x48(%rbp)
jne    120b <main+0x3b>
movq   $0x100,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   1090 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    123f <main+0x6f>
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    %eax,%esi
lea    0xdc6(%rip),%rdi
call   10a0 <err_exit@plt>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    0x2d83(%rip),%rax
mov    (%rax),%edx
call   1050 <fgets@plt>
cmp    $0x0,%rax
jne    1292 <main+0xc2>
mov    0x2d53(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    %eax,%esi
lea    0xd9b(%rip),%rdi
call   10a0 <err_exit@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x50(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    12c8 <main+0xf8>
mov    -0x18(%rbp),%rax
mov    -0x50(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
call   1070 <getpwnam@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    12fc <main+0x12c>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    %eax,%esi
lea    0xd42(%rip),%rdi
call   10a0 <err_exit@plt>
mov    -0x18(%rbp),%rdi
call   10c0 <getspnam@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1335 <main+0x165>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    %eax,%esi
lea    0xd2e(%rip),%rdi
call   10a0 <err_exit@plt>
jmp    1342 <main+0x172>
mov    -0x40(%rbp),%rax
mov    (%rax),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x8(%rax)
lea    0xd30(%rip),%rdi
call   10b0 <getpass@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%esi
call   1030 <crypt@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1396 <main+0x1c6>
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    136e <main+0x19e>
cmpq   $0x0,-0x28(%rbp)
jne    13bd <main+0x1ed>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    %eax,%esi
lea    0xcd1(%rip),%rdi
call   10a0 <err_exit@plt>
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x28(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13fa <main+0x22a>
mov    0x2bea(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rax
mov    (%rax),%rdx
lea    0xcaf(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1418 <main+0x248>
mov    0x2bc7(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rax
mov    (%rax),%rdx
lea    0xcb0(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2ba1(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
call   10d0 <sysconf@plt>
cmp    $0xffffffffffffffff,%rax
mov    $0x100,%ebx
cmovne %rax,%rbx
mov    %rbx,%rdi
call   1090 <malloc@plt>
mov    %rax,%r15
test   %rax,%rax
jne    121f <main+0x4f>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xde8(%rip),%rdi
mov    %eax,%esi
call   10a0 <err_exit@plt>
mov    0x2da2(%rip),%r12
mov    (%r12),%edi
lea    0xde4(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <fgets@plt>
test   %rax,%rax
jne    126d <main+0x9d>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xdc2(%rip),%rdi
mov    %eax,%esi
call   10a0 <err_exit@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmpb   $0xa,-0x1(%rax,%r15,1)
jne    1283 <main+0xb3>
movb   $0x0,-0x1(%r15,%rax,1)
mov    %r15,%rdi
call   1070 <getpwnam@plt>
mov    %rax,%r14
test   %rax,%rax
jne    12af <main+0xdf>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xd91(%rip),%rdi
mov    %eax,%esi
call   10a0 <err_exit@plt>
mov    %r15,%rdi
call   10c0 <getspnam@plt>
test   %rax,%rax
jne    12da <main+0x10a>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xd88(%rip),%rdi
mov    %eax,%esi
call   10a0 <err_exit@plt>
jmp    12e0 <main+0x110>
mov    (%rax),%eax
mov    %eax,0x8(%r14)
lea    0xd92(%rip),%rdi
call   10b0 <getpass@plt>
mov    %rax,%rbx
mov    0x8(%r14),%esi
mov    %rax,%rdi
call   1030 <crypt@plt>
mov    %rax,%r15
cmpb   $0x0,(%rbx)
je     131d <main+0x14d>
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%rbx)
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1310 <main+0x140>
test   %r15,%r15
jne    133e <main+0x16e>
mov    0x2ca7(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
lea    0xd52(%rip),%rdi
mov    %eax,%esi
call   10a0 <err_exit@plt>
mov    0x8(%r14),%edi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
mov    (%r12),%edi
mov    (%r14),%rdx
lea    0xd42(%rip),%rax
lea    0xd5f(%rip),%rsi
cmove  %rax,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.passwd = type { i8*, i32 }
%struct.spwd = type { i32 }
@_SC_LOGIN_NAME_MAX = global i32 0
@.str = [21 x i8] c"error on malloc, %s\0A\00"
@errno = global i32 0
@stdout = global i32 0
@.str.1 = [19 x i8] c"Enter user login:\0A\00"
@stdin = global i32 0
@.str.2 = [17 x i8] c"eof reached, %s\0A\00"
@.str.3 = [32 x i8] c"could not read /etc/passwd, %s\0A\00"
@.str.4 = [32 x i8] c"could not read /etc/shadow, %s\0A\00"
@.str.5 = [16 x i8] c"Enter password:\00"
@.str.6 = [20 x i8] c"error on crypt, %s\0A\00"
@.str.7 = [36 x i8] c"successfully authenticated user %s\0A\00"
@.str.8 = [27 x i8] c"incorrect password for %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca %struct.passwd*
%11 = alloca %struct.spwd*
%12 = alloca i64
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* @_SC_LOGIN_NAME_MAX
%15 = call i64 @sysconf(i32 %14)
store i64 %15, i64* %12
%16 = load i64, i64* %12
%17 = icmp eq i64 %16, -1
br i1 %17, label %18, label %19
18: ; preds = %2
store i64 256, i64* %12
br label %19
19: ; preds = %18, %2
%20 = load i64, i64* %12
%21 = call i64 @malloc(i64 %20)
%22 = inttoptr i64 %21 to i8*
store i8* %22, i8** %6
%23 = load i8*, i8** %6
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %29
25: ; preds = %19
%26 = load i32, i32* @errno
%27 = call i32 @strerror(i32 %26)
%28 = call i32 @err_exit(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %25, %19
%30 = load i32, i32* @stdout
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%32 = load i8*, i8** %6
%33 = load i64, i64* %12
%34 = load i32, i32* @stdin
%35 = call i32* @fgets(i8* %32, i64 %33, i32 %34)
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %41
37: ; preds = %29
%38 = load i32, i32* @errno
%39 = call i32 @strerror(i32 %38)
%40 = call i32 @err_exit(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %37, %29
%42 = load i8*, i8** %6
%43 = call i64 @strlen(i8* %42)
store i64 %43, i64* %13
%44 = load i8*, i8** %6
%45 = load i64, i64* %13
%46 = sub i64 %45, 1
%47 = getelementptr inbounds i8, i8* %44, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 10
br i1 %50, label %51, label %56
51: ; preds = %41
%52 = load i8*, i8** %6
%53 = load i64, i64* %13
%54 = sub i64 %53, 1
%55 = getelementptr inbounds i8, i8* %52, i64 %54
store i8 0, i8* %55
br label %56
56: ; preds = %51, %41
%57 = load i8*, i8** %6
%58 = call %struct.passwd* @getpwnam(i8* %57)
store %struct.passwd* %58, %struct.passwd** %10
%59 = load %struct.passwd*, %struct.passwd** %10
%60 = icmp eq %struct.passwd* %59, null
br i1 %60, label %61, label %65
61: ; preds = %56
%62 = load i32, i32* @errno
%63 = call i32 @strerror(i32 %62)
%64 = call i32 @err_exit(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %61, %56
%66 = load i8*, i8** %6
%67 = call %struct.spwd* @getspnam(i8* %66)
store %struct.spwd* %67, %struct.spwd** %11
%68 = load %struct.spwd*, %struct.spwd** %11
%69 = icmp eq %struct.spwd* %68, null
br i1 %69, label %70, label %74
70: ; preds = %65
%71 = load i32, i32* @errno
%72 = call i32 @strerror(i32 %71)
%73 = call i32 @err_exit(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %72)
br label %80
74: ; preds = %65
%75 = load %struct.spwd*, %struct.spwd** %11
%76 = getelementptr inbounds %struct.spwd, %struct.spwd* %75, i32 0, i32 0
%77 = load i32, i32* %76
%78 = load %struct.passwd*, %struct.passwd** %10
%79 = getelementptr inbounds %struct.passwd, %struct.passwd* %78, i32 0, i32 1
store i32 %77, i32* %79
br label %80
80: ; preds = %74, %70
%81 = call i8* @getpass(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
store i8* %81, i8** %7
%82 = load i8*, i8** %7
%83 = load %struct.passwd*, %struct.passwd** %10
%84 = getelementptr inbounds %struct.passwd, %struct.passwd* %83, i32 0, i32 1
%85 = load i32, i32* %84
%86 = call i8* @crypt(i8* %82, i32 %85)
store i8* %86, i8** %8
%87 = load i8*, i8** %7
store i8* %87, i8** %9
br label %88
88: ; preds = %95, %80
%89 = load i8*, i8** %9
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %98
93: ; preds = %88
%94 = load i8*, i8** %9
store i8 0, i8* %94
br label %95
95: ; preds = %93
%96 = load i8*, i8** %9
%97 = getelementptr inbounds i8, i8* %96, i32 1
store i8* %97, i8** %9
br label %88
98: ; preds = %88
%99 = load i8*, i8** %8
%100 = icmp eq i8* %99, null
br i1 %100, label %101, label %105
101: ; preds = %98
%102 = load i32, i32* @errno
%103 = call i32 @strerror(i32 %102)
%104 = call i32 @err_exit(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %103)
br label %105
105: ; preds = %101, %98
%106 = load %struct.passwd*, %struct.passwd** %10
%107 = getelementptr inbounds %struct.passwd, %struct.passwd* %106, i32 0, i32 1
%108 = load i32, i32* %107
%109 = load i8*, i8** %8
%110 = call i64 @strcmp(i32 %108, i8* %109)
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %118
112: ; preds = %105
%113 = load i32, i32* @stdout
%114 = load %struct.passwd*, %struct.passwd** %10
%115 = getelementptr inbounds %struct.passwd, %struct.passwd* %114, i32 0, i32 0
%116 = load i8*, i8** %115
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* %116)
br label %124
118: ; preds = %105
%119 = load i32, i32* @stdout
%120 = load %struct.passwd*, %struct.passwd** %10
%121 = getelementptr inbounds %struct.passwd, %struct.passwd* %120, i32 0, i32 0
%122 = load i8*, i8** %121
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %122)
br label %124
124: ; preds = %118, %112
%125 = load i32, i32* @EXIT_SUCCESS
%126 = call i32 @exit(i32 %125)
unreachable
}

LLVM IR (-O2):
%struct.passwd = type { i8*, i32 }
%struct.spwd = type { i32 }
@_SC_LOGIN_NAME_MAX = global i32 0
@.str = [21 x i8] c"error on malloc, %s\0A\00"
@errno = global i32 0
@stdout = global i32 0
@.str.1 = [19 x i8] c"Enter user login:\0A\00"
@stdin = global i32 0
@.str.2 = [17 x i8] c"eof reached, %s\0A\00"
@.str.3 = [32 x i8] c"could not read /etc/passwd, %s\0A\00"
@.str.4 = [32 x i8] c"could not read /etc/shadow, %s\0A\00"
@.str.5 = [16 x i8] c"Enter password:\00"
@.str.6 = [20 x i8] c"error on crypt, %s\0A\00"
@.str.7 = [36 x i8] c"successfully authenticated user %s\0A\00"
@.str.8 = [27 x i8] c"incorrect password for %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @_SC_LOGIN_NAME_MAX
%4 = tail call i64 @sysconf(i32 %3)
%5 = icmp eq i64 %4, -1
%6 = select i1 %5, i64 256, i64 %4
%7 = tail call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = icmp eq i64 %7, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = tail call i32 @strerror(i32 %11)
%13 = tail call i32 @err_exit(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* @stdout
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* @stdin
%18 = tail call i32* @fgets(i8* %8, i64 %6, i32 %17)
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %24
20: ; preds = %14
%21 = load i32, i32* @errno
%22 = tail call i32 @strerror(i32 %21)
%23 = tail call i32 @err_exit(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %20, %14
%25 = tail call i64 @strlen(i8* dereferenceable(1) %8)
%26 = add i64 %25, -1
%27 = getelementptr inbounds i8, i8* %8, i64 %26
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 10
br i1 %29, label %30, label %31
30: ; preds = %24
store i8 0, i8* %27
br label %31
31: ; preds = %30, %24
%32 = tail call %struct.passwd* @getpwnam(i8* %8)
%33 = icmp eq %struct.passwd* %32, null
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = load i32, i32* @errno
%36 = tail call i32 @strerror(i32 %35)
%37 = tail call i32 @err_exit(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %36)
br label %38
38: ; preds = %34, %31
%39 = tail call %struct.spwd* @getspnam(i8* %8)
%40 = icmp eq %struct.spwd* %39, null
br i1 %40, label %41, label %45
41: ; preds = %38
%42 = load i32, i32* @errno
%43 = tail call i32 @strerror(i32 %42)
%44 = tail call i32 @err_exit(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %43)
br label %49
45: ; preds = %38
%46 = getelementptr inbounds %struct.spwd, %struct.spwd* %39, i64 0, i32 0
%47 = load i32, i32* %46
%48 = getelementptr inbounds %struct.passwd, %struct.passwd* %32, i64 0, i32 1
store i32 %47, i32* %48
br label %49
49: ; preds = %45, %41
%50 = tail call i8* @getpass(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%51 = getelementptr inbounds %struct.passwd, %struct.passwd* %32, i64 0, i32 1
%52 = load i32, i32* %51
%53 = tail call i8* @crypt(i8* %50, i32 %52)
%54 = load i8, i8* %50
%55 = icmp eq i8 %54, 0
br i1 %55, label %61, label %56
56: ; preds = %49, %56
%57 = phi i8* [ %58, %56 ], [ %50, %49 ]
store i8 0, i8* %57
%58 = getelementptr inbounds i8, i8* %57, i64 1
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 0
br i1 %60, label %61, label %56
61: ; preds = %56, %49
%62 = icmp eq i8* %53, null
br i1 %62, label %63, label %67
63: ; preds = %61
%64 = load i32, i32* @errno
%65 = tail call i32 @strerror(i32 %64)
%66 = tail call i32 @err_exit(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %65)
br label %67
67: ; preds = %63, %61
%68 = load i32, i32* %51
%69 = tail call i64 @strcmp(i32 %68, i8* %53)
%70 = icmp eq i64 %69, 0
%71 = load i32, i32* @stdout
%72 = getelementptr inbounds %struct.passwd, %struct.passwd* %32, i64 0, i32 0
%73 = load i8*, i8** %72
%74 = select i1 %70, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0)
%75 = tail call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* %74, i8* %73)
%76 = load i32, i32* @EXIT_SUCCESS
%77 = tail call i32 @exit(i32 %76)
unreachable
}