#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*/ cl_must_pass_(int /*<<< orphan*/, char *);
int /*<<< orphan*/ shell_out(char **);
void fs_rm(const char *source) {
  char *argv[4];
  argv[0] = "/bin/rm";
  argv[1] = "-Rf";
  argv[2] = (char *)source;
  argv[3] = NULL;
  cl_must_pass_(shell_out(argv), "Failed to cleanup the sandbox");
}


x86 assembly (clang, -O0):
<fs_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <shell_out@plt>
mov    %eax,%edi
lea    0xea8(%rip),%rsi
call   1040 <cl_must_pass_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_rm>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rax
mov    %rax,(%rsp)
lea    0xed2(%rip),%rax
mov    %rax,0x8(%rsp)
mov    %rdi,0x10(%rsp)
movq   $0x0,0x18(%rsp)
mov    %rsp,%rdi
call   1030 <shell_out@plt>
lea    0xeb4(%rip),%rsi
mov    %eax,%edi
call   1040 <cl_must_pass_@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/rm\00"
@.str.1 = [4 x i8] c"-Rf\00"
@.str.2 = [30 x i8] c"Failed to cleanup the sandbox\00"
define void @fs_rm(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8*]
store i8* %0, i8** %2
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 2
store i8* %6, i8** %7
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 3
store i8* null, i8** %8
%9 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%10 = call i32 @shell_out(i8** %9)
%11 = call i32 @cl_must_pass_(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/rm\00"
@.str.1 = [4 x i8] c"-Rf\00"
@.str.2 = [30 x i8] c"Failed to cleanup the sandbox\00"
define void @fs_rm(i8* %0) {
%2 = alloca [4 x i8*]
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 2
store i8* %0, i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 3
store i8* null, i8** %7
%8 = call i32 @shell_out(i8** %4)
%9 = call i32 @cl_must_pass_(i32 %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
ret void
}