#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 *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
int comment(char *buf, int sze, void *data) {
  FILE *fp = NULL;
  if (data != NULL)
    fp = (FILE *)data;
  else
    fp = stderr;
  fprintf(fp, "Comment:");
  fwrite(buf, sze, 1, fp);
  return 0;
}


x86 assembly (clang, -O0):
<comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1153 <comment+0x33>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1161 <comment+0x41>
mov    0x2e86(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fwrite@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comment>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
test   %rdx,%rdx
jne    112c <comment+0x1c>
mov    0x2eb7(%rip),%rax
mov    (%rax),%rbx
lea    0xecd(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32* null
@.str = [9 x i8] c"Comment:\00"
define i32 @comment(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32* null, i32** %7
%8 = load i8*, i8** %6
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %7
br label %15
13: ; preds = %3
%14 = load i32*, i32** @stderr
store i32* %14, i32** %7
br label %15
15: ; preds = %13, %10
%16 = load i32*, i32** %7
%17 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = load i32*, i32** %7
%21 = call i32 @fwrite(i8* %18, i32 %19, i32 1, i32* %20)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [9 x i8] c"Comment:\00"
define i32 @comment(i8* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i8* %2, null
%5 = bitcast i8* %2 to i32*
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %6, i32* %5
%8 = tail call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 8, i64 1, i32* %7)
%9 = tail call i32 @fwrite(i8* %0, i32 %1, i32 1, i32* %7)
ret i32 0
}