void read_configuration(fname) const char *fname;
{
  if (!do_file_load(getvar("TFLIBRARY"), 0))
    die("Can't read required library.", 0);
  if (fname) {
    if (*fname)
      do_file_load(fname, 0);
    return;
  }
  (void)(do_file_load("~/.tfrc", 1) || do_file_load("~/tfrc", 1) ||
         do_file_load("./.tfrc", 1) || do_file_load("./tfrc", 1));
  do_file_load((fname = getvar("TINYTALK")) ? fname : "~/.tinytalk", 1);
}


x86 assembly (clang, -O0):
<read_configuration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <getvar@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
cmp    $0x0,%eax
jne    116e <read_configuration+0x3e>
lea    0xea5(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <die@plt>
cmpq   $0x0,-0x8(%rbp)
je     1198 <read_configuration+0x68>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1193 <read_configuration+0x63>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
jmp    126b <read_configuration+0x13b>
lea    0xe88(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    121d <read_configuration+0xed>
lea    0xe6d(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    121d <read_configuration+0xed>
lea    0xe51(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    121d <read_configuration+0xed>
lea    0xe36(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <getvar@plt>
cltq
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     124b <read_configuration+0x11b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    125b <read_configuration+0x12b>
lea    0xdfc(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    125b <read_configuration+0x12b>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <do_file_load@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_configuration>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <getvar@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <do_file_load@plt>
test   %eax,%eax
je     1169 <read_configuration+0x39>
test   %rbx,%rbx
je     117e <read_configuration+0x4e>
cmpb   $0x0,(%rbx)
je     1200 <read_configuration+0xd0>
mov    %rbx,%rdi
xor    %esi,%esi
jmp    11f8 <read_configuration+0xc8>
lea    0xe9a(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <die@plt>
test   %rbx,%rbx
jne    1156 <read_configuration+0x26>
lea    0xea2(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <do_file_load@plt>
test   %eax,%eax
jne    11d6 <read_configuration+0xa6>
lea    0xe93(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <do_file_load@plt>
test   %eax,%eax
jne    11d6 <read_configuration+0xa6>
lea    0xe83(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <do_file_load@plt>
test   %eax,%eax
jne    11d6 <read_configuration+0xa6>
lea    0xe74(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <do_file_load@plt>
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   1030 <getvar@plt>
cltq
test   %eax,%eax
lea    0xe5f(%rip),%rdi
cmovne %rax,%rdi
mov    $0x1,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <do_file_load@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"TFLIBRARY\00"
@.str.1 = [29 x i8] c"Can't read required library.\00"
@.str.2 = [8 x i8] c"~/.tfrc\00"
@.str.3 = [7 x i8] c"~/tfrc\00"
@.str.4 = [8 x i8] c"./.tfrc\00"
@.str.5 = [7 x i8] c"./tfrc\00"
@.str.6 = [9 x i8] c"TINYTALK\00"
@.str.7 = [12 x i8] c"~/.tinytalk\00"
define void @read_configuration(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @getvar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i32, i32, ...)*)(i32 %3, i32 0)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @die to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 0)
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %2
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i8*, i8** %2
%17 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* %16, i32 0)
br label %18
18: ; preds = %15, %11
br label %44
19: ; preds = %8
%20 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 1)
%21 = icmp ne i32 %20, 0
br i1 %21, label %31, label %22
22: ; preds = %19
%23 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 1)
%24 = icmp ne i32 %23, 0
br i1 %24, label %31, label %25
25: ; preds = %22
%26 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 1)
%27 = icmp ne i32 %26, 0
br i1 %27, label %31, label %28
28: ; preds = %25
%29 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 1)
%30 = icmp ne i32 %29, 0
br label %31
31: ; preds = %28, %25, %22, %19
%32 = phi i1 [ true, %25 ], [ true, %22 ], [ true, %19 ], [ %30, %28 ]
%33 = zext i1 %32 to i32
%34 = call i32 (i8*, ...) bitcast (i32 (...)* @getvar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%35 = sext i32 %34 to i64
%36 = inttoptr i64 %35 to i8*
store i8* %36, i8** %2
%37 = icmp ne i8* %36, null
br i1 %37, label %38, label %40
38: ; preds = %31
%39 = load i8*, i8** %2
br label %41
40: ; preds = %31
br label %41
41: ; preds = %40, %38
%42 = phi i8* [ %39, %38 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), %40 ]
%43 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* %42, i32 1)
br label %44
44: ; preds = %41, %18
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"TFLIBRARY\00"
@.str.1 = [29 x i8] c"Can't read required library.\00"
@.str.2 = [8 x i8] c"~/.tfrc\00"
@.str.3 = [7 x i8] c"~/tfrc\00"
@.str.4 = [8 x i8] c"./.tfrc\00"
@.str.5 = [7 x i8] c"./tfrc\00"
@.str.6 = [9 x i8] c"TINYTALK\00"
@.str.7 = [12 x i8] c"~/.tinytalk\00"
define void @read_configuration(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getvar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i32, i32, ...)*)(i32 %2, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @die to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 0)
br label %7
7: ; preds = %5, %1
%8 = icmp eq i8* %0, null
br i1 %8, label %14, label %9
9: ; preds = %7
%10 = load i8, i8* %0
%11 = icmp eq i8 %10, 0
br i1 %11, label %32, label %12
12: ; preds = %9
%13 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* %0, i32 0)
br label %32
14: ; preds = %7
%15 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 1)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 1)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 1)
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 1)
br label %25
25: ; preds = %23, %20, %17, %14
%26 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getvar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i8*
%29 = icmp eq i32 %26, 0
%30 = select i1 %29, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %28
%31 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_file_load to i32 (i8*, i32, ...)*)(i8* %30, i32 1)
br label %32
32: ; preds = %9, %12, %25
ret void
}