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

/* Variables and functions */
int /*<<< orphan*/ GL_FRONT_AND_BACK;
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
void MyMaterial(GLenum mode, GLfloat *f, GLfloat alpha) {
  GLfloat d[4];
  d[0] = f[0];
  d[1] = f[1];
  d[2] = f[2];
  d[3] = alpha;
  glMaterialfv(GL_FRONT_AND_BACK, mode, d);
}


x86 assembly (clang, -O0):
<MyMaterial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
lea    -0x30(%rbp),%rdx
call   1030 <glMaterialfv@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyMaterial>:
sub    $0x18,%rsp
mov    %edi,%eax
mov    (%rsi),%ecx
mov    %ecx,(%rsp)
mov    0x4(%rsi),%ecx
mov    %ecx,0x4(%rsp)
mov    0x8(%rsi),%ecx
mov    %ecx,0x8(%rsp)
mov    %edx,0xc(%rsp)
mov    0x2eb4(%rip),%rcx
mov    (%rcx),%edi
mov    %rsp,%rdx
mov    %eax,%esi
call   1030 <glMaterialfv@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@GL_FRONT_AND_BACK = global i32 0
define void @MyMaterial(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca [4 x i32]
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 2
store i32 %18, i32* %19
%20 = load i32, i32* %6
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 3
store i32 %20, i32* %21
%22 = load i32, i32* @GL_FRONT_AND_BACK
%23 = load i32, i32* %4
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%25 = call i32 @glMaterialfv(i32 %22, i32 %23, i32* %24)
ret void
}

LLVM IR (-O2):
@GL_FRONT_AND_BACK = global i32 0
define void @MyMaterial(i32 %0, i32* nocapture %1, i32 %2) {
%4 = alloca [4 x i32]
%5 = bitcast [4 x i32]* %4 to i8*
%6 = load i32, i32* %1
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
store i32 %6, i32* %7
%8 = getelementptr inbounds i32, i32* %1, i64 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 1
store i32 %9, i32* %10
%11 = getelementptr inbounds i32, i32* %1, i64 2
%12 = load i32, i32* %11
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 2
store i32 %12, i32* %13
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 3
store i32 %2, i32* %14
%15 = load i32, i32* @GL_FRONT_AND_BACK
%16 = call i32 @glMaterialfv(i32 %15, i32 %0, i32* %7)
ret void
}