#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 int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glScissor(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
void setAreaAndClear(GLint x, GLint y, GLsizei w, GLsizei h) {
  glViewport(x, y, w, h);
  glScissor(x, y, w, h);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}


x86 assembly (clang, -O0):
<setAreaAndClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1050 <glViewport@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <glScissor@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    0x2e72(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setAreaAndClear>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <glViewport@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1040 <glScissor@plt>
mov    0x2e7c(%rip),%rax
mov    0x2e85(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <glClear@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @setAreaAndClear(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @glViewport(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = call i32 @glScissor(i32 %14, i32 %15, i32 %16, i32 %17)
%19 = load i32, i32* @GL_COLOR_BUFFER_BIT
%20 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%21 = or i32 %19, %20
%22 = call i32 @glClear(i32 %21)
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @setAreaAndClear(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glViewport(i32 %0, i32 %1, i32 %2, i32 %3)
%6 = tail call i32 @glScissor(i32 %0, i32 %1, i32 %2, i32 %3)
%7 = load i32, i32* @GL_COLOR_BUFFER_BIT
%8 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%9 = or i32 %8, %7
%10 = tail call i32 @glClear(i32 %9)
ret void
}