#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 */
typedef scalar_t__ uid_t;
struct passwd {
  char *pw_name;
  char *pw_passwd;
  char *pw_gecos;
  char *pw_dir;
  char *pw_shell;
  scalar_t__ pw_uid;
  scalar_t__ pw_gid;
};
typedef scalar_t__ gid_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ lseek(int, long, int /*<<< orphan*/);
char *malloc(int);
int read(int, char *, int);
char *strchr(char *, char);
scalar_t__ strtoul(char *, char **, int);
struct passwd *__getpwent(int pwd_fd) {
  static char *line_buff;
  static struct passwd passwd;
  char *field_begin;
  char *endptr;
  char *gid_ptr;
  char *uid_ptr;
  int line_len;
  int i;
  if (line_buff == NULL) {
    line_buff = malloc(sizeof(char) * 256);
    if (line_buff == NULL)
      return NULL;
  }
restart:
  if ((line_len = read(pwd_fd, line_buff, 256)) <= 0)
    return NULL;
  field_begin = strchr(line_buff, '\n');
  if (field_begin != NULL)
    lseek(pwd_fd, (long)(1 + field_begin - (line_buff + line_len)), SEEK_CUR);
  else {
    do {
      if ((line_len = read(pwd_fd, line_buff, 256)) <= 0)
        return NULL;
    } while (!(field_begin = strchr(line_buff, '\n')));
    lseek(pwd_fd, (long)(field_begin - line_buff) - line_len + 1, SEEK_CUR);
    goto restart;
  }
  if (*line_buff == '#' || *line_buff == ' ' || *line_buff == '\n' ||
      *line_buff == '\t')
    goto restart;
  *field_begin = '\0';
  field_begin = line_buff;
  for (i = 0; i < 7; i++) {
    switch (i) {
    case 0:
      passwd.pw_name = field_begin;
      break;
    case 1:
      passwd.pw_passwd = field_begin;
      break;
    case 2:
      uid_ptr = field_begin;
      break;
    case 3:
      gid_ptr = field_begin;
      break;
    case 4:
      passwd.pw_gecos = field_begin;
      break;
    case 5:
      passwd.pw_dir = field_begin;
      break;
    case 6:
      passwd.pw_shell = field_begin;
      break;
    }
    if (i < 6) {
      field_begin = strchr(field_begin, ':');
      if (field_begin == NULL)
        goto restart;
      *field_begin++ = '\0';
    }
  }
  passwd.pw_gid = (gid_t)strtoul(gid_ptr, &endptr, 10);
  if (*endptr != '\0')
    goto restart;
  passwd.pw_uid = (uid_t)strtoul(uid_ptr, &endptr, 10);
  if (*endptr != '\0')
    goto restart;
  return &passwd;
}


