#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 */
int /*<<< orphan*/ STDIN_FILENO;
scalar_t__ WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ die(char *, ...);
int /*<<< orphan*/ dup2(int, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ execl(char const *, char *, char *, char *, char *, ...);
int fork();
scalar_t__ pipe(int *);
int /*<<< orphan*/ redir_to_dev_null();
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void ensure_docker_image(const char *docker_path) {
  int pid, status;
  switch (pid = fork()) {
  case -1:
    die("fork error (%s)", strerror(errno));
  case 0:
    redir_to_dev_null();
    execl(docker_path, "docker", "inspect", "docker-sandbox-img", NULL);
    die("unable to run docker (%s)", strerror(errno));
  }
  waitpid(pid, &status, 0);
  if (WIFEXITED(status) && (WEXITSTATUS(status) == 0)) {
    return;
  }
  int pipes[2];
  if (pipe(pipes)) {
    die("pipe() error (%s)", strerror(errno));
  }
  int rd = pipes[0];
  int wr = pipes[1];
  switch (pid = fork()) {
  case -1:
    die("fork error (%s)", strerror(errno));
  case 0:
    close(wr);
    dup2(rd, STDIN_FILENO);
    close(rd);
    redir_to_dev_null();
    execl(docker_path, "docker", "build", "-t", "docker-sandbox-img", "-",
          NULL);
    die("unable to run docker (%s)", strerror(errno));
  }
  close(rd);
  static const char buff[] = "FROM scratch\nCMD []\n";
  write(wr, buff, strlen(buff));
  close(wr);
  waitpid(pid, &status, 0);
  if (WIFEXITED(status) && (WEXITSTATUS(status) == 0)) {
    return;
  }
  die("unable to build docker-sandbox image");
}


x86 assembly (clang, -O0):
<ensure_docker_image>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
call   10f0 <fork@plt>
mov    %eax,-0xc(%rbp)
mov    %eax,%ecx
mov    %ecx,-0x24(%rbp)
sub    $0xffffffff,%eax
je     1209 <ensure_docker_image+0x39>
jmp    11f9 <ensure_docker_image+0x29>
mov    -0x24(%rbp),%eax
test   %eax,%eax
je     1227 <ensure_docker_image+0x57>
jmp    1271 <ensure_docker_image+0xa1>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   10b0 <die@plt>
mov    $0x0,%al
call   1080 <redir_to_dev_null@plt>
mov    -0x8(%rbp),%rdi
lea    0xdd7(%rip),%rsi
lea    0xdd7(%rip),%rdx
lea    0xdd8(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
mov    $0x0,%al
call   10e0 <execl@plt>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   10b0 <die@plt>
mov    -0xc(%rbp),%edi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   10a0 <waitpid@plt>
mov    -0x10(%rbp),%edi
call   10c0 <WIFEXITED@plt>
cmp    $0x0,%rax
je     12a8 <ensure_docker_image+0xd8>
mov    -0x10(%rbp),%edi
call   1090 <WEXITSTATUS@plt>
cmp    $0x0,%rax
jne    12a8 <ensure_docker_image+0xd8>
jmp    1426 <ensure_docker_image+0x256>
lea    -0x18(%rbp),%rdi
call   1070 <pipe@plt>
cmp    $0x0,%rax
je     12d9 <ensure_docker_image+0x109>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   10b0 <die@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
call   10f0 <fork@plt>
mov    %eax,-0xc(%rbp)
mov    %eax,%ecx
mov    %ecx,-0x28(%rbp)
sub    $0xffffffff,%eax
je     1312 <ensure_docker_image+0x142>
jmp    1302 <ensure_docker_image+0x132>
mov    -0x28(%rbp),%eax
test   %eax,%eax
je     1330 <ensure_docker_image+0x160>
jmp    13ae <ensure_docker_image+0x1de>
mov    0x2cc7(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   10b0 <die@plt>
mov    -0x20(%rbp),%edi
call   1060 <close@plt>
mov    -0x1c(%rbp),%edi
mov    0x2c96(%rip),%rax
mov    (%rax),%esi
call   1050 <dup2@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    $0x0,%al
call   1080 <redir_to_dev_null@plt>
mov    -0x8(%rbp),%rdi
lea    0xcad(%rip),%rsi
lea    0xcf4(%rip),%rdx
lea    0xcf3(%rip),%rcx
lea    0xca7(%rip),%r8
lea    0xce8(%rip),%r9
xor    %eax,%eax
movq   $0x0,(%rsp)
mov    $0x0,%al
call   10e0 <execl@plt>
mov    0x2c49(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   10b0 <die@plt>
mov    -0x1c(%rbp),%edi
call   1060 <close@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    0xccd(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%edx
lea    0xcbc(%rip),%rsi
call   1030 <write@plt>
mov    -0x20(%rbp),%edi
call   1060 <close@plt>
mov    -0xc(%rbp),%edi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   10a0 <waitpid@plt>
mov    -0x10(%rbp),%edi
call   10c0 <WIFEXITED@plt>
cmp    $0x0,%rax
je     1418 <ensure_docker_image+0x248>
mov    -0x10(%rbp),%edi
call   1090 <WEXITSTATUS@plt>
cmp    $0x0,%rax
jne    1418 <ensure_docker_image+0x248>
jmp    1426 <ensure_docker_image+0x256>
lea    0xc4a(%rip),%rdi
mov    $0x0,%al
call   10b0 <die@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ensure_docker_image>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r14
xor    %eax,%eax
call   10f0 <fork@plt>
mov    %eax,%ebx
test   %eax,%eax
je     120d <ensure_docker_image+0x3d>
cmp    $0xffffffff,%ebx
jne    1254 <ensure_docker_image+0x84>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xdfc(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <die@plt>
xor    %eax,%eax
call   1080 <redir_to_dev_null@plt>
lea    0xdf5(%rip),%rsi
lea    0xdf5(%rip),%rdx
lea    0xdf6(%rip),%rcx
mov    %r14,%rdi
xor    %r8d,%r8d
xor    %eax,%eax
call   10e0 <execl@plt>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xde7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <die@plt>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   10a0 <waitpid@plt>
mov    0xc(%rsp),%edi
call   10c0 <WIFEXITED@plt>
test   %rax,%rax
je     1282 <ensure_docker_image+0xb2>
mov    0xc(%rsp),%edi
call   1090 <WEXITSTATUS@plt>
test   %rax,%rax
je     13c8 <ensure_docker_image+0x1f8>
lea    0x10(%rsp),%rdi
call   1070 <pipe@plt>
test   %rax,%rax
je     12af <ensure_docker_image+0xdf>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xda6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <die@plt>
mov    0x10(%rsp),%ebp
mov    0x14(%rsp),%r15d
xor    %eax,%eax
call   10f0 <fork@plt>
mov    %eax,%ebx
test   %eax,%eax
je     12ec <ensure_docker_image+0x11c>
cmp    $0xffffffff,%ebx
jne    1365 <ensure_docker_image+0x195>
mov    0x2d0b(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xd1d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <die@plt>
mov    %r15d,%edi
call   1060 <close@plt>
mov    0x2cdd(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1050 <dup2@plt>
mov    %ebp,%edi
call   1060 <close@plt>
xor    %eax,%eax
call   1080 <redir_to_dev_null@plt>
movq   $0x0,(%rsp)
lea    0xcef(%rip),%rsi
lea    0xd36(%rip),%rdx
lea    0xd35(%rip),%rcx
lea    0xce9(%rip),%r8
lea    0xd2a(%rip),%r9
mov    %r14,%rdi
xor    %eax,%eax
call   10e0 <execl@plt>
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xcd6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <die@plt>
mov    %ebp,%edi
call   1060 <close@plt>
lea    0xd1d(%rip),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %r15d,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %r15d,%edi
call   1060 <close@plt>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   10a0 <waitpid@plt>
mov    0xc(%rsp),%edi
call   10c0 <WIFEXITED@plt>
test   %rax,%rax
je     13ba <ensure_docker_image+0x1ea>
mov    0xc(%rsp),%edi
call   1090 <WEXITSTATUS@plt>
test   %rax,%rax
je     13c8 <ensure_docker_image+0x1f8>
lea    0xca8(%rip),%rdi
xor    %eax,%eax
call   10b0 <die@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"fork error (%s)\00"
@errno = global i32 0
@.str.1 = [7 x i8] c"docker\00"
@.str.2 = [8 x i8] c"inspect\00"
@.str.3 = [19 x i8] c"docker-sandbox-img\00"
@.str.4 = [26 x i8] c"unable to run docker (%s)\00"
@.str.5 = [18 x i8] c"pipe() error (%s)\00"
@STDIN_FILENO = global i32 0
@.str.6 = [6 x i8] c"build\00"
@.str.7 = [3 x i8] c"-t\00"
@.str.8 = [2 x i8] c"-\00"
@ensure_docker_image.buff = internal constant [21 x i8] c"FROM scratch\0ACMD []\0A\00"
@.str.9 = [37 x i8] c"unable to build docker-sandbox image\00"
define void @ensure_docker_image(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %2
%8 = call i32 (...) @fork()
store i32 %8, i32* %3
switch i32 %8, label %20 [
i32 -1, label %9
i32 0, label %13
]
9: ; preds = %1
%10 = load i32, i32* @errno
%11 = call i32 @strerror(i32 %10)
%12 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %1, %9
%14 = call i32 (...) @redir_to_dev_null()
%15 = load i8*, i8** %2
%16 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @execl(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* null)
%17 = load i32, i32* @errno
%18 = call i32 @strerror(i32 %17)
%19 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %13, %1
%21 = load i32, i32* %3
%22 = call i32 @waitpid(i32 %21, i32* %4, i32 0)
%23 = load i32, i32* %4
%24 = call i64 @WIFEXITED(i32 %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %20
%27 = load i32, i32* %4
%28 = call i64 @WEXITSTATUS(i32 %27)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %26
br label %83
31: ; preds = %26, %20
%32 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%33 = call i64 @pipe(i32* %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i32, i32* @errno
%37 = call i32 @strerror(i32 %36)
%38 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %35, %31
%40 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%41 = load i32, i32* %40
store i32 %41, i32* %6
%42 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%43 = load i32, i32* %42
store i32 %43, i32* %7
%44 = call i32 (...) @fork()
store i32 %44, i32* %3
switch i32 %44, label %63 [
i32 -1, label %45
i32 0, label %49
]
45: ; preds = %39
%46 = load i32, i32* @errno
%47 = call i32 @strerror(i32 %46)
%48 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %39, %45
%50 = load i32, i32* %7
%51 = call i32 @close(i32 %50)
%52 = load i32, i32* %6
%53 = load i32, i32* @STDIN_FILENO
%54 = call i32 @dup2(i32 %52, i32 %53)
%55 = load i32, i32* %6
%56 = call i32 @close(i32 %55)
%57 = call i32 (...) @redir_to_dev_null()
%58 = load i8*, i8** %2
%59 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @execl(i8* %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* null)
%60 = load i32, i32* @errno
%61 = call i32 @strerror(i32 %60)
%62 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %49, %39
%64 = load i32, i32* %6
%65 = call i32 @close(i32 %64)
%66 = load i32, i32* %7
%67 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @ensure_docker_image.buff, i64 0, i64 0))
%68 = call i32 @write(i32 %66, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @ensure_docker_image.buff, i64 0, i64 0), i32 %67)
%69 = load i32, i32* %7
%70 = call i32 @close(i32 %69)
%71 = load i32, i32* %3
%72 = call i32 @waitpid(i32 %71, i32* %4, i32 0)
%73 = load i32, i32* %4
%74 = call i64 @WIFEXITED(i32 %73)
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %81
76: ; preds = %63
%77 = load i32, i32* %4
%78 = call i64 @WEXITSTATUS(i32 %77)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %81
80: ; preds = %76
br label %83
81: ; preds = %76, %63
%82 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
br label %83
83: ; preds = %81, %80, %30
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"fork error (%s)\00"
@errno = global i32 0
@.str.1 = [7 x i8] c"docker\00"
@.str.2 = [8 x i8] c"inspect\00"
@.str.3 = [19 x i8] c"docker-sandbox-img\00"
@.str.4 = [26 x i8] c"unable to run docker (%s)\00"
@.str.5 = [18 x i8] c"pipe() error (%s)\00"
@STDIN_FILENO = global i32 0
@.str.6 = [6 x i8] c"build\00"
@.str.7 = [3 x i8] c"-t\00"
@.str.8 = [2 x i8] c"-\00"
@ensure_docker_image.buff = internal constant [21 x i8] c"FROM scratch\0ACMD []\0A\00"
@.str.9 = [37 x i8] c"unable to build docker-sandbox image\00"
define void @ensure_docker_image(i8* %0) {
%2 = alloca i32
%3 = alloca [2 x i32]
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (...) @fork()
switch i32 %5, label %16 [
i32 -1, label %6
i32 0, label %10
]
6: ; preds = %1
%7 = load i32, i32* @errno
%8 = tail call i32 @strerror(i32 %7)
%9 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %1, %6
%11 = tail call i32 (...) @redir_to_dev_null()
%12 = tail call i32 (i8*, i8*, i8*, i8*, i8*, ...) @execl(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* null)
%13 = load i32, i32* @errno
%14 = tail call i32 @strerror(i32 %13)
%15 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %10, %1
%17 = call i32 @waitpid(i32 %5, i32* %2, i32 0)
%18 = load i32, i32* %2
%19 = call i64 @WIFEXITED(i32 %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %16
%22 = load i32, i32* %2
%23 = call i64 @WEXITSTATUS(i32 %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %69, label %25
25: ; preds = %21, %16
%26 = bitcast [2 x i32]* %3 to i8*
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%28 = call i64 @pipe(i32* %27)
%29 = icmp eq i64 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %25
%31 = load i32, i32* @errno
%32 = call i32 @strerror(i32 %31)
%33 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %30, %25
%35 = load i32, i32* %27
%36 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%37 = load i32, i32* %36
%38 = call i32 (...) @fork()
switch i32 %38, label %53 [
i32 -1, label %39
i32 0, label %43
]
39: ; preds = %34
%40 = load i32, i32* @errno
%41 = call i32 @strerror(i32 %40)
%42 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %34, %39
%44 = call i32 @close(i32 %37)
%45 = load i32, i32* @STDIN_FILENO
%46 = call i32 @dup2(i32 %35, i32 %45)
%47 = call i32 @close(i32 %35)
%48 = call i32 (...) @redir_to_dev_null()
%49 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @execl(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* null)
%50 = load i32, i32* @errno
%51 = call i32 @strerror(i32 %50)
%52 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %51)
br label %53
53: ; preds = %43, %34
%54 = call i32 @close(i32 %35)
%55 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @ensure_docker_image.buff, i64 0, i64 0))
%56 = call i32 @write(i32 %37, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @ensure_docker_image.buff, i64 0, i64 0), i32 %55)
%57 = call i32 @close(i32 %37)
%58 = call i32 @waitpid(i32 %38, i32* %2, i32 0)
%59 = load i32, i32* %2
%60 = call i64 @WIFEXITED(i32 %59)
%61 = icmp eq i64 %60, 0
br i1 %61, label %66, label %62
62: ; preds = %53
%63 = load i32, i32* %2
%64 = call i64 @WEXITSTATUS(i32 %63)
%65 = icmp eq i64 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %62, %53
%67 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
br label %68
68: ; preds = %62, %66
br label %69
69: ; preds = %21, %68
ret void
}