#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*/ html(char *);
int /*<<< orphan*/ html_attr(char const *);
void html_link_open(const char *url, const char *title, const char *class) {
  html("<a href='");
  html_attr(url);
  if (title) {
    html("' title='");
    html_attr(title);
  }
  if (class) {
    html("' class='");
    html_attr(class);
  }
  html("'>");
}


x86 assembly (clang, -O0):
<html_link_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <html@plt>
mov    -0x8(%rbp),%rdi
call   1040 <html_attr@plt>
cmpq   $0x0,-0x10(%rbp)
je     1169 <html_link_open+0x49>
lea    0xeaf(%rip),%rdi
call   1030 <html@plt>
mov    -0x10(%rbp),%rdi
call   1040 <html_attr@plt>
cmpq   $0x0,-0x18(%rbp)
je     1189 <html_link_open+0x69>
lea    0xe99(%rip),%rdi
call   1030 <html@plt>
mov    -0x18(%rbp),%rdi
call   1040 <html_attr@plt>
lea    0xe8e(%rip),%rdi
call   1030 <html@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_link_open>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xecb(%rip),%rdi
call   1030 <html@plt>
mov    %rbx,%rdi
call   1040 <html_attr@plt>
test   %r15,%r15
je     115b <html_link_open+0x3b>
lea    0xebc(%rip),%rdi
call   1030 <html@plt>
mov    %r15,%rdi
call   1040 <html_attr@plt>
test   %r14,%r14
je     1174 <html_link_open+0x54>
lea    0xead(%rip),%rdi
call   1030 <html@plt>
mov    %r14,%rdi
call   1040 <html_attr@plt>
lea    0xea3(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <html@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"<a href='\00"
@.str.1 = [10 x i8] c"' title='\00"
@.str.2 = [10 x i8] c"' class='\00"
@.str.3 = [3 x i8] c"'>\00"
define void @html_link_open(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 = call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = call i32 @html_attr(i8* %8)
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%14 = load i8*, i8** %5
%15 = call i32 @html_attr(i8* %14)
br label %16
16: ; preds = %12, %3
%17 = load i8*, i8** %6
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%21 = load i8*, i8** %6
%22 = call i32 @html_attr(i8* %21)
br label %23
23: ; preds = %19, %16
%24 = call i32 @html(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"<a href='\00"
@.str.1 = [10 x i8] c"' title='\00"
@.str.2 = [10 x i8] c"' class='\00"
@.str.3 = [3 x i8] c"'>\00"
define void @html_link_open(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @html_attr(i8* %0)
%6 = icmp eq i8* %1, null
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @html_attr(i8* %1)
br label %10
10: ; preds = %7, %3
%11 = icmp eq i8* %2, null
br i1 %11, label %15, label %12
12: ; preds = %10
%13 = tail call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%14 = tail call i32 @html_attr(i8* %2)
br label %15
15: ; preds = %12, %10
%16 = tail call i32 @html(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
ret void
}