#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 *);
int /*<<< orphan*/ html_txt(char *);
int /*<<< orphan*/ strcmp(char *, char *);
void html_option(char *value, char *text, char *selected_value) {
  html("<option value='");
  html_attr(value);
  html("'");
  if (selected_value && !strcmp(selected_value, value))
    html(" selected='selected'");
  html(">");
  html_txt(text);
  html("</option>\n");
}


x86 assembly (clang, -O0):
<html_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xea5(%rip),%rdi
call   1030 <html@plt>
mov    -0x8(%rbp),%rdi
call   1050 <html_attr@plt>
lea    0xe9e(%rip),%rdi
call   1030 <html@plt>
cmpq   $0x0,-0x18(%rbp)
je     11a2 <html_option+0x62>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11a2 <html_option+0x62>
lea    0xe73(%rip),%rdi
call   1030 <html@plt>
lea    0xe7c(%rip),%rdi
call   1030 <html@plt>
mov    -0x10(%rbp),%rdi
call   1060 <html_txt@plt>
lea    0xe69(%rip),%rdi
call   1030 <html@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_option>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeab(%rip),%rdi
call   1030 <html@plt>
mov    %rbx,%rdi
call   1050 <html_attr@plt>
lea    0xea5(%rip),%rdi
call   1030 <html@plt>
test   %r15,%r15
je     118e <html_option+0x4e>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    118e <html_option+0x4e>
lea    0xe87(%rip),%rdi
call   1030 <html@plt>
lea    0xe90(%rip),%rdi
call   1030 <html@plt>
mov    %r14,%rdi
call   1060 <html_txt@plt>
lea    0xe7e(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <html@plt>

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

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