#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 EXIT_SUCCESS;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ output_16_sin(int /*<<< orphan*/ *, int);
int main() {
  int i;
  FILE *out = fopen("sin.inc", "wb");
  fprintf(out, "sin:");
  for (i = 0; i < 64; i += 16) {
    output_16_sin(out, i);
  }
  fprintf(out, "\ncos:");
  for (; i < 320; i += 16) {
    output_16_sin(out, i);
  }
  fclose(out);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeab(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x40,-0x8(%rbp)
jge    11a1 <main+0x61>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <output_16_sin@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <main+0x3d>
mov    -0x10(%rbp),%rdi
lea    0xe64(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x140,-0x8(%rbp)
jge    11d8 <main+0x98>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <output_16_sin@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x8(%rbp)
jmp    11b1 <main+0x71>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xead(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x30,%esi
call   1040 <output_16_sin@plt>
lea    0xe68(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x40,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x60,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x90,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0xb0,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0xc0,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0xd0,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0xe0,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0xf0,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x110,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x120,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
mov    $0x130,%esi
call   1040 <output_16_sin@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x2d47(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"sin.inc\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [5 x i8] c"sin:\00"
@.str.3 = [6 x i8] c"\0Acos:\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %7
7: ; preds = %14, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 64
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32*, i32** %3
%12 = load i32, i32* %2
%13 = call i32 @output_16_sin(i32* %11, i32 %12)
br label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 16
store i32 %16, i32* %2
br label %7
17: ; preds = %7
%18 = load i32*, i32** %3
%19 = call i32 @fprintf(i32* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %27, %17
%21 = load i32, i32* %2
%22 = icmp slt i32 %21, 320
br i1 %22, label %23, label %30
23: ; preds = %20
%24 = load i32*, i32** %3
%25 = load i32, i32* %2
%26 = call i32 @output_16_sin(i32* %24, i32 %25)
br label %27
27: ; preds = %23
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 16
store i32 %29, i32* %2
br label %20
30: ; preds = %20
%31 = load i32*, i32** %3
%32 = call i32 @fclose(i32* %31)
%33 = load i32, i32* @EXIT_SUCCESS
ret i32 %33
}

LLVM IR (-O2):
@.str = [8 x i8] c"sin.inc\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [5 x i8] c"sin:\00"
@.str.3 = [6 x i8] c"\0Acos:\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 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 i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i64 1, i32* %1)
%3 = tail call i32 @output_16_sin(i32* %1, i32 0)
%4 = tail call i32 @output_16_sin(i32* %1, i32 16)
%5 = tail call i32 @output_16_sin(i32* %1, i32 32)
%6 = tail call i32 @output_16_sin(i32* %1, i32 48)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 5, i64 1, i32* %1)
%8 = tail call i32 @output_16_sin(i32* %1, i32 64)
%9 = tail call i32 @output_16_sin(i32* %1, i32 80)
%10 = tail call i32 @output_16_sin(i32* %1, i32 96)
%11 = tail call i32 @output_16_sin(i32* %1, i32 112)
%12 = tail call i32 @output_16_sin(i32* %1, i32 128)
%13 = tail call i32 @output_16_sin(i32* %1, i32 144)
%14 = tail call i32 @output_16_sin(i32* %1, i32 160)
%15 = tail call i32 @output_16_sin(i32* %1, i32 176)
%16 = tail call i32 @output_16_sin(i32* %1, i32 192)
%17 = tail call i32 @output_16_sin(i32* %1, i32 208)
%18 = tail call i32 @output_16_sin(i32* %1, i32 224)
%19 = tail call i32 @output_16_sin(i32* %1, i32 240)
%20 = tail call i32 @output_16_sin(i32* %1, i32 256)
%21 = tail call i32 @output_16_sin(i32* %1, i32 272)
%22 = tail call i32 @output_16_sin(i32* %1, i32 288)
%23 = tail call i32 @output_16_sin(i32* %1, i32 304)
%24 = tail call i32 @fclose(i32* %1)
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}