#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*/ GL_TRIANGLES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glVertex2f(double, double);
void redRobot() {
  glColor3f(1.0, 0.0, 0.0);
  glScalef(0.0625, 0.0833, 0.0);
  glBegin(GL_TRIANGLES);
  glVertex2f(0.0, 1.0);
  glVertex2f(-1.0, -1.0);
  glVertex2f(1.0, -1.0);
  glEnd();
}


x86 assembly (clang, -O0):
<redRobot>:
push   %rbp
mov    %rsp,%rbp
movsd  0xea4(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1040 <glColor3f@plt>
movsd  0xea1(%rip),%xmm0
movsd  0xea1(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1050 <glScalef@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
xorps  %xmm0,%xmm0
movsd  0xe68(%rip),%xmm1
call   1060 <glVertex2f@plt>
movsd  0xe63(%rip),%xmm1
movaps %xmm1,%xmm0
call   1060 <glVertex2f@plt>
movsd  0xe4b(%rip),%xmm0
movsd  0xe4b(%rip),%xmm1
call   1060 <glVertex2f@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<redRobot>:
push   %rax
movsd  0xea7(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1040 <glColor3f@plt>
movsd  0xe9c(%rip),%xmm0
movsd  0xe9c(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1050 <glScalef@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
xorps  %xmm0,%xmm0
movsd  0xe6b(%rip),%xmm1
call   1060 <glVertex2f@plt>
movsd  0xe76(%rip),%xmm0
movaps %xmm0,%xmm1
call   1060 <glVertex2f@plt>
movsd  0xe4e(%rip),%xmm0
movsd  0xe5e(%rip),%xmm1
call   1060 <glVertex2f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_TRIANGLES = global i32 0
define void @redRobot() {
%1 = call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = call i32 @glScalef(double 6.250000e-02, double 0x3FB5532617C1BDA5, double 0.000000e+00)
%3 = load i32, i32* @GL_TRIANGLES
%4 = call i32 @glBegin(i32 %3)
%5 = call i32 @glVertex2f(double 0.000000e+00, double 1.000000e+00)
%6 = call i32 @glVertex2f(double -1.000000e+00, double -1.000000e+00)
%7 = call i32 @glVertex2f(double 1.000000e+00, double -1.000000e+00)
%8 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_TRIANGLES = global i32 0
define void @redRobot() {
%1 = tail call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = tail call i32 @glScalef(double 6.250000e-02, double 0x3FB5532617C1BDA5, double 0.000000e+00)
%3 = load i32, i32* @GL_TRIANGLES
%4 = tail call i32 @glBegin(i32 %3)
%5 = tail call i32 @glVertex2f(double 0.000000e+00, double 1.000000e+00)
%6 = tail call i32 @glVertex2f(double -1.000000e+00, double -1.000000e+00)
%7 = tail call i32 @glVertex2f(double 1.000000e+00, double -1.000000e+00)
%8 = tail call i32 (...) @glEnd()
ret void
}