#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*/ free(void *);
int /*<<< orphan*/ munit_errorf_ex(char *, int, char *, int, int);
int remove(char *);
void sr_CleanUpTempFile(void *file) {
  do {
    int munit_tmp_a_ = (remove((char *)file));
    int munit_tmp_b_ = (0);
    if (!(munit_tmp_a_ == munit_tmp_b_)) {
      munit_errorf_ex("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/chrisrink10/mscript/"
                      "refs/heads/master/test/streamreader_test.c",
                      88,
                      "assertion failed: "
                      "remove((char *)file)"
                      " "
                      "=="
                      " "
                      "0"
                      " ("
                      ""
                      "%"
                      "d"
                      ""
                      " "
                      "=="
                      " "
                      ""
                      "%"
                      "d"
                      ""
                      ")",
                      munit_tmp_a_, munit_tmp_b_);
    }
  } while (0);
  free(file);
}


x86 assembly (clang, -O0):
<sr_CleanUpTempFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <remove@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     117a <sr_CleanUpTempFile+0x4a>
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe97(%rip),%rdi
mov    $0x58,%esi
lea    0xf24(%rip),%rdx
call   1050 <munit_errorf_ex@plt>
jmp    117f <sr_CleanUpTempFile+0x4f>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_CleanUpTempFile>:
push   %rbx
mov    %rdi,%rbx
call   1040 <remove@plt>
test   %eax,%eax
je     115a <sr_CleanUpTempFile+0x2a>
lea    0xebc(%rip),%rdi
lea    0xf4e(%rip),%rdx
mov    $0x58,%esi
mov    %eax,%ecx
xor    %r8d,%r8d
call   1050 <munit_errorf_ex@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/chrisrink10/mscript/refs/heads/master/test/streamreader_test.c\00"
@.str.1 = [55 x i8] c"assertion failed: remove((char *)file) == 0 (%d == %d)\00"
define void @sr_CleanUpTempFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
br label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @remove(i8* %6)
store i32 %7, i32* %3
store i32 0, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
br i1 %10, label %15, label %11
11: ; preds = %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @munit_errorf_ex(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 88, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
br label %15
15: ; preds = %11, %5
br label %16
16: ; preds = %15
%17 = load i8*, i8** %2
%18 = call i32 @free(i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/chrisrink10/mscript/refs/heads/master/test/streamreader_test.c\00"
@.str.1 = [55 x i8] c"assertion failed: remove((char *)file) == 0 (%d == %d)\00"
define void @sr_CleanUpTempFile(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @munit_errorf_ex(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 88, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @free(i8* %0)
ret void
}