#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_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ GL_LINE_STRIP;
int /*<<< orphan*/ GL_POINTS;
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);
void display() {
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(0.1, 0.1, 0.1);
  glBegin(GL_POLYGON);
  glVertex2f(0.0, 0.0);
  glVertex2f(0.0, 3.0);
  glVertex2f(4.0, 3.0);
  glVertex2f(5.5, 1.5);
  glVertex2f(4.0, 0.0);
  glEnd();
  glColor3f(0.2, 0.2, 0.2);
  glBegin(GL_POINTS);
  glVertex2f(1.0, 4.0);
  glVertex2f(2.0, 5.0);
  glEnd();
  glColor3f(0.3, 0.3, 0.3);
  glBegin(GL_LINES);
  glVertex2f(2.0, 2.0);
  glVertex2f(3.0, 4.0);
  glVertex2f(8.0, 4.0);
  glVertex2f(7.0, 5.0);
  glEnd();
  glColor3f(0.4, 0.4, 0.4);
  glBegin(GL_LINE_STRIP);
  glVertex2f(1.0, 2.0);
  glVertex2f(2.0, 4.0);
  glVertex2f(6.0, 7.0);
  glEnd();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xeee(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1070 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xe97(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe62(%rip),%xmm0
movsd  0xe82(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe8d(%rip),%xmm0
movsd  0xe8d(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe38(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1070 <glVertex2f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
movsd  0xe59(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xe08(%rip),%xmm0
movsd  0xdf8(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xde3(%rip),%xmm0
movsd  0xdfb(%rip),%xmm1
call   1070 <glVertex2f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
movsd  0xdff(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xda6(%rip),%xmm1
movaps %xmm1,%xmm0
call   1070 <glVertex2f@plt>
movsd  0xdc6(%rip),%xmm0
movsd  0xd96(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xda9(%rip),%xmm0
movsd  0xd81(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xd64(%rip),%xmm0
movsd  0xd84(%rip),%xmm1
call   1070 <glVertex2f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
movsd  0xd68(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xd3f(%rip),%xmm0
movsd  0xd27(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xd1a(%rip),%xmm0
movsd  0xd1a(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xcf5(%rip),%xmm0
movsd  0xcf5(%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):
<display>:
push   %rax
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe89(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glColor3f@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe65(%rip),%xmm1
xorps  %xmm0,%xmm0
call   1070 <glVertex2f@plt>
movsd  0xe5d(%rip),%xmm0
movsd  0xe4d(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe50(%rip),%xmm0
movsd  0xe50(%rip),%xmm1
call   1070 <glVertex2f@plt>
xorps  %xmm1,%xmm1
movsd  0xe30(%rip),%xmm0
call   1070 <glVertex2f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
movsd  0xe34(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glColor3f@plt>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xe1b(%rip),%xmm0
movsd  0xdf3(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xe0e(%rip),%xmm0
movsd  0xe0e(%rip),%xmm1
call   1070 <glVertex2f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
movsd  0xe02(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glColor3f@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xdd1(%rip),%xmm0
movaps %xmm0,%xmm1
call   1070 <glVertex2f@plt>
movsd  0xd91(%rip),%xmm0
movsd  0xd91(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xdc4(%rip),%xmm0
movsd  0xd7c(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xdb7(%rip),%xmm0
movsd  0xd97(%rip),%xmm1
call   1070 <glVertex2f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
movsd  0xda3(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glColor3f@plt>
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movsd  0xd52(%rip),%xmm0
movsd  0xd52(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xd45(%rip),%xmm0
movsd  0xd15(%rip),%xmm1
call   1070 <glVertex2f@plt>
movsd  0xd60(%rip),%xmm0
movsd  0xd48(%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):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
@GL_POINTS = global i32 0
@GL_LINES = global i32 0
@GL_LINE_STRIP = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 @glColor3f(double 1.000000e-01, double 1.000000e-01, double 1.000000e-01)
%4 = load i32, i32* @GL_POLYGON
%5 = call i32 @glBegin(i32 %4)
%6 = call i32 @glVertex2f(double 0.000000e+00, double 0.000000e+00)
%7 = call i32 @glVertex2f(double 0.000000e+00, double 3.000000e+00)
%8 = call i32 @glVertex2f(double 4.000000e+00, double 3.000000e+00)
%9 = call i32 @glVertex2f(double 5.500000e+00, double 1.500000e+00)
%10 = call i32 @glVertex2f(double 4.000000e+00, double 0.000000e+00)
%11 = call i32 (...) @glEnd()
%12 = call i32 @glColor3f(double 2.000000e-01, double 2.000000e-01, double 2.000000e-01)
%13 = load i32, i32* @GL_POINTS
%14 = call i32 @glBegin(i32 %13)
%15 = call i32 @glVertex2f(double 1.000000e+00, double 4.000000e+00)
%16 = call i32 @glVertex2f(double 2.000000e+00, double 5.000000e+00)
%17 = call i32 (...) @glEnd()
%18 = call i32 @glColor3f(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%19 = load i32, i32* @GL_LINES
%20 = call i32 @glBegin(i32 %19)
%21 = call i32 @glVertex2f(double 2.000000e+00, double 2.000000e+00)
%22 = call i32 @glVertex2f(double 3.000000e+00, double 4.000000e+00)
%23 = call i32 @glVertex2f(double 8.000000e+00, double 4.000000e+00)
%24 = call i32 @glVertex2f(double 7.000000e+00, double 5.000000e+00)
%25 = call i32 (...) @glEnd()
%26 = call i32 @glColor3f(double 4.000000e-01, double 4.000000e-01, double 4.000000e-01)
%27 = load i32, i32* @GL_LINE_STRIP
%28 = call i32 @glBegin(i32 %27)
%29 = call i32 @glVertex2f(double 1.000000e+00, double 2.000000e+00)
%30 = call i32 @glVertex2f(double 2.000000e+00, double 4.000000e+00)
%31 = call i32 @glVertex2f(double 6.000000e+00, double 7.000000e+00)
%32 = call i32 (...) @glEnd()
%33 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
@GL_POINTS = global i32 0
@GL_LINES = global i32 0
@GL_LINE_STRIP = 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-01, double 1.000000e-01, double 1.000000e-01)
%4 = load i32, i32* @GL_POLYGON
%5 = tail call i32 @glBegin(i32 %4)
%6 = tail call i32 @glVertex2f(double 0.000000e+00, double 0.000000e+00)
%7 = tail call i32 @glVertex2f(double 0.000000e+00, double 3.000000e+00)
%8 = tail call i32 @glVertex2f(double 4.000000e+00, double 3.000000e+00)
%9 = tail call i32 @glVertex2f(double 5.500000e+00, double 1.500000e+00)
%10 = tail call i32 @glVertex2f(double 4.000000e+00, double 0.000000e+00)
%11 = tail call i32 (...) @glEnd()
%12 = tail call i32 @glColor3f(double 2.000000e-01, double 2.000000e-01, double 2.000000e-01)
%13 = load i32, i32* @GL_POINTS
%14 = tail call i32 @glBegin(i32 %13)
%15 = tail call i32 @glVertex2f(double 1.000000e+00, double 4.000000e+00)
%16 = tail call i32 @glVertex2f(double 2.000000e+00, double 5.000000e+00)
%17 = tail call i32 (...) @glEnd()
%18 = tail call i32 @glColor3f(double 3.000000e-01, double 3.000000e-01, double 3.000000e-01)
%19 = load i32, i32* @GL_LINES
%20 = tail call i32 @glBegin(i32 %19)
%21 = tail call i32 @glVertex2f(double 2.000000e+00, double 2.000000e+00)
%22 = tail call i32 @glVertex2f(double 3.000000e+00, double 4.000000e+00)
%23 = tail call i32 @glVertex2f(double 8.000000e+00, double 4.000000e+00)
%24 = tail call i32 @glVertex2f(double 7.000000e+00, double 5.000000e+00)
%25 = tail call i32 (...) @glEnd()
%26 = tail call i32 @glColor3f(double 4.000000e-01, double 4.000000e-01, double 4.000000e-01)
%27 = load i32, i32* @GL_LINE_STRIP
%28 = tail call i32 @glBegin(i32 %27)
%29 = tail call i32 @glVertex2f(double 1.000000e+00, double 2.000000e+00)
%30 = tail call i32 @glVertex2f(double 2.000000e+00, double 4.000000e+00)
%31 = tail call i32 @glVertex2f(double 6.000000e+00, double 7.000000e+00)
%32 = tail call i32 (...) @glEnd()
%33 = tail call i32 (...) @glFlush()
ret void
}