#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ cgiMakeCheckBox2Bool(char *, int, int, char *, char *);
int /*<<< orphan*/ safef(char *, int, char *, char *);
void cgiMakeCheckBoxUtil(char *name, int checked, char *msg, char *id) {
  char buf[256];
  if (msg)
    safef(buf, sizeof(buf), "TITLE=\"%s\"", msg);
  else
    buf[0] = 0;
  cgiMakeCheckBox2Bool(name, checked, 1, id, buf);
}


x86 assembly (clang, -O0):
<cgiMakeCheckBoxUtil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1166 <cgiMakeCheckBoxUtil+0x46>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xea4(%rip),%rdx
call   1040 <safef@plt>
jmp    116d <cgiMakeCheckBoxUtil+0x4d>
movb   $0x0,-0x120(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rcx
lea    -0x120(%rbp),%r8
mov    $0x1,%edx
call   1030 <cgiMakeCheckBox2Bool@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeCheckBoxUtil>:
push   %rbp
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
test   %rdx,%rdx
je     1151 <cgiMakeCheckBoxUtil+0x31>
mov    %rdx,%rcx
lea    0xebe(%rip),%rdx
mov    %rsp,%rdi
mov    $0x100,%esi
call   1040 <safef@plt>
jmp    1155 <cgiMakeCheckBoxUtil+0x35>
movb   $0x0,(%rsp)
mov    %rsp,%r8
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1030 <cgiMakeCheckBox2Bool@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"TITLE=\22%s\22\00"
define void @cgiMakeCheckBoxUtil(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = icmp eq i8* %2, null
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = call i32 @safef(i8* %6, i32 256, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %11
10: ; preds = %4
store i8 0, i8* %6
br label %11
11: ; preds = %10, %8
%12 = call i32 @cgiMakeCheckBox2Bool(i8* %0, i32 %1, i32 1, i8* %3, i8* %6)
ret void
}