#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 *, char *, char *, char *, char *);
void cgiTableFieldWithMsg(char *text, char *msg) {
  printf("<TD %s%s%s> %s </TD>\n", (msg ? " TITLE=\"" : ""), (msg ? msg : ""),
         (msg ? "\"" : ""), text);
}


x86 assembly (clang, -O0):
<cgiTableFieldWithMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xeea(%rip),%rax
lea    0xee4(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1156 <cgiTableFieldWithMsg+0x46>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1166 <cgiTableFieldWithMsg+0x56>
lea    0xeb8(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1166 <cgiTableFieldWithMsg+0x56>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rdi
lea    0xe9c(%rip),%rcx
lea    0xe9d(%rip),%rax
cmp    $0x0,%rdi
cmovne %rax,%rcx
mov    -0x8(%rbp),%r8
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiTableFieldWithMsg>:
mov    %rsi,%rdx
mov    %rdi,%r8
test   %rsi,%rsi
lea    0xef5(%rip),%rax
lea    0xeef(%rip),%rsi
cmove  %rax,%rsi
cmove  %rax,%rdx
lea    0xee7(%rip),%rcx
cmove  %rax,%rcx
lea    0xebf(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"<TD %s%s%s> %s </TD>\0A\00"
@.str.1 = [9 x i8] c" TITLE=\22\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [2 x i8] c"\22\00"
define void @cgiTableFieldWithMsg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i8*, i8** %4
br label %14
13: ; preds = %2
br label %14
14: ; preds = %13, %11
%15 = phi i8* [ %12, %11 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %13 ]
%16 = load i8*, i8** %4
%17 = icmp ne i8* %16, null
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%20 = load i8*, i8** %3
%21 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %15, i8* %19, i8* %20)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"<TD %s%s%s> %s </TD>\0A\00"
@.str.1 = [9 x i8] c" TITLE=\22\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [2 x i8] c"\22\00"
define void @cgiTableFieldWithMsg(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
%5 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %1
%6 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %0)
ret void
}