#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 group {
  char *gr_name;
  char *gr_passwd;
  char **gr_mem;
  scalar_t__ gr_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 group *__getgrent(int grp_fd) {
  static char line_buff[128];
  static char *members[11];
  static struct group group;
  char *ptr;
  char *field_begin;
  int member_num;
  char *endptr;
  int line_len;
restart:
  if ((line_len = read(grp_fd, line_buff, 128)) <= 0)
    return NULL;
  field_begin = strchr(line_buff, '\n');
  if (field_begin != NULL)
    lseek(grp_fd, (long)(1 + field_begin - (line_buff + line_len)), SEEK_CUR);
  else {
    do {
      if ((line_len = read(grp_fd, line_buff, 128)) <= 0)
        return NULL;
    } while (!(field_begin = strchr(line_buff, '\n')));
    lseek(grp_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';
  group.gr_name = line_buff;
  ptr = strchr(line_buff, ':');
  if (ptr == NULL)
    goto restart;
  *ptr++ = '\0';
  group.gr_passwd = ptr;
  ptr = strchr(ptr, ':');
  if (ptr == NULL)
    goto restart;
  *ptr++ = '\0';
  field_begin = ptr;
  ptr = strchr(ptr, ':');
  if (ptr == NULL)
    goto restart;
  *ptr++ = '\0';
  group.gr_gid = (gid_t)strtoul(field_begin, &endptr, 10);
  if (*endptr != '\0')
    goto restart;
  member_num = 0;
  field_begin = ptr;
  while ((ptr = strchr(ptr, ',')) != NULL) {
    *ptr = '\0';
    ptr++;
    members[member_num] = field_begin;
    field_begin = ptr;
    member_num++;
  }
  if (*field_begin == '\0')
    members[member_num] = NULL;
  else {
    members[member_num] = field_begin;
    members[member_num + 1] = NULL;
  }
  group.gr_mem = members;
  return &group;
}


x86 assembly (clang, -O0):
<__getgrent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    0x2efb(%rip),%rsi
mov    $0x80,%edx
call   1050 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jg     1178 <__getgrent+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1460 <__getgrent+0x320>
lea    0x2ed1(%rip),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11c7 <__getgrent+0x87>
mov    -0xc(%rbp),%edi
mov    -0x20(%rbp),%rsi
add    $0x1,%rsi
movslq -0x34(%rbp),%rcx
lea    0x2ea2(%rip),%rax
add    %rcx,%rax
sub    %rax,%rsi
mov    0x2e2d(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
jmp    1253 <__getgrent+0x113>
jmp    11cc <__getgrent+0x8c>
mov    -0xc(%rbp),%edi
lea    0x2e7a(%rip),%rsi
mov    $0x80,%edx
call   1050 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jg     11f9 <__getgrent+0xb9>
movq   $0x0,-0x8(%rbp)
jmp    1460 <__getgrent+0x320>
jmp    11fe <__getgrent+0xbe>
lea    0x2e4b(%rip),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11cc <__getgrent+0x8c>
mov    -0xc(%rbp),%edi
mov    -0x20(%rbp),%rsi
lea    0x2e1e(%rip),%rax
sub    %rax,%rsi
movslq -0x34(%rbp),%rax
sub    %rax,%rsi
add    $0x1,%rsi
mov    0x2da1(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
jmp    114b <__getgrent+0xb>
movsbl 0x2df6(%rip),%eax
cmp    $0x23,%eax
je     1293 <__getgrent+0x153>
movsbl 0x2de6(%rip),%eax
cmp    $0x20,%eax
je     1293 <__getgrent+0x153>
movsbl 0x2dd6(%rip),%eax
cmp    $0xa,%eax
je     1293 <__getgrent+0x153>
movsbl 0x2dc6(%rip),%eax
cmp    $0x9,%eax
jne    1298 <__getgrent+0x158>
jmp    114b <__getgrent+0xb>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2daa(%rip),%rax
mov    %rax,0x2e7b(%rip)
lea    0x2d9c(%rip),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12d2 <__getgrent+0x192>
jmp    114b <__getgrent+0xb>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,0x2e41(%rip)
mov    -0x18(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1311 <__getgrent+0x1d1>
jmp    114b <__getgrent+0xb>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    134d <__getgrent+0x20d>
jmp    114b <__getgrent+0xb>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %rax,0x2dc8(%rip)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     138d <__getgrent+0x24d>
jmp    114b <__getgrent+0xb>
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     13f4 <__getgrent+0x2b4>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdx
movslq -0x24(%rbp),%rcx
lea    0x2cf6(%rip),%rax
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    139c <__getgrent+0x25c>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    141c <__getgrent+0x2dc>
movslq -0x24(%rbp),%rcx
lea    0x2cc1(%rip),%rax
movq   $0x0,(%rax,%rcx,8)
jmp    1447 <__getgrent+0x307>
mov    -0x20(%rbp),%rdx
movslq -0x24(%rbp),%rcx
lea    0x2ca5(%rip),%rax
mov    %rdx,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0x2c91(%rip),%rax
movq   $0x0,(%rax,%rcx,8)
lea    0x2c82(%rip),%rax
mov    %rax,0x2ce3(%rip)
lea    0x2ccc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getgrent>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%r12d
lea    0x2efb(%rip),%r15
mov    %r15,%rsi
mov    $0x80,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    12cd <__getgrent+0x18d>
mov    %eax,%ebp
xor    %r14d,%r14d
jmp    119a <__getgrent+0x5a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %r15,%rsi
mov    $0x80,%edx
call   1050 <read@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    12d0 <__getgrent+0x190>
mov    %r15,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1280 <__getgrent+0x140>
mov    %rax,%rbx
mov    %ebp,%eax
add    %r15,%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 <__getgrent+0xb0>
movabs $0x900000600,%rcx
bt     %rax,%rcx
jb     1180 <__getgrent+0x40>
movb   $0x0,(%rbx)
mov    %r15,0x2f2e(%rip)
mov    %r15,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getgrent+0x40>
mov    %rax,%rdi
add    $0x1,%rdi
movb   $0x0,(%rax)
mov    %rdi,0x2f0f(%rip)
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getgrent+0x40>
mov    %rax,%rbx
add    $0x1,%rbx
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1180 <__getgrent+0x40>
mov    %rax,%r13
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %rax,0x2ecf(%rip)
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
jne    1180 <__getgrent+0x40>
jmp    12e2 <__getgrent+0x1a2>
mov    %r12d,%edi
mov    %r15,%rsi
mov    $0x80,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    12d0 <__getgrent+0x190>
mov    %eax,%ebx
mov    %r15,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1280 <__getgrent+0x140>
mov    %ebx,%ecx
add    %r15,%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    0x2d2d(%rip),%rcx
mov    (%rcx),%edx
mov    %r12d,%edi
mov    %rax,%rsi
call   1040 <lseek@plt>
jmp    1180 <__getgrent+0x40>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%r13
mov    %r13,%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     132a <__getgrent+0x1ea>
lea    0x2dd1(%rip),%rbp
xor    %ebx,%ebx
movb   $0x0,(%rax)
mov    %r13,0x0(%rbp)
mov    %rax,%r13
add    $0x1,%r13
mov    %r13,%rdi
mov    $0x2c,%esi
call   1030 <strchr@plt>
add    $0x8,%rbp
add    $0x1,%ebx
test   %rax,%rax
jne    1301 <__getgrent+0x1c1>
jmp    132c <__getgrent+0x1ec>
xor    %ebx,%ebx
cmpb   $0x0,0x0(%r13)
mov    %ebx,%edx
lea    0x2d96(%rip),%rax
lea    (%rax,%rdx,8),%rcx
je     134b <__getgrent+0x20b>
mov    %r13,(%rcx)
lea    (%rax,%rdx,8),%rcx
add    $0x8,%rcx
movq   $0x0,(%rcx)
mov    %rax,0x2ddf(%rip)
lea    0x2dc8(%rip),%r14
jmp    12d0 <__getgrent+0x190>

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

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