#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*/ emit_text(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ generate(int /*<<< orphan*/ *, char *);
int main() {
  FILE *f = fopen("gu8_to_mono.h", "wb");
  emit_text(f, "#ifndef __gu8_2_mono__\n#define __gu8_2_mono__\n\n\t");
  generate(f, "g_gu8_to_mono_lut");
  emit_text(f, "#endif\n\n");
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1060 <emit_text@plt>
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1050 <generate@plt>
mov    -0x10(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1060 <emit_text@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xeb3(%rip),%rsi
mov    %rax,%rdi
call   1060 <emit_text@plt>
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
call   1050 <generate@plt>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1060 <emit_text@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"gu8_to_mono.h\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [49 x i8] c"#ifndef __gu8_2_mono__\0A#define __gu8_2_mono__\0A\0A\09\00"
@.str.3 = [18 x i8] c"g_gu8_to_mono_lut\00"
@.str.4 = [9 x i8] c"#endif\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @emit_text(i32* %4, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32*, i32** %2
%7 = call i32 @generate(i32* %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32*, i32** %2
%9 = call i32 @emit_text(i32* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%10 = load i32*, i32** %2
%11 = call i32 @fclose(i32* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"gu8_to_mono.h\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [49 x i8] c"#ifndef __gu8_2_mono__\0A#define __gu8_2_mono__\0A\0A\09\00"
@.str.3 = [18 x i8] c"g_gu8_to_mono_lut\00"
@.str.4 = [9 x i8] c"#endif\0A\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @emit_text(i32* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @generate(i32* %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @emit_text(i32* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%5 = tail call i32 @fclose(i32* %1)
ret i32 0
}