#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 /*<<< orphan*/ tab;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fork();
char *getenv(char const *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
char *secure_getenv(char const *);
int /*<<< orphan*/ setenv(char const *, char const *, int);
int /*<<< orphan*/ unsetenv(char *);
int /*<<< orphan*/ waitpid(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
void testfork(void) {
  static const struct {
    const char *key;
    const char *val;
  } tab[] = {
      {"ghetto", "blaster"},
      {"hydra", "pone"},
      {"real", "limit"},
  };
  const char *val[2];
  pid_t pid;
  size_t i;
  for (i = 0; i < (sizeof(tab) / sizeof(tab[0])); i++)
    setenv(tab[i].key, tab[i].val, 1);
  switch ((pid = fork())) {
  case 0:
    printf("child:\n");
    for (i = 0; i < (sizeof(tab) / sizeof(tab[0])); i++) {
      val[0] = getenv(tab[i].key);
      val[1] = secure_getenv(tab[i].key);
      printf("%s: %s %s\n", tab[i].key, val[0], val[1]);
      unsetenv(tab[i].key);
      val[0] = getenv(tab[i].key);
      val[1] = secure_getenv(tab[i].key);
      printf("%s: %s %s\n", tab[i].key, val[0], val[1]);
    }
    break;
  case -1:
    perror("fork");
    exit(1);
    break;
  default:
    waitpid(pid, NULL, 0);
    printf("parent\n");
    for (i = 0; i < (sizeof(tab) / sizeof(tab[0])); i++) {
      val[0] = getenv(tab[i].key);
      val[1] = secure_getenv(tab[i].key);
      printf("%s: %s %s\n", tab[i].key, val[0], val[1]);
    }
    break;
  }
}


x86 assembly (clang, -O0):
<testfork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    11f1 <testfork+0x61>
mov    -0x20(%rbp),%rcx
lea    0x2c3a(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%rcx
lea    0x2c25(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
mov    $0x1,%edx
call   1050 <setenv@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11a0 <testfork+0x10>
xor    %eax,%eax
call   10b0 <fork@plt>
mov    %eax,-0x14(%rbp)
mov    %eax,%ecx
mov    %ecx,-0x24(%rbp)
sub    $0xffffffff,%eax
je     133d <testfork+0x1ad>
jmp    120e <testfork+0x7e>
mov    -0x24(%rbp),%eax
test   %eax,%eax
jne    1353 <testfork+0x1c3>
jmp    121e <testfork+0x8e>
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    1338 <testfork+0x1a8>
mov    -0x20(%rbp),%rcx
lea    0x2ba6(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2b88(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1040 <secure_getenv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2b6a(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rcx
lea    0x2b3f(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1090 <unsetenv@plt>
mov    -0x20(%rbp),%rcx
lea    0x2b25(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2b07(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1040 <secure_getenv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2ae9(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1234 <testfork+0xa4>
jmp    13ff <testfork+0x26f>
lea    0xcf4(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x14(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1070 <waitpid@plt>
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    13fa <testfork+0x26a>
mov    -0x20(%rbp),%rcx
lea    0x2a63(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2a45(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   1040 <secure_getenv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2a27(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1377 <testfork+0x1e7>
jmp    13ff <testfork+0x26f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfork>:
push   %r15
push   %r14
push   %rbx
lea    0xe54(%rip),%rdi
lea    0xe54(%rip),%rsi
mov    $0x1,%edx
call   1060 <setenv@plt>
lea    0xe4b(%rip),%rdi
lea    0xe4a(%rip),%rsi
mov    $0x1,%edx
call   1060 <setenv@plt>
lea    0xe3e(%rip),%rdi
lea    0xe3c(%rip),%rsi
mov    $0x1,%edx
call   1060 <setenv@plt>
xor    %eax,%eax
call   10c0 <fork@plt>
test   %eax,%eax
je     1282 <testfork+0xe2>
cmp    $0xffffffff,%eax
je     13b6 <testfork+0x216>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <waitpid@plt>
lea    0xe25(%rip),%rdi
call   1050 <puts@plt>
lea    0xddd(%rip),%r14
mov    %r14,%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <secure_getenv@plt>
lea    0xde8(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdb8(%rip),%r14
mov    %r14,%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <secure_getenv@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1380 <testfork+0x1e0>
lea    0xdac(%rip),%rdi
call   1050 <puts@plt>
lea    0xd6b(%rip),%rbx
mov    %rbx,%rdi
call   1030 <getenv@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1040 <secure_getenv@plt>
lea    0xd76(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   10a0 <unsetenv@plt>
mov    %rbx,%rdi
call   1030 <getenv@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1040 <secure_getenv@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd18(%rip),%rbx
mov    %rbx,%rdi
call   1030 <getenv@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1040 <secure_getenv@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   10a0 <unsetenv@plt>
mov    %rbx,%rdi
call   1030 <getenv@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1040 <secure_getenv@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xcc8(%rip),%r15
mov    %r15,%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1040 <secure_getenv@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r15,%rdi
call   10a0 <unsetenv@plt>
lea    0xc93(%rip),%r14
mov    %r14,%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <secure_getenv@plt>
lea    0xc84(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1070 <printf@plt>
lea    0xc73(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
%struct.anon = type { i8*, i8* }
@testfork.tab = internal constant [3 x %struct.anon] [%struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0) }]
@.str = [7 x i8] c"ghetto\00"
@.str.1 = [8 x i8] c"blaster\00"
@.str.2 = [6 x i8] c"hydra\00"
@.str.3 = [5 x i8] c"pone\00"
@.str.4 = [5 x i8] c"real\00"
@.str.5 = [6 x i8] c"limit\00"
@.str.6 = [8 x i8] c"child:\0A\00"
@.str.7 = [11 x i8] c"%s: %s %s\0A\00"
@.str.8 = [5 x i8] c"fork\00"
@.str.9 = [8 x i8] c"parent\0A\00"
define void @testfork() {
%1 = alloca [2 x i8*]
%2 = alloca i32
%3 = alloca i64
store i64 0, i64* %3
br label %4
4: ; preds = %17, %0
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 3
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i64, i64* %3
%9 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %8
%10 = getelementptr inbounds %struct.anon, %struct.anon* %9, i32 0, i32 0
%11 = load i8*, i8** %10
%12 = load i64, i64* %3
%13 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %12
%14 = getelementptr inbounds %struct.anon, %struct.anon* %13, i32 0, i32 1
%15 = load i8*, i8** %14
%16 = call i32 @setenv(i8* %11, i8* %15, i32 1)
br label %17
17: ; preds = %7
%18 = load i64, i64* %3
%19 = add i64 %18, 1
store i64 %19, i64* %3
br label %4
20: ; preds = %4
%21 = call i32 (...) @fork()
store i32 %21, i32* %2
switch i32 %21, label %82 [
i32 0, label %22
i32 -1, label %79
]
22: ; preds = %20
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
store i64 0, i64* %3
br label %24
24: ; preds = %75, %22
%25 = load i64, i64* %3
%26 = icmp ult i64 %25, 3
br i1 %26, label %27, label %78
27: ; preds = %24
%28 = load i64, i64* %3
%29 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %28
%30 = getelementptr inbounds %struct.anon, %struct.anon* %29, i32 0, i32 0
%31 = load i8*, i8** %30
%32 = call i8* @getenv(i8* %31)
%33 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* %32, i8** %33
%34 = load i64, i64* %3
%35 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %34
%36 = getelementptr inbounds %struct.anon, %struct.anon* %35, i32 0, i32 0
%37 = load i8*, i8** %36
%38 = call i8* @secure_getenv(i8* %37)
%39 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* %38, i8** %39
%40 = load i64, i64* %3
%41 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %40
%42 = getelementptr inbounds %struct.anon, %struct.anon* %41, i32 0, i32 0
%43 = load i8*, i8** %42
%44 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%45 = load i8*, i8** %44
%46 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
%47 = load i8*, i8** %46
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* %43, i8* %45, i8* %47)
%49 = load i64, i64* %3
%50 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %49
%51 = getelementptr inbounds %struct.anon, %struct.anon* %50, i32 0, i32 0
%52 = load i8*, i8** %51
%53 = call i32 @unsetenv(i8* %52)
%54 = load i64, i64* %3
%55 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %54
%56 = getelementptr inbounds %struct.anon, %struct.anon* %55, i32 0, i32 0
%57 = load i8*, i8** %56
%58 = call i8* @getenv(i8* %57)
%59 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* %58, i8** %59
%60 = load i64, i64* %3
%61 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %60
%62 = getelementptr inbounds %struct.anon, %struct.anon* %61, i32 0, i32 0
%63 = load i8*, i8** %62
%64 = call i8* @secure_getenv(i8* %63)
%65 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* %64, i8** %65
%66 = load i64, i64* %3
%67 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %66
%68 = getelementptr inbounds %struct.anon, %struct.anon* %67, i32 0, i32 0
%69 = load i8*, i8** %68
%70 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%71 = load i8*, i8** %70
%72 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
%73 = load i8*, i8** %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* %69, i8* %71, i8* %73)
br label %75
75: ; preds = %27
%76 = load i64, i64* %3
%77 = add i64 %76, 1
store i64 %77, i64* %3
br label %24
78: ; preds = %24
br label %115
79: ; preds = %20
%80 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%81 = call i32 @exit(i32 1)
unreachable
82: ; preds = %20
%83 = load i32, i32* %2
%84 = call i32 @waitpid(i32 %83, i32* null, i32 0)
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
store i64 0, i64* %3
br label %86
86: ; preds = %111, %82
%87 = load i64, i64* %3
%88 = icmp ult i64 %87, 3
br i1 %88, label %89, label %114
89: ; preds = %86
%90 = load i64, i64* %3
%91 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %90
%92 = getelementptr inbounds %struct.anon, %struct.anon* %91, i32 0, i32 0
%93 = load i8*, i8** %92
%94 = call i8* @getenv(i8* %93)
%95 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* %94, i8** %95
%96 = load i64, i64* %3
%97 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %96
%98 = getelementptr inbounds %struct.anon, %struct.anon* %97, i32 0, i32 0
%99 = load i8*, i8** %98
%100 = call i8* @secure_getenv(i8* %99)
%101 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* %100, i8** %101
%102 = load i64, i64* %3
%103 = getelementptr inbounds [3 x %struct.anon], [3 x %struct.anon]* @testfork.tab, i64 0, i64 %102
%104 = getelementptr inbounds %struct.anon, %struct.anon* %103, i32 0, i32 0
%105 = load i8*, i8** %104
%106 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%107 = load i8*, i8** %106
%108 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
%109 = load i8*, i8** %108
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* %105, i8* %107, i8* %109)
br label %111
111: ; preds = %89
%112 = load i64, i64* %3
%113 = add i64 %112, 1
store i64 %113, i64* %3
br label %86
114: ; preds = %86
br label %115
115: ; preds = %114, %78
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"ghetto\00"
@.str.1 = [8 x i8] c"blaster\00"
@.str.2 = [6 x i8] c"hydra\00"
@.str.3 = [5 x i8] c"pone\00"
@.str.4 = [5 x i8] c"real\00"
@.str.5 = [6 x i8] c"limit\00"
@.str.7 = [11 x i8] c"%s: %s %s\0A\00"
@.str.8 = [5 x i8] c"fork\00"
@str = [7 x i8] c"child:\00"
@str.10 = [7 x i8] c"parent\00"
define void @testfork() {
%1 = tail call i32 @setenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 @setenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 1)
%3 = tail call i32 @setenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 1)
%4 = tail call i32 (...) @fork()
switch i32 %4, label %28 [
i32 0, label %5
i32 -1, label %25
]
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%7 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = tail call i32 @unsetenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %14, i8* %15)
%17 = tail call i32 @unsetenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%19 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %18, i8* %19)
%21 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%22 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %21, i8* %22)
%24 = tail call i32 @unsetenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %37
25: ; preds = %0
%26 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %0
%29 = tail call i32 @waitpid(i32 %4, i32* null, i32 0)
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.10, i64 0, i64 0))
%31 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%32 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %31, i8* %32)
%34 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%35 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %34, i8* %35)
br label %37
37: ; preds = %5, %28
%38 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%39 = tail call i8* @secure_getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %38, i8* %39)
ret void
}