#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(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(1.0, 1.0, 1.0);
  glLoadIdentity();
  glColor3f(1.0, 1.0, 1.0);
  draw_triangle();
  glEnable(GL_LINE_STIPPLE);
  glLineStipple(1, 0xF0F0);
  glLoadIdentity();
  glTranslatef(-20.0, 0.0, 0.0);
  draw_triangle();
  glLineStipple(1, 0xF00F);
  glLoadIdentity();
  glScalef(1.5, 0.5, 1.0);
  draw_triangle();
  glLineStipple(1, 0x8888);
  glLoadIdentity();
  glRotatef(90.0, 0.0, 0.0, 1.0);
  draw_triangle();
  glDisable(GL_LINE_STIPPLE);
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe3e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movsd  0xe24(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    0x2de3(%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  0xdfe(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   10b0 <glTranslatef@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  0xdbe(%rip),%xmm0
movsd  0xdbe(%rip),%xmm1
movsd  0xda6(%rip),%xmm2
call   1080 <glScalef@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  0xd74(%rip),%xmm0
xorps  %xmm2,%xmm2
movsd  0xd71(%rip),%xmm3
movaps %xmm2,%xmm1
call   10d0 <glRotatef@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    $0x0,%al
call   1090 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbx
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe39(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xe1f(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
mov    0x2de6(%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  0xde9(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   10b0 <glTranslatef@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  0xdc1(%rip),%xmm0
movsd  0xdc1(%rip),%xmm1
movsd  0xda1(%rip),%xmm2
call   1080 <glScalef@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  0xd97(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xd69(%rip),%xmm3
call   10d0 <glRotatef@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
mov    (%rbx),%edi
call   10c0 <glDisable@plt>
xor    %eax,%eax
pop    %rbx
jmp    1090 <glFlush@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 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%4 = call i32 (...) @glLoadIdentity()
%5 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = call i32 (...) @draw_triangle()
%7 = load i32, i32* @GL_LINE_STIPPLE
%8 = call i32 @glEnable(i32 %7)
%9 = call i32 @glLineStipple(i32 1, i32 61680)
%10 = call i32 (...) @glLoadIdentity()
%11 = call i32 @glTranslatef(double -2.000000e+01, double 0.000000e+00, double 0.000000e+00)
%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 (...) @draw_triangle()
%17 = call i32 @glLineStipple(i32 1, i32 34952)
%18 = call i32 (...) @glLoadIdentity()
%19 = call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%20 = call i32 (...) @draw_triangle()
%21 = load i32, i32* @GL_LINE_STIPPLE
%22 = call i32 @glDisable(i32 %21)
%23 = call i32 (...) @glFlush()
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 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%4 = tail call i32 (...) @glLoadIdentity()
%5 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = tail call i32 (...) @draw_triangle()
%7 = load i32, i32* @GL_LINE_STIPPLE
%8 = tail call i32 @glEnable(i32 %7)
%9 = tail call i32 @glLineStipple(i32 1, i32 61680)
%10 = tail call i32 (...) @glLoadIdentity()
%11 = tail call i32 @glTranslatef(double -2.000000e+01, double 0.000000e+00, double 0.000000e+00)
%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 (...) @draw_triangle()
%17 = tail call i32 @glLineStipple(i32 1, i32 34952)
%18 = tail call i32 (...) @glLoadIdentity()
%19 = tail call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%20 = tail call i32 (...) @draw_triangle()
%21 = load i32, i32* @GL_LINE_STIPPLE
%22 = tail call i32 @glDisable(i32 %21)
%23 = tail call i32 (...) @glFlush()
ret void
}