#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 */
struct t_gui_bar {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_bar_default_items(char *);
scalar_t__ gui_bar_new(char *, char *, char *, char *, char *, char *, char *,
                       char *, char *, char *, char *, char *, char *, char *,
                       int /*<<< orphan*/);
struct t_gui_bar *gui_bar_search(char *);
int /*<<< orphan*/ gui_chat_printf_date_tags(int /*<<< orphan*/ *,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/ *, char *,
                                             char *);
void gui_bar_create_default_status() {
  struct t_gui_bar *ptr_bar;
  ptr_bar = gui_bar_search("status");
  if (!ptr_bar) {
    if (gui_bar_new("status", "0", "500", "window", "", "bottom", "horizontal",
                    "vertical", "1", "0", "default", "cyan", "blue", "0",
                    gui_bar_default_items("status"))) {
      gui_chat_printf_date_tags(NULL, 0, NULL, ("Bar \"%s\" created"),
                                "status");
    }
  }
}


x86 assembly (clang, -O0):
<gui_bar_create_default_status>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xea8(%rip),%rdi
call   1050 <gui_bar_search@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    122a <gui_bar_create_default_status+0xea>
lea    0xe8d(%rip),%rdi
call   1040 <gui_bar_default_items@plt>
lea    0xe81(%rip),%rdi
lea    0xe83(%rip),%r10
lea    0xe7a(%rip),%rdx
lea    0xe77(%rip),%rcx
lea    0xe6f(%rip),%r8
lea    0xe70(%rip),%r9
lea    0xe70(%rip),%r13
lea    0xe74(%rip),%r12
lea    0xe76(%rip),%r15
lea    0xe71(%rip),%r14
lea    0xe72(%rip),%rbx
lea    0xe70(%rip),%r11
mov    %r10,%rsi
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %r14,0x20(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r11,0x30(%rsp)
mov    %r10,0x38(%rsp)
mov    %eax,0x40(%rsp)
call   1060 <gui_bar_new@plt>
cmp    $0x0,%rax
je     1225 <gui_bar_create_default_status+0xe5>
xor    %eax,%eax
mov    %eax,%edx
xor    %esi,%esi
lea    0xe2b(%rip),%rcx
lea    0xde3(%rip),%r8
mov    %rdx,%rdi
call   1030 <gui_chat_printf_date_tags@plt>
jmp    122a <gui_bar_create_default_status+0xea>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_bar_create_default_status>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xeb0(%rip),%rdi
call   1050 <gui_bar_search@plt>
test   %rax,%rax
je     1164 <gui_bar_create_default_status+0x24>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xe95(%rip),%rbx
mov    %rbx,%rdi
call   1040 <gui_bar_default_items@plt>
sub    $0x8,%rsp
lea    0xe8b(%rip),%rsi
lea    0xeb7(%rip),%r10
lea    0xeab(%rip),%r11
lea    0xe9c(%rip),%r14
lea    0xe93(%rip),%r15
lea    0xe83(%rip),%r12
lea    0xe71(%rip),%r13
lea    0xe58(%rip),%rdx
lea    0xe55(%rip),%rcx
lea    0xe4d(%rip),%r8
lea    0xe4e(%rip),%r9
mov    %rbx,%rdi
push   %rax
push   %rsi
push   %r10
push   %r11
push   %r14
push   %rsi
push   %r15
push   %r12
push   %r13
call   1060 <gui_bar_new@plt>
add    $0x50,%rsp
test   %rax,%rax
je     115a <gui_bar_create_default_status+0x1a>
lea    0xe52(%rip),%rcx
lea    0xe0a(%rip),%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <gui_chat_printf_date_tags@plt>

LLVM IR (-O0):
%struct.t_gui_bar = type { i32 }
@.str = [7 x i8] c"status\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [4 x i8] c"500\00"
@.str.3 = [7 x i8] c"window\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [7 x i8] c"bottom\00"
@.str.6 = [11 x i8] c"horizontal\00"
@.str.7 = [9 x i8] c"vertical\00"
@.str.8 = [2 x i8] c"1\00"
@.str.9 = [8 x i8] c"default\00"
@.str.10 = [5 x i8] c"cyan\00"
@.str.11 = [5 x i8] c"blue\00"
@.str.12 = [17 x i8] c"Bar \22%s\22 created\00"
define void @gui_bar_create_default_status() {
%1 = alloca %struct.t_gui_bar*
%2 = call %struct.t_gui_bar* @gui_bar_search(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store %struct.t_gui_bar* %2, %struct.t_gui_bar** %1
%3 = load %struct.t_gui_bar*, %struct.t_gui_bar** %1
%4 = icmp ne %struct.t_gui_bar* %3, null
br i1 %4, label %12, label %5
5: ; preds = %0
%6 = call i32 @gui_bar_default_items(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i64 @gui_bar_new(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
br label %12
12: ; preds = %11, %0
ret void
}

LLVM IR (-O2):
%struct.t_gui_bar = type { i32 }
@.str = [7 x i8] c"status\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [4 x i8] c"500\00"
@.str.3 = [7 x i8] c"window\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [7 x i8] c"bottom\00"
@.str.6 = [11 x i8] c"horizontal\00"
@.str.7 = [9 x i8] c"vertical\00"
@.str.8 = [2 x i8] c"1\00"
@.str.9 = [8 x i8] c"default\00"
@.str.10 = [5 x i8] c"cyan\00"
@.str.11 = [5 x i8] c"blue\00"
@.str.12 = [17 x i8] c"Bar \22%s\22 created\00"
define void @gui_bar_create_default_status() {
%1 = tail call %struct.t_gui_bar* @gui_bar_search(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq %struct.t_gui_bar* %1, null
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 @gui_bar_default_items(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = tail call i64 @gui_bar_new(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %3, %7, %0
ret void
}