#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;
  char *pw_dir;
  char *pw_shell;
  scalar_t__ pw_gid;
  scalar_t__ pw_uid;
  int /*<<< orphan*/ pw_gecos;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
char *__nss_rewrite_field(int /*<<< orphan*/, char **);
int /*<<< orphan*/ __nss_valid_field(char *);
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int fprintf(int /*<<< orphan*/ *, char *, char *, char *, ...);
int /*<<< orphan*/ free(char *);
int putpwent(const struct passwd *p, FILE *stream) {
  if (p == NULL || stream == NULL || p->pw_name == NULL ||
      !__nss_valid_field(p->pw_name) || !__nss_valid_field(p->pw_passwd) ||
      !__nss_valid_field(p->pw_dir) || !__nss_valid_field(p->pw_shell)) {
    __set_errno(EINVAL);
    return -1;
  }
  int ret;
  char *gecos_alloc;
  const char *gecos = __nss_rewrite_field(p->pw_gecos, &gecos_alloc);
  if (gecos == NULL)
    return -1;
  if (p->pw_name[0] == '+' || p->pw_name[0] == '-')
    ret = fprintf(stream, "%s:%s:::%s:%s:%s\n", p->pw_name, p->pw_passwd ?: "",
                  gecos, p->pw_dir ?: "", p->pw_shell ?: "");
  else
    ret = fprintf(stream, "%s:%s:%lu:%lu:%s:%s:%s\n", p->pw_name,
                  p->pw_passwd ?: "", (unsigned long int)p->pw_uid,
                  (unsigned long int)p->pw_gid, gecos, p->pw_dir ?: "",
                  p->pw_shell ?: "");
  free(gecos_alloc);
  if (ret >= 0)
    ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<putpwent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11de <putpwent+0x8e>
cmpq   $0x0,-0x18(%rbp)
je     11de <putpwent+0x8e>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11de <putpwent+0x8e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <__nss_valid_field@plt>
cmp    $0x0,%eax
je     11de <putpwent+0x8e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <__nss_valid_field@plt>
cmp    $0x0,%eax
je     11de <putpwent+0x8e>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <__nss_valid_field@plt>
cmp    $0x0,%eax
je     11de <putpwent+0x8e>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <__nss_valid_field@plt>
cmp    $0x0,%eax
jne    11f8 <putpwent+0xa8>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14da <putpwent+0x38a>
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%edi
lea    -0x28(%rbp),%rsi
call   1070 <__nss_rewrite_field@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1223 <putpwent+0xd3>
movl   $0xffffffff,-0x4(%rbp)
jmp    14da <putpwent+0x38a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1249 <putpwent+0xf9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1348 <putpwent+0x1f8>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     127f <putpwent+0x12f>
mov    -0x38(%rbp),%rax
mov    %rax,-0x50(%rbp)
jmp    128f <putpwent+0x13f>
lea    0xd8b(%rip),%rax
mov    %rax,-0x50(%rbp)
jmp    128f <putpwent+0x13f>
mov    -0x50(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
je     12c2 <putpwent+0x172>
mov    -0x58(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    12d2 <putpwent+0x182>
lea    0xd48(%rip),%rax
mov    %rax,-0x70(%rbp)
jmp    12d2 <putpwent+0x182>
mov    -0x70(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x78(%rbp)
cmp    $0x0,%rax
je     1300 <putpwent+0x1b0>
mov    -0x78(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    1313 <putpwent+0x1c3>
lea    0xd0a(%rip),%rax
mov    %rax,-0x88(%rbp)
jmp    1313 <putpwent+0x1c3>
mov    -0x80(%rbp),%r9
mov    -0x60(%rbp),%r8
mov    -0x68(%rbp),%rcx
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rdi
mov    -0x88(%rbp),%rax
lea    0xccb(%rip),%rsi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x1c(%rbp)
jmp    14ba <putpwent+0x36a>
mov    -0x18(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x98(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x90(%rbp)
cmp    $0x0,%rax
je     138d <putpwent+0x23d>
mov    -0x90(%rbp),%rax
mov    %rax,-0xa8(%rbp)
jmp    13a0 <putpwent+0x250>
lea    0xc7d(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    13a0 <putpwent+0x250>
mov    -0xa8(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0xb0(%rbp)
cmp    $0x0,%rax
je     1403 <putpwent+0x2b3>
mov    -0xb0(%rbp),%rax
mov    %rax,-0xd8(%rbp)
jmp    1416 <putpwent+0x2c6>
lea    0xc07(%rip),%rax
mov    %rax,-0xd8(%rbp)
jmp    1416 <putpwent+0x2c6>
mov    -0xd8(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0xe0(%rbp)
cmp    $0x0,%rax
je     1450 <putpwent+0x300>
mov    -0xe0(%rbp),%rax
mov    %rax,-0xf0(%rbp)
jmp    1463 <putpwent+0x313>
lea    0xbba(%rip),%rax
mov    %rax,-0xf0(%rbp)
jmp    1463 <putpwent+0x313>
mov    -0xe8(%rbp),%r10
mov    -0xb8(%rbp),%r11
mov    -0xc0(%rbp),%r9
mov    -0xc8(%rbp),%r8
mov    -0xd0(%rbp),%rcx
mov    -0x98(%rbp),%rdx
mov    -0xa0(%rbp),%rdi
mov    -0xf0(%rbp),%rax
lea    0xb70(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
cmpl   $0x0,-0x1c(%rbp)
jl     14d4 <putpwent+0x384>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putpwent>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1217 <putpwent+0xc7>
mov    %rsi,%r14
test   %rsi,%rsi
je     1217 <putpwent+0xc7>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1217 <putpwent+0xc7>
call   1050 <__nss_valid_field@plt>
test   %eax,%eax
je     1217 <putpwent+0xc7>
mov    0x8(%rbx),%rdi
call   1050 <__nss_valid_field@plt>
test   %eax,%eax
je     1217 <putpwent+0xc7>
mov    0x10(%rbx),%rdi
call   1050 <__nss_valid_field@plt>
test   %eax,%eax
je     1217 <putpwent+0xc7>
mov    0x18(%rbx),%rdi
call   1050 <__nss_valid_field@plt>
test   %eax,%eax
je     1217 <putpwent+0xc7>
mov    0x30(%rbx),%edi
mov    %rsp,%rsi
call   1070 <__nss_rewrite_field@plt>
test   %rax,%rax
je     1225 <putpwent+0xd5>
mov    %rax,%r10
mov    (%rbx),%rdx
mov    (%rdx),%al
cmp    $0x2d,%al
je     11d0 <putpwent+0x80>
cmp    $0x2b,%al
jne    1232 <putpwent+0xe2>
mov    0x8(%rbx),%rcx
test   %rcx,%rcx
lea    0xe33(%rip),%rax
cmove  %rax,%rcx
mov    0x10(%rbx),%r9
test   %r9,%r9
cmove  %rax,%r9
mov    0x18(%rbx),%rbx
test   %rbx,%rbx
cmove  %rax,%rbx
sub    $0x8,%rsp
lea    0xdfd(%rip),%rsi
mov    %r14,%rdi
mov    %r10,%r8
xor    %eax,%eax
push   %rbx
call   1060 <fprintf@plt>
add    $0x10,%rsp
jmp    1280 <putpwent+0x130>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x8(%rbx),%rcx
mov    0x10(%rbx),%r11
test   %rcx,%rcx
lea    0xdcd(%rip),%rax
cmove  %rax,%rcx
mov    0x28(%rbx),%r8
mov    0x20(%rbx),%r9
test   %r11,%r11
cmove  %rax,%r11
mov    0x18(%rbx),%rbx
test   %rbx,%rbx
cmove  %rax,%rbx
sub    $0x8,%rsp
lea    0xda5(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
push   %rbx
push   %r11
push   %r10
call   1060 <fprintf@plt>
add    $0x20,%rsp
mov    %eax,%ebx
mov    (%rsp),%rdi
call   1040 <free@plt>
mov    %ebx,%eax
sar    $0x1f,%eax
and    %ebx,%eax
jmp    122a <putpwent+0xda>

LLVM IR (-O0):
%struct.passwd = type { i8*, i8*, i8*, i8*, i64, i64, i32 }
@EINVAL = global i32 0
@.str = [18 x i8] c"%s:%s:::%s:%s:%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [24 x i8] c"%s:%s:%lu:%lu:%s:%s:%s\0A\00"
define i32 @putpwent(%struct.passwd* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.passwd*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.passwd* %0, %struct.passwd** %4
store i32* %1, i32** %5
%9 = load %struct.passwd*, %struct.passwd** %4
%10 = icmp eq %struct.passwd* %9, null
br i1 %10, label %43, label %11
11: ; preds = %2
%12 = load i32*, i32** %5
%13 = icmp eq i32* %12, null
br i1 %13, label %43, label %14
14: ; preds = %11
%15 = load %struct.passwd*, %struct.passwd** %4
%16 = getelementptr inbounds %struct.passwd, %struct.passwd* %15, i32 0, i32 0
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, null
br i1 %18, label %43, label %19
19: ; preds = %14
%20 = load %struct.passwd*, %struct.passwd** %4
%21 = getelementptr inbounds %struct.passwd, %struct.passwd* %20, i32 0, i32 0
%22 = load i8*, i8** %21
%23 = call i32 @__nss_valid_field(i8* %22)
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %43
25: ; preds = %19
%26 = load %struct.passwd*, %struct.passwd** %4
%27 = getelementptr inbounds %struct.passwd, %struct.passwd* %26, i32 0, i32 1
%28 = load i8*, i8** %27
%29 = call i32 @__nss_valid_field(i8* %28)
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %43
31: ; preds = %25
%32 = load %struct.passwd*, %struct.passwd** %4
%33 = getelementptr inbounds %struct.passwd, %struct.passwd* %32, i32 0, i32 2
%34 = load i8*, i8** %33
%35 = call i32 @__nss_valid_field(i8* %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %43
37: ; preds = %31
%38 = load %struct.passwd*, %struct.passwd** %4
%39 = getelementptr inbounds %struct.passwd, %struct.passwd* %38, i32 0, i32 3
%40 = load i8*, i8** %39
%41 = call i32 @__nss_valid_field(i8* %40)
%42 = icmp ne i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %37, %31, %25, %19, %14, %11, %2
%44 = load i32, i32* @EINVAL
%45 = call i32 @__set_errno(i32 %44)
store i32 -1, i32* %3
br label %146
46: ; preds = %37
%47 = load %struct.passwd*, %struct.passwd** %4
%48 = getelementptr inbounds %struct.passwd, %struct.passwd* %47, i32 0, i32 6
%49 = load i32, i32* %48
%50 = call i8* @__nss_rewrite_field(i32 %49, i8** %7)
store i8* %50, i8** %8
%51 = load i8*, i8** %8
%52 = icmp eq i8* %51, null
br i1 %52, label %53, label %54
53: ; preds = %46
store i32 -1, i32* %3
br label %146
54: ; preds = %46
%55 = load %struct.passwd*, %struct.passwd** %4
%56 = getelementptr inbounds %struct.passwd, %struct.passwd* %55, i32 0, i32 0
%57 = load i8*, i8** %56
%58 = getelementptr inbounds i8, i8* %57, i64 0
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 43
br i1 %61, label %70, label %62
62: ; preds = %54
%63 = load %struct.passwd*, %struct.passwd** %4
%64 = getelementptr inbounds %struct.passwd, %struct.passwd* %63, i32 0, i32 0
%65 = load i8*, i8** %64
%66 = getelementptr inbounds i8, i8* %65, i64 0
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp eq i32 %68, 45
br i1 %69, label %70, label %101
70: ; preds = %62, %54
%71 = load i32*, i32** %5
%72 = load %struct.passwd*, %struct.passwd** %4
%73 = getelementptr inbounds %struct.passwd, %struct.passwd* %72, i32 0, i32 0
%74 = load i8*, i8** %73
%75 = load %struct.passwd*, %struct.passwd** %4
%76 = getelementptr inbounds %struct.passwd, %struct.passwd* %75, i32 0, i32 1
%77 = load i8*, i8** %76
%78 = icmp ne i8* %77, null
br i1 %78, label %79, label %80
79: ; preds = %70
br label %81
80: ; preds = %70
br label %81
81: ; preds = %80, %79
%82 = phi i8* [ %77, %79 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %80 ]
%83 = load i8*, i8** %8
%84 = load %struct.passwd*, %struct.passwd** %4
%85 = getelementptr inbounds %struct.passwd, %struct.passwd* %84, i32 0, i32 2
%86 = load i8*, i8** %85
%87 = icmp ne i8* %86, null
br i1 %87, label %88, label %89
88: ; preds = %81
br label %90
89: ; preds = %81
br label %90
90: ; preds = %89, %88
%91 = phi i8* [ %86, %88 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %89 ]
%92 = load %struct.passwd*, %struct.passwd** %4
%93 = getelementptr inbounds %struct.passwd, %struct.passwd* %92, i32 0, i32 3
%94 = load i8*, i8** %93
%95 = icmp ne i8* %94, null
br i1 %95, label %96, label %97
96: ; preds = %90
br label %98
97: ; preds = %90
br label %98
98: ; preds = %97, %96
%99 = phi i8* [ %94, %96 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %97 ]
%100 = call i32 (i32*, i8*, i8*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %74, i8* %82, i8* %83, i8* %91, i8* %99)
store i32 %100, i32* %6
br label %138
101: ; preds = %62
%102 = load i32*, i32** %5
%103 = load %struct.passwd*, %struct.passwd** %4
%104 = getelementptr inbounds %struct.passwd, %struct.passwd* %103, i32 0, i32 0
%105 = load i8*, i8** %104
%106 = load %struct.passwd*, %struct.passwd** %4
%107 = getelementptr inbounds %struct.passwd, %struct.passwd* %106, i32 0, i32 1
%108 = load i8*, i8** %107
%109 = icmp ne i8* %108, null
br i1 %109, label %110, label %111
110: ; preds = %101
br label %112
111: ; preds = %101
br label %112
112: ; preds = %111, %110
%113 = phi i8* [ %108, %110 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %111 ]
%114 = load %struct.passwd*, %struct.passwd** %4
%115 = getelementptr inbounds %struct.passwd, %struct.passwd* %114, i32 0, i32 5
%116 = load i64, i64* %115
%117 = load %struct.passwd*, %struct.passwd** %4
%118 = getelementptr inbounds %struct.passwd, %struct.passwd* %117, i32 0, i32 4
%119 = load i64, i64* %118
%120 = load i8*, i8** %8
%121 = load %struct.passwd*, %struct.passwd** %4
%122 = getelementptr inbounds %struct.passwd, %struct.passwd* %121, i32 0, i32 2
%123 = load i8*, i8** %122
%124 = icmp ne i8* %123, null
br i1 %124, label %125, label %126
125: ; preds = %112
br label %127
126: ; preds = %112
br label %127
127: ; preds = %126, %125
%128 = phi i8* [ %123, %125 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %126 ]
%129 = load %struct.passwd*, %struct.passwd** %4
%130 = getelementptr inbounds %struct.passwd, %struct.passwd* %129, i32 0, i32 3
%131 = load i8*, i8** %130
%132 = icmp ne i8* %131, null
br i1 %132, label %133, label %134
133: ; preds = %127
br label %135
134: ; preds = %127
br label %135
135: ; preds = %134, %133
%136 = phi i8* [ %131, %133 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %134 ]
%137 = call i32 (i32*, i8*, i8*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %105, i8* %113, i64 %116, i64 %119, i8* %120, i8* %128, i8* %136)
store i32 %137, i32* %6
br label %138
138: ; preds = %135, %98
%139 = load i8*, i8** %7
%140 = call i32 @free(i8* %139)
%141 = load i32, i32* %6
%142 = icmp sge i32 %141, 0
br i1 %142, label %143, label %144
143: ; preds = %138
store i32 0, i32* %6
br label %144
144: ; preds = %143, %138
%145 = load i32, i32* %6
store i32 %145, i32* %3
br label %146
146: ; preds = %144, %53, %43
%147 = load i32, i32* %3
ret i32 %147
}

LLVM IR (-O2):
%struct.passwd = type { i8*, i8*, i8*, i8*, i64, i64, i32 }
@EINVAL = global i32 0
@.str = [18 x i8] c"%s:%s:::%s:%s:%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [24 x i8] c"%s:%s:%lu:%lu:%s:%s:%s\0A\00"
define i32 @putpwent(%struct.passwd* %0, i32* %1) {
%3 = alloca i8*
%4 = icmp eq %struct.passwd* %0, null
%5 = icmp eq i32* %1, null
%6 = or i1 %4, %5
br i1 %6, label %29, label %7
7: ; preds = %2
%8 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 0
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %29, label %11
11: ; preds = %7
%12 = tail call i32 @__nss_valid_field(i8* %9)
%13 = icmp eq i32 %12, 0
br i1 %13, label %29, label %14
14: ; preds = %11
%15 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 1
%16 = load i8*, i8** %15
%17 = tail call i32 @__nss_valid_field(i8* %16)
%18 = icmp eq i32 %17, 0
br i1 %18, label %29, label %19
19: ; preds = %14
%20 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 2
%21 = load i8*, i8** %20
%22 = tail call i32 @__nss_valid_field(i8* %21)
%23 = icmp eq i32 %22, 0
br i1 %23, label %29, label %24
24: ; preds = %19
%25 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 3
%26 = load i8*, i8** %25
%27 = tail call i32 @__nss_valid_field(i8* %26)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %24, %19, %14, %11, %7, %2
%30 = load i32, i32* @EINVAL
%31 = tail call i32 @__set_errno(i32 %30)
br label %75
32: ; preds = %24
%33 = bitcast i8** %3 to i8*
%34 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 6
%35 = load i32, i32* %34
%36 = call i8* @__nss_rewrite_field(i32 %35, i8** %3)
%37 = icmp eq i8* %36, null
br i1 %37, label %73, label %38
38: ; preds = %32
%39 = load i8*, i8** %8
%40 = load i8, i8* %39
switch i8 %40, label %52 [
i8 43, label %41
i8 45, label %41
]
41: ; preds = %38, %38
%42 = load i8*, i8** %15
%43 = icmp eq i8* %42, null
%44 = select i1 %43, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %42
%45 = load i8*, i8** %20
%46 = icmp eq i8* %45, null
%47 = select i1 %46, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %45
%48 = load i8*, i8** %25
%49 = icmp eq i8* %48, null
%50 = select i1 %49, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %48
%51 = call i32 (i32*, i8*, i8*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %39, i8* %44, i8* %36, i8* %47, i8* %50)
br label %67
52: ; preds = %38
%53 = load i8*, i8** %15
%54 = icmp eq i8* %53, null
%55 = select i1 %54, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %53
%56 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 5
%57 = load i64, i64* %56
%58 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 4
%59 = load i64, i64* %58
%60 = load i8*, i8** %20
%61 = icmp eq i8* %60, null
%62 = select i1 %61, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %60
%63 = load i8*, i8** %25
%64 = icmp eq i8* %63, null
%65 = select i1 %64, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %63
%66 = call i32 (i32*, i8*, i8*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %39, i8* %55, i64 %57, i64 %59, i8* %36, i8* %62, i8* %65)
br label %67
67: ; preds = %52, %41
%68 = phi i32 [ %51, %41 ], [ %66, %52 ]
%69 = load i8*, i8** %3
%70 = call i32 @free(i8* %69)
%71 = icmp slt i32 %68, 0
%72 = select i1 %71, i32 %68, i32 0
br label %73
73: ; preds = %32, %67
%74 = phi i32 [ %72, %67 ], [ -1, %32 ]
br label %75
75: ; preds = %73, %29
%76 = phi i32 [ -1, %29 ], [ %74, %73 ]
ret i32 %76
}