#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*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_AMBIENT;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
void SetMaterial(GLfloat spec[], GLfloat amb[], GLfloat diff[],
                 GLfloat shin[]) {
  glMaterialfv(GL_FRONT, GL_SPECULAR, spec);
  glMaterialfv(GL_FRONT, GL_SHININESS, shin);
  glMaterialfv(GL_FRONT, GL_AMBIENT, amb);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diff);
}


x86 assembly (clang, -O0):
<SetMaterial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
call   1030 <glMaterialfv@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
call   1030 <glMaterialfv@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <glMaterialfv@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
mov    0x2e37(%rip),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
call   1030 <glMaterialfv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetMaterial>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r12
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
mov    %r12,%rdx
call   1030 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    %r15,%rdx
call   1030 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e56(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <glMaterialfv@plt>

LLVM IR (-O0):
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
define void @SetMaterial(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* @GL_FRONT
%10 = load i32, i32* @GL_SPECULAR
%11 = load i32*, i32** %5
%12 = call i32 @glMaterialfv(i32 %9, i32 %10, i32* %11)
%13 = load i32, i32* @GL_FRONT
%14 = load i32, i32* @GL_SHININESS
%15 = load i32*, i32** %8
%16 = call i32 @glMaterialfv(i32 %13, i32 %14, i32* %15)
%17 = load i32, i32* @GL_FRONT
%18 = load i32, i32* @GL_AMBIENT
%19 = load i32*, i32** %6
%20 = call i32 @glMaterialfv(i32 %17, i32 %18, i32* %19)
%21 = load i32, i32* @GL_FRONT
%22 = load i32, i32* @GL_DIFFUSE
%23 = load i32*, i32** %7
%24 = call i32 @glMaterialfv(i32 %21, i32 %22, i32* %23)
ret void
}

LLVM IR (-O2):
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
define void @SetMaterial(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = load i32, i32* @GL_FRONT
%6 = load i32, i32* @GL_SPECULAR
%7 = tail call i32 @glMaterialfv(i32 %5, i32 %6, i32* %0)
%8 = load i32, i32* @GL_FRONT
%9 = load i32, i32* @GL_SHININESS
%10 = tail call i32 @glMaterialfv(i32 %8, i32 %9, i32* %3)
%11 = load i32, i32* @GL_FRONT
%12 = load i32, i32* @GL_AMBIENT
%13 = tail call i32 @glMaterialfv(i32 %11, i32 %12, i32* %1)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_DIFFUSE
%16 = tail call i32 @glMaterialfv(i32 %14, i32 %15, i32* %2)
ret void
}