#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 */

/* Variables and functions */
char *build_command_line(char const **);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ putenv(char *);
int recv_control(int const);
int send_control(int const, int);
int /*<<< orphan*/ stderr;
int string_array_len(char const **);
int system(char *);
int /*<<< orphan*/ system_ok(int);
void down_root_server(const int fd, char *command, const char *argv[],
                      const char *envp[], const int verb) {
  const char *p[3];
  char *command_line = NULL;
  char *argv_cat = NULL;
  int i;
  if (((verb) >= 7))
    fprintf(stderr, "DOWN-ROOT: BACKGROUND: INIT command='%s'\n", command);
  if (send_control(fd, 10) == -1) {
    fprintf(stderr,
            "DOWN-ROOT: BACKGROUND: write error on response socket [1]\n");
    goto done;
  }
  if (string_array_len(argv) >= 2)
    argv_cat = build_command_line(&argv[1]);
  else
    argv_cat = build_command_line(NULL);
  p[0] = command;
  p[1] = argv_cat;
  p[2] = NULL;
  command_line = build_command_line(p);
  for (i = 0; envp[i]; ++i) {
    putenv((char *)envp[i]);
  }
  while (1) {
    int command_code;
    int status;
    command_code = recv_control(fd);
    if (((verb) >= 7))
      fprintf(stderr, "DOWN-ROOT: BACKGROUND: received command code: %d\n",
              command_code);
    switch (command_code) {
    case 0:
      status = system(command_line);
      if (system_ok(status)) {
        if (send_control(fd, 12) == -1) {
          fprintf(
              stderr,
              "DOWN-ROOT: BACKGROUND: write error on response socket [2]\n");
          goto done;
        }
      } else {
        if (send_control(fd, 13) == -1) {
          fprintf(
              stderr,
              "DOWN-ROOT: BACKGROUND: write error on response socket [3]\n");
          goto done;
        }
      }
      break;
    case 1:
      goto done;
    case -1:
      fprintf(stderr, "DOWN-ROOT: BACKGROUND: read error on command channel\n");
      goto done;
    default:
      fprintf(stderr,
              "DOWN-ROOT: BACKGROUND: unknown command code: code=%d, exiting\n",
              command_code);
      goto done;
    }
  }
done:
  if (argv_cat)
    free(argv_cat);
  if (command_line)
    free(command_line);
  if (((verb) >= 7))
    fprintf(stderr, "DOWN-ROOT: BACKGROUND: EXIT\n");
  return;
}


