#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 int uid_t;
typedef int gid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long,
                           unsigned long, unsigned long);
int getresgid(int *, int *, int *);
int getresuid(int *, int *, int *);
int /*<<< orphan*/ perror(char *);
int setresgid(int, int, int);
int setresuid(int, int, int);
int /*<<< orphan*/ stderr;
int main(void) {
  uid_t ruid = 13, euid = 13, suid = 13;
  gid_t rgid = 13, egid = 13, sgid = 13;
  int status;
  status = getresuid(&ruid, &euid, &suid);
  if (status != 0 || ruid != 0 || euid != 0 || suid != 0) {
    perror("getresuid");
    fprintf(stderr, "%ld %ld %ld\n", (unsigned long)ruid, (unsigned long)euid,
            (unsigned long)suid);
    exit(EXIT_FAILURE);
  }
  status = getresgid(&rgid, &egid, &sgid);
  if (status != 0 || rgid != 0 || egid != 0 || sgid != 0) {
    perror("getresgid");
    fprintf(stderr, "%ld %ld %ld\n", (unsigned long)ruid, (unsigned long)euid,
            (unsigned long)suid);
    exit(EXIT_FAILURE);
  }
  status = setresgid(1, 1, 1);
  if (status != 0) {
    perror("setresgid");
    exit(EXIT_FAILURE);
  }
  status = getresgid(&rgid, &egid, &sgid);
  if (status != 0 || rgid != 1 || egid != 1 || sgid != 1) {
    perror("getresgid");
    fprintf(stderr, "%ld %ld %ld\n", (unsigned long)rgid, (unsigned long)egid,
            (unsigned long)sgid);
    exit(EXIT_FAILURE);
  }
  if (status != 0 || rgid != 1 || egid != 1 || sgid != 1) {
    perror("getresgid");
    fprintf(stderr, "%ld %ld %ld\n", (unsigned long)ruid, (unsigned long)euid,
            (unsigned long)suid);
    exit(EXIT_FAILURE);
  }
  status = setresuid(1, 1, 1);
  if (status != 0) {
    perror("setresuid");
    exit(EXIT_FAILURE);
  }
  status = getresuid(&ruid, &euid, &suid);
  if (status != 0 || ruid != 1 || euid != 1 || suid != 1) {
    perror("getresuid");
    fprintf(stderr, "%ld %ld %ld\n", (unsigned long)ruid, (unsigned long)euid,
            (unsigned long)suid);
    exit(EXIT_FAILURE);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd,-0x8(%rbp)
movl   $0xd,-0xc(%rbp)
movl   $0xd,-0x10(%rbp)
movl   $0xd,-0x14(%rbp)
movl   $0xd,-0x18(%rbp)
movl   $0xd,-0x1c(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1070 <getresuid@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    11e5 <main+0x75>
cmpl   $0x0,-0x8(%rbp)
jne    11e5 <main+0x75>
cmpl   $0x0,-0xc(%rbp)
jne    11e5 <main+0x75>
cmpl   $0x0,-0x10(%rbp)
je     1220 <main+0xb0>
lea    0xe14(%rip),%rdi
call   1080 <perror@plt>
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
movslq -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rcx
movslq -0x10(%rbp),%r8
lea    0xdfd(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <getresgid@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    125c <main+0xec>
cmpl   $0x0,-0x14(%rbp)
jne    125c <main+0xec>
cmpl   $0x0,-0x18(%rbp)
jne    125c <main+0xec>
cmpl   $0x0,-0x1c(%rbp)
je     1297 <main+0x127>
lea    0xdb4(%rip),%rdi
call   1080 <perror@plt>
mov    0x2d71(%rip),%rax
mov    (%rax),%edi
movslq -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rcx
movslq -0x10(%rbp),%r8
lea    0xd86(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    $0x1,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <setresgid@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     12cc <main+0x15c>
lea    0xd68(%rip),%rdi
call   1080 <perror@plt>
mov    0x2d13(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <getresgid@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1308 <main+0x198>
cmpl   $0x1,-0x14(%rbp)
jne    1308 <main+0x198>
cmpl   $0x1,-0x18(%rbp)
jne    1308 <main+0x198>
cmpl   $0x1,-0x1c(%rbp)
je     1343 <main+0x1d3>
lea    0xd08(%rip),%rdi
call   1080 <perror@plt>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edi
movslq -0x14(%rbp),%rdx
movslq -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%r8
lea    0xcda(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2c9c(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
cmpl   $0x0,-0x20(%rbp)
jne    136b <main+0x1fb>
cmpl   $0x1,-0x14(%rbp)
jne    136b <main+0x1fb>
cmpl   $0x1,-0x18(%rbp)
jne    136b <main+0x1fb>
cmpl   $0x1,-0x1c(%rbp)
je     13a6 <main+0x236>
lea    0xca5(%rip),%rdi
call   1080 <perror@plt>
mov    0x2c62(%rip),%rax
mov    (%rax),%edi
movslq -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rcx
movslq -0x10(%rbp),%r8
lea    0xc77(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2c39(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    $0x1,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1040 <setresuid@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     13db <main+0x26b>
lea    0xc63(%rip),%rdi
call   1080 <perror@plt>
mov    0x2c04(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1070 <getresuid@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1417 <main+0x2a7>
cmpl   $0x1,-0x8(%rbp)
jne    1417 <main+0x2a7>
cmpl   $0x1,-0xc(%rbp)
jne    1417 <main+0x2a7>
cmpl   $0x1,-0x10(%rbp)
je     1452 <main+0x2e2>
lea    0xbe2(%rip),%rdi
call   1080 <perror@plt>
mov    0x2bb6(%rip),%rax
mov    (%rax),%edi
movslq -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rcx
movslq -0x10(%rbp),%r8
lea    0xbcb(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2b8d(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    0x2b77(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0xd,0x8(%rsp)
movl   $0xd,0x4(%rsp)
movl   $0xd,(%rsp)
movl   $0xd,0x14(%rsp)
movl   $0xd,0x10(%rsp)
movl   $0xd,0xc(%rsp)
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1070 <getresuid@plt>
test   %eax,%eax
jne    12c7 <main+0x157>
cmpl   $0x0,0x8(%rsp)
jne    12c7 <main+0x157>
cmpl   $0x0,0x4(%rsp)
jne    12c7 <main+0x157>
cmpl   $0x0,(%rsp)
jne    12c7 <main+0x157>
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <getresgid@plt>
test   %eax,%eax
jne    12d0 <main+0x160>
cmpl   $0x0,0x14(%rsp)
jne    12d0 <main+0x160>
cmpl   $0x0,0x10(%rsp)
jne    12d0 <main+0x160>
cmpl   $0x0,0xc(%rsp)
jne    12d0 <main+0x160>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <setresgid@plt>
test   %eax,%eax
jne    130d <main+0x19d>
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <getresgid@plt>
test   %eax,%eax
jne    1316 <main+0x1a6>
cmpl   $0x1,0x14(%rsp)
jne    1316 <main+0x1a6>
cmpl   $0x1,0x10(%rsp)
jne    1316 <main+0x1a6>
cmpl   $0x1,0xc(%rsp)
jne    1316 <main+0x1a6>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <setresuid@plt>
test   %eax,%eax
jne    133c <main+0x1cc>
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1070 <getresuid@plt>
test   %eax,%eax
jne    12c7 <main+0x157>
cmpl   $0x1,0x8(%rsp)
jne    12c7 <main+0x157>
cmpl   $0x1,0x4(%rsp)
jne    12c7 <main+0x157>
cmpl   $0x1,(%rsp)
jne    12c7 <main+0x157>
mov    0x2d10(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
lea    0xd32(%rip),%rdi
jmp    12d7 <main+0x167>
lea    0xd40(%rip),%rdi
call   1080 <perror@plt>
mov    0x2cfd(%rip),%rax
mov    (%rax),%edi
movslq 0x8(%rsp),%rdx
movslq 0x4(%rsp),%rcx
movslq (%rsp),%r8
lea    0xd10(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
lea    0xd0d(%rip),%rdi
jmp    1343 <main+0x1d3>
lea    0xcfa(%rip),%rdi
call   1080 <perror@plt>
mov    0x2cb7(%rip),%rax
mov    (%rax),%edi
movslq 0x14(%rsp),%rdx
movslq 0x10(%rsp),%rcx
movslq 0xc(%rsp),%r8
jmp    12f3 <main+0x183>
lea    0xce8(%rip),%rdi
call   1080 <perror@plt>
jmp    12ff <main+0x18f>

LLVM IR (-O0):
@.str = [10 x i8] c"getresuid\00"
@stderr = global i32 0
@.str.1 = [13 x i8] c"%ld %ld %ld\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [10 x i8] c"getresgid\00"
@.str.3 = [10 x i8] c"setresgid\00"
@.str.4 = [10 x i8] c"setresuid\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 13, i32* %2
store i32 13, i32* %3
store i32 13, i32* %4
store i32 13, i32* %5
store i32 13, i32* %6
store i32 13, i32* %7
%9 = call i32 @getresuid(i32* %2, i32* %3, i32* %4)
store i32 %9, i32* %8
%10 = load i32, i32* %8
%11 = icmp ne i32 %10, 0
br i1 %11, label %21, label %12
12: ; preds = %0
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %33
21: ; preds = %18, %15, %12, %0
%22 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
%30 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 %25, i64 %27, i64 %29)
%31 = load i32, i32* @EXIT_FAILURE
%32 = call i32 @exit(i32 %31)
unreachable
33: ; preds = %18
%34 = call i32 @getresgid(i32* %5, i32* %6, i32* %7)
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = icmp ne i32 %35, 0
br i1 %36, label %46, label %37
37: ; preds = %33
%38 = load i32, i32* %5
%39 = icmp ne i32 %38, 0
br i1 %39, label %46, label %40
40: ; preds = %37
%41 = load i32, i32* %6
%42 = icmp ne i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = load i32, i32* %7
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %58
46: ; preds = %43, %40, %37, %33
%47 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%48 = load i32, i32* @stderr
%49 = load i32, i32* %2
%50 = sext i32 %49 to i64
%51 = load i32, i32* %3
%52 = sext i32 %51 to i64
%53 = load i32, i32* %4
%54 = sext i32 %53 to i64
%55 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 %50, i64 %52, i64 %54)
%56 = load i32, i32* @EXIT_FAILURE
%57 = call i32 @exit(i32 %56)
unreachable
58: ; preds = %43
%59 = call i32 @setresgid(i32 1, i32 1, i32 1)
store i32 %59, i32* %8
%60 = load i32, i32* %8
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %66
62: ; preds = %58
%63 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%64 = load i32, i32* @EXIT_FAILURE
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %58
%67 = call i32 @getresgid(i32* %5, i32* %6, i32* %7)
store i32 %67, i32* %8
%68 = load i32, i32* %8
%69 = icmp ne i32 %68, 0
br i1 %69, label %79, label %70
70: ; preds = %66
%71 = load i32, i32* %5
%72 = icmp ne i32 %71, 1
br i1 %72, label %79, label %73
73: ; preds = %70
%74 = load i32, i32* %6
%75 = icmp ne i32 %74, 1
br i1 %75, label %79, label %76
76: ; preds = %73
%77 = load i32, i32* %7
%78 = icmp ne i32 %77, 1
br i1 %78, label %79, label %91
79: ; preds = %76, %73, %70, %66
%80 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%81 = load i32, i32* @stderr
%82 = load i32, i32* %5
%83 = sext i32 %82 to i64
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = load i32, i32* %7
%87 = sext i32 %86 to i64
%88 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 %83, i64 %85, i64 %87)
%89 = load i32, i32* @EXIT_FAILURE
%90 = call i32 @exit(i32 %89)
unreachable
91: ; preds = %76
%92 = load i32, i32* %8
%93 = icmp ne i32 %92, 0
br i1 %93, label %103, label %94
94: ; preds = %91
%95 = load i32, i32* %5
%96 = icmp ne i32 %95, 1
br i1 %96, label %103, label %97
97: ; preds = %94
%98 = load i32, i32* %6
%99 = icmp ne i32 %98, 1
br i1 %99, label %103, label %100
100: ; preds = %97
%101 = load i32, i32* %7
%102 = icmp ne i32 %101, 1
br i1 %102, label %103, label %115
103: ; preds = %100, %97, %94, %91
%104 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%105 = load i32, i32* @stderr
%106 = load i32, i32* %2
%107 = sext i32 %106 to i64
%108 = load i32, i32* %3
%109 = sext i32 %108 to i64
%110 = load i32, i32* %4
%111 = sext i32 %110 to i64
%112 = call i32 @fprintf(i32 %105, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 %107, i64 %109, i64 %111)
%113 = load i32, i32* @EXIT_FAILURE
%114 = call i32 @exit(i32 %113)
unreachable
115: ; preds = %100
%116 = call i32 @setresuid(i32 1, i32 1, i32 1)
store i32 %116, i32* %8
%117 = load i32, i32* %8
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %123
119: ; preds = %115
%120 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%121 = load i32, i32* @EXIT_FAILURE
%122 = call i32 @exit(i32 %121)
unreachable
123: ; preds = %115
%124 = call i32 @getresuid(i32* %2, i32* %3, i32* %4)
store i32 %124, i32* %8
%125 = load i32, i32* %8
%126 = icmp ne i32 %125, 0
br i1 %126, label %136, label %127
127: ; preds = %123
%128 = load i32, i32* %2
%129 = icmp ne i32 %128, 1
br i1 %129, label %136, label %130
130: ; preds = %127
%131 = load i32, i32* %3
%132 = icmp ne i32 %131, 1
br i1 %132, label %136, label %133
133: ; preds = %130
%134 = load i32, i32* %4
%135 = icmp ne i32 %134, 1
br i1 %135, label %136, label %148
136: ; preds = %133, %130, %127, %123
%137 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%138 = load i32, i32* @stderr
%139 = load i32, i32* %2
%140 = sext i32 %139 to i64
%141 = load i32, i32* %3
%142 = sext i32 %141 to i64
%143 = load i32, i32* %4
%144 = sext i32 %143 to i64
%145 = call i32 @fprintf(i32 %138, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 %140, i64 %142, i64 %144)
%146 = load i32, i32* @EXIT_FAILURE
%147 = call i32 @exit(i32 %146)
unreachable
148: ; preds = %133
%149 = load i32, i32* @EXIT_SUCCESS
%150 = call i32 @exit(i32 %149)
unreachable
}

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