#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*/ ScalarMult3fv(float *, float const *, float);
float *Obj2WorldXform16fv(float *M, const float X[3], const float Y[3],
                          const float Z[3], const float O[3], float Scale) {
  float sX[3], sY[3], sZ[3];
  ScalarMult3fv(sX, X, Scale);
  ScalarMult3fv(sY, Y, Scale);
  ScalarMult3fv(sZ, Z, Scale);
  M[0] = sX[0];
  M[4] = sY[0];
  M[8] = sZ[0];
  M[12] = O[0];
  M[1] = sX[1];
  M[5] = sY[1];
  M[9] = sZ[1];
  M[13] = O[1];
  M[2] = sX[2];
  M[6] = sY[2];
  M[10] = sZ[2];
  M[14] = O[2];
  M[3] = 0;
  M[7] = 0;
  M[11] = 0;
  M[15] = 1;
  return (M);
}


x86 assembly (clang, -O0):
<Obj2WorldXform16fv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movss  %xmm0,-0x2c(%rbp)
lea    -0x38(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x2c(%rbp),%xmm0
call   1030 <ScalarMult3fv@plt>
lea    -0x44(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movss  -0x2c(%rbp),%xmm0
call   1030 <ScalarMult3fv@plt>
lea    -0x50(%rbp),%rdi
mov    -0x20(%rbp),%rsi
movss  -0x2c(%rbp),%xmm0
call   1030 <ScalarMult3fv@plt>
movss  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x44(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x30(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x4c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
mov    -0x28(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x34(%rax)
movss  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x3c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
movss  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x28(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
mov    -0x8(%rbp),%rax
movss  0xdb7(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Obj2WorldXform16fv>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
movss  %xmm0,(%rsp)
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rdi,%rbx
lea    0x1c(%rsp),%rdi
call   1030 <ScalarMult3fv@plt>
lea    0x10(%rsp),%rdi
mov    %r12,%rsi
movss  (%rsp),%xmm0
call   1030 <ScalarMult3fv@plt>
lea    0x4(%rsp),%rdi
mov    %r15,%rsi
movss  (%rsp),%xmm0
call   1030 <ScalarMult3fv@plt>
movss  0x1c(%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rbx)
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x20(%rbx)
movss  (%r14),%xmm0
movss  %xmm0,0x30(%rbx)
movss  0x20(%rsp),%xmm0
movss  %xmm0,0x4(%rbx)
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x14(%rbx)
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x24(%rbx)
movss  0x4(%r14),%xmm0
movss  %xmm0,0x34(%rbx)
movss  0x24(%rsp),%xmm0
movss  %xmm0,0x8(%rbx)
movss  0x18(%rsp),%xmm0
movss  %xmm0,0x18(%rbx)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x28(%rbx)
movss  0x8(%r14),%xmm0
movss  %xmm0,0x38(%rbx)
movl   $0x0,0xc(%rbx)
movl   $0x0,0x1c(%rbx)
movl   $0x0,0x2c(%rbx)
movl   $0x3f800000,0x3c(%rbx)
mov    %rbx,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define float* @Obj2WorldXform16fv(float* %0, float* %1, float* %2, float* %3, float* %4, float %5) {
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float
%13 = alloca [3 x float]
%14 = alloca [3 x float]
%15 = alloca [3 x float]
store float* %0, float** %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float %5, float* %12
%16 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 0
%17 = load float*, float** %8
%18 = load float, float* %12
%19 = call i32 @ScalarMult3fv(float* %16, float* %17, float %18)
%20 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 0
%21 = load float*, float** %9
%22 = load float, float* %12
%23 = call i32 @ScalarMult3fv(float* %20, float* %21, float %22)
%24 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 0, i64 0
%25 = load float*, float** %10
%26 = load float, float* %12
%27 = call i32 @ScalarMult3fv(float* %24, float* %25, float %26)
%28 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 0
%29 = load float, float* %28
%30 = load float*, float** %7
%31 = getelementptr inbounds float, float* %30, i64 0
store float %29, float* %31
%32 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 0
%33 = load float, float* %32
%34 = load float*, float** %7
%35 = getelementptr inbounds float, float* %34, i64 4
store float %33, float* %35
%36 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 0, i64 0
%37 = load float, float* %36
%38 = load float*, float** %7
%39 = getelementptr inbounds float, float* %38, i64 8
store float %37, float* %39
%40 = load float*, float** %11
%41 = getelementptr inbounds float, float* %40, i64 0
%42 = load float, float* %41
%43 = load float*, float** %7
%44 = getelementptr inbounds float, float* %43, i64 12
store float %42, float* %44
%45 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 1
%46 = load float, float* %45
%47 = load float*, float** %7
%48 = getelementptr inbounds float, float* %47, i64 1
store float %46, float* %48
%49 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 1
%50 = load float, float* %49
%51 = load float*, float** %7
%52 = getelementptr inbounds float, float* %51, i64 5
store float %50, float* %52
%53 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 0, i64 1
%54 = load float, float* %53
%55 = load float*, float** %7
%56 = getelementptr inbounds float, float* %55, i64 9
store float %54, float* %56
%57 = load float*, float** %11
%58 = getelementptr inbounds float, float* %57, i64 1
%59 = load float, float* %58
%60 = load float*, float** %7
%61 = getelementptr inbounds float, float* %60, i64 13
store float %59, float* %61
%62 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 2
%63 = load float, float* %62
%64 = load float*, float** %7
%65 = getelementptr inbounds float, float* %64, i64 2
store float %63, float* %65
%66 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 2
%67 = load float, float* %66
%68 = load float*, float** %7
%69 = getelementptr inbounds float, float* %68, i64 6
store float %67, float* %69
%70 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 0, i64 2
%71 = load float, float* %70
%72 = load float*, float** %7
%73 = getelementptr inbounds float, float* %72, i64 10
store float %71, float* %73
%74 = load float*, float** %11
%75 = getelementptr inbounds float, float* %74, i64 2
%76 = load float, float* %75
%77 = load float*, float** %7
%78 = getelementptr inbounds float, float* %77, i64 14
store float %76, float* %78
%79 = load float*, float** %7
%80 = getelementptr inbounds float, float* %79, i64 3
store float 0.000000e+00, float* %80
%81 = load float*, float** %7
%82 = getelementptr inbounds float, float* %81, i64 7
store float 0.000000e+00, float* %82
%83 = load float*, float** %7
%84 = getelementptr inbounds float, float* %83, i64 11
store float 0.000000e+00, float* %84
%85 = load float*, float** %7
%86 = getelementptr inbounds float, float* %85, i64 15
store float 1.000000e+00, float* %86
%87 = load float*, float** %7
ret float* %87
}

LLVM IR (-O2):
define float* @Obj2WorldXform16fv(float* returned writeonly %0, float* %1, float* %2, float* %3, float* nocapture %4, float %5) {
%7 = alloca [3 x float]
%8 = alloca [3 x float]
%9 = alloca [3 x float]
%10 = bitcast [3 x float]* %7 to i8*
%11 = bitcast [3 x float]* %8 to i8*
%12 = bitcast [3 x float]* %9 to i8*
%13 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%14 = call i32 @ScalarMult3fv(float* %13, float* %1, float %5)
%15 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%16 = call i32 @ScalarMult3fv(float* %15, float* %2, float %5)
%17 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%18 = call i32 @ScalarMult3fv(float* %17, float* %3, float %5)
%19 = load float, float* %13
store float %19, float* %0
%20 = load float, float* %15
%21 = getelementptr inbounds float, float* %0, i64 4
store float %20, float* %21
%22 = load float, float* %17
%23 = getelementptr inbounds float, float* %0, i64 8
store float %22, float* %23
%24 = load float, float* %4
%25 = getelementptr inbounds float, float* %0, i64 12
store float %24, float* %25
%26 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 1
%27 = load float, float* %26
%28 = getelementptr inbounds float, float* %0, i64 1
store float %27, float* %28
%29 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 1
%30 = load float, float* %29
%31 = getelementptr inbounds float, float* %0, i64 5
store float %30, float* %31
%32 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 1
%33 = load float, float* %32
%34 = getelementptr inbounds float, float* %0, i64 9
store float %33, float* %34
%35 = getelementptr inbounds float, float* %4, i64 1
%36 = load float, float* %35
%37 = getelementptr inbounds float, float* %0, i64 13
store float %36, float* %37
%38 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 2
%39 = load float, float* %38
%40 = getelementptr inbounds float, float* %0, i64 2
store float %39, float* %40
%41 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 2
%42 = load float, float* %41
%43 = getelementptr inbounds float, float* %0, i64 6
store float %42, float* %43
%44 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 2
%45 = load float, float* %44
%46 = getelementptr inbounds float, float* %0, i64 10
store float %45, float* %46
%47 = getelementptr inbounds float, float* %4, i64 2
%48 = load float, float* %47
%49 = getelementptr inbounds float, float* %0, i64 14
store float %48, float* %49
%50 = getelementptr inbounds float, float* %0, i64 3
store float 0.000000e+00, float* %50
%51 = getelementptr inbounds float, float* %0, i64 7
store float 0.000000e+00, float* %51
%52 = getelementptr inbounds float, float* %0, i64 11
store float 0.000000e+00, float* %52
%53 = getelementptr inbounds float, float* %0, i64 15
store float 1.000000e+00, float* %53
ret float* %0
}