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

/* Variables and functions */
int ENOENT;
int ERANGE;
void *atou(char **);
int errno;
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, size_t, int /*<<< orphan*/ *);
char *strchr(char *, char);
size_t strcspn(char *, char *);
int fgetpwent_r(FILE *f, struct passwd *pw, char *line, size_t size,
                struct passwd **res) {
  char *s;
  int rv = 0;
  for (;;) {
    line[size - 1] = '\xff';
    if ((fgets(line, size, f) == NULL) || ferror(f) ||
        line[size - 1] != '\xff') {
      rv = (line[size - 1] != '\xff') ? ERANGE : ENOENT;
      line = 0;
      pw = 0;
      break;
    }
    line[strcspn(line, "\n")] = 0;
    s = line;
    pw->pw_name = s++;
    if (!(s = strchr(s, ':')))
      continue;
    *s++ = 0;
    pw->pw_passwd = s;
    if (!(s = strchr(s, ':')))
      continue;
    *s++ = 0;
    pw->pw_uid = atou(&s);
    if (*s != ':')
      continue;
    *s++ = 0;
    pw->pw_gid = atou(&s);
    if (*s != ':')
      continue;
    *s++ = 0;
    pw->pw_gecos = s;
    if (!(s = strchr(s, ':')))
      continue;
    *s++ = 0;
    pw->pw_dir = s;
    if (!(s = strchr(s, ':')))
      continue;
    *s++ = 0;
    pw->pw_shell = s;
    break;
  }
  *res = pw;
  if (rv)
    errno = rv;
  return rv;
}


x86 assembly (clang, -O0):
<fgetpwent_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
movb   $0xff,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     11ca <fgetpwent_r+0x7a>
mov    -0x8(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
jne    11ca <fgetpwent_r+0x7a>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xffffffff,%eax
je     121b <fgetpwent_r+0xcb>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xffffffff,%eax
je     11f4 <fgetpwent_r+0xa4>
mov    0x2dfe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1200 <fgetpwent_r+0xb0>
mov    0x2dcd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
jmp    13cf <fgetpwent_r+0x27f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xdd2(%rip),%rsi
call   1050 <strcspn@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x30(%rax)
mov    -0x30(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    127f <fgetpwent_r+0x12f>
jmp    1173 <fgetpwent_r+0x23>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x30(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    12bd <fgetpwent_r+0x16d>
jmp    1173 <fgetpwent_r+0x23>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
lea    -0x30(%rbp),%rdi
call   1070 <atou@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     12f8 <fgetpwent_r+0x1a8>
jmp    1173 <fgetpwent_r+0x23>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
lea    -0x30(%rbp),%rdi
call   1070 <atou@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x20(%rax)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     1333 <fgetpwent_r+0x1e3>
jmp    1173 <fgetpwent_r+0x23>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x30(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    1372 <fgetpwent_r+0x222>
jmp    1173 <fgetpwent_r+0x23>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x30(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    13b1 <fgetpwent_r+0x261>
jmp    1173 <fgetpwent_r+0x23>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
cmpl   $0x0,-0x34(%rbp)
je     13f0 <fgetpwent_r+0x2a0>
mov    -0x34(%rbp),%ecx
mov    0x2bea(%rip),%rax
mov    %ecx,(%rax)
mov    -0x34(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetpwent_r>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,0x10(%rsp)
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r13
movb   $0xff,-0x1(%rcx,%rdx,1)
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %r13,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1305 <fgetpwent_r+0x1b5>
lea    0x1(%rbx),%rbp
lea    0xe6a(%rip),%r14
jmp    11bd <fgetpwent_r+0x6d>
nopl   0x0(%rax,%rax,1)
movb   $0xff,-0x1(%rbx,%r12,1)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1305 <fgetpwent_r+0x1b5>
mov    %r13,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    1305 <fgetpwent_r+0x1b5>
cmpb   $0xff,-0x1(%rbx,%r12,1)
jne    1305 <fgetpwent_r+0x1b5>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
mov    %ebx,0x30(%r15)
mov    %rbp,%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     11a0 <fgetpwent_r+0x50>
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rax)
mov    0x8(%rsp),%rdi
mov    %rdi,(%r15)
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     11a0 <fgetpwent_r+0x50>
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rax)
lea    0x8(%rsp),%rdi
call   1070 <atou@plt>
mov    %rax,0x28(%r15)
mov    0x8(%rsp),%rax
cmpb   $0x3a,(%rax)
jne    11a0 <fgetpwent_r+0x50>
lea    0x1(%rax),%rcx
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rax)
lea    0x8(%rsp),%rdi
call   1070 <atou@plt>
mov    %rax,0x20(%r15)
mov    0x8(%rsp),%rax
cmpb   $0x3a,(%rax)
jne    11a0 <fgetpwent_r+0x50>
lea    0x1(%rax),%rcx
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rax)
mov    0x8(%rsp),%rdi
mov    %rdi,0x8(%r15)
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     11a0 <fgetpwent_r+0x50>
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rax)
mov    0x8(%rsp),%rdi
mov    %rdi,0x10(%r15)
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     11a0 <fgetpwent_r+0x50>
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rax)
mov    0x8(%rsp),%rax
mov    %rax,0x18(%r15)
mov    0x10(%rsp),%rax
mov    %r15,(%rax)
jmp    133a <fgetpwent_r+0x1ea>
cmpb   $0xff,-0x1(%rbx,%r12,1)
jne    1316 <fgetpwent_r+0x1c6>
mov    0x2cb4(%rip),%rax
jmp    131d <fgetpwent_r+0x1cd>
mov    0x2ccb(%rip),%rax
mov    (%rax),%eax
mov    0x10(%rsp),%rcx
movq   $0x0,(%rcx)
test   %eax,%eax
je     133a <fgetpwent_r+0x1ea>
mov    0x2ca2(%rip),%rcx
mov    %eax,(%rcx)
jmp    133c <fgetpwent_r+0x1ec>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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