#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 {
  scalar_t__ pw_uid;
  char *pw_name;
  scalar_t__ pw_gid;
};
struct group {
  scalar_t__ gr_gid;
};
typedef scalar_t__ gid_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
struct group *getgrnam(char const *);
struct passwd *getpwnam(char const *);
struct passwd *getpwuid(scalar_t__);
int /*<<< orphan*/ stderr;
scalar_t__ strtol(char const *, char **, int);
int find_user_group(const char *user, const char *group, uid_t *uid, gid_t *gid,
                    const char **username) {
  uid_t my_uid = 0;
  gid_t my_gid = 0;
  struct passwd *my_pwd = NULL;
  struct group *my_grp = NULL;
  char *endptr = NULL;
  *uid = 0;
  *gid = 0;
  if (username)
    *username = NULL;
  if (user) {
    my_uid = strtol(user, &endptr, 10);
    if (my_uid <= 0 || *endptr) {
      if (NULL == (my_pwd = getpwnam(user))) {
        fprintf(stderr, "samcms-index: can't find user name %s\n", user);
        return -1;
      }
      my_uid = my_pwd->pw_uid;
      if (my_uid == 0) {
        fprintf(stderr, "samcms-index: I will not set uid to 0\n");
        return -1;
      }
      if (username)
        *username = user;
    } else {
      my_pwd = getpwuid(my_uid);
      if (username && my_pwd)
        *username = my_pwd->pw_name;
    }
  }
  if (group) {
    my_gid = strtol(group, &endptr, 10);
    if (my_gid <= 0 || *endptr) {
      if (NULL == (my_grp = getgrnam(group))) {
        fprintf(stderr, "samcms-index: can't find group name %s\n", group);
        return -1;
      }
      my_gid = my_grp->gr_gid;
      if (my_gid == 0) {
        fprintf(stderr, "samcms-index: I will not set gid to 0\n");
        return -1;
      }
    }
  } else if (my_pwd) {
    my_gid = my_pwd->pw_gid;
    if (my_gid == 0) {
      fprintf(stderr, "samcms-index: I will not set gid to 0\n");
      return -1;
    }
  }
  *uid = my_uid;
  *gid = my_gid;
  return 0;
}