x86 assembly (clang, -O0):
<down_root_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
cmpl   $0x7,-0x24(%rbp)
jl     11e0 <down_root_server+0x50>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe27(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   10b0 <send_control@plt>
cmp    $0xffffffff,%eax
jne    1212 <down_root_server+0x82>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
lea    0xe24(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    13e3 <down_root_server+0x253>
mov    -0x18(%rbp),%rdi
call   1090 <string_array_len@plt>
cmp    $0x2,%eax
jl     123a <down_root_server+0xaa>
mov    -0x18(%rbp),%rdi
add    $0x8,%rdi
call   1070 <build_command_line@plt>
mov    %rax,-0x50(%rbp)
jmp    1247 <down_root_server+0xb7>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <build_command_line@plt>
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x38(%rbp)
movq   $0x0,-0x30(%rbp)
lea    -0x40(%rbp),%rdi
call   1070 <build_command_line@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x54(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     12a5 <down_root_server+0x115>
mov    -0x20(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <putenv@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1273 <down_root_server+0xe3>
jmp    12aa <down_root_server+0x11a>
mov    -0x4(%rbp),%edi
call   10a0 <recv_control@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x7,-0x24(%rbp)
jl     12d9 <down_root_server+0x149>
mov    0x2d1a(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%edx
lea    0xd93(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x58(%rbp),%eax
mov    %eax,-0x60(%rbp)
sub    $0xffffffff,%eax
je     13a3 <down_root_server+0x213>
jmp    12ed <down_root_server+0x15d>
mov    -0x60(%rbp),%eax
test   %eax,%eax
je     130e <down_root_server+0x17e>
jmp    12fd <down_root_server+0x16d>
mov    -0x60(%rbp),%eax
sub    $0x1,%eax
je     139e <down_root_server+0x20e>
jmp    13bf <down_root_server+0x22f>
mov    -0x48(%rbp),%rdi
call   1050 <system@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%edi
call   1040 <system_ok@plt>
cmp    $0x0,%eax
je     1362 <down_root_server+0x1d2>
mov    -0x4(%rbp),%edi
mov    $0xc,%esi
call   10b0 <send_control@plt>
cmp    $0xffffffff,%eax
jne    135d <down_root_server+0x1cd>
mov    0x2c98(%rip),%rax
mov    (%rax),%edi
lea    0xd46(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    13e3 <down_root_server+0x253>
jmp    1399 <down_root_server+0x209>
mov    -0x4(%rbp),%edi
mov    $0xd,%esi
call   10b0 <send_control@plt>
cmp    $0xffffffff,%eax
jne    1394 <down_root_server+0x204>
mov    0x2c61(%rip),%rax
mov    (%rax),%edi
lea    0xd4a(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    13e3 <down_root_server+0x253>
jmp    1399 <down_root_server+0x209>
jmp    13de <down_root_server+0x24e>
jmp    13e3 <down_root_server+0x253>
mov    0x2c36(%rip),%rax
mov    (%rax),%edi
lea    0xd5a(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    13e3 <down_root_server+0x253>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%edx
lea    0xd71(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    13e3 <down_root_server+0x253>
jmp    12aa <down_root_server+0x11a>
cmpq   $0x0,-0x50(%rbp)
je     13f7 <down_root_server+0x267>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x48(%rbp)
je     140b <down_root_server+0x27b>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x7,-0x24(%rbp)
jl     142c <down_root_server+0x29c>
mov    0x2bc4(%rip),%rax
mov    (%rax),%edi
lea    0xd5d(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<down_root_server>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8d,%r15d
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r12
mov    %edi,%ebp
cmp    $0x7,%r8d
jl     11cc <down_root_server+0x3c>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
lea    0xe3e(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %ebp,%edi
mov    $0xa,%esi
call   10b0 <send_control@plt>
cmp    $0xffffffff,%eax
je     11f3 <down_root_server+0x63>
mov    %r14,%rdi
call   1090 <string_array_len@plt>
cmp    $0x2,%eax
jl     120f <down_root_server+0x7f>
add    $0x8,%r14
mov    %r14,%rdi
jmp    1211 <down_root_server+0x81>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
lea    0xe27(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1339 <down_root_server+0x1a9>
xor    %edi,%edi
call   1070 <build_command_line@plt>
mov    %r12,0x10(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,0x18(%rsp)
movq   $0x0,0x20(%rsp)
lea    0x10(%rsp),%rdi
call   1070 <build_command_line@plt>
mov    %rax,%r12
mov    (%rbx),%rdi
test   %rdi,%rdi
je     1261 <down_root_server+0xd1>
add    $0x8,%rbx
nopw   0x0(%rax,%rax,1)
call   1060 <putenv@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1250 <down_root_server+0xc0>
mov    0x2d78(%rip),%r14
lea    0xdf6(%rip),%r13
jmp    128f <down_root_server+0xff>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xd,%esi
call   10b0 <send_control@plt>
cmp    $0xffffffff,%eax
je     130c <down_root_server+0x17c>
mov    %ebp,%edi
call   10a0 <recv_control@plt>
mov    %eax,%ebx
cmp    $0x7,%r15d
jl     12ad <down_root_server+0x11d>
mov    (%r14),%edi
mov    %r13,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
test   %ebx,%ebx
jne    12e1 <down_root_server+0x151>
mov    %r12,%rdi
call   1050 <system@plt>
mov    %eax,%edi
call   1040 <system_ok@plt>
mov    %ebp,%edi
test   %eax,%eax
je     1280 <down_root_server+0xf0>
mov    $0xc,%esi
call   10b0 <send_control@plt>
cmp    $0xffffffff,%eax
jne    128f <down_root_server+0xff>
mov    (%r14),%edi
lea    0xdb8(%rip),%rsi
jmp    1316 <down_root_server+0x186>
cmp    $0xffffffff,%ebx
je     1300 <down_root_server+0x170>
cmp    $0x1,%ebx
je     131d <down_root_server+0x18d>
mov    (%r14),%edi
lea    0xe4e(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    131d <down_root_server+0x18d>
mov    (%r14),%edi
lea    0xe03(%rip),%rsi
jmp    1316 <down_root_server+0x186>
mov    (%r14),%edi
lea    0xdbc(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     132c <down_root_server+0x19c>
call   1030 <free@plt>
test   %r12,%r12
je     1339 <down_root_server+0x1a9>
mov    %r12,%rdi
call   1030 <free@plt>
cmp    $0x7,%r15d
jl     1356 <down_root_server+0x1c6>
mov    0x2c9a(%rip),%rax
mov    (%rax),%edi
lea    0xe33(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"DOWN-ROOT: BACKGROUND: INIT command='%s'\0A\00"
@.str.1 = [59 x i8] c"DOWN-ROOT: BACKGROUND: write error on response socket [1]\0A\00"
@.str.2 = [50 x i8] c"DOWN-ROOT: BACKGROUND: received command code: %d\0A\00"
@.str.3 = [59 x i8] c"DOWN-ROOT: BACKGROUND: write error on response socket [2]\0A\00"
@.str.4 = [59 x i8] c"DOWN-ROOT: BACKGROUND: write error on response socket [3]\0A\00"
@.str.5 = [54 x i8] c"DOWN-ROOT: BACKGROUND: read error on command channel\0A\00"
@.str.6 = [63 x i8] c"DOWN-ROOT: BACKGROUND: unknown command code: code=%d, exiting\0A\00"
@.str.7 = [29 x i8] c"DOWN-ROOT: BACKGROUND: EXIT\0A\00"
define void @down_root_server(i32 %0, i8* %1, i8** %2, i8** %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i8**
%10 = alloca i32
%11 = alloca [3 x i8*]
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8** %2, i8*** %8
store i8** %3, i8*** %9
store i32 %4, i32* %10
store i8* null, i8** %12
store i8* null, i8** %13
%17 = load i32, i32* %10
%18 = icmp sge i32 %17, 7
br i1 %18, label %19, label %23
19: ; preds = %5
%20 = load i32, i32* @stderr
%21 = load i8*, i8** %7
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %19, %5
%24 = load i32, i32* %6
%25 = call i32 @send_control(i32 %24, i32 10)
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
br label %109
30: ; preds = %23
%31 = load i8**, i8*** %8
%32 = call i32 @string_array_len(i8** %31)
%33 = icmp sge i32 %32, 2
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load i8**, i8*** %8
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = call i8* @build_command_line(i8** %36)
store i8* %37, i8** %13
br label %40
38: ; preds = %30
%39 = call i8* @build_command_line(i8** null)
store i8* %39, i8** %13
br label %40
40: ; preds = %38, %34
%41 = load i8*, i8** %7
%42 = getelementptr inbounds [3 x i8*], [3 x i8*]* %11, i64 0, i64 0
store i8* %41, i8** %42
%43 = load i8*, i8** %13
%44 = getelementptr inbounds [3 x i8*], [3 x i8*]* %11, i64 0, i64 1
store i8* %43, i8** %44
%45 = getelementptr inbounds [3 x i8*], [3 x i8*]* %11, i64 0, i64 2
store i8* null, i8** %45
%46 = getelementptr inbounds [3 x i8*], [3 x i8*]* %11, i64 0, i64 0
%47 = call i8* @build_command_line(i8** %46)
store i8* %47, i8** %12
store i32 0, i32* %14
br label %48
48: ; preds = %62, %40
%49 = load i8**, i8*** %9
%50 = load i32, i32* %14
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %49, i64 %51
%53 = load i8*, i8** %52
%54 = icmp ne i8* %53, null
br i1 %54, label %55, label %65
55: ; preds = %48
%56 = load i8**, i8*** %9
%57 = load i32, i32* %14
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %56, i64 %58
%60 = load i8*, i8** %59
%61 = call i32 @putenv(i8* %60)
br label %62
62: ; preds = %55
%63 = load i32, i32* %14
%64 = add nsw i32 %63, 1
store i32 %64, i32* %14
br label %48
65: ; preds = %48
br label %66
66: ; preds = %65, %108
%67 = load i32, i32* %6
%68 = call i32 @recv_control(i32 %67)
store i32 %68, i32* %15
%69 = load i32, i32* %10
%70 = icmp sge i32 %69, 7
br i1 %70, label %71, label %75
71: ; preds = %66
%72 = load i32, i32* @stderr
%73 = load i32, i32* %15
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 %73)
br label %75
75: ; preds = %71, %66
%76 = load i32, i32* %15
switch i32 %76, label %104 [
i32 0, label %77
i32 1, label %100
i32 -1, label %101
]
77: ; preds = %75
%78 = load i8*, i8** %12
%79 = call i32 @system(i8* %78)
store i32 %79, i32* %16
%80 = load i32, i32* %16
%81 = call i32 @system_ok(i32 %80)
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %91
83: ; preds = %77
%84 = load i32, i32* %6
%85 = call i32 @send_control(i32 %84, i32 12)
%86 = icmp eq i32 %85, -1
br i1 %86, label %87, label %90
87: ; preds = %83
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
br label %109
90: ; preds = %83
br label %99
91: ; preds = %77
%92 = load i32, i32* %6
%93 = call i32 @send_control(i32 %92, i32 13)
%94 = icmp eq i32 %93, -1
br i1 %94, label %95, label %98
95: ; preds = %91
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0))
br label %109
98: ; preds = %91
br label %99
99: ; preds = %98, %90
br label %108
100: ; preds = %75
br label %109
101: ; preds = %75
%102 = load i32, i32* @stderr
%103 = call i32 (i32, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
br label %109
104: ; preds = %75
%105 = load i32, i32* @stderr
%106 = load i32, i32* %15
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0), i32 %106)
br label %109
108: ; preds = %99
br label %66
109: ; preds = %104, %101, %100, %95, %87, %27
%110 = load i8*, i8** %13
%111 = icmp ne i8* %110, null
br i1 %111, label %112, label %115
112: ; preds = %109
%113 = load i8*, i8** %13
%114 = call i32 @free(i8* %113)
br label %115
115: ; preds = %112, %109
%116 = load i8*, i8** %12
%117 = icmp ne i8* %116, null
br i1 %117, label %118, label %121
118: ; preds = %115
%119 = load i8*, i8** %12
%120 = call i32 @free(i8* %119)
br label %121
121: ; preds = %118, %115
%122 = load i32, i32* %10
%123 = icmp sge i32 %122, 7
br i1 %123, label %124, label %127
124: ; preds = %121
%125 = load i32, i32* @stderr
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %127
127: ; preds = %124, %121
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"DOWN-ROOT: BACKGROUND: INIT command='%s'\0A\00"
@.str.1 = [59 x i8] c"DOWN-ROOT: BACKGROUND: write error on response socket [1]\0A\00"
@.str.2 = [50 x i8] c"DOWN-ROOT: BACKGROUND: received command code: %d\0A\00"
@.str.3 = [59 x i8] c"DOWN-ROOT: BACKGROUND: write error on response socket [2]\0A\00"
@.str.4 = [59 x i8] c"DOWN-ROOT: BACKGROUND: write error on response socket [3]\0A\00"
@.str.5 = [54 x i8] c"DOWN-ROOT: BACKGROUND: read error on command channel\0A\00"
@.str.6 = [63 x i8] c"DOWN-ROOT: BACKGROUND: unknown command code: code=%d, exiting\0A\00"
@.str.7 = [29 x i8] c"DOWN-ROOT: BACKGROUND: EXIT\0A\00"
define void @down_root_server(i32 %0, i8* %1, i8** %2, i8** nocapture %3, i32 %4) {
%6 = alloca [3 x i8*]
%7 = bitcast [3 x i8*]* %6 to i8*
%8 = icmp sgt i32 %4, 6
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %12
12: ; preds = %9, %5
%13 = tail call i32 @send_control(i32 %0, i32 10)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
br label %80
18: ; preds = %12
%19 = tail call i32 @string_array_len(i8** %2)
%20 = icmp sgt i32 %19, 1
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = getelementptr inbounds i8*, i8** %2, i64 1
%23 = tail call i8* @build_command_line(i8** %22)
br label %26
24: ; preds = %18
%25 = tail call i8* @build_command_line(i8** null)
br label %26
26: ; preds = %24, %21
%27 = phi i8* [ %23, %21 ], [ %25, %24 ]
%28 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
store i8* %1, i8** %28
%29 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 1
store i8* %27, i8** %29
%30 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 2
store i8* null, i8** %30
%31 = call i8* @build_command_line(i8** %28)
%32 = load i8*, i8** %3
%33 = icmp eq i8* %32, null
br i1 %33, label %42, label %34
34: ; preds = %26, %34
%35 = phi i64 [ %38, %34 ], [ 0, %26 ]
%36 = phi i8* [ %40, %34 ], [ %32, %26 ]
%37 = call i32 @putenv(i8* %36)
%38 = add nuw i64 %35, 1
%39 = getelementptr inbounds i8*, i8** %3, i64 %38
%40 = load i8*, i8** %39
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %34
42: ; preds = %34, %26
br label %43
43: ; preds = %62, %42
%44 = call i32 @recv_control(i32 %0)
br i1 %8, label %45, label %48
45: ; preds = %43
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 %44)
br label %48
48: ; preds = %45, %43
switch i32 %44, label %69 [
i32 0, label %49
i32 1, label %72
i32 -1, label %66
]
49: ; preds = %48
%50 = call i32 @system(i8* %31)
%51 = call i32 @system_ok(i32 %50)
%52 = icmp eq i32 %51, 0
br i1 %52, label %59, label %53
53: ; preds = %49
%54 = call i32 @send_control(i32 %0, i32 12)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %62
56: ; preds = %53
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
br label %72
59: ; preds = %49
%60 = call i32 @send_control(i32 %0, i32 13)
%61 = icmp eq i32 %60, -1
br i1 %61, label %63, label %62
62: ; preds = %59, %53
br label %43
63: ; preds = %59
%64 = load i32, i32* @stderr
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0))
br label %72
66: ; preds = %48
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
br label %72
69: ; preds = %48
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0), i32 %44)
br label %72
72: ; preds = %48, %69, %66, %56, %63
%73 = icmp eq i8* %27, null
br i1 %73, label %76, label %74
74: ; preds = %72
%75 = call i32 @free(i8* %27)
br label %76
76: ; preds = %74, %72
%77 = icmp eq i8* %31, null
br i1 %77, label %80, label %78
78: ; preds = %76
%79 = call i32 @free(i8* %31)
br label %80
80: ; preds = %15, %78, %76
br i1 %8, label %81, label %84
81: ; preds = %80
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %84
84: ; preds = %80, %81
ret void
}