#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void om_html_print_bar(FILE *fp, int l, char *leftclass, char *rightclass) {
  fprintf(fp, "<table cellpadding=\"0\" cellspacing=\"0\" width=\"400\" "
              "border=\"0\">\n");
  fprintf(fp, "<tr><td align=\"center\" class=\"%s\" width=\"%d%%\">%s</td>\n",
          leftclass, l, l ? "&nbsp;" : "");
  fprintf(fp, "<td align=\"center\" class=\"%s\" width=\"%d%%\">%s</td></tr>\n",
          rightclass, 100 - l, (l != 100) ? "&nbsp;" : "");
  fprintf(fp, "</table>\n");
}


x86 assembly (clang, -O0):
<om_html_print_bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%esi
lea    0xef1(%rip),%r8
lea    0xf23(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x64,%ecx
sub    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%esi
lea    0xebb(%rip),%r8
lea    0xeed(%rip),%rax
cmp    $0x64,%esi
cmovne %rax,%r8
lea    0xee6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf0d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_html_print_bar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%r12
lea    0xec3(%rip),%rdi
mov    $0x3f,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1040 <fwrite@plt>
test   %ebp,%ebp
lea    0xee7(%rip),%r13
lea    0xf19(%rip),%rbx
mov    %rbx,%r8
cmove  %r13,%r8
lea    0xed3(%rip),%rsi
mov    %r12,%rdi
mov    %r15,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
sub    $0x64,%ebp
cmove  %r13,%rbx
neg    %ebp
lea    0xef3(%rip),%rsi
mov    %r12,%rdi
mov    %r14,%rdx
mov    %ebp,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xf13(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %r12,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"<table cellpadding=\220\22 cellspacing=\220\22 width=\22400\22 border=\220\22>\0A\00"
@.str.1 = [56 x i8] c"<tr><td align=\22center\22 class=\22%s\22 width=\22%d%%\22>%s</td>\0A\00"
@.str.2 = [7 x i8] c"&nbsp;\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [57 x i8] c"<td align=\22center\22 class=\22%s\22 width=\22%d%%\22>%s</td></tr>\0A\00"
@.str.5 = [10 x i8] c"</table>\0A\00"
define void @om_html_print_bar(i32* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%11 = load i32*, i32** %5
%12 = load i8*, i8** %7
%13 = load i32, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %12, i32 %13, i8* %17)
%19 = load i32*, i32** %5
%20 = load i8*, i8** %8
%21 = load i32, i32* %6
%22 = sub nsw i32 100, %21
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 100
%25 = zext i1 %24 to i64
%26 = select i1 %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i8* %20, i32 %22, i8* %26)
%28 = load i32*, i32** %5
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"<table cellpadding=\220\22 cellspacing=\220\22 width=\22400\22 border=\220\22>\0A\00"
@.str.1 = [56 x i8] c"<tr><td align=\22center\22 class=\22%s\22 width=\22%d%%\22>%s</td>\0A\00"
@.str.2 = [7 x i8] c"&nbsp;\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [57 x i8] c"<td align=\22center\22 class=\22%s\22 width=\22%d%%\22>%s</td></tr>\0A\00"
@.str.5 = [10 x i8] c"</table>\0A\00"
define void @om_html_print_bar(i32* nocapture %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i64 63, i64 1, i32* %0)
%6 = icmp eq i32 %1, 0
%7 = select i1 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %1, i8* %7)
%9 = sub nsw i32 100, %1
%10 = icmp eq i32 %1, 100
%11 = select i1 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%12 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i8* %3, i32 %9, i8* %11)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i64 9, i64 1, i32* %0)
ret void
}