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

/* Variables and functions */
int M_PI;
float cos(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, float, float);
float sin(int);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int i;
  float x, y;
  for (i = 0; i < 15; i++) {
    x = cos(M_PI * 2 / 15 * i) * (33.f / 2) + 200;
    y = sin(M_PI * 2 / 15 * i) * (33.f / 2) * -1 + 150;
    fprintf(stdout, "%i %.3f %.3f\n", 3600 * i / 15, x, y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jge    1210 <main+0xe0>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
imul   -0x14(%rbp),%edi
call   1050 <cos@plt>
movss  0xe86(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe7e(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    0x2e4e(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
imul   -0x14(%rbp),%edi
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movss  0xe47(%rip),%xmm0
mulss  %xmm0,%xmm1
movss  0xe37(%rip),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    0x2dff(%rip),%rax
mov    (%rax),%edi
imul   $0xe10,-0x14(%rbp),%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
movss  -0x18(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
lea    0xe0f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
mov    0x2ea3(%rip),%r15
mov    0x2e8c(%rip),%r12
lea    0xeb9(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15),%eax
mov    %eax,%ecx
add    %eax,%ecx
movslq %ecx,%rcx
imul   $0xffffffff88888889,%rcx,%rcx
shr    $0x20,%rcx
lea    (%rcx,%rax,2),%edi
mov    %edi,%eax
shr    $0x1f,%eax
sar    $0x3,%edi
add    %eax,%edi
imul   %ebp,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movss  0xe6b(%rip),%xmm0
mulss  %xmm0,%xmm1
addss  0xe63(%rip),%xmm1
movss  %xmm1,0xc(%rsp)
mov    (%r15),%eax
mov    %eax,%ecx
add    %eax,%ecx
movslq %ecx,%rcx
imul   $0xffffffff88888889,%rcx,%rcx
shr    $0x20,%rcx
lea    (%rcx,%rax,2),%edi
mov    %edi,%eax
shr    $0x1f,%eax
sar    $0x3,%edi
add    %eax,%edi
imul   %ebp,%edi
call   1040 <sin@plt>
mulss  0xe27(%rip),%xmm0
movss  0xe27(%rip),%xmm1
subss  %xmm0,%xmm1
mov    (%r12),%edi
mov    %r14,%rsi
mov    %ebx,%edx
movss  0xc(%rsp),%xmm0
call   1030 <fprintf@plt>
add    $0x1,%ebp
add    $0xf0,%ebx
cmp    $0xf,%ebp
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global i32 0
@stdout = global i32 0
@.str = [14 x i8] c"%i %.3f %.3f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %9
9: ; preds = %35, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 15
br i1 %11, label %12, label %38
12: ; preds = %9
%13 = load i32, i32* @M_PI
%14 = mul nsw i32 %13, 2
%15 = sdiv i32 %14, 15
%16 = load i32, i32* %6
%17 = mul nsw i32 %15, %16
%18 = call float @cos(i32 %17)
%19 = call float @llvm.fmuladd.f32(float %18, float 1.650000e+01, float 2.000000e+02)
store float %19, float* %7
%20 = load i32, i32* @M_PI
%21 = mul nsw i32 %20, 2
%22 = sdiv i32 %21, 15
%23 = load i32, i32* %6
%24 = mul nsw i32 %22, %23
%25 = call float @sin(i32 %24)
%26 = fmul float %25, 1.650000e+01
%27 = call float @llvm.fmuladd.f32(float %26, float -1.000000e+00, float 1.500000e+02)
store float %27, float* %8
%28 = load i32, i32* @stdout
%29 = load i32, i32* %6
%30 = mul nsw i32 3600, %29
%31 = sdiv i32 %30, 15
%32 = load float, float* %7
%33 = load float, float* %8
%34 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %31, float %32, float %33)
br label %35
35: ; preds = %12
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %9
38: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@M_PI = global i32 0
@stdout = global i32 0
@.str = [14 x i8] c"%i %.3f %.3f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %21, %3 ]
%5 = load i32, i32* @M_PI
%6 = shl nsw i32 %5, 1
%7 = sdiv i32 %6, 15
%8 = mul nsw i32 %7, %4
%9 = tail call float @cos(i32 %8)
%10 = tail call float @llvm.fmuladd.f32(float %9, float 1.650000e+01, float 2.000000e+02)
%11 = load i32, i32* @M_PI
%12 = shl nsw i32 %11, 1
%13 = sdiv i32 %12, 15
%14 = mul nsw i32 %13, %4
%15 = tail call float @sin(i32 %14)
%16 = fmul float %15, 1.650000e+01
%17 = tail call float @llvm.fmuladd.f32(float %16, float -1.000000e+00, float 1.500000e+02)
%18 = load i32, i32* @stdout
%19 = mul nuw nsw i32 %4, 240
%20 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %19, float %10, float %17)
%21 = add nuw nsw i32 %4, 1
%22 = icmp eq i32 %21, 15
br i1 %22, label %23, label %3
23: ; preds = %3
ret i32 0
}