x86 assembly (clang, -O0):
<__getpwent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0xc(%rbp)
cmpq   $0x0,0x2eed(%rip)
jne    119a <__getpwent+0x4a>
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,0x2ed6(%rip)
cmpq   $0x0,0x2ece(%rip)
jne    1195 <__getpwent+0x45>
movq   $0x0,-0x8(%rbp)
jmp    145d <__getpwent+0x30d>
jmp    119a <__getpwent+0x4a>
jmp    119f <__getpwent+0x4f>
mov    -0xc(%rbp),%edi
mov    0x2ea7(%rip),%rsi
mov    $0x100,%edx
call   1050 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jg     11cc <__getpwent+0x7c>
movq   $0x0,-0x8(%rbp)
jmp    145d <__getpwent+0x30d>
mov    0x2e7d(%rip),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     121b <__getpwent+0xcb>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    0x2e52(%rip),%rax
movslq -0x34(%rbp),%rcx
add    %rcx,%rax
sub    %rax,%rsi
mov    0x2dd9(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
jmp    12a7 <__getpwent+0x157>
jmp    1220 <__getpwent+0xd0>
mov    -0xc(%rbp),%edi
mov    0x2e26(%rip),%rsi
mov    $0x100,%edx
call   1050 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jg     124d <__getpwent+0xfd>
movq   $0x0,-0x8(%rbp)
jmp    145d <__getpwent+0x30d>
jmp    1252 <__getpwent+0x102>
mov    0x2df7(%rip),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1220 <__getpwent+0xd0>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    0x2dca(%rip),%rax
sub    %rax,%rsi
movslq -0x34(%rbp),%rax
sub    %rax,%rsi
add    $0x1,%rsi
mov    0x2d4d(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
jmp    119f <__getpwent+0x4f>
mov    0x2da2(%rip),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     12f3 <__getpwent+0x1a3>
mov    0x2d8f(%rip),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     12f3 <__getpwent+0x1a3>
mov    0x2d7c(%rip),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     12f3 <__getpwent+0x1a3>
mov    0x2d69(%rip),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    12f8 <__getpwent+0x1a8>
jmp    119f <__getpwent+0x4f>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    0x2d4a(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x7,-0x38(%rbp)
jge    13f6 <__getpwent+0x2a6>
mov    -0x38(%rbp),%eax
mov    %rax,-0x40(%rbp)
sub    $0x6,%rax
ja     13a5 <__getpwent+0x255>
mov    -0x40(%rbp),%rax
lea    0xcc9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rax
mov    %rax,0x2d0d(%rip)
jmp    13a5 <__getpwent+0x255>
mov    -0x18(%rbp),%rax
mov    %rax,0x2d05(%rip)
jmp    13a5 <__getpwent+0x255>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    13a5 <__getpwent+0x255>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    13a5 <__getpwent+0x255>
mov    -0x18(%rbp),%rax
mov    %rax,0x2ce3(%rip)
jmp    13a5 <__getpwent+0x255>
mov    -0x18(%rbp),%rax
mov    %rax,0x2cdb(%rip)
jmp    13a5 <__getpwent+0x255>
mov    -0x18(%rbp),%rax
mov    %rax,0x2cd3(%rip)
cmpl   $0x6,-0x38(%rbp)
jge    13e3 <__getpwent+0x293>
mov    -0x18(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    13d1 <__getpwent+0x281>
jmp    119f <__getpwent+0x4f>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
jmp    13e8 <__getpwent+0x298>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1311 <__getpwent+0x1c1>
mov    -0x28(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1070 <strtoul@plt>
mov    %rax,0x2c79(%rip)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1424 <__getpwent+0x2d4>
jmp    119f <__getpwent+0x4f>
mov    -0x30(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1070 <strtoul@plt>
mov    %rax,0x2c43(%rip)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1452 <__getpwent+0x302>
jmp    119f <__getpwent+0x4f>
lea    0x2bff(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getpwent>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%r13d
mov    0x2eeb(%rip),%rsi
test   %rsi,%rsi
jne    1187 <__getpwent+0x37>
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,%rsi
mov    %rax,0x2ed2(%rip)
test   %rax,%rax
je     1399 <__getpwent+0x249>
mov    %r13d,%edi
mov    $0x100,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    1399 <__getpwent+0x249>
mov    %eax,%ebp
xor    %r14d,%r14d
mov    0x2e40(%rip),%r15
mov    0x2ea1(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1330 <__getpwent+0x1e0>
mov    %rax,%r12
mov    %ebp,%eax
add    %rax,%rbx
mov    %r12,%rsi
sub    %rbx,%rsi
add    $0x1,%rsi
mov    (%r15),%edx
mov    %r13d,%edi
call   1040 <lseek@plt>
mov    0x2e67(%rip),%rsi
movzbl (%rsi),%eax
cmp    $0x23,%rax
ja     1206 <__getpwent+0xb6>
movabs $0x900000600,%rcx
bt     %rax,%rcx
jb     1380 <__getpwent+0x230>
movb   $0x0,(%r12)
mov    %rsi,0x2e46(%rip)
mov    %rsi,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1379 <__getpwent+0x229>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2e27(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1379 <__getpwent+0x229>
mov    %rax,%r12
add    $0x1,%r12
movb   $0x0,(%rax)
mov    %r12,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1379 <__getpwent+0x229>
mov    %rax,%rbx
add    $0x1,%rbx
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1379 <__getpwent+0x229>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2dcb(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1379 <__getpwent+0x229>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2daf(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1379 <__getpwent+0x229>
mov    %rax,%rcx
add    $0x1,%rcx
movb   $0x0,(%rax)
mov    %rcx,0x2d93(%rip)
mov    %rbx,%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1070 <strtoul@plt>
mov    %rax,0x2d8c(%rip)
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
jne    1379 <__getpwent+0x229>
mov    %r12,%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1070 <strtoul@plt>
mov    %rax,0x2d64(%rip)
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
jne    1379 <__getpwent+0x229>
jmp    13ae <__getpwent+0x25e>
nopw   0x0(%rax,%rax,1)
mov    %r13d,%edi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    139c <__getpwent+0x24c>
mov    %eax,%ebp
mov    0x2d03(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1330 <__getpwent+0x1e0>
mov    %ebp,%ecx
add    %rbx,%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    (%r15),%edx
mov    %r13d,%edi
mov    %rax,%rsi
call   1040 <lseek@plt>
mov    0x2cd0(%rip),%rsi
mov    %r13d,%edi
mov    $0x100,%edx
call   1050 <read@plt>
mov    %eax,%ebp
test   %eax,%eax
jg     11a8 <__getpwent+0x58>
jmp    139c <__getpwent+0x24c>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x2ca3(%rip),%r14
jmp    139c <__getpwent+0x24c>

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

LLVM IR (-O2):
%struct.passwd = type { i8*, i8*, i8*, i8*, i8*, i64, i64 }
@__getpwent.line_buff = internal unnamed_addr global i8* null
@__getpwent.passwd = internal global %struct.passwd zeroinitializer
@SEEK_CUR = global i32 0
define %struct.passwd* @__getpwent(i32 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = load i8*, i8** @__getpwent.line_buff
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
store i8* %7, i8** @__getpwent.line_buff
%8 = icmp eq i8* %7, null
br i1 %8, label %95, label %9
9: ; preds = %6, %1
%10 = phi i8* [ %7, %6 ], [ %4, %1 ]
%11 = tail call i32 @read(i32 %0, i8* %10, i32 256)
%12 = icmp slt i32 %11, 1
br i1 %12, label %95, label %13
13: ; preds = %9, %84
%14 = phi i32 [ %88, %84 ], [ %11, %9 ]
%15 = phi i8* [ %86, %84 ], [ undef, %9 ]
%16 = phi i8* [ %85, %84 ], [ undef, %9 ]
br label %17
17: ; preds = %13, %51
%18 = phi i32 [ %14, %13 ], [ %53, %51 ]
%19 = load i8*, i8** @__getpwent.line_buff
%20 = tail call i8* @strchr(i8* dereferenceable(1) %19, i8 signext 10)
%21 = icmp eq i8* %20, null
br i1 %21, label %33, label %22
22: ; preds = %17
%23 = getelementptr inbounds i8, i8* %20, i64 1
%24 = zext i32 %18 to i64
%25 = getelementptr inbounds i8, i8* %19, i64 %24
%26 = ptrtoint i8* %23 to i64
%27 = ptrtoint i8* %25 to i64
%28 = sub i64 %26, %27
%29 = load i32, i32* @SEEK_CUR
%30 = tail call i32 @lseek(i32 %0, i64 %28, i32 %29)
%31 = load i8*, i8** @__getpwent.line_buff
%32 = load i8, i8* %31
switch i8 %32, label %55 [
i8 35, label %51
i8 32, label %51
i8 10, label %51
i8 9, label %51
]
33: ; preds = %17, %37
%34 = phi i8* [ %38, %37 ], [ %19, %17 ]
%35 = tail call i32 @read(i32 %0, i8* %34, i32 256)
%36 = icmp slt i32 %35, 1
br i1 %36, label %95, label %37
37: ; preds = %33
%38 = load i8*, i8** @__getpwent.line_buff
%39 = tail call i8* @strchr(i8* dereferenceable(1) %38, i8 signext 10)
%40 = icmp eq i8* %39, null
br i1 %40, label %33, label %41
41: ; preds = %37
%42 = ptrtoint i8* %39 to i64
%43 = ptrtoint i8* %38 to i64
%44 = zext i32 %35 to i64
%45 = add i64 %44, %43
%46 = sub i64 1, %45
%47 = add i64 %46, %42
%48 = load i32, i32* @SEEK_CUR
%49 = tail call i32 @lseek(i32 %0, i64 %47, i32 %48)
%50 = load i8*, i8** @__getpwent.line_buff
br label %51
51: ; preds = %22, %22, %22, %22, %41
%52 = phi i8* [ %31, %22 ], [ %31, %22 ], [ %31, %22 ], [ %31, %22 ], [ %50, %41 ]
%53 = tail call i32 @read(i32 %0, i8* %52, i32 256)
%54 = icmp slt i32 %53, 1
br i1 %54, label %95, label %17
55: ; preds = %22
store i8 0, i8* %20
store i8* %31, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 0)
%56 = tail call i8* @strchr(i8* dereferenceable(1) %31, i8 signext 58)
%57 = icmp eq i8* %56, null
br i1 %57, label %84, label %58
58: ; preds = %55
%59 = getelementptr inbounds i8, i8* %56, i64 1
store i8 0, i8* %56
store i8* %59, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 1)
%60 = tail call i8* @strchr(i8* dereferenceable(1) %59, i8 signext 58)
%61 = icmp eq i8* %60, null
br i1 %61, label %84, label %62
62: ; preds = %58
%63 = getelementptr inbounds i8, i8* %60, i64 1
store i8 0, i8* %60
%64 = tail call i8* @strchr(i8* dereferenceable(1) %63, i8 signext 58)
%65 = icmp eq i8* %64, null
br i1 %65, label %84, label %66
66: ; preds = %62
%67 = getelementptr inbounds i8, i8* %64, i64 1
store i8 0, i8* %64
%68 = tail call i8* @strchr(i8* dereferenceable(1) %67, i8 signext 58)
%69 = icmp eq i8* %68, null
br i1 %69, label %84, label %70
70: ; preds = %66
%71 = getelementptr inbounds i8, i8* %68, i64 1
store i8 0, i8* %68
store i8* %71, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 2)
%72 = tail call i8* @strchr(i8* dereferenceable(1) %71, i8 signext 58)
%73 = icmp eq i8* %72, null
br i1 %73, label %84, label %74
74: ; preds = %70
%75 = getelementptr inbounds i8, i8* %72, i64 1
store i8 0, i8* %72
store i8* %75, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 3)
%76 = tail call i8* @strchr(i8* dereferenceable(1) %75, i8 signext 58)
%77 = icmp eq i8* %76, null
br i1 %77, label %84, label %78
78: ; preds = %74
%79 = getelementptr inbounds i8, i8* %76, i64 1
store i8 0, i8* %76
store i8* %79, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 4)
%80 = call i64 @strtoul(i8* %67, i8** %2, i32 10)
store i64 %80, i64* getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 6)
%81 = load i8*, i8** %2
%82 = load i8, i8* %81
%83 = icmp eq i8 %82, 0
br i1 %83, label %90, label %84
84: ; preds = %55, %58, %62, %66, %70, %74, %78, %90
%85 = phi i8* [ %67, %90 ], [ %67, %78 ], [ %16, %55 ], [ %16, %58 ], [ %16, %62 ], [ %67, %66 ], [ %67, %70 ], [ %67, %74 ]
%86 = phi i8* [ %63, %90 ], [ %63, %78 ], [ %15, %55 ], [ %15, %58 ], [ %63, %62 ], [ %63, %66 ], [ %63, %70 ], [ %63, %74 ]
%87 = load i8*, i8** @__getpwent.line_buff
%88 = tail call i32 @read(i32 %0, i8* %87, i32 256)
%89 = icmp slt i32 %88, 1
br i1 %89, label %95, label %13
90: ; preds = %78
%91 = call i64 @strtoul(i8* %63, i8** %2, i32 10)
store i64 %91, i64* getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 5)
%92 = load i8*, i8** %2
%93 = load i8, i8* %92
%94 = icmp eq i8 %93, 0
br i1 %94, label %95, label %84
95: ; preds = %84, %90, %51, %33, %9, %6
%96 = phi %struct.passwd* [ null, %6 ], [ null, %9 ], [ null, %33 ], [ null, %51 ], [ null, %84 ], [ @__getpwent.passwd, %90 ]
ret %struct.passwd* %96
}