#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*/);
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[256];
  static struct passwd passwd;
  char *field_begin;
  char *endptr;
  char *gid_ptr = NULL;
  char *uid_ptr = NULL;
  int line_len;
  int i;
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)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0xc(%rbp),%edi
lea    0x2eeb(%rip),%rsi
mov    $0x100,%edx
call   1050 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jg     1188 <__getpwent+0x48>
movq   $0x0,-0x8(%rbp)
jmp    140d <__getpwent+0x2cd>
lea    0x2ec1(%rip),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11d7 <__getpwent+0x97>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
movslq -0x34(%rbp),%rcx
lea    0x2e92(%rip),%rax
add    %rcx,%rax
sub    %rax,%rsi
mov    0x2e1d(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
jmp    1263 <__getpwent+0x123>
jmp    11dc <__getpwent+0x9c>
mov    -0xc(%rbp),%edi
lea    0x2e6a(%rip),%rsi
mov    $0x100,%edx
call   1050 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jg     1209 <__getpwent+0xc9>
movq   $0x0,-0x8(%rbp)
jmp    140d <__getpwent+0x2cd>
jmp    120e <__getpwent+0xce>
lea    0x2e3b(%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    11dc <__getpwent+0x9c>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    0x2e0e(%rip),%rax
sub    %rax,%rsi
movslq -0x34(%rbp),%rax
sub    %rax,%rsi
add    $0x1,%rsi
mov    0x2d91(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
jmp    115b <__getpwent+0x1b>
movsbl 0x2de6(%rip),%eax
cmp    $0x23,%eax
je     12a3 <__getpwent+0x163>
movsbl 0x2dd6(%rip),%eax
cmp    $0x20,%eax
je     12a3 <__getpwent+0x163>
movsbl 0x2dc6(%rip),%eax
cmp    $0xa,%eax
je     12a3 <__getpwent+0x163>
movsbl 0x2db6(%rip),%eax
cmp    $0x9,%eax
jne    12a8 <__getpwent+0x168>
jmp    115b <__getpwent+0x1b>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2d9a(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x7,-0x38(%rbp)
jge    13a6 <__getpwent+0x266>
mov    -0x38(%rbp),%eax
mov    %rax,-0x40(%rbp)
sub    $0x6,%rax
ja     1355 <__getpwent+0x215>
mov    -0x40(%rbp),%rax
lea    0xd19(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rax
mov    %rax,0x2e55(%rip)
jmp    1355 <__getpwent+0x215>
mov    -0x18(%rbp),%rax
mov    %rax,0x2e4d(%rip)
jmp    1355 <__getpwent+0x215>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1355 <__getpwent+0x215>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1355 <__getpwent+0x215>
mov    -0x18(%rbp),%rax
mov    %rax,0x2e2b(%rip)
jmp    1355 <__getpwent+0x215>
mov    -0x18(%rbp),%rax
mov    %rax,0x2e23(%rip)
jmp    1355 <__getpwent+0x215>
mov    -0x18(%rbp),%rax
mov    %rax,0x2e1b(%rip)
cmpl   $0x6,-0x38(%rbp)
jge    1393 <__getpwent+0x253>
mov    -0x18(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1381 <__getpwent+0x241>
jmp    115b <__getpwent+0x1b>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
jmp    1398 <__getpwent+0x258>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12c1 <__getpwent+0x181>
mov    -0x28(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %rax,0x2dc1(%rip)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13d4 <__getpwent+0x294>
jmp    115b <__getpwent+0x1b>
mov    -0x30(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %rax,0x2d8b(%rip)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1402 <__getpwent+0x2c2>
jmp    115b <__getpwent+0x1b>
lea    0x2d47(%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,%r12d
lea    0x2efb(%rip),%r14
mov    %r14,%rsi
mov    $0x100,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    136d <__getpwent+0x22d>
mov    %eax,%ebp
lea    0x2fdd(%rip),%r15
jmp    119a <__getpwent+0x5a>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12d,%edi
mov    %r14,%rsi
mov    $0x100,%edx
call   1050 <read@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    136d <__getpwent+0x22d>
mov    %r14,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1320 <__getpwent+0x1e0>
mov    %rax,%rbx
mov    %ebp,%eax
add    %r14,%rax
mov    %rbx,%rsi
sub    %rax,%rsi
add    $0x1,%rsi
mov    0x2e1f(%rip),%rax
mov    (%rax),%edx
mov    %r12d,%edi
call   1040 <lseek@plt>
movzbl 0x2e76(%rip),%eax
cmp    $0x23,%rax
ja     11f0 <__getpwent+0xb0>
movabs $0x900000600,%rcx
bt     %rax,%rcx
jb     1180 <__getpwent+0x40>
movb   $0x0,(%rbx)
mov    %r14,0x2f56(%rip)
mov    %r14,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getpwent+0x40>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2f37(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getpwent+0x40>
mov    %rax,%r13
add    $0x1,%r13
movb   $0x0,(%rax)
mov    %r13,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getpwent+0x40>
mov    %rax,%rbp
add    $0x1,%rbp
movb   $0x0,(%rax)
mov    %rbp,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getpwent+0x40>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2edb(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getpwent+0x40>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2ebf(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getpwent+0x40>
mov    %rax,%rcx
add    $0x1,%rcx
movb   $0x0,(%rax)
mov    %rcx,0x2ea3(%rip)
mov    %rbp,%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %rax,0x2e9c(%rip)
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
jne    1180 <__getpwent+0x40>
mov    %r13,%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %rax,0x2e70(%rip)
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
jne    1180 <__getpwent+0x40>
jmp    1370 <__getpwent+0x230>
nopw   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %r14,%rsi
mov    $0x100,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    136d <__getpwent+0x22d>
mov    %eax,%ebx
mov    %r14,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1320 <__getpwent+0x1e0>
mov    %ebx,%ecx
add    %r14,%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    0x2c8d(%rip),%rcx
mov    (%rcx),%edx
mov    %r12d,%edi
mov    %rax,%rsi
call   1040 <lseek@plt>
jmp    1180 <__getpwent+0x40>
xor    %r15d,%r15d
mov    %r15,%rax
add    $0x8,%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*, i64, i64 }
@__getpwent.line_buff = internal global [256 x i8] zeroinitializer
@__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
store i8* null, i8** %6
store i8* null, i8** %7
br label %10
10: ; preds = %122, %114, %99, %69, %42, %1
%11 = load i32, i32* %3
%12 = call i32 @read(i32 %11, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i32 256)
store i32 %12, i32* %8
%13 = icmp sle i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store %struct.passwd* null, %struct.passwd** %2
br label %124
15: ; preds = %10
%16 = call i8* @strchr(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8 signext 10)
store i8* %16, i8** %4
%17 = load i8*, i8** %4
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %31
19: ; preds = %15
%20 = load i32, i32* %3
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i64 %24
%26 = ptrtoint i8* %22 to i64
%27 = ptrtoint i8* %25 to i64
%28 = sub i64 %26, %27
%29 = load i32, i32* @SEEK_CUR
%30 = call i32 @lseek(i32 %20, i64 %28, i32 %29)
br label %53
31: ; preds = %15
br label %32
32: ; preds = %38, %31
%33 = load i32, i32* %3
%34 = call i32 @read(i32 %33, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i32 256)
store i32 %34, i32* %8
%35 = icmp sle i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
store %struct.passwd* null, %struct.passwd** %2
br label %124
37: ; preds = %32
br label %38
38: ; preds = %37
%39 = call i8* @strchr(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8 signext 10)
store i8* %39, i8** %4
%40 = icmp ne i8* %39, null
%41 = xor i1 %40, true
br i1 %41, label %32, label %42
42: ; preds = %38
%43 = load i32, i32* %3
%44 = load i8*, i8** %4
%45 = ptrtoint i8* %44 to i64
%46 = sub i64 %45, ptrtoint ([256 x i8]* @__getpwent.line_buff to i64)
%47 = load i32, i32* %8
%48 = sext i32 %47 to i64
%49 = sub nsw i64 %46, %48
%50 = add nsw i64 %49, 1
%51 = load i32, i32* @SEEK_CUR
%52 = call i32 @lseek(i32 %43, i64 %50, i32 %51)
br label %10
53: ; preds = %19
%54 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0)
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 35
br i1 %56, label %69, label %57
57: ; preds = %53
%58 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0)
%59 = sext i8 %58 to i32
%60 = icmp eq i32 %59, 32
br i1 %60, label %69, label %61
61: ; preds = %57
%62 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0)
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 10
br i1 %64, label %69, label %65
65: ; preds = %61
%66 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0)
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 9
br i1 %68, label %69, label %70
69: ; preds = %65, %61, %57, %53
br label %10
70: ; preds = %65
%71 = load i8*, i8** %4
store i8 0, i8* %71
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8** %4
store i32 0, i32* %9
br label %72
72: ; preds = %104, %70
%73 = load i32, i32* %9
%74 = icmp slt i32 %73, 7
br i1 %74, label %75, label %107
75: ; preds = %72
%76 = load i32, i32* %9
switch i32 %76, label %91 [
i32 0, label %77
i32 1, label %79
i32 2, label %81
i32 3, label %83
i32 4, label %85
i32 5, label %87
i32 6, label %89
]
77: ; preds = %75
%78 = load i8*, i8** %4
store i8* %78, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 0)
br label %91
79: ; preds = %75
%80 = load i8*, i8** %4
store i8* %80, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 1)
br label %91
81: ; preds = %75
%82 = load i8*, i8** %4
store i8* %82, i8** %7
br label %91
83: ; preds = %75
%84 = load i8*, i8** %4
store i8* %84, i8** %6
br label %91
85: ; preds = %75
%86 = load i8*, i8** %4
store i8* %86, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 2)
br label %91
87: ; preds = %75
%88 = load i8*, i8** %4
store i8* %88, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 3)
br label %91
89: ; preds = %75
%90 = load i8*, i8** %4
store i8* %90, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 4)
br label %91
91: ; preds = %75, %89, %87, %85, %83, %81, %79, %77
%92 = load i32, i32* %9
%93 = icmp slt i32 %92, 6
br i1 %93, label %94, label %103
94: ; preds = %91
%95 = load i8*, i8** %4
%96 = call i8* @strchr(i8* %95, i8 signext 58)
store i8* %96, i8** %4
%97 = load i8*, i8** %4
%98 = icmp eq i8* %97, null
br i1 %98, label %99, label %100
99: ; preds = %94
br label %10
100: ; preds = %94
%101 = load i8*, i8** %4
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %4
store i8 0, i8* %101
br label %103
103: ; preds = %100, %91
br label %104
104: ; preds = %103
%105 = load i32, i32* %9
%106 = add nsw i32 %105, 1
store i32 %106, i32* %9
br label %72
107: ; preds = %72
%108 = load i8*, i8** %6
%109 = call i64 @strtoul(i8* %108, i8** %5, i32 10)
store i64 %109, i64* getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 6)
%110 = load i8*, i8** %5
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %115
114: ; preds = %107
br label %10
115: ; preds = %107
%116 = load i8*, i8** %7
%117 = call i64 @strtoul(i8* %116, i8** %5, i32 10)
store i64 %117, i64* getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i32 0, i32 5)
%118 = load i8*, i8** %5
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp ne i32 %120, 0
br i1 %121, label %122, label %123
122: ; preds = %115
br label %10
123: ; preds = %115
store %struct.passwd* @__getpwent.passwd, %struct.passwd** %2
br label %124
124: ; preds = %123, %36, %14
%125 = load %struct.passwd*, %struct.passwd** %2
ret %struct.passwd* %125
}

LLVM IR (-O2):
%struct.passwd = type { i8*, i8*, i8*, i8*, i8*, i64, i64 }
@__getpwent.line_buff = internal global [256 x i8] zeroinitializer
@__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 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i32 256)
%5 = icmp slt i32 %4, 1
br i1 %5, label %75, label %6
6: ; preds = %1, %36
%7 = phi i32 [ %39, %36 ], [ %4, %1 ]
%8 = phi i8* [ %38, %36 ], [ null, %1 ]
%9 = phi i8* [ %37, %36 ], [ null, %1 ]
%10 = tail call i8* @strchr(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8 signext 10)
%11 = icmp eq i8* %10, null
br i1 %11, label %22, label %12
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = zext i32 %7 to i64
%15 = getelementptr inbounds [256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 %14
%16 = ptrtoint i8* %13 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
%19 = load i32, i32* @SEEK_CUR
%20 = tail call i32 @lseek(i32 %0, i64 %18, i32 %19)
%21 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0)
switch i8 %21, label %41 [
i8 35, label %36
i8 32, label %36
i8 10, label %36
i8 9, label %36
]
22: ; preds = %6, %25
%23 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i32 256)
%24 = icmp slt i32 %23, 1
br i1 %24, label %75, label %25
25: ; preds = %22
%26 = tail call i8* @strchr(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8 signext 10)
%27 = icmp eq i8* %26, null
br i1 %27, label %22, label %28
28: ; preds = %25
%29 = ptrtoint i8* %26 to i64
%30 = zext i32 %23 to i64
%31 = add i64 %30, ptrtoint ([256 x i8]* @__getpwent.line_buff to i64)
%32 = sub i64 1, %31
%33 = add i64 %32, %29
%34 = load i32, i32* @SEEK_CUR
%35 = tail call i32 @lseek(i32 %0, i64 %33, i32 %34)
br label %36
36: ; preds = %41, %44, %48, %52, %56, %60, %28, %64, %70, %12, %12, %12, %12
%37 = phi i8* [ %9, %12 ], [ %53, %64 ], [ %53, %70 ], [ %9, %28 ], [ %9, %12 ], [ %9, %12 ], [ %9, %12 ], [ %9, %41 ], [ %9, %44 ], [ %9, %48 ], [ %53, %52 ], [ %53, %56 ], [ %53, %60 ]
%38 = phi i8* [ %8, %12 ], [ %49, %64 ], [ %49, %70 ], [ %8, %28 ], [ %8, %12 ], [ %8, %12 ], [ %8, %12 ], [ %8, %41 ], [ %8, %44 ], [ %49, %48 ], [ %49, %52 ], [ %49, %56 ], [ %49, %60 ]
%39 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i32 256)
%40 = icmp slt i32 %39, 1
br i1 %40, label %75, label %6
41: ; preds = %12
store i8 0, i8* %10
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 0)
%42 = tail call i8* @strchr(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @__getpwent.line_buff, i64 0, i64 0), i8 signext 58)
%43 = icmp eq i8* %42, null
br i1 %43, label %36, label %44
44: ; preds = %41
%45 = getelementptr inbounds i8, i8* %42, i64 1
store i8 0, i8* %42
store i8* %45, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 1)
%46 = tail call i8* @strchr(i8* dereferenceable(1) %45, i8 signext 58)
%47 = icmp eq i8* %46, null
br i1 %47, label %36, label %48
48: ; preds = %44
%49 = getelementptr inbounds i8, i8* %46, i64 1
store i8 0, i8* %46
%50 = tail call i8* @strchr(i8* dereferenceable(1) %49, i8 signext 58)
%51 = icmp eq i8* %50, null
br i1 %51, label %36, label %52
52: ; preds = %48
%53 = getelementptr inbounds i8, i8* %50, i64 1
store i8 0, i8* %50
%54 = tail call i8* @strchr(i8* dereferenceable(1) %53, i8 signext 58)
%55 = icmp eq i8* %54, null
br i1 %55, label %36, label %56
56: ; preds = %52
%57 = getelementptr inbounds i8, i8* %54, i64 1
store i8 0, i8* %54
store i8* %57, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 2)
%58 = tail call i8* @strchr(i8* dereferenceable(1) %57, i8 signext 58)
%59 = icmp eq i8* %58, null
br i1 %59, label %36, label %60
60: ; preds = %56
%61 = getelementptr inbounds i8, i8* %58, i64 1
store i8 0, i8* %58
store i8* %61, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 3)
%62 = tail call i8* @strchr(i8* dereferenceable(1) %61, i8 signext 58)
%63 = icmp eq i8* %62, null
br i1 %63, label %36, label %64
64: ; preds = %60
%65 = getelementptr inbounds i8, i8* %62, i64 1
store i8 0, i8* %62
store i8* %65, i8** getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 4)
%66 = call i64 @strtoul(i8* %53, i8** %2, i32 10)
store i64 %66, i64* getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 6)
%67 = load i8*, i8** %2
%68 = load i8, i8* %67
%69 = icmp eq i8 %68, 0
br i1 %69, label %70, label %36
70: ; preds = %64
%71 = call i64 @strtoul(i8* %49, i8** %2, i32 10)
store i64 %71, i64* getelementptr inbounds (%struct.passwd, %struct.passwd* @__getpwent.passwd, i64 0, i32 5)
%72 = load i8*, i8** %2
%73 = load i8, i8* %72
%74 = icmp eq i8 %73, 0
br i1 %74, label %75, label %36
75: ; preds = %36, %70, %22, %1
%76 = phi %struct.passwd* [ null, %1 ], [ null, %22 ], [ null, %36 ], [ @__getpwent.passwd, %70 ]
ret %struct.passwd* %76
}