#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_QUADS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glNormal3f(float, float, float);
int /*<<< orphan*/ glVertex3f(float, float, int /*<<< orphan*/);
int /*<<< orphan*/ glVertex3i(int, int, int /*<<< orphan*/);
void decal_poly(void) {
  glBegin(GL_QUADS);
  glNormal3f(0.f, 0.f, -1.f);
  glVertex3i(-2, 2, 0);
  glVertex3i(-2, 3, 0);
  glVertex3i(2, 3, 0);
  glVertex3i(2, 2, 0);
  glVertex3f(-.5, -3.f, 0);
  glVertex3f(-.5f, 2.f, 0);
  glVertex3f(.5f, 2.f, 0);
  glVertex3f(.5f, -3.f, 0);
  glEnd();
}


x86 assembly (clang, -O0):
<decal_poly>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm1,%xmm1
movss  0xea3(%rip),%xmm2
movaps %xmm1,%xmm0
call   1070 <glNormal3f@plt>
mov    $0xfffffffe,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
mov    $0xfffffffe,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
mov    $0x2,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1050 <glVertex3i@plt>
movss  0xe4e(%rip),%xmm0
movss  0xe3e(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  0xe37(%rip),%xmm0
movss  0xe2b(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  0xe14(%rip),%xmm0
movss  0xe14(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  0xdfd(%rip),%xmm0
movss  0xdf9(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<decal_poly>:
push   %rax
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
movss  0xe99(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1070 <glNormal3f@plt>
mov    $0xfffffffe,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
mov    $0xfffffffe,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
mov    $0x2,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1050 <glVertex3i@plt>
movss  0xe46(%rip),%xmm0
movss  0xe42(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  0xe37(%rip),%xmm1
movss  0xe27(%rip),%xmm0
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  0xe24(%rip),%xmm0
movss  0xe18(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  0xe0d(%rip),%xmm0
movss  0xdfd(%rip),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @decal_poly() {
%1 = load i32, i32* @GL_QUADS
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, float -1.000000e+00)
%4 = call i32 @glVertex3i(i32 -2, i32 2, i32 0)
%5 = call i32 @glVertex3i(i32 -2, i32 3, i32 0)
%6 = call i32 @glVertex3i(i32 2, i32 3, i32 0)
%7 = call i32 @glVertex3i(i32 2, i32 2, i32 0)
%8 = call i32 @glVertex3f(float -5.000000e-01, float -3.000000e+00, i32 0)
%9 = call i32 @glVertex3f(float -5.000000e-01, float 2.000000e+00, i32 0)
%10 = call i32 @glVertex3f(float 5.000000e-01, float 2.000000e+00, i32 0)
%11 = call i32 @glVertex3f(float 5.000000e-01, float -3.000000e+00, i32 0)
%12 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @decal_poly() {
%1 = load i32, i32* @GL_QUADS
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glNormal3f(float 0.000000e+00, float 0.000000e+00, float -1.000000e+00)
%4 = tail call i32 @glVertex3i(i32 -2, i32 2, i32 0)
%5 = tail call i32 @glVertex3i(i32 -2, i32 3, i32 0)
%6 = tail call i32 @glVertex3i(i32 2, i32 3, i32 0)
%7 = tail call i32 @glVertex3i(i32 2, i32 2, i32 0)
%8 = tail call i32 @glVertex3f(float -5.000000e-01, float -3.000000e+00, i32 0)
%9 = tail call i32 @glVertex3f(float -5.000000e-01, float 2.000000e+00, i32 0)
%10 = tail call i32 @glVertex3f(float 5.000000e-01, float 2.000000e+00, i32 0)
%11 = tail call i32 @glVertex3f(float 5.000000e-01, float -3.000000e+00, i32 0)
%12 = tail call i32 (...) @glEnd()
ret void
}