void find_config_dir(void) {
  {
    log_prefix("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/cosminadrianpopescu/vifm/"
               "refs/heads/master/src/cfg/config.c",
               __FUNCTION__, 309);
    log_msg("Entered into this function");
  };
  if (try_vifm_envvar_for_conf())
    return;
  if (try_exe_directory_for_conf())
    return;
  if (try_home_envvar_for_conf(0))
    return;
  if (try_appdata_for_conf())
    return;
  if (try_xdg_for_conf())
    return;
  if (!try_home_envvar_for_conf(1)) {
    vifm_finish("Failed to determine location of configuration files.");
  }
}


x86 assembly (clang, -O0):
<find_config_dir>:
push   %rbp
mov    %rsp,%rbp
lea    0xe75(%rip),%rdi
lea    0xf04(%rip),%rsi
mov    $0x135,%edx
mov    $0x0,%al
call   1040 <log_prefix@plt>
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1090 <log_msg@plt>
mov    $0x0,%al
call   10a0 <try_vifm_envvar_for_conf@plt>
cmp    $0x0,%eax
je     11c1 <find_config_dir+0x41>
jmp    123a <find_config_dir+0xba>
mov    $0x0,%al
call   1030 <try_exe_directory_for_conf@plt>
cmp    $0x0,%eax
je     11d6 <find_config_dir+0x56>
jmp    123a <find_config_dir+0xba>
xor    %edi,%edi
mov    $0x0,%al
call   1060 <try_home_envvar_for_conf@plt>
cmp    $0x0,%eax
je     11ed <find_config_dir+0x6d>
jmp    123a <find_config_dir+0xba>
mov    $0x0,%al
call   1080 <try_appdata_for_conf@plt>
cmp    $0x0,%eax
je     1202 <find_config_dir+0x82>
jmp    123a <find_config_dir+0xba>
mov    $0x0,%al
call   1050 <try_xdg_for_conf@plt>
cmp    $0x0,%eax
je     1217 <find_config_dir+0x97>
jmp    123a <find_config_dir+0xba>
mov    $0x1,%edi
mov    $0x0,%al
call   1060 <try_home_envvar_for_conf@plt>
cmp    $0x0,%eax
jne    123a <find_config_dir+0xba>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1070 <vifm_finish@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_config_dir>:
push   %rax
lea    0xe78(%rip),%rdi
lea    0xf07(%rip),%rsi
mov    $0x135,%edx
xor    %eax,%eax
call   1040 <log_prefix@plt>
lea    0xf04(%rip),%rdi
xor    %eax,%eax
call   1090 <log_msg@plt>
xor    %eax,%eax
call   10a0 <try_vifm_envvar_for_conf@plt>
test   %eax,%eax
jne    11f2 <find_config_dir+0x72>
xor    %eax,%eax
call   1030 <try_exe_directory_for_conf@plt>
test   %eax,%eax
jne    11f2 <find_config_dir+0x72>
xor    %edi,%edi
xor    %eax,%eax
call   1060 <try_home_envvar_for_conf@plt>
test   %eax,%eax
jne    11f2 <find_config_dir+0x72>
xor    %eax,%eax
call   1080 <try_appdata_for_conf@plt>
test   %eax,%eax
jne    11f2 <find_config_dir+0x72>
xor    %eax,%eax
call   1050 <try_xdg_for_conf@plt>
test   %eax,%eax
jne    11f2 <find_config_dir+0x72>
mov    $0x1,%edi
xor    %eax,%eax
call   1060 <try_home_envvar_for_conf@plt>
test   %eax,%eax
je     11f4 <find_config_dir+0x74>
pop    %rax
ret
lea    0xec6(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1070 <vifm_finish@plt>

LLVM IR (-O0):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cosminadrianpopescu/vifm/refs/heads/master/src/cfg/config.c\00"
@__FUNCTION__.find_config_dir = [16 x i8] c"find_config_dir\00"
@.str.1 = [27 x i8] c"Entered into this function\00"
@.str.2 = [53 x i8] c"Failed to determine location of configuration files.\00"
define void @find_config_dir() {
%1 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @log_prefix to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__FUNCTION__.find_config_dir, i64 0, i64 0), i32 309)
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @log_msg to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @try_vifm_envvar_for_conf()
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %27
6: ; preds = %0
%7 = call i32 (...) @try_exe_directory_for_conf()
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %27
10: ; preds = %6
%11 = call i32 (i32, ...) bitcast (i32 (...)* @try_home_envvar_for_conf to i32 (i32, ...)*)(i32 0)
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
br label %27
14: ; preds = %10
%15 = call i32 (...) @try_appdata_for_conf()
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
br label %27
18: ; preds = %14
%19 = call i32 (...) @try_xdg_for_conf()
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18
br label %27
22: ; preds = %18
%23 = call i32 (i32, ...) bitcast (i32 (...)* @try_home_envvar_for_conf to i32 (i32, ...)*)(i32 1)
%24 = icmp ne i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @vifm_finish to i32 (i8*, ...)*)(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
br label %27
27: ; preds = %5, %9, %13, %17, %21, %25, %22
ret void
}

LLVM IR (-O2):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cosminadrianpopescu/vifm/refs/heads/master/src/cfg/config.c\00"
@__FUNCTION__.find_config_dir = [16 x i8] c"find_config_dir\00"
@.str.1 = [27 x i8] c"Entered into this function\00"
@.str.2 = [53 x i8] c"Failed to determine location of configuration files.\00"
define void @find_config_dir() {
%1 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @log_prefix to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__FUNCTION__.find_config_dir, i64 0, i64 0), i32 309)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @log_msg to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @try_vifm_envvar_for_conf()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %22
5: ; preds = %0
%6 = tail call i32 (...) @try_exe_directory_for_conf()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @try_home_envvar_for_conf to i32 (i32, ...)*)(i32 0)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = tail call i32 (...) @try_appdata_for_conf()
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = tail call i32 (...) @try_xdg_for_conf()
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = tail call i32 (i32, ...) bitcast (i32 (...)* @try_home_envvar_for_conf to i32 (i32, ...)*)(i32 1)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = tail call i32 (i8*, ...) bitcast (i32 (...)* @vifm_finish to i32 (i8*, ...)*)(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %14, %11, %8, %5, %0, %20, %17
ret void
}