#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 System(char *);
int /*<<< orphan*/ q_internal(char *, char *, int);
char *s_cat2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ s_internal(char *, char *, char *, int);
int delete_file(char *pathspec) {
  char *cmd;
  int ret;
  cmd = s_cat2(
      (q_internal("rm -f ",
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/guicho271828/roswell/refs/"
                  "heads/master/src/util_file.c",
                  8)),
      (q_internal(pathspec,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/guicho271828/roswell/refs/"
                  "heads/master/src/util_file.c",
                  8)));
  ret = System(cmd);
  (s_internal(cmd, "cmd",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/guicho271828/roswell/refs/heads/"
              "master/src/util_file.c",
              10));
  return ret == 0;
}


x86 assembly (clang, -O0):
<delete_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
lea    0xead(%rip),%rsi
mov    $0x8,%edx
call   1060 <q_internal@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
mov    $0x8,%edx
call   1060 <q_internal@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <s_cat2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <System@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xef7(%rip),%rsi
lea    0xe5f(%rip),%rdx
mov    $0xa,%ecx
call   1030 <s_internal@plt>
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_file>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xeb2(%rip),%rdi
lea    0xeb2(%rip),%r14
mov    %r14,%rsi
mov    $0x8,%edx
call   1060 <q_internal@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1060 <q_internal@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <s_cat2@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <System@plt>
mov    %eax,%ebp
lea    0xf07(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0xa,%ecx
call   1030 <s_internal@plt>
xor    %eax,%eax
test   %ebp,%ebp
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"rm -f \00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/guicho271828/roswell/refs/heads/master/src/util_file.c\00"
@.str.2 = [4 x i8] c"cmd\00"
define i32 @delete_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @q_internal(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 8)
%6 = load i8*, i8** %2
%7 = call i32 @q_internal(i8* %6, i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 8)
%8 = call i8* @s_cat2(i32 %5, i32 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @System(i8* %9)
store i32 %10, i32* %4
%11 = load i8*, i8** %3
%12 = call i32 @s_internal(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 10)
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [7 x i8] c"rm -f \00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/guicho271828/roswell/refs/heads/master/src/util_file.c\00"
@.str.2 = [4 x i8] c"cmd\00"
define i32 @delete_file(i8* %0) {
%2 = tail call i32 @q_internal(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = tail call i32 @q_internal(i8* %0, i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 8)
%4 = tail call i8* @s_cat2(i32 %2, i32 %3)
%5 = tail call i32 @System(i8* %4)
%6 = tail call i32 @s_internal(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 10)
%7 = icmp eq i32 %5, 0
%8 = zext i1 %7 to i32
ret i32 %8
}