#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 double GLfloat;

/* Variables and functions */
int GL_CURRENT_BIT;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int GL_LIGHTING_BIT;
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glPushAttrib(int);
void highlightBegin(void) {
  static GLfloat red[4] = {1.0, 0.0, 0.0, 1.0};
  glPushAttrib(GL_LIGHTING_BIT | GL_CURRENT_BIT);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, red);
  glColor3f(1.0, 0.0, 0.0);
}


x86 assembly (clang, -O0):
<highlightBegin>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
or     (%rax),%edi
call   1040 <glPushAttrib@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    0x2e6d(%rip),%rax
mov    (%rax),%esi
lea    0x2edc(%rip),%rdx
call   1050 <glMaterialfv@plt>
movsd  0xe8f(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glColor3f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<highlightBegin>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1040 <glPushAttrib@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    0x2e70(%rip),%rax
mov    (%rax),%esi
lea    0x2edf(%rip),%rdx
call   1050 <glMaterialfv@plt>
movsd  0xe92(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
pop    %rax
jmp    1030 <glColor3f@plt>

LLVM IR (-O0):
@highlightBegin.red = internal global [4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_LIGHTING_BIT = global i32 0
@GL_CURRENT_BIT = global i32 0
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
define void @highlightBegin() {
%1 = load i32, i32* @GL_LIGHTING_BIT
%2 = load i32, i32* @GL_CURRENT_BIT
%3 = or i32 %1, %2
%4 = call i32 @glPushAttrib(i32 %3)
%5 = load i32, i32* @GL_FRONT
%6 = load i32, i32* @GL_DIFFUSE
%7 = call i32 @glMaterialfv(i32 %5, i32 %6, double* getelementptr inbounds ([4 x double], [4 x double]* @highlightBegin.red, i64 0, i64 0))
%8 = call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
@highlightBegin.red = internal global [4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_LIGHTING_BIT = global i32 0
@GL_CURRENT_BIT = global i32 0
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
define void @highlightBegin() {
%1 = load i32, i32* @GL_LIGHTING_BIT
%2 = load i32, i32* @GL_CURRENT_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glPushAttrib(i32 %3)
%5 = load i32, i32* @GL_FRONT
%6 = load i32, i32* @GL_DIFFUSE
%7 = tail call i32 @glMaterialfv(i32 %5, i32 %6, double* getelementptr inbounds ([4 x double], [4 x double]* @highlightBegin.red, i64 0, i64 0))
%8 = tail call i32 @glColor3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
ret void
}