#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 GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_FILL;
int /*<<< orphan*/ GL_FRONT_AND_BACK;
int /*<<< orphan*/ GL_LINE;
int /*<<< orphan*/ draw_folded_plane();
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glColor3ub(int, int, int);
int /*<<< orphan*/ glPolygonMode(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/, double);
int /*<<< orphan*/ glutSwapBuffers();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
  glColor3ub(67, 205, 128);
  draw_folded_plane();
  glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
  glColor3ub(255, 255, 255);
  glPushMatrix();
  glTranslatef(0, 0, .05);
  draw_folded_plane();
  glPopMatrix();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
mov    0x2e4c(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
mov    0x2e15(%rip),%rax
mov    (%rax),%esi
call   10a0 <glPolygonMode@plt>
mov    $0x43,%edi
mov    $0xcd,%esi
mov    $0x80,%edx
call   1060 <glColor3ub@plt>
mov    $0x0,%al
call   1040 <draw_folded_plane@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
mov    0x2dfb(%rip),%rax
mov    (%rax),%esi
call   10a0 <glPolygonMode@plt>
mov    $0xff,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1060 <glColor3ub@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
xor    %esi,%esi
movsd  0xdfd(%rip),%xmm0
mov    %esi,%edi
call   1090 <glTranslatef@plt>
mov    $0x0,%al
call   1040 <draw_folded_plane@plt>
mov    $0x0,%al
call   1070 <glPopMatrix@plt>
mov    $0x0,%al
call   1050 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbx
mov    0x2e40(%rip),%rax
mov    0x2e51(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
mov    0x2e49(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e18(%rip),%rax
mov    (%rax),%esi
call   10a0 <glPolygonMode@plt>
mov    $0x43,%edi
mov    $0xcd,%esi
mov    $0x80,%edx
call   1060 <glColor3ub@plt>
xor    %eax,%eax
call   1040 <draw_folded_plane@plt>
mov    (%rbx),%edi
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
call   10a0 <glPolygonMode@plt>
mov    $0xff,%edi
mov    $0xff,%esi
mov    $0xff,%edx
call   1060 <glColor3ub@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xe03(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1090 <glTranslatef@plt>
xor    %eax,%eax
call   1040 <draw_folded_plane@plt>
xor    %eax,%eax
call   1070 <glPopMatrix@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_FILL = global i32 0
@GL_LINE = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = load i32, i32* @GL_FRONT_AND_BACK
%6 = load i32, i32* @GL_FILL
%7 = call i32 @glPolygonMode(i32 %5, i32 %6)
%8 = call i32 @glColor3ub(i32 67, i32 205, i32 128)
%9 = call i32 (...) @draw_folded_plane()
%10 = load i32, i32* @GL_FRONT_AND_BACK
%11 = load i32, i32* @GL_LINE
%12 = call i32 @glPolygonMode(i32 %10, i32 %11)
%13 = call i32 @glColor3ub(i32 255, i32 255, i32 255)
%14 = call i32 (...) @glPushMatrix()
%15 = call i32 @glTranslatef(i32 0, i32 0, double 5.000000e-02)
%16 = call i32 (...) @draw_folded_plane()
%17 = call i32 (...) @glPopMatrix()
%18 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_FILL = global i32 0
@GL_LINE = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = load i32, i32* @GL_FRONT_AND_BACK
%6 = load i32, i32* @GL_FILL
%7 = tail call i32 @glPolygonMode(i32 %5, i32 %6)
%8 = tail call i32 @glColor3ub(i32 67, i32 205, i32 128)
%9 = tail call i32 (...) @draw_folded_plane()
%10 = load i32, i32* @GL_FRONT_AND_BACK
%11 = load i32, i32* @GL_LINE
%12 = tail call i32 @glPolygonMode(i32 %10, i32 %11)
%13 = tail call i32 @glColor3ub(i32 255, i32 255, i32 255)
%14 = tail call i32 (...) @glPushMatrix()
%15 = tail call i32 @glTranslatef(i32 0, i32 0, double 5.000000e-02)
%16 = tail call i32 (...) @draw_folded_plane()
%17 = tail call i32 (...) @glPopMatrix()
%18 = tail call i32 (...) @glutSwapBuffers()
ret void
}