#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 current_vs_historical_output_body(FILE *output_file,
                                       char *additional_javascript) {
  fprintf(output_file, "<body");
  if (additional_javascript && additional_javascript) {
    fprintf(output_file, " onload=\"%s\"", additional_javascript);
  }
  fprintf(output_file,
          " leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\n");
}


x86 assembly (clang, -O0):
<current_vs_historical_output_body>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
cmpq   $0x0,-0x10(%rbp)
je     115e <current_vs_historical_output_body+0x4e>
cmpq   $0x0,-0x10(%rbp)
je     115e <current_vs_historical_output_body+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<current_vs_historical_output_body>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
test   %r14,%r14
je     115c <current_vs_historical_output_body+0x3c>
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x38,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"<body\00"
@.str.1 = [13 x i8] c" onload=\22%s\22\00"
@.str.2 = [57 x i8] c" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\0A\00"
define void @current_vs_historical_output_body(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i8*, i8** %4
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %12, %9, %2
%17 = load i32*, i32** %3
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"<body\00"
@.str.1 = [13 x i8] c" onload=\22%s\22\00"
@.str.2 = [57 x i8] c" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\0A\00"
define void @current_vs_historical_output_body(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5, i64 1, i32* %0)
%4 = icmp eq i8* %1, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i64 56, i64 1, i32* %0)
ret void
}