#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*/ glColor3f(int, int, int);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3f(int, int, double);
void pared(int x, int y, int r, int g, int b) {
  glBegin(GL_QUADS);
  glColor3f(r, g, b);
  glVertex3f(x, y, 0.0);
  glVertex3f(x + 1, y, 0.0);
  glVertex3f(x + 1, y + 1, 0.0);
  glVertex3f(x, y + 1, 0.0);
  glEnd();
}


x86 assembly (clang, -O0):
<pared>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1050 <glColor3f@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xorps  %xmm0,%xmm0
call   1030 <glVertex3f@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
xorps  %xmm0,%xmm0
call   1030 <glVertex3f@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
xorps  %xmm0,%xmm0
call   1030 <glVertex3f@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
xorps  %xmm0,%xmm0
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pared>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r14d
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    %r15d,%edx
call   1050 <glColor3f@plt>
xorps  %xmm0,%xmm0
mov    %r14d,%edi
mov    %ebx,%esi
call   1030 <glVertex3f@plt>
lea    0x1(%r14),%ebp
xorps  %xmm0,%xmm0
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <glVertex3f@plt>
add    $0x1,%ebx
xorps  %xmm0,%xmm0
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
mov    %r14d,%edi
mov    %ebx,%esi
call   1030 <glVertex3f@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @pared(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* @GL_QUADS
%12 = call i32 @glBegin(i32 %11)
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @glColor3f(i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 @glVertex3f(i32 %17, i32 %18, double 0.000000e+00)
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %7
%23 = call i32 @glVertex3f(i32 %21, i32 %22, double 0.000000e+00)
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
%28 = call i32 @glVertex3f(i32 %25, i32 %27, double 0.000000e+00)
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
%32 = call i32 @glVertex3f(i32 %29, i32 %31, double 0.000000e+00)
%33 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @pared(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = load i32, i32* @GL_QUADS
%7 = tail call i32 @glBegin(i32 %6)
%8 = tail call i32 @glColor3f(i32 %2, i32 %3, i32 %4)
%9 = tail call i32 @glVertex3f(i32 %0, i32 %1, double 0.000000e+00)
%10 = add nsw i32 %0, 1
%11 = tail call i32 @glVertex3f(i32 %10, i32 %1, double 0.000000e+00)
%12 = add nsw i32 %1, 1
%13 = tail call i32 @glVertex3f(i32 %10, i32 %12, double 0.000000e+00)
%14 = tail call i32 @glVertex3f(i32 %0, i32 %12, double 0.000000e+00)
%15 = tail call i32 (...) @glEnd()
ret void
}