#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*/ printf(char *, ...);
void html_table_heading(char *title, char *sub_title, char *sub_sub_title) {
  if (title && *title)
    printf("<h1>%s</h1>\n", title);
  if (sub_title && *sub_title)
    printf("<h2>%s</h2>\n", sub_title);
  if (sub_sub_title && *sub_sub_title)
    printf("<h3>%s</h3>\n", sub_sub_title);
  printf("<table border>\n");
}


x86 assembly (clang, -O0):
<html_table_heading>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1151 <html_table_heading+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <html_table_heading+0x41>
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     117e <html_table_heading+0x6e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117e <html_table_heading+0x6e>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
je     11ab <html_table_heading+0x9b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11ab <html_table_heading+0x9b>
mov    -0x18(%rbp),%rsi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_table_heading>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
test   %rdi,%rdi
je     1145 <html_table_heading+0x25>
mov    %rdi,%rsi
cmpb   $0x0,(%rdi)
je     1145 <html_table_heading+0x25>
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %rbx,%rbx
je     1160 <html_table_heading+0x40>
cmpb   $0x0,(%rbx)
je     1160 <html_table_heading+0x40>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14,%r14
je     117c <html_table_heading+0x5c>
cmpb   $0x0,(%r14)
je     117c <html_table_heading+0x5c>
lea    0xea8(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"<h1>%s</h1>\0A\00"
@.str.1 = [13 x i8] c"<h2>%s</h2>\0A\00"
@.str.2 = [13 x i8] c"<h3>%s</h3>\0A\00"
@.str.3 = [16 x i8] c"<table border>\0A\00"
define void @html_table_heading(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %17
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %14, %9, %3
%18 = load i8*, i8** %5
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i8*, i8** %5
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = load i8*, i8** %5
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %25, %20, %17
%29 = load i8*, i8** %6
%30 = icmp ne i8* %29, null
br i1 %30, label %31, label %39
31: ; preds = %28
%32 = load i8*, i8** %6
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %31
%37 = load i8*, i8** %6
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %37)
br label %39
39: ; preds = %36, %31, %28
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<h1>%s</h1>\0A\00"
@.str.1 = [13 x i8] c"<h2>%s</h2>\0A\00"
@.str.2 = [13 x i8] c"<h3>%s</h3>\0A\00"
@str = [15 x i8] c"<table border>\00"
define void @html_table_heading(i8* %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %8, %5, %3
%11 = icmp eq i8* %1, null
br i1 %11, label %17, label %12
12: ; preds = %10
%13 = load i8, i8* %1
%14 = icmp eq i8 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %17
17: ; preds = %15, %12, %10
%18 = icmp eq i8* %2, null
br i1 %18, label %24, label %19
19: ; preds = %17
%20 = load i8, i8* %2
%21 = icmp eq i8 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %24
24: ; preds = %22, %19, %17
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}