#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_BACK;
int /*<<< orphan*/ GL_EQUAL;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_NOTEQUAL;
int /*<<< orphan*/ GL_STENCIL_TEST;
int /*<<< orphan*/ firstInsideSecond(void (*)(), void (*)(), int /*<<< orphan*/,
                                     int /*<<< orphan*/);
int /*<<< orphan*/ fixDepth(void (*)());
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
void sub(void (*a)(void), void (*b)(void)) {
  firstInsideSecond(a, b, GL_FRONT, GL_NOTEQUAL);
  fixDepth(b);
  firstInsideSecond(b, a, GL_BACK, GL_EQUAL);
  glDisable(GL_STENCIL_TEST);
}


x86 assembly (clang, -O0):
<sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    0x2e78(%rip),%rax
mov    (%rax),%ecx
call   1040 <firstInsideSecond@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fixDepth@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    0x2e51(%rip),%rax
mov    (%rax),%edx
mov    0x2e60(%rip),%rax
mov    (%rax),%ecx
call   1040 <firstInsideSecond@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
call   1050 <glDisable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
mov    0x2e86(%rip),%rax
mov    (%rax),%ecx
call   1040 <firstInsideSecond@plt>
mov    %rbx,%rdi
call   1030 <fixDepth@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edx
mov    0x2e77(%rip),%rax
mov    (%rax),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <firstInsideSecond@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <glDisable@plt>

LLVM IR (-O0):
@GL_FRONT = global i32 0
@GL_NOTEQUAL = global i32 0
@GL_BACK = global i32 0
@GL_EQUAL = global i32 0
@GL_STENCIL_TEST = global i32 0
define void @sub(void ()* %0, void ()* %1) {
%3 = alloca void ()*
%4 = alloca void ()*
store void ()* %0, void ()** %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %3
%6 = bitcast void ()* %5 to void (...)*
%7 = load void ()*, void ()** %4
%8 = bitcast void ()* %7 to void (...)*
%9 = load i32, i32* @GL_FRONT
%10 = load i32, i32* @GL_NOTEQUAL
%11 = call i32 @firstInsideSecond(void (...)* %6, void (...)* %8, i32 %9, i32 %10)
%12 = load void ()*, void ()** %4
%13 = bitcast void ()* %12 to void (...)*
%14 = call i32 @fixDepth(void (...)* %13)
%15 = load void ()*, void ()** %4
%16 = bitcast void ()* %15 to void (...)*
%17 = load void ()*, void ()** %3
%18 = bitcast void ()* %17 to void (...)*
%19 = load i32, i32* @GL_BACK
%20 = load i32, i32* @GL_EQUAL
%21 = call i32 @firstInsideSecond(void (...)* %16, void (...)* %18, i32 %19, i32 %20)
%22 = load i32, i32* @GL_STENCIL_TEST
%23 = call i32 @glDisable(i32 %22)
ret void
}

LLVM IR (-O2):
@GL_FRONT = global i32 0
@GL_NOTEQUAL = global i32 0
@GL_BACK = global i32 0
@GL_EQUAL = global i32 0
@GL_STENCIL_TEST = global i32 0
define void @sub(void ()* %0, void ()* %1) {
%3 = bitcast void ()* %0 to void (...)*
%4 = bitcast void ()* %1 to void (...)*
%5 = load i32, i32* @GL_FRONT
%6 = load i32, i32* @GL_NOTEQUAL
%7 = tail call i32 @firstInsideSecond(void (...)* %3, void (...)* %4, i32 %5, i32 %6)
%8 = tail call i32 @fixDepth(void (...)* %4)
%9 = load i32, i32* @GL_BACK
%10 = load i32, i32* @GL_EQUAL
%11 = tail call i32 @firstInsideSecond(void (...)* %4, void (...)* %3, i32 %9, i32 %10)
%12 = load i32, i32* @GL_STENCIL_TEST
%13 = tail call i32 @glDisable(i32 %12)
ret void
}