#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 float GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_POINTS;
int /*<<< orphan*/ cos(float);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glPointSize(int);
int /*<<< orphan*/ glVertex3f(int /*<<< orphan*/, int /*<<< orphan*/, float);
int /*<<< orphan*/ sin(float);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(1.0, 1.0, 1.0);
  glPointSize(4);
  GLfloat angulo;
  float i;
  glBegin(GL_POINTS);
  for (i = 0; i < 360; i += 7.2) {
    angulo = (GLfloat)i * 3.14159f / 180.0f;
    glVertex3f(cos(angulo), sin(angulo), 0.0f);
  }
  glEnd();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe52(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x4,%edi
call   1090 <glPointSize@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
call   10b0 <glBegin@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe2f(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1250 <display+0xc0>
movss  0xe25(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xe14(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   10a0 <cos@plt>
mov    %eax,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
call   1060 <sin@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
xorps  %xmm0,%xmm0
call   1040 <glVertex3f@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdca(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11d9 <display+0x49>
mov    $0x0,%al
call   1050 <glEnd@plt>
mov    $0x0,%al
call   1080 <glFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe55(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
mov    $0x4,%edi
call   1090 <glPointSize@plt>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
call   10b0 <glBegin@plt>
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  %xmm0,0xc(%rsp)
mulss  0xe22(%rip),%xmm0
divss  0xe1e(%rip),%xmm0
movss  %xmm0,0x8(%rsp)
call   10a0 <cos@plt>
mov    %eax,%ebx
movss  0x8(%rsp),%xmm0
call   1060 <sin@plt>
xorps  %xmm0,%xmm0
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <glVertex3f@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xddc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xde0(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     11e0 <display+0x50>
xor    %eax,%eax
call   1050 <glEnd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1080 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POINTS = global i32 0
define void @display() {
%1 = alloca float
%2 = alloca float
%3 = load i32, i32* @GL_COLOR_BUFFER_BIT
%4 = call i32 @glClear(i32 %3)
%5 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = call i32 @glPointSize(i32 4)
%7 = load i32, i32* @GL_POINTS
%8 = call i32 @glBegin(i32 %7)
store float 0.000000e+00, float* %2
br label %9
9: ; preds = %21, %0
%10 = load float, float* %2
%11 = fcmp olt float %10, 3.600000e+02
br i1 %11, label %12, label %26
12: ; preds = %9
%13 = load float, float* %2
%14 = fmul float %13, 0x400921FA00000000
%15 = fdiv float %14, 1.800000e+02
store float %15, float* %1
%16 = load float, float* %1
%17 = call i32 @cos(float %16)
%18 = load float, float* %1
%19 = call i32 @sin(float %18)
%20 = call i32 @glVertex3f(i32 %17, i32 %19, float 0.000000e+00)
br label %21
21: ; preds = %12
%22 = load float, float* %2
%23 = fpext float %22 to double
%24 = fadd double %23, 7.200000e+00
%25 = fptrunc double %24 to float
store float %25, float* %2
br label %9
26: ; preds = %9
%27 = call i32 (...) @glEnd()
%28 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POINTS = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%4 = tail call i32 @glPointSize(i32 4)
%5 = load i32, i32* @GL_POINTS
%6 = tail call i32 @glBegin(i32 %5)
br label %7
7: ; preds = %0, %7
%8 = phi float [ 0.000000e+00, %0 ], [ %16, %7 ]
%9 = fmul float %8, 0x400921FA00000000
%10 = fdiv float %9, 1.800000e+02
%11 = tail call i32 @cos(float %10)
%12 = tail call i32 @sin(float %10)
%13 = tail call i32 @glVertex3f(i32 %11, i32 %12, float 0.000000e+00)
%14 = fpext float %8 to double
%15 = fadd double %14, 7.200000e+00
%16 = fptrunc double %15 to float
%17 = fcmp olt float %16, 3.600000e+02
br i1 %17, label %7, label %18
18: ; preds = %7
%19 = tail call i32 (...) @glEnd()
%20 = tail call i32 (...) @glFlush()
ret void
}