#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_hashtable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_chat_printf_date_tags(int /*<<< orphan*/ *,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/ *, char *,
                                             char const *, ...);
void command_buffer_display_localvar(void *data, struct t_hashtable *hashtable,
                                     const void *key, const void *value) {
  (void)data;
  (void)hashtable;
  if (key) {
    if (value) {
      gui_chat_printf_date_tags(NULL, 0, NULL, "  %s: \"%s\"",
                                (const char *)key, (const char *)value);
    } else {
      gui_chat_printf_date_tags(NULL, 0, NULL, "  %s: (null)",
                                (const char *)key);
    }
  }
}


x86 assembly (clang, -O0):
<command_buffer_display_localvar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1182 <command_buffer_display_localvar+0x72>
cmpq   $0x0,-0x20(%rbp)
je     1162 <command_buffer_display_localvar+0x52>
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
xor    %eax,%eax
mov    %eax,%edx
xor    %esi,%esi
lea    0xead(%rip),%rcx
mov    %rdx,%rdi
mov    $0x0,%al
call   1030 <gui_chat_printf_date_tags@plt>
jmp    117d <command_buffer_display_localvar+0x6d>
mov    -0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%edx
xor    %esi,%esi
lea    0xe98(%rip),%rcx
mov    %rdx,%rdi
mov    $0x0,%al
call   1030 <gui_chat_printf_date_tags@plt>
jmp    1182 <command_buffer_display_localvar+0x72>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_buffer_display_localvar>:
test   %rdx,%rdx
je     1134 <command_buffer_display_localvar+0x24>
mov    %rcx,%r9
mov    %rdx,%r8
test   %rcx,%rcx
je     1135 <command_buffer_display_localvar+0x25>
lea    0xed9(%rip),%rcx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <gui_chat_printf_date_tags@plt>
ret
lea    0xecf(%rip),%rcx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <gui_chat_printf_date_tags@plt>

LLVM IR (-O0):
%struct.t_hashtable = type { i32 }
@.str = [11 x i8] c" %s: \22%s\22\00"
@.str.1 = [13 x i8] c" %s: (null)\00"
define void @command_buffer_display_localvar(i8* %0, %struct.t_hashtable* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_hashtable*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store %struct.t_hashtable* %1, %struct.t_hashtable** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load %struct.t_hashtable*, %struct.t_hashtable** %6
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %24
13: ; preds = %4
%14 = load i8*, i8** %8
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i8*, i8** %7
%18 = load i8*, i8** %8
%19 = call i32 (i32*, i32, i32*, i8*, i8*, ...) @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18)
br label %23
20: ; preds = %13
%21 = load i8*, i8** %7
%22 = call i32 (i32*, i32, i32*, i8*, i8*, ...) @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %20, %16
br label %24
24: ; preds = %23, %4
ret void
}

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
@.str = [11 x i8] c" %s: \22%s\22\00"
@.str.1 = [13 x i8] c" %s: (null)\00"
define void @command_buffer_display_localvar(i8* nocapture readnone %0, %struct.t_hashtable* nocapture readnone %1, i8* %2, i8* %3) {
%5 = icmp eq i8* %2, null
br i1 %5, label %12, label %6
6: ; preds = %4
%7 = icmp eq i8* %3, null
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 (i32*, i32, i32*, i8*, i8*, ...) @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
br label %12
10: ; preds = %6
%11 = tail call i32 (i32*, i32, i32*, i8*, i8*, ...) @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %12
12: ; preds = %8, %10, %4
ret void
}