#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_mult_matrixf(float *);
void gl_scalef(float x, float y, float z) {
  float mat[] = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
  mat[0] = x;
  mat[5] = y;
  mat[10] = z;
  gl_mult_matrixf(mat);
}


x86 assembly (clang, -O0):
<gl_scalef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  0xea4(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  0xe97(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xe8a(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <gl_mult_matrixf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_scalef>:
sub    $0x48,%rsp
xorps  %xmm3,%xmm3
movaps %xmm3,0x30(%rsp)
movaps %xmm3,(%rsp)
movaps %xmm3,0x10(%rsp)
movaps %xmm3,0x20(%rsp)
movl   $0x3f800000,0x3c(%rsp)
3f
movss  %xmm0,(%rsp)
movss  %xmm1,0x14(%rsp)
movss  %xmm2,0x28(%rsp)
mov    %rsp,%rdi
call   1030 <gl_mult_matrixf@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define void @gl_scalef(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca [16 x float]
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = bitcast [16 x float]* %7 to i8*
%9 = bitcast i8* %8 to [16 x float]*
%10 = getelementptr inbounds [16 x float], [16 x float]* %9, i32 0, i32 0
store float 1.000000e+00, float* %10
%11 = getelementptr inbounds [16 x float], [16 x float]* %9, i32 0, i32 5
store float 1.000000e+00, float* %11
%12 = getelementptr inbounds [16 x float], [16 x float]* %9, i32 0, i32 10
store float 1.000000e+00, float* %12
%13 = getelementptr inbounds [16 x float], [16 x float]* %9, i32 0, i32 15
store float 1.000000e+00, float* %13
%14 = load float, float* %4
%15 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
store float %14, float* %15
%16 = load float, float* %5
%17 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 5
store float %16, float* %17
%18 = load float, float* %6
%19 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 10
store float %18, float* %19
%20 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%21 = call i32 @gl_mult_matrixf(float* %20)
ret void
}

LLVM IR (-O2):
define void @gl_scalef(float %0, float %1, float %2) {
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %4 to i8*
%6 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%7 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 5
%8 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 10
%9 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 15
store float 1.000000e+00, float* %9
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
%10 = call i32 @gl_mult_matrixf(float* %6)
ret void
}