#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*/ CmdFontFamily(int);
int /*<<< orphan*/ ConvertString(char *);
int existsDefinition(char *);
scalar_t__ strstr(char const *, char *);
void putHtmlRTF(const char *style) {
  int n;
  if (style) {
    if (strstr(style, "rm"))
      CmdFontFamily(1);
    else if (strstr(style, "tt"))
      CmdFontFamily(9);
    else if (strstr(style, "sf"))
      CmdFontFamily(5);
  } else
    CmdFontFamily(9);
  n = existsDefinition("UrlFont");
  if (n != -1)
    ConvertString("\\UrlFont");
}


x86 assembly (clang, -O0):
<putHtmlRTF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11dc <putHtmlRTF+0x9c>
mov    -0x8(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
je     1180 <putHtmlRTF+0x40>
mov    $0x1,%edi
call   1050 <CmdFontFamily@plt>
jmp    11d7 <putHtmlRTF+0x97>
mov    -0x8(%rbp),%rdi
lea    0xe78(%rip),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
je     11a9 <putHtmlRTF+0x69>
mov    $0x9,%edi
call   1050 <CmdFontFamily@plt>
jmp    11d2 <putHtmlRTF+0x92>
mov    -0x8(%rbp),%rdi
lea    0xe52(%rip),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
je     11cd <putHtmlRTF+0x8d>
mov    $0x5,%edi
call   1050 <CmdFontFamily@plt>
jmp    11d2 <putHtmlRTF+0x92>
jmp    11d7 <putHtmlRTF+0x97>
jmp    11e6 <putHtmlRTF+0xa6>
mov    $0x9,%edi
call   1050 <CmdFontFamily@plt>
lea    0xe1d(%rip),%rdi
call   1030 <existsDefinition@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
je     120b <putHtmlRTF+0xcb>
lea    0xe03(%rip),%rdi
call   1040 <ConvertString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putHtmlRTF>:
push   %rbx
mov    %rdi,%rbx
mov    $0x9,%edi
test   %rbx,%rbx
je     1199 <putHtmlRTF+0x59>
lea    0xeab(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strstr@plt>
mov    $0x1,%edi
test   %rax,%rax
jne    1199 <putHtmlRTF+0x59>
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strstr@plt>
mov    $0x9,%edi
test   %rax,%rax
jne    1199 <putHtmlRTF+0x59>
lea    0xe7f(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strstr@plt>
mov    $0x5,%edi
test   %rax,%rax
je     119e <putHtmlRTF+0x5e>
call   1050 <CmdFontFamily@plt>
lea    0xe65(%rip),%rdi
call   1030 <existsDefinition@plt>
cmp    $0xffffffff,%eax
je     11bc <putHtmlRTF+0x7c>
lea    0xe53(%rip),%rdi
pop    %rbx
jmp    1040 <ConvertString@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rm\00"
@.str.1 = [3 x i8] c"tt\00"
@.str.2 = [3 x i8] c"sf\00"
@.str.3 = [8 x i8] c"UrlFont\00"
@.str.4 = [9 x i8] c"\\UrlFont\00"
define void @putHtmlRTF(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %27
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strstr(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 @CmdFontFamily(i32 1)
br label %26
12: ; preds = %6
%13 = load i8*, i8** %2
%14 = call i64 @strstr(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @CmdFontFamily(i32 9)
br label %25
18: ; preds = %12
%19 = load i8*, i8** %2
%20 = call i64 @strstr(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @CmdFontFamily(i32 5)
br label %24
24: ; preds = %22, %18
br label %25
25: ; preds = %24, %16
br label %26
26: ; preds = %25, %10
br label %29
27: ; preds = %1
%28 = call i32 @CmdFontFamily(i32 9)
br label %29
29: ; preds = %27, %26
%30 = call i32 @existsDefinition(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = icmp ne i32 %31, -1
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @ConvertString(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %35
35: ; preds = %33, %29
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"rm\00"
@.str.1 = [3 x i8] c"tt\00"
@.str.2 = [3 x i8] c"sf\00"
@.str.3 = [8 x i8] c"UrlFont\00"
@.str.4 = [9 x i8] c"\\UrlFont\00"
define void @putHtmlRTF(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %1, %9, %6, %3
%13 = phi i32 [ 1, %3 ], [ 9, %6 ], [ 5, %9 ], [ 9, %1 ]
%14 = tail call i32 @CmdFontFamily(i32 %13)
br label %15
15: ; preds = %12, %9
%16 = tail call i32 @existsDefinition(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i32 %16, -1
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @ConvertString(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
ret void
}