#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 option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ err(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ getgid();
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
int /*<<< orphan*/ getuid();
int /*<<< orphan*/ no_argument;
int optind;
scalar_t__ setgid(int /*<<< orphan*/);
scalar_t__ setuid(int /*<<< orphan*/);
int unshare(int);
int /*<<< orphan*/ usage(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  struct option longopts[] = {
      {"help", no_argument, 0, 'h'}, {"mount", no_argument, 0, 'm'},
      {"uts", no_argument, 0, 'u'},  {"ipc", no_argument, 0, 'i'},
      {"net", no_argument, 0, 'n'},  {NULL, 0, 0, 0}};
  int unshare_flags = 0;
  int c;
  ;
  ;
  ;
  while ((c = getopt_long(argc, argv, "hmuin", longopts, NULL)) != -1) {
    switch (c) {
    case 'h':
      usage(EXIT_SUCCESS);
    case 'm':
      unshare_flags |= 0x00020000;
      break;
    case 'u':
      unshare_flags |= 0x04000000;
      break;
    case 'i':
      unshare_flags |= 0x08000000;
      break;
    case 'n':
      unshare_flags |= 0x40000000;
      break;
    default:
      usage(EXIT_FAILURE);
    }
  }
  if (optind >= argc)
    usage(EXIT_FAILURE);
  if (-1 == unshare(unshare_flags))
    err(EXIT_FAILURE, ("unshare failed"));
  if (setgid(getgid()) < 0)
    err(EXIT_FAILURE, ("cannot set group id"));
  if (setuid(getuid()) < 0)
    err(EXIT_FAILURE, ("cannot set user id"));
  execvp(argv[optind], argv + optind);
  err(EXIT_FAILURE, ("exec %s failed"), argv[optind]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xe71(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2e03(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x98(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x68,-0x90(%rbp)
add    $0x18,%rdi
lea    0xe41(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0x2dce(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x80(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x6d,-0x78(%rbp)
add    $0x18,%rdi
lea    0xe1b(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0x2da5(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x68(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x75,-0x60(%rbp)
add    $0x18,%rdi
lea    0xdf6(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0x2d7c(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x69,-0x48(%rbp)
add    $0x18,%rdi
lea    0xdd1(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2d53(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x6e,-0x30(%rbp)
add    $0x18,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1060 <memset@plt>
movl   $0x0,-0xa4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0xa0(%rbp),%rcx
lea    0xd88(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1050 <getopt_long@plt>
mov    %eax,-0xa8(%rbp)
cmp    $0xffffffff,%eax
je     138b <main+0x1eb>
mov    -0xa8(%rbp),%eax
add    $0xffffff98,%eax
mov    %eax,%ecx
mov    %rcx,-0xb0(%rbp)
sub    $0xd,%eax
ja     1378 <main+0x1d8>
mov    -0xb0(%rbp),%rax
lea    0xcf7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2caf(%rip),%rax
mov    (%rax),%edi
call   1090 <usage@plt>
mov    -0xa4(%rbp),%eax
or     $0x20000,%eax
mov    %eax,-0xa4(%rbp)
jmp    1386 <main+0x1e6>
mov    -0xa4(%rbp),%eax
or     $0x4000000,%eax
mov    %eax,-0xa4(%rbp)
jmp    1386 <main+0x1e6>
mov    -0xa4(%rbp),%eax
or     $0x8000000,%eax
mov    %eax,-0xa4(%rbp)
jmp    1386 <main+0x1e6>
mov    -0xa4(%rbp),%eax
or     $0x40000000,%eax
mov    %eax,-0xa4(%rbp)
jmp    1386 <main+0x1e6>
mov    0x2c51(%rip),%rax
mov    (%rax),%edi
call   1090 <usage@plt>
jmp    12b2 <main+0x112>
mov    0x2c56(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     13ab <main+0x20b>
mov    0x2c2c(%rip),%rax
mov    (%rax),%edi
call   1090 <usage@plt>
mov    -0xa4(%rbp),%edi
call   1030 <unshare@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    13dc <main+0x23c>
mov    0x2c04(%rip),%rax
mov    (%rax),%edi
lea    0xc80(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    $0x0,%al
call   1070 <getgid@plt>
mov    %eax,%edi
call   10a0 <setgid@plt>
cmp    $0x0,%rax
jge    140b <main+0x26b>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
lea    0xc60(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   10c0 <setuid@plt>
cmp    $0x0,%rax
jge    143a <main+0x29a>
mov    0x2ba6(%rip),%rax
mov    (%rax),%edi
lea    0xc45(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    -0x10(%rbp),%rax
mov    0x2ba3(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2b91(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   10b0 <execvp@plt>
mov    0x2b63(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x2b6e(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc03(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rsi,%r15
mov    %edi,%ebp
lea    0xe8b(%rip),%rax
mov    %rax,(%rsp)
mov    0x2e20(%rip),%rax
mov    (%rax),%al
mov    %al,0x8(%rsp)
movabs $0x6800000000,%rcx
mov    %rcx,0xc(%rsp)
lea    0xe69(%rip),%rcx
mov    %rcx,0x18(%rsp)
mov    %al,0x20(%rsp)
movabs $0x6d00000000,%rcx
mov    %rcx,0x24(%rsp)
lea    0xe50(%rip),%rcx
mov    %rcx,0x30(%rsp)
mov    %al,0x38(%rsp)
movabs $0x7500000000,%rcx
mov    %rcx,0x3c(%rsp)
lea    0xe35(%rip),%rcx
mov    %rcx,0x48(%rsp)
mov    %al,0x50(%rsp)
movabs $0x6900000000,%rcx
mov    %rcx,0x54(%rsp)
lea    0xe1a(%rip),%rcx
mov    %rcx,0x60(%rsp)
mov    %al,0x68(%rsp)
movabs $0x6e00000000,%rax
mov    %rax,0x6c(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x78(%rsp)
movq   $0x0,0x88(%rsp)
xor    %r14d,%r14d
lea    0xde8(%rip),%r12
mov    %rsp,%rbx
lea    0xd8f(%rip),%r13
jmp    1293 <main+0x103>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0xffffffff,%eax
je     12ea <main+0x15a>
mov    0x2d44(%rip),%rax
mov    (%rax),%edi
call   1080 <usage@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1050 <getopt_long@plt>
lea    -0x68(%rax),%ecx
cmp    $0xd,%ecx
ja     1280 <main+0xf0>
movslq 0x0(%r13,%rcx,4),%rax
add    %r13,%rax
jmp    *%rax
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
call   1080 <usage@plt>
or     $0x20000,%r14d
jmp    1293 <main+0x103>
or     $0x8000000,%r14d
jmp    1293 <main+0x103>
or     $0x40000000,%r14d
jmp    1293 <main+0x103>
or     $0x4000000,%r14d
jmp    1293 <main+0x103>
mov    0x2cf7(%rip),%rbx
cmp    %ebp,(%rbx)
jl     1303 <main+0x173>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
call   1080 <usage@plt>
mov    %r14d,%edi
call   1030 <unshare@plt>
cmp    $0xffffffff,%eax
jne    1327 <main+0x197>
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
lea    0xd35(%rip),%rsi
xor    %eax,%eax
call   1070 <err@plt>
xor    %eax,%eax
call   1060 <getgid@plt>
mov    %eax,%edi
call   1090 <setgid@plt>
test   %rax,%rax
jns    1351 <main+0x1c1>
mov    0x2c8f(%rip),%rax
mov    (%rax),%edi
lea    0xd1a(%rip),%rsi
xor    %eax,%eax
call   1070 <err@plt>
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   10b0 <setuid@plt>
test   %rax,%rax
jns    137b <main+0x1eb>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
lea    0xd04(%rip),%rsi
xor    %eax,%eax
call   1070 <err@plt>
movslq (%rbx),%rax
lea    (%r15,%rax,8),%rsi
mov    (%r15,%rax,8),%rdi
call   10a0 <execvp@plt>
mov    0x2c3e(%rip),%rax
mov    (%rax),%edi
movslq (%rbx),%rax
mov    (%r15,%rax,8),%rdx
lea    0xce9(%rip),%rsi
xor    %eax,%eax
call   1070 <err@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32, i32 }
@.str = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.1 = [6 x i8] c"mount\00"
@.str.2 = [4 x i8] c"uts\00"
@.str.3 = [4 x i8] c"ipc\00"
@.str.4 = [4 x i8] c"net\00"
@.str.5 = [6 x i8] c"hmuin\00"
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@.str.6 = [15 x i8] c"unshare failed\00"
@.str.7 = [20 x i8] c"cannot set group id\00"
@.str.8 = [19 x i8] c"cannot set user id\00"
@.str.9 = [15 x i8] c"exec %s failed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x %struct.option]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %6, i64 0, i64 0
%10 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 1
%12 = load i32, i32* @no_argument
%13 = trunc i32 %12 to i8
store i8 %13, i8* %11
%14 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 2
store i32 0, i32* %14
%15 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 3
store i32 104, i32* %15
%16 = getelementptr inbounds %struct.option, %struct.option* %9, i64 1
%17 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %17
%18 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 1
%19 = load i32, i32* @no_argument
%20 = trunc i32 %19 to i8
store i8 %20, i8* %18
%21 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 2
store i32 0, i32* %21
%22 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 3
store i32 109, i32* %22
%23 = getelementptr inbounds %struct.option, %struct.option* %16, i64 1
%24 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 1
%26 = load i32, i32* @no_argument
%27 = trunc i32 %26 to i8
store i8 %27, i8* %25
%28 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 2
store i32 0, i32* %28
%29 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 3
store i32 117, i32* %29
%30 = getelementptr inbounds %struct.option, %struct.option* %23, i64 1
%31 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %31
%32 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 1
%33 = load i32, i32* @no_argument
%34 = trunc i32 %33 to i8
store i8 %34, i8* %32
%35 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 2
store i32 0, i32* %35
%36 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 3
store i32 105, i32* %36
%37 = getelementptr inbounds %struct.option, %struct.option* %30, i64 1
%38 = getelementptr inbounds %struct.option, %struct.option* %37, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %38
%39 = getelementptr inbounds %struct.option, %struct.option* %37, i32 0, i32 1
%40 = load i32, i32* @no_argument
%41 = trunc i32 %40 to i8
store i8 %41, i8* %39
%42 = getelementptr inbounds %struct.option, %struct.option* %37, i32 0, i32 2
store i32 0, i32* %42
%43 = getelementptr inbounds %struct.option, %struct.option* %37, i32 0, i32 3
store i32 110, i32* %43
%44 = getelementptr inbounds %struct.option, %struct.option* %37, i64 1
%45 = bitcast %struct.option* %44 to i8*
store i32 0, i32* %7
br label %46
46: ; preds = %72, %2
%47 = load i32, i32* %4
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %6, i64 0, i64 0
%50 = call i32 @getopt_long(i32 %47, i8** %48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %struct.option* %49, i32* null)
store i32 %50, i32* %8
%51 = icmp ne i32 %50, -1
br i1 %51, label %52, label %73
52: ; preds = %46
%53 = load i32, i32* %8
switch i32 %53, label %69 [
i32 104, label %54
i32 109, label %57
i32 117, label %60
i32 105, label %63
i32 110, label %66
]
54: ; preds = %52
%55 = load i32, i32* @EXIT_SUCCESS
%56 = call i32 @usage(i32 %55)
br label %57
57: ; preds = %52, %54
%58 = load i32, i32* %7
%59 = or i32 %58, 131072
store i32 %59, i32* %7
br label %72
60: ; preds = %52
%61 = load i32, i32* %7
%62 = or i32 %61, 67108864
store i32 %62, i32* %7
br label %72
63: ; preds = %52
%64 = load i32, i32* %7
%65 = or i32 %64, 134217728
store i32 %65, i32* %7
br label %72
66: ; preds = %52
%67 = load i32, i32* %7
%68 = or i32 %67, 1073741824
store i32 %68, i32* %7
br label %72
69: ; preds = %52
%70 = load i32, i32* @EXIT_FAILURE
%71 = call i32 @usage(i32 %70)
br label %72
72: ; preds = %69, %66, %63, %60, %57
br label %46
73: ; preds = %46
%74 = load i32, i32* @optind
%75 = load i32, i32* %4
%76 = icmp sge i32 %74, %75
br i1 %76, label %77, label %80
77: ; preds = %73
%78 = load i32, i32* @EXIT_FAILURE
%79 = call i32 @usage(i32 %78)
br label %80
80: ; preds = %77, %73
%81 = load i32, i32* %7
%82 = call i32 @unshare(i32 %81)
%83 = icmp eq i32 -1, %82
br i1 %83, label %84, label %87
84: ; preds = %80
%85 = load i32, i32* @EXIT_FAILURE
%86 = call i32 (i32, i8*, ...) @err(i32 %85, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %87
87: ; preds = %84, %80
%88 = call i32 (...) @getgid()
%89 = call i64 @setgid(i32 %88)
%90 = icmp slt i64 %89, 0
br i1 %90, label %91, label %94
91: ; preds = %87
%92 = load i32, i32* @EXIT_FAILURE
%93 = call i32 (i32, i8*, ...) @err(i32 %92, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
br label %94
94: ; preds = %91, %87
%95 = call i32 (...) @getuid()
%96 = call i64 @setuid(i32 %95)
%97 = icmp slt i64 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %94
%99 = load i32, i32* @EXIT_FAILURE
%100 = call i32 (i32, i8*, ...) @err(i32 %99, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %101
101: ; preds = %98, %94
%102 = load i8**, i8*** %5
%103 = load i32, i32* @optind
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8*, i8** %102, i64 %104
%106 = load i8*, i8** %105
%107 = load i8**, i8*** %5
%108 = load i32, i32* @optind
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i8*, i8** %107, i64 %109
%111 = call i32 @execvp(i8* %106, i8** %110)
%112 = load i32, i32* @EXIT_FAILURE
%113 = load i8**, i8*** %5
%114 = load i32, i32* @optind
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8*, i8** %113, i64 %115
%117 = load i8*, i8** %116
%118 = call i32 (i32, i8*, ...) @err(i32 %112, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* %117)
%119 = load i32, i32* %3
ret i32 %119
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32, i32 }
@.str = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.1 = [6 x i8] c"mount\00"
@.str.2 = [4 x i8] c"uts\00"
@.str.3 = [4 x i8] c"ipc\00"
@.str.4 = [4 x i8] c"net\00"
@.str.5 = [6 x i8] c"hmuin\00"
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@.str.6 = [15 x i8] c"unshare failed\00"
@.str.7 = [20 x i8] c"cannot set group id\00"
@.str.8 = [19 x i8] c"cannot set user id\00"
@.str.9 = [15 x i8] c"exec %s failed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [6 x %struct.option]
%4 = bitcast [6 x %struct.option]* %3 to i8*
%5 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 0
%6 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 0, i32 1
%8 = load i32, i32* @no_argument
%9 = trunc i32 %8 to i8
store i8 %9, i8* %7
%10 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 0, i32 2
store i32 0, i32* %10
%11 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 0, i32 3
store i32 104, i32* %11
%12 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 1, i32 1
store i8 %9, i8* %13
%14 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 1, i32 2
store i32 0, i32* %14
%15 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 1, i32 3
store i32 109, i32* %15
%16 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %16
%17 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 2, i32 1
store i8 %9, i8* %17
%18 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 2, i32 2
store i32 0, i32* %18
%19 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 2, i32 3
store i32 117, i32* %19
%20 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 3, i32 1
store i8 %9, i8* %21
%22 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 3, i32 2
store i32 0, i32* %22
%23 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 3, i32 3
store i32 105, i32* %23
%24 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 4, i32 1
store i8 %9, i8* %25
%26 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 4, i32 2
store i32 0, i32* %26
%27 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 4, i32 3
store i32 110, i32* %27
%28 = getelementptr inbounds [6 x %struct.option], [6 x %struct.option]* %3, i64 0, i64 5
%29 = bitcast %struct.option* %28 to i8*
br label %30
30: ; preds = %45, %2
%31 = phi i32 [ 0, %2 ], [ %46, %45 ]
br label %32
32: ; preds = %30, %47
%33 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %struct.option* %5, i32* null)
switch i32 %33, label %47 [
i32 -1, label %50
i32 104, label %34
i32 109, label %37
i32 117, label %39
i32 105, label %41
i32 110, label %43
]
34: ; preds = %32
%35 = load i32, i32* @EXIT_SUCCESS
%36 = call i32 @usage(i32 %35)
br label %37
37: ; preds = %32, %34
%38 = or i32 %31, 131072
br label %45
39: ; preds = %32
%40 = or i32 %31, 67108864
br label %45
41: ; preds = %32
%42 = or i32 %31, 134217728
br label %45
43: ; preds = %32
%44 = or i32 %31, 1073741824
br label %45
45: ; preds = %43, %41, %39, %37
%46 = phi i32 [ %38, %37 ], [ %40, %39 ], [ %42, %41 ], [ %44, %43 ]
br label %30
47: ; preds = %32
%48 = load i32, i32* @EXIT_FAILURE
%49 = call i32 @usage(i32 %48)
br label %32
50: ; preds = %32
%51 = load i32, i32* @optind
%52 = icmp slt i32 %51, %0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i32, i32* @EXIT_FAILURE
%55 = call i32 @usage(i32 %54)
br label %56
56: ; preds = %53, %50
%57 = call i32 @unshare(i32 %31)
%58 = icmp eq i32 %57, -1
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i32, i32* @EXIT_FAILURE
%61 = call i32 (i32, i8*, ...) @err(i32 %60, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %62
62: ; preds = %59, %56
%63 = call i32 (...) @getgid()
%64 = call i64 @setgid(i32 %63)
%65 = icmp slt i64 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %62
%67 = load i32, i32* @EXIT_FAILURE
%68 = call i32 (i32, i8*, ...) @err(i32 %67, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
br label %69
69: ; preds = %66, %62
%70 = call i32 (...) @getuid()
%71 = call i64 @setuid(i32 %70)
%72 = icmp slt i64 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* @EXIT_FAILURE
%75 = call i32 (i32, i8*, ...) @err(i32 %74, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %76
76: ; preds = %73, %69
%77 = load i32, i32* @optind
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %1, i64 %78
%80 = load i8*, i8** %79
%81 = call i32 @execvp(i8* %80, i8** %79)
%82 = load i32, i32* @EXIT_FAILURE
%83 = load i32, i32* @optind
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %1, i64 %84
%86 = load i8*, i8** %85
%87 = call i32 (i32, i8*, ...) @err(i32 %82, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* %86)
ret i32 0
}