x86 assembly (clang, -O0):
<find_user_group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     11c0 <find_user_group+0x70>
mov    -0x30(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     12ce <find_user_group+0x17e>
mov    -0x10(%rbp),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jle    11fc <find_user_group+0xac>
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1292 <find_user_group+0x142>
mov    -0x10(%rbp),%rdi
call   1040 <getpwnam@plt>
mov    %rax,%rcx
mov    %rcx,-0x48(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    123e <find_user_group+0xee>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xdd5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fb <find_user_group+0x2ab>
mov    -0x48(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1277 <find_user_group+0x127>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
lea    0xdc3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fb <find_user_group+0x2ab>
cmpq   $0x0,-0x30(%rbp)
je     128d <find_user_group+0x13d>
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
jmp    12c9 <find_user_group+0x179>
mov    -0x38(%rbp),%rdi
call   1030 <getpwuid@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     12c4 <find_user_group+0x174>
cmpq   $0x0,-0x48(%rbp)
je     12c4 <find_user_group+0x174>
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
jmp    12c9 <find_user_group+0x179>
jmp    12ce <find_user_group+0x17e>
cmpq   $0x0,-0x18(%rbp)
je     138f <find_user_group+0x23f>
mov    -0x18(%rbp),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jle    130a <find_user_group+0x1ba>
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     138a <find_user_group+0x23a>
mov    -0x18(%rbp),%rdi
call   1070 <getgrnam@plt>
mov    %rax,%rcx
mov    %rcx,-0x50(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    134c <find_user_group+0x1fc>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xd15(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fb <find_user_group+0x2ab>
mov    -0x50(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1385 <find_user_group+0x235>
mov    0x2c77(%rip),%rax
mov    (%rax),%edi
lea    0xd04(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fb <find_user_group+0x2ab>
jmp    138a <find_user_group+0x23a>
jmp    13de <find_user_group+0x28e>
cmpq   $0x0,-0x48(%rbp)
je     13d9 <find_user_group+0x289>
mov    -0x48(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    13d4 <find_user_group+0x284>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
lea    0xcb5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13fb <find_user_group+0x2ab>
jmp    13d9 <find_user_group+0x289>
jmp    13de <find_user_group+0x28e>
mov    -0x38(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_user_group>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbp
movq   $0x0,(%rsp)
movq   $0x0,(%rdx)
movq   $0x0,(%rcx)
test   %r8,%r8
je     118c <find_user_group+0x3c>
movq   $0x0,(%rbx)
test   %rbp,%rbp
je     11d2 <find_user_group+0x82>
mov    %rsp,%rsi
mov    %rbp,%rdi
mov    $0xa,%edx
call   1060 <strtol@plt>
test   %rax,%rax
jle    11b2 <find_user_group+0x62>
mov    %rax,%r13
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
je     11fc <find_user_group+0xac>
mov    %rbp,%rdi
call   1040 <getpwnam@plt>
test   %rax,%rax
je     11e4 <find_user_group+0x94>
mov    (%rax),%r13
test   %r13,%r13
je     1290 <find_user_group+0x140>
test   %rbx,%rbx
jne    1212 <find_user_group+0xc2>
jmp    1215 <find_user_group+0xc5>
xor    %r13d,%r13d
mov    $0x0,%eax
test   %r12,%r12
jne    121a <find_user_group+0xca>
jmp    12b0 <find_user_group+0x160>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
lea    0xe0c(%rip),%rsi
mov    %rbp,%rdx
jmp    1282 <find_user_group+0x132>
mov    %r13,%rdi
call   1030 <getpwuid@plt>
test   %rbx,%rbx
je     1215 <find_user_group+0xc5>
test   %rax,%rax
je     1215 <find_user_group+0xc5>
mov    0x8(%rax),%rbp
mov    %rbp,(%rbx)
test   %r12,%r12
je     124f <find_user_group+0xff>
mov    %rsp,%rsi
mov    %r12,%rdi
mov    $0xa,%edx
call   1060 <strtol@plt>
test   %rax,%rax
jle    1238 <find_user_group+0xe8>
mov    (%rsp),%rcx
cmpb   $0x0,(%rcx)
je     12b0 <find_user_group+0x160>
mov    %r12,%rdi
call   1070 <getgrnam@plt>
test   %rax,%rax
je     126f <find_user_group+0x11f>
mov    (%rax),%rax
test   %rax,%rax
jne    12b0 <find_user_group+0x160>
jmp    125d <find_user_group+0x10d>
test   %rax,%rax
je     12ae <find_user_group+0x15e>
mov    0x10(%rax),%rax
test   %rax,%rax
jne    12b0 <find_user_group+0x160>
mov    0x2d7c(%rip),%rax
mov    (%rax),%edi
lea    0xe09(%rip),%rsi
jmp    12a0 <find_user_group+0x150>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
lea    0xdcf(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    12b8 <find_user_group+0x168>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
lea    0xd87(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    12b8 <find_user_group+0x168>
xor    %eax,%eax
mov    %r13,(%r15)
mov    %rax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.passwd = type { i64, i8*, i64 }
%struct.group = type { i64 }
@stderr = global i32 0
@.str = [39 x i8] c"samcms-index: can't find user name %s\0A\00"
@.str.1 = [39 x i8] c"samcms-index: I will not set uid to 0\0A\00"
@.str.2 = [40 x i8] c"samcms-index: can't find group name %s\0A\00"
@.str.3 = [39 x i8] c"samcms-index: I will not set gid to 0\0A\00"
define i32 @find_user_group(i8* %0, i8* %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3, i8** writeonly %4) {
%6 = alloca i8*
%7 = bitcast i8** %6 to i8*
store i8* null, i8** %6
store i64 0, i64* %2
store i64 0, i64* %3
%8 = icmp ne i8** %4, null
br i1 %8, label %9, label %10
9: ; preds = %5
store i8* null, i8** %4
br label %10
10: ; preds = %9, %5
%11 = icmp eq i8* %0, null
br i1 %11, label %48, label %12
12: ; preds = %10
%13 = call i64 @strtol(i8* %0, i8** %6, i32 10)
%14 = icmp slt i64 %13, 1
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = load i8*, i8** %6
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %33, label %19
19: ; preds = %15, %12
%20 = tail call %struct.passwd* @getpwnam(i8* %0)
%21 = icmp eq %struct.passwd* %20, null
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* @stderr
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %83
25: ; preds = %19
%26 = getelementptr inbounds %struct.passwd, %struct.passwd* %20, i64 0, i32 0
%27 = load i64, i64* %26
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
br label %83
32: ; preds = %25
br i1 %8, label %40, label %44
33: ; preds = %15
%34 = tail call %struct.passwd* @getpwuid(i64 %13)
%35 = icmp ne %struct.passwd* %34, null
%36 = select i1 %8, i1 %35, i1 false
br i1 %36, label %37, label %44
37: ; preds = %33
%38 = getelementptr inbounds %struct.passwd, %struct.passwd* %34, i64 0, i32 1
%39 = load i8*, i8** %38
br label %40
40: ; preds = %32, %37
%41 = phi i8* [ %39, %37 ], [ %0, %32 ]
%42 = phi i64 [ %13, %37 ], [ %27, %32 ]
%43 = phi %struct.passwd* [ %34, %37 ], [ %20, %32 ]
store i8* %41, i8** %4
br label %44
44: ; preds = %40, %32, %33
%45 = phi i64 [ %27, %32 ], [ %13, %33 ], [ %42, %40 ]
%46 = phi %struct.passwd* [ %20, %32 ], [ %34, %33 ], [ %43, %40 ]
%47 = icmp eq i8* %1, null
br i1 %47, label %71, label %50
48: ; preds = %10
%49 = icmp eq i8* %1, null
br i1 %49, label %80, label %50
50: ; preds = %48, %44
%51 = phi i64 [ 0, %48 ], [ %45, %44 ]
%52 = call i64 @strtol(i8* %1, i8** %6, i32 10)
%53 = icmp slt i64 %52, 1
br i1 %53, label %58, label %54
54: ; preds = %50
%55 = load i8*, i8** %6
%56 = load i8, i8* %55
%57 = icmp eq i8 %56, 0
br i1 %57, label %80, label %58
58: ; preds = %54, %50
%59 = tail call %struct.group* @getgrnam(i8* %1)
%60 = icmp eq %struct.group* %59, null
br i1 %60, label %61, label %64
61: ; preds = %58
%62 = load i32, i32* @stderr
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i8* %1)
br label %83
64: ; preds = %58
%65 = getelementptr inbounds %struct.group, %struct.group* %59, i64 0, i32 0
%66 = load i64, i64* %65
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %80
68: ; preds = %64
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
br label %83
71: ; preds = %44
%72 = icmp eq %struct.passwd* %46, null
br i1 %72, label %80, label %73
73: ; preds = %71
%74 = getelementptr inbounds %struct.passwd, %struct.passwd* %46, i64 0, i32 2
%75 = load i64, i64* %74
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %73
%78 = load i32, i32* @stderr
%79 = tail call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
br label %83
80: ; preds = %48, %71, %73, %54, %64
%81 = phi i64 [ %51, %64 ], [ %51, %54 ], [ %45, %73 ], [ %45, %71 ], [ 0, %48 ]
%82 = phi i64 [ %66, %64 ], [ %52, %54 ], [ %75, %73 ], [ 0, %71 ], [ 0, %48 ]
store i64 %81, i64* %2
store i64 %82, i64* %3
br label %83
83: ; preds = %80, %77, %68, %61, %29, %22
%84 = phi i32 [ -1, %22 ], [ -1, %29 ], [ -1, %61 ], [ -1, %68 ], [ 0, %80 ], [ -1, %77 ]
ret i32 %84
}