#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*/ version_get_compilation_date();
int /*<<< orphan*/ version_get_compilation_time();
int /*<<< orphan*/ version_get_version_with_git();
int /*<<< orphan*/ weechat_backtrace_printf(char *, ...);
void weechat_backtrace() {
  weechat_backtrace_printf("======= WeeChat backtrace =======");
  weechat_backtrace_printf("(written by WeeChat %s, compiled on %s %s)",
                           version_get_version_with_git(),
                           version_get_compilation_date(),
                           version_get_compilation_time());
  weechat_backtrace_printf("  No backtrace info (no debug info available "
                           "or no backtrace possible on your system).");
  weechat_backtrace_printf("======= End of  backtrace =======");
}


x86 assembly (clang, -O0):
<weechat_backtrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1060 <weechat_backtrace_printf@plt>
mov    $0x0,%al
call   1050 <version_get_version_with_git@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <version_get_compilation_date@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <version_get_compilation_time@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    %eax,%ecx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1060 <weechat_backtrace_printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1060 <weechat_backtrace_printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1060 <weechat_backtrace_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<weechat_backtrace>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1060 <weechat_backtrace_printf@plt>
xor    %eax,%eax
call   1050 <version_get_version_with_git@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <version_get_compilation_date@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <version_get_compilation_time@plt>
lea    0xeb1(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1060 <weechat_backtrace_printf@plt>
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1060 <weechat_backtrace_printf@plt>
lea    0xf11(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <weechat_backtrace_printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"======= WeeChat backtrace =======\00"
@.str.1 = [43 x i8] c"(written by WeeChat %s, compiled on %s %s)\00"
@.str.2 = [87 x i8] c" No backtrace info (no debug info available or no backtrace possible on your system).\00"
@.str.3 = [34 x i8] c"======= End of backtrace =======\00"
define void @weechat_backtrace() {
%1 = call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @version_get_version_with_git()
%3 = call i32 (...) @version_get_compilation_date()
%4 = call i32 (...) @version_get_compilation_time()
%5 = call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
%6 = call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"======= WeeChat backtrace =======\00"
@.str.1 = [43 x i8] c"(written by WeeChat %s, compiled on %s %s)\00"
@.str.2 = [87 x i8] c" No backtrace info (no debug info available or no backtrace possible on your system).\00"
@.str.3 = [34 x i8] c"======= End of backtrace =======\00"
define void @weechat_backtrace() {
%1 = tail call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @version_get_version_with_git()
%3 = tail call i32 (...) @version_get_compilation_date()
%4 = tail call i32 (...) @version_get_compilation_time()
%5 = tail call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
%6 = tail call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @weechat_backtrace_printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
ret void
}