void disable_file_path(const char *path, const char *file) {
  assert(file);
  assert(path);
  char *fname;
  if (asprintf(&fname, "%s/%s", path, file) == -1)
    do {
      char msgout[500];
      snprintf(msgout, 500, "Error %s: %s:%d %s", "asprintf",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/Fred-Barclay/firejail/refs/"
               "heads/master/src/firejail/util.c",
               1136, __FUNCTION__);
      perror(msgout);
      exit(1);
    } while (0);
  disable_file_or_dir(fname);
  free(fname);
}


x86 assembly (clang, -O0):
<disable_file_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%rdi
lea    0xe54(%rip),%rsi
mov    $0x0,%al
call   1070 <asprintf@plt>
cmp    $0xffffffff,%eax
jne    1212 <disable_file_path+0xa2>
jmp    11c1 <disable_file_path+0x51>
lea    -0x210(%rbp),%rdi
mov    $0x1f4,%esi
lea    0xe32(%rip),%rdx
lea    0xe3e(%rip),%rcx
lea    0xe40(%rip),%r8
mov    $0x470,%r9d
lea    0xec9(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x210(%rbp),%rdi
mov    $0x0,%al
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <disable_file_or_dir@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_file_path>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
xor    %eax,%eax
call   1060 <assert@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <assert@plt>
lea    0xe65(%rip),%rsi
lea    0x8(%rsp),%rdi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1070 <asprintf@plt>
cmp    $0xffffffff,%eax
je     11d3 <disable_file_path+0x63>
mov    0x8(%rsp),%rdi
xor    %eax,%eax
call   1040 <disable_file_or_dir@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret
lea    0xede(%rip),%rax
mov    %rax,(%rsp)
lea    0xe21(%rip),%rdx
lea    0xe2d(%rip),%rcx
lea    0xe2f(%rip),%r8
lea    0x10(%rsp),%rbx
mov    $0x1f4,%esi
mov    %rbx,%rdi
mov    $0x470,%r9d
xor    %eax,%eax
call   1050 <snprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [19 x i8] c"Error %s: %s:%d %s\00"
@.str.2 = [9 x i8] c"asprintf\00"
@.str.3 = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Fred-Barclay/firejail/refs/heads/master/src/firejail/util.c\00"
@__FUNCTION__.disable_file_path = [18 x i8] c"disable_file_path\00"
define void @disable_file_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [500 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %9)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 (i8**, i8*, i8*, i8*, ...) bitcast (i32 (...)* @asprintf to i32 (i8**, i8*, i8*, i8*, ...)*)(i8** %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %22
15: ; preds = %2
br label %16
16: ; preds = %15
%17 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%18 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %17, i64 500, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.3, i64 0, i64 0), i32 1136, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.disable_file_path, i64 0, i64 0))
%19 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %19)
unreachable
21: ; No predecessors!
br label %22
22: ; preds = %21, %2
%23 = load i8*, i8** %5
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @disable_file_or_dir to i32 (i8*, ...)*)(i8* %23)
%25 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [19 x i8] c"Error %s: %s:%d %s\00"
@.str.2 = [9 x i8] c"asprintf\00"
@.str.3 = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Fred-Barclay/firejail/refs/heads/master/src/firejail/util.c\00"
@__FUNCTION__.disable_file_path = [18 x i8] c"disable_file_path\00"
define void @disable_file_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca [500 x i8]
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %1)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
%7 = bitcast i8** %3 to i8*
%8 = call i32 (i8**, i8*, i8*, i8*, ...) bitcast (i32 (...)* @asprintf to i32 (i8**, i8*, i8*, i8*, ...)*)(i8** %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = getelementptr inbounds [500 x i8], [500 x i8]* %4, i64 0, i64 0
%12 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %11, i64 500, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.3, i64 0, i64 0), i32 1136, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.disable_file_path, i64 0, i64 0))
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %11)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @disable_file_or_dir to i32 (i8*, ...)*)(i8* %15)
%17 = load i8*, i8** %3
ret void
}