#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ get_bucket(char *);
int /*<<< orphan*/ load_settings();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int main() {
  char bucket[128];
  if (!load_settings()) {
    fprintf(stderr, "Can't load your settings file.\n");
    exit(1);
  }
  get_bucket(bucket);
  printf("%s\n", bucket);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <load_settings@plt>
cmp    $0x0,%eax
jne    1191 <main+0x41>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    -0x90(%rbp),%rdi
call   1070 <get_bucket@plt>
lea    -0x90(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
xor    %eax,%eax
call   1060 <load_settings@plt>
test   %eax,%eax
je     1188 <main+0x38>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <get_bucket@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
lea    0xe68(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Can't load your settings file.\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
store i32 0, i32* %1
%3 = call i32 (...) @load_settings()
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%11 = call i32 @get_bucket(i8* %10)
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Can't load your settings file.\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @load_settings()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = call i32 @get_bucket(i8* %2)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}