#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(float, float, float);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glLineStipple(int, int);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glRotatef(float, float, float, float);
int /*<<< orphan*/ glScalef(float, float, float);
int /*<<< orphan*/ glTranslatef(float, float, float);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glLoadIdentity();
  glColor3f(1.0f, 0.0f, 0.0f);
  draw_triangle();
  glColor3f(1.0f, 1.0f, 0.0f);
  glEnable(GL_LINE_STIPPLE);
  glLineStipple(1, 0xf0f0);
  glLoadIdentity();
  glTranslatef(-20.0f, 0.0f, 0.0f);
  draw_triangle();
  glColor3f(0.0f, 1.0f, 1.0f);
  glLineStipple(1, 0xf00f);
  glLoadIdentity();
  glScalef(1.5f, 0.5f, 1.0f);
  draw_triangle();
  glColor3f(0.0f, 0.0f, 1.0f);
  glLineStipple(1, 0x8888);
  glLoadIdentity();
  glRotatef(90.0f, 0.0f, 0.0f, 1.0f);
  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>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movss  0xe33(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
movss  0xe19(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1070 <glColor3f@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>
movss  0xdee(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   10b0 <glTranslatef@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
xorps  %xmm0,%xmm0
movss  0xdc5(%rip),%xmm2
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
mov    $0x1,%edi
mov    $0xf00f,%esi
call   1050 <glLineStipple@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movss  0xda3(%rip),%xmm0
movss  0xd9f(%rip),%xmm1
movss  0xd8f(%rip),%xmm2
call   1080 <glScalef@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
xorps  %xmm1,%xmm1
movss  0xd78(%rip),%xmm2
movaps %xmm1,%xmm0
call   1070 <glColor3f@plt>
mov    $0x1,%edi
mov    $0x8888,%esi
call   1050 <glLineStipple@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
movss  0xd4e(%rip),%xmm0
xorps  %xmm2,%xmm2
movss  0xd47(%rip),%xmm3
movaps %xmm2,%xmm1
call   10d0 <glRotatef@plt>
mov    $0x0,%al
call   10a0 <draw_triangle@plt>
mov    0x2d0d(%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>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movss  0xe32(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
xorps  %xmm2,%xmm2
movss  0xe15(%rip),%xmm0
movaps %xmm0,%xmm1
call   1070 <glColor3f@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>
movss  0xde5(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   10b0 <glTranslatef@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
xorps  %xmm0,%xmm0
movss  0xdc4(%rip),%xmm1
movaps %xmm1,%xmm2
call   1070 <glColor3f@plt>
mov    $0x1,%edi
mov    $0xf00f,%esi
call   1050 <glLineStipple@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movss  0xda6(%rip),%xmm0
movss  0xda2(%rip),%xmm1
movss  0xd8e(%rip),%xmm2
call   1080 <glScalef@plt>
xor    %eax,%eax
call   10a0 <draw_triangle@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movss  0xd74(%rip),%xmm2
call   1070 <glColor3f@plt>
mov    $0x1,%edi
mov    $0x8888,%esi
call   1050 <glLineStipple@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movss  0xd61(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movss  0xd43(%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 (...) @glLoadIdentity()
%4 = call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%5 = call i32 (...) @draw_triangle()
%6 = call i32 @glColor3f(float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%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(float -2.000000e+01, float 0.000000e+00, float 0.000000e+00)
%12 = call i32 (...) @draw_triangle()
%13 = call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 1.000000e+00)
%14 = call i32 @glLineStipple(i32 1, i32 61455)
%15 = call i32 (...) @glLoadIdentity()
%16 = call i32 @glScalef(float 1.500000e+00, float 5.000000e-01, float 1.000000e+00)
%17 = call i32 (...) @draw_triangle()
%18 = call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%19 = call i32 @glLineStipple(i32 1, i32 34952)
%20 = call i32 (...) @glLoadIdentity()
%21 = call i32 @glRotatef(float 9.000000e+01, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%22 = call i32 (...) @draw_triangle()
%23 = load i32, i32* @GL_LINE_STIPPLE
%24 = call i32 @glDisable(i32 %23)
%25 = 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 (...) @glLoadIdentity()
%4 = tail call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%5 = tail call i32 (...) @draw_triangle()
%6 = tail call i32 @glColor3f(float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%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(float -2.000000e+01, float 0.000000e+00, float 0.000000e+00)
%12 = tail call i32 (...) @draw_triangle()
%13 = tail call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 1.000000e+00)
%14 = tail call i32 @glLineStipple(i32 1, i32 61455)
%15 = tail call i32 (...) @glLoadIdentity()
%16 = tail call i32 @glScalef(float 1.500000e+00, float 5.000000e-01, float 1.000000e+00)
%17 = tail call i32 (...) @draw_triangle()
%18 = tail call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%19 = tail call i32 @glLineStipple(i32 1, i32 34952)
%20 = tail call i32 (...) @glLoadIdentity()
%21 = tail call i32 @glRotatef(float 9.000000e+01, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%22 = tail call i32 (...) @draw_triangle()
%23 = load i32, i32* @GL_LINE_STIPPLE
%24 = tail call i32 @glDisable(i32 %23)
%25 = tail call i32 (...) @glFlush()
ret void
}