#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 /*<<< orphan*/ GLUT_NORMAL;
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_POLYGON;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glVertex2f(double, double);
int /*<<< orphan*/ glutUseLayer(int /*<<< orphan*/);
void render_normal(void) {
  glutUseLayer(GLUT_NORMAL);
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(0.0, 0.0, 1.0);
  glBegin(GL_POLYGON);
  glVertex2f(.2, .28);
  glVertex2f(.5, .58);
  glVertex2f(.2, .58);
  glEnd();
  glFlush();
}


x86 assembly (clang, -O0):
<render_normal>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1090 <glutUseLayer@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xorps  %xmm1,%xmm1
movsd  0xe85(%rip),%xmm2
movaps %xmm1,%xmm0
call   1050 <glColor3f@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xe47(%rip),%xmm0
movsd  0xe57(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe42(%rip),%xmm0
movsd  0xe32(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe1d(%rip),%xmm0
movsd  0xe1d(%rip),%xmm1
call   1070 <glVertex2f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
mov    $0x0,%al
call   1060 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_normal>:
push   %rax
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1090 <glutUseLayer@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe6b(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1050 <glColor3f@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xe52(%rip),%xmm0
movsd  0xe52(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe4d(%rip),%xmm0
movsd  0xe4d(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe28(%rip),%xmm0
movsd  0xe38(%rip),%xmm1
call   1070 <glVertex2f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glFlush@plt>

LLVM IR (-O0):
@GLUT_NORMAL = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
define void @render_normal() {
%1 = load i32, i32* @GLUT_NORMAL
%2 = call i32 @glutUseLayer(i32 %1)
%3 = load i32, i32* @GL_COLOR_BUFFER_BIT
%4 = call i32 @glClear(i32 %3)
%5 = call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%6 = load i32, i32* @GL_POLYGON
%7 = call i32 @glBegin(i32 %6)
%8 = call i32 @glVertex2f(double 2.000000e-01, double 2.800000e-01)
%9 = call i32 @glVertex2f(double 5.000000e-01, double 5.800000e-01)
%10 = call i32 @glVertex2f(double 2.000000e-01, double 5.800000e-01)
%11 = call i32 (...) @glEnd()
%12 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GLUT_NORMAL = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
define void @render_normal() {
%1 = load i32, i32* @GLUT_NORMAL
%2 = tail call i32 @glutUseLayer(i32 %1)
%3 = load i32, i32* @GL_COLOR_BUFFER_BIT
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%6 = load i32, i32* @GL_POLYGON
%7 = tail call i32 @glBegin(i32 %6)
%8 = tail call i32 @glVertex2f(double 2.000000e-01, double 2.800000e-01)
%9 = tail call i32 @glVertex2f(double 5.000000e-01, double 5.800000e-01)
%10 = tail call i32 @glVertex2f(double 2.000000e-01, double 5.800000e-01)
%11 = tail call i32 (...) @glEnd()
%12 = tail call i32 (...) @glFlush()
ret void
}