#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 */
typedef scalar_t__ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(scalar_t__, scalar_t__, scalar_t__, scalar_t__,
                           scalar_t__, scalar_t__);
void setup(float R, float G, float B, GLdouble P) {
  GLdouble N = 0 - P;
  glClearColor(R, G, B, 1.0f);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(N, P, N, P, N, P);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
xor    %eax,%eax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  0xe84(%rip),%xmm3
call   1050 <glClearColor@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x18(%rbp),%r9
call   1040 <glOrtho@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
neg    %rbx
movss  0xeab(%rip),%xmm3
call   1050 <glClearColor@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %rbx,%r8
mov    %r14,%r9
call   1040 <glOrtho@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <glLoadIdentity@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @setup(float %0, float %1, float %2, i64 %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i64
%9 = alloca i64
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store i64 %3, i64* %8
%10 = load i64, i64* %8
%11 = sub nsw i64 0, %10
store i64 %11, i64* %9
%12 = load float, float* %5
%13 = load float, float* %6
%14 = load float, float* %7
%15 = call i32 @glClearColor(float %12, float %13, float %14, float 1.000000e+00)
%16 = load i32, i32* @GL_PROJECTION
%17 = call i32 @glMatrixMode(i32 %16)
%18 = call i32 (...) @glLoadIdentity()
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = load i64, i64* %9
%22 = load i64, i64* %8
%23 = load i64, i64* %9
%24 = load i64, i64* %8
%25 = call i32 @glOrtho(i64 %19, i64 %20, i64 %21, i64 %22, i64 %23, i64 %24)
%26 = load i32, i32* @GL_MODELVIEW
%27 = call i32 @glMatrixMode(i32 %26)
%28 = call i32 (...) @glLoadIdentity()
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @setup(float %0, float %1, float %2, i64 %3) {
%5 = sub nsw i64 0, %3
%6 = tail call i32 @glClearColor(float %0, float %1, float %2, float 1.000000e+00)
%7 = load i32, i32* @GL_PROJECTION
%8 = tail call i32 @glMatrixMode(i32 %7)
%9 = tail call i32 (...) @glLoadIdentity()
%10 = tail call i32 @glOrtho(i64 %5, i64 %3, i64 %5, i64 %3, i64 %5, i64 %3)
%11 = load i32, i32* @GL_MODELVIEW
%12 = tail call i32 @glMatrixMode(i32 %11)
%13 = tail call i32 (...) @glLoadIdentity()
ret void
}