#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_LINE_STIPPLE;
int /*<<< orphan*/ draw_triangle();
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glLineStipple(int, int);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
void display() {
  glClear(GL_COLOR_BUFFER_BIT);
  glLoadIdentity();
  glColor3f(1.0, 1.0, 1.0);
  draw_triangle();
  glEnable(GL_LINE_STIPPLE);
  glLineStipple(1, 0xF0F0);
  glLoadIdentity();
  glTranslatef(-.25, 0.0, 0.0);
  glColor3f(0.8, 0.8, 0.8);
  draw_triangle();
  glLineStipple(1, 0xF00F);
  glLoadIdentity();
  glScalef(1.5, 0.5, 1.0);
  glColor3f(0.6, 0.6, 0.6);
  draw_triangle();
  glLineStipple(1, 0x8888);
  glLoadIdentity();
  glRotatef(90.0, 0.0, 0.0, 1.0);
  glColor3f(0.4, 0.4, 0.4);
  draw_triangle();
  glFlush();
  glDisable(GL_LINE_STIPPLE);
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movsd  0xe3f(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    $0x1,%edi
mov    $0xf0f0,%esi
call   1050 <glLineStipple@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movsd  0xe29(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   10b0 <glTranslatef@plt>
movsd  0xe0e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    $0x1,%edi
mov    $0xf00f,%esi
call   1050 <glLineStipple@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movsd  0xdce(%rip),%xmm0
movsd  0xdce(%rip),%xmm1
movsd  0xdae(%rip),%xmm2
call   1080 <glScalef@plt>
movsd  0xda9(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    $0x1,%edi
mov    $0x8888,%esi
call   1050 <glLineStipple@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movsd  0xd69(%rip),%xmm0
xorps  %xmm2,%xmm2
movsd  0xd66(%rip),%xmm3
movaps %xmm2,%xmm1
call   10d0 <glRotatef@plt>
movsd  0xd46(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    $0x0,%al
call   1090 <glFlush@plt>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbx
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xe32(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
mov    0x2df9(%rip),%rbx
mov    (%rbx),%edi
call   1040 <glEnable@plt>
mov    $0x1,%edi
mov    $0xf0f0,%esi
call   1050 <glLineStipple@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xdfc(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   10b0 <glTranslatef@plt>
movsd  0xdf1(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
mov    $0x1,%edi
mov    $0xf00f,%esi
call   1050 <glLineStipple@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xdc9(%rip),%xmm0
movsd  0xdc9(%rip),%xmm1
movsd  0xda1(%rip),%xmm2
call   1080 <glScalef@plt>
movsd  0xdbc(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
mov    $0x1,%edi
mov    $0x8888,%esi
call   1050 <glLineStipple@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xd94(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xd56(%rip),%xmm3
call   10d0 <glRotatef@plt>
movsd  0xd81(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
xor    %eax,%eax
call   1090 <glFlush@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    10c0 <glDisable@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_LINE_STIPPLE = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @glLoadIdentity()
%4 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%5 = call i32 (...) @draw_triangle()
%6 = load i32, i32* @GL_LINE_STIPPLE
%7 = call i32 @glEnable(i32 %6)
%8 = call i32 @glLineStipple(i32 1, i32 61680)
%9 = call i32 (...) @glLoadIdentity()
%10 = call i32 @glTranslatef(double -2.500000e-01, double 0.000000e+00, double 0.000000e+00)
%11 = call i32 @glColor3f(double 8.000000e-01, double 8.000000e-01, double 8.000000e-01)
%12 = call i32 (...) @draw_triangle()
%13 = call i32 @glLineStipple(i32 1, i32 61455)
%14 = call i32 (...) @glLoadIdentity()
%15 = call i32 @glScalef(double 1.500000e+00, double 5.000000e-01, double 1.000000e+00)
%16 = call i32 @glColor3f(double 6.000000e-01, double 6.000000e-01, double 6.000000e-01)
%17 = call i32 (...) @draw_triangle()
%18 = call i32 @glLineStipple(i32 1, i32 34952)
%19 = call i32 (...) @glLoadIdentity()
%20 = call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%21 = call i32 @glColor3f(double 4.000000e-01, double 4.000000e-01, double 4.000000e-01)
%22 = call i32 (...) @draw_triangle()
%23 = call i32 (...) @glFlush()
%24 = load i32, i32* @GL_LINE_STIPPLE
%25 = call i32 @glDisable(i32 %24)
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_LINE_STIPPLE = 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 (...) @glLoadIdentity()
%4 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%5 = tail call i32 (...) @draw_triangle()
%6 = load i32, i32* @GL_LINE_STIPPLE
%7 = tail call i32 @glEnable(i32 %6)
%8 = tail call i32 @glLineStipple(i32 1, i32 61680)
%9 = tail call i32 (...) @glLoadIdentity()
%10 = tail call i32 @glTranslatef(double -2.500000e-01, double 0.000000e+00, double 0.000000e+00)
%11 = tail call i32 @glColor3f(double 8.000000e-01, double 8.000000e-01, double 8.000000e-01)
%12 = tail call i32 (...) @draw_triangle()
%13 = tail call i32 @glLineStipple(i32 1, i32 61455)
%14 = tail call i32 (...) @glLoadIdentity()
%15 = tail call i32 @glScalef(double 1.500000e+00, double 5.000000e-01, double 1.000000e+00)
%16 = tail call i32 @glColor3f(double 6.000000e-01, double 6.000000e-01, double 6.000000e-01)
%17 = tail call i32 (...) @draw_triangle()
%18 = tail call i32 @glLineStipple(i32 1, i32 34952)
%19 = tail call i32 (...) @glLoadIdentity()
%20 = tail call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%21 = tail call i32 @glColor3f(double 4.000000e-01, double 4.000000e-01, double 4.000000e-01)
%22 = tail call i32 (...) @draw_triangle()
%23 = tail call i32 (...) @glFlush()
%24 = load i32, i32* @GL_LINE_STIPPLE
%25 = tail call i32 @glDisable(i32 %24)
ret void
}