void find_home_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__, 241);
    log_msg("Entered into this function");
  };
  if (try_home_envvar_for_home())
    return;
  if (try_userprofile_envvar_for_home())
    return;
  if (try_homepath_envvar_for_home())
    return;
}


x86 assembly (clang, -O0):
<find_home_dir>:
push   %rbp
mov    %rsp,%rbp
lea    0xea5(%rip),%rdi
lea    0xf34(%rip),%rsi
mov    $0xf1,%edx
mov    $0x0,%al
call   1030 <log_prefix@plt>
lea    0xf2f(%rip),%rdi
mov    $0x0,%al
call   1050 <log_msg@plt>
mov    $0x0,%al
call   1040 <try_home_envvar_for_home@plt>
cmp    $0x0,%eax
je     1191 <find_home_dir+0x41>
jmp    11bb <find_home_dir+0x6b>
mov    $0x0,%al
call   1060 <try_userprofile_envvar_for_home@plt>
cmp    $0x0,%eax
je     11a6 <find_home_dir+0x56>
jmp    11bb <find_home_dir+0x6b>
mov    $0x0,%al
call   1070 <try_homepath_envvar_for_home@plt>
cmp    $0x0,%eax
je     11bb <find_home_dir+0x6b>
jmp    11bb <find_home_dir+0x6b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_home_dir>:
push   %rax
lea    0xea8(%rip),%rdi
lea    0xf37(%rip),%rsi
mov    $0xf1,%edx
xor    %eax,%eax
call   1030 <log_prefix@plt>
lea    0xf32(%rip),%rdi
xor    %eax,%eax
call   1050 <log_msg@plt>
xor    %eax,%eax
call   1040 <try_home_envvar_for_home@plt>
test   %eax,%eax
jne    118f <find_home_dir+0x3f>
xor    %eax,%eax
call   1060 <try_userprofile_envvar_for_home@plt>
test   %eax,%eax
je     1191 <find_home_dir+0x41>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1070 <try_homepath_envvar_for_home@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_home_dir = [14 x i8] c"find_home_dir\00"
@.str.1 = [27 x i8] c"Entered into this function\00"
define void @find_home_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 ([14 x i8], [14 x i8]* @__FUNCTION__.find_home_dir, i64 0, i64 0), i32 241)
%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_home_envvar_for_home()
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %14
6: ; preds = %0
%7 = call i32 (...) @try_userprofile_envvar_for_home()
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %14
10: ; preds = %6
%11 = call i32 (...) @try_homepath_envvar_for_home()
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
br label %14
14: ; preds = %5, %9, %13, %10
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_home_dir = [14 x i8] c"find_home_dir\00"
@.str.1 = [27 x i8] c"Entered into this function\00"
define void @find_home_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 ([14 x i8], [14 x i8]* @__FUNCTION__.find_home_dir, i64 0, i64 0), i32 241)
%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_home_envvar_for_home()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = tail call i32 (...) @try_userprofile_envvar_for_home()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @try_homepath_envvar_for_home()
br label %10
10: ; preds = %8, %5, %0
ret void
}