void remove_tmppath(void *temporary_directory) {
  if (0 != lace_compat_file_rmdir((char *)temporary_directory)) {
    lace_compat_errno_trace_(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/grencez/lace/refs/heads/readme/src/lace.c",
        __extension__ __func__, 754);
    lace_log_warningf("Temp directory not removed: %s",
                      (char *)temporary_directory);
  }
  free(temporary_directory);
  lace_log_trace_(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/grencez/lace/refs/heads/readme/src/lace.c",
      __extension__ __func__, 759, "freed temporary_directory");
}


x86 assembly (clang, -O0):
<remove_tmppath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <lace_compat_file_rmdir@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     119f <remove_tmppath+0x4f>
lea    0xe86(%rip),%rdi
lea    0xf03(%rip),%rsi
mov    $0x2f2,%edx
mov    $0x0,%al
call   1050 <lace_compat_errno_trace_@plt>
mov    -0x8(%rbp),%rsi
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1070 <lace_log_warningf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
lea    0xe51(%rip),%rdi
lea    0xece(%rip),%rsi
mov    $0x2f7,%edx
lea    0xef0(%rip),%rcx
mov    $0x0,%al
call   1030 <lace_log_trace_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_tmppath>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <lace_compat_file_rmdir@plt>
test   %eax,%eax
je     118a <remove_tmppath+0x3a>
lea    0xe9a(%rip),%rdi
lea    0xf17(%rip),%rsi
mov    $0x2f2,%edx
xor    %eax,%eax
call   1050 <lace_compat_errno_trace_@plt>
lea    0xf13(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <lace_log_warningf@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
lea    0xe67(%rip),%rdi
lea    0xee4(%rip),%rsi
lea    0xf0b(%rip),%rcx
mov    $0x2f7,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <lace_log_trace_@plt>

LLVM IR (-O0):
@.str = [132 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grencez/lace/refs/heads/readme/src/lace.c\00"
@__func__.remove_tmppath = [15 x i8] c"remove_tmppath\00"
@.str.1 = [31 x i8] c"Temp directory not removed: %s\00"
@.str.2 = [26 x i8] c"freed temporary_directory\00"
define void @remove_tmppath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @lace_compat_file_rmdir to i32 (i8*, ...)*)(i8* %3)
%5 = icmp ne i32 0, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @lace_compat_errno_trace_ to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.remove_tmppath, i64 0, i64 0), i32 754)
%8 = load i8*, i8** %2
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @lace_log_warningf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %6, %1
%11 = load i8*, i8** %2
%12 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @lace_log_trace_ to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.remove_tmppath, i64 0, i64 0), i32 759, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [132 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grencez/lace/refs/heads/readme/src/lace.c\00"
@__func__.remove_tmppath = [15 x i8] c"remove_tmppath\00"
@.str.1 = [31 x i8] c"Temp directory not removed: %s\00"
@.str.2 = [26 x i8] c"freed temporary_directory\00"
define void @remove_tmppath(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @lace_compat_file_rmdir to i32 (i8*, ...)*)(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @lace_compat_errno_trace_ to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.remove_tmppath, i64 0, i64 0), i32 754)
%6 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @lace_log_warningf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %4, %1
tail call void @free(i8* %0)
%8 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @lace_log_trace_ to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.remove_tmppath, i64 0, i64 0), i32 759, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}