#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*/ Mult16fv(float *, float *, float *);
int /*<<< orphan*/ invFrustum16fv(float *, float, float, float, float, float,
                                  float);
int /*<<< orphan*/ invViewing16fv(float *, float const *, float const *,
                                  float const *, float const *);
int /*<<< orphan*/ invViewport16fv(float *, int, int);
float *Screen2WorldXform16fv(float *M, const float X[3], const float Y[3],
                             const float Z[3], const float O[3], float l,
                             float r, float b, float t, float n, float f,
                             int WW, int WH) {
  float N[16];
  invViewing16fv(M, X, Y, Z, O);
  invFrustum16fv(N, l, r, b, t, n, f);
  Mult16fv(M, M, N);
  invViewport16fv(N, WW, WH);
  Mult16fv(M, M, N);
  return (M);
}


x86 assembly (clang, -O0):
<Screen2WorldXform16fv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movss  %xmm0,-0x2c(%rbp)
movss  %xmm1,-0x30(%rbp)
movss  %xmm2,-0x34(%rbp)
movss  %xmm3,-0x38(%rbp)
movss  %xmm4,-0x3c(%rbp)
movss  %xmm5,-0x40(%rbp)
mov    %r9d,-0x44(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1050 <invViewing16fv@plt>
lea    -0x90(%rbp),%rdi
movss  -0x2c(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
movss  -0x34(%rbp),%xmm2
movss  -0x38(%rbp),%xmm3
movss  -0x3c(%rbp),%xmm4
movss  -0x40(%rbp),%xmm5
call   1060 <invFrustum16fv@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1040 <Mult16fv@plt>
lea    -0x90(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x10(%rbp),%edx
call   1030 <invViewport16fv@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1040 <Mult16fv@plt>
mov    -0x8(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Screen2WorldXform16fv>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %r9d,%r15d
movss  %xmm5,0x1c(%rsp)
movss  %xmm4,0x18(%rsp)
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
mov    0x90(%rsp),%r14d
call   1050 <invViewing16fv@plt>
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movss  0x18(%rsp),%xmm4
movss  0x1c(%rsp),%xmm5
call   1060 <invFrustum16fv@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1040 <Mult16fv@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r14d,%edx
call   1030 <invViewport16fv@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1040 <Mult16fv@plt>
mov    %rbx,%rax
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define float* @Screen2WorldXform16fv(float* %0, float* %1, float* %2, float* %3, float* %4, float %5, float %6, float %7, float %8, float %9, float %10, i32 %11, i32 %12) {
%14 = alloca float*
%15 = alloca float*
%16 = alloca float*
%17 = alloca float*
%18 = alloca float*
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca i32
%26 = alloca i32
%27 = alloca [16 x float]
store float* %0, float** %14
store float* %1, float** %15
store float* %2, float** %16
store float* %3, float** %17
store float* %4, float** %18
store float %5, float* %19
store float %6, float* %20
store float %7, float* %21
store float %8, float* %22
store float %9, float* %23
store float %10, float* %24
store i32 %11, i32* %25
store i32 %12, i32* %26
%28 = load float*, float** %14
%29 = load float*, float** %15
%30 = load float*, float** %16
%31 = load float*, float** %17
%32 = load float*, float** %18
%33 = call i32 @invViewing16fv(float* %28, float* %29, float* %30, float* %31, float* %32)
%34 = getelementptr inbounds [16 x float], [16 x float]* %27, i64 0, i64 0
%35 = load float, float* %19
%36 = load float, float* %20
%37 = load float, float* %21
%38 = load float, float* %22
%39 = load float, float* %23
%40 = load float, float* %24
%41 = call i32 @invFrustum16fv(float* %34, float %35, float %36, float %37, float %38, float %39, float %40)
%42 = load float*, float** %14
%43 = load float*, float** %14
%44 = getelementptr inbounds [16 x float], [16 x float]* %27, i64 0, i64 0
%45 = call i32 @Mult16fv(float* %42, float* %43, float* %44)
%46 = getelementptr inbounds [16 x float], [16 x float]* %27, i64 0, i64 0
%47 = load i32, i32* %25
%48 = load i32, i32* %26
%49 = call i32 @invViewport16fv(float* %46, i32 %47, i32 %48)
%50 = load float*, float** %14
%51 = load float*, float** %14
%52 = getelementptr inbounds [16 x float], [16 x float]* %27, i64 0, i64 0
%53 = call i32 @Mult16fv(float* %50, float* %51, float* %52)
%54 = load float*, float** %14
ret float* %54
}

LLVM IR (-O2):
define float* @Screen2WorldXform16fv(float* returned %0, float* %1, float* %2, float* %3, float* %4, float %5, float %6, float %7, float %8, float %9, float %10, i32 %11, i32 %12) {
%14 = alloca [16 x float]
%15 = bitcast [16 x float]* %14 to i8*
%16 = tail call i32 @invViewing16fv(float* %0, float* %1, float* %2, float* %3, float* %4)
%17 = getelementptr inbounds [16 x float], [16 x float]* %14, i64 0, i64 0
%18 = call i32 @invFrustum16fv(float* %17, float %5, float %6, float %7, float %8, float %9, float %10)
%19 = call i32 @Mult16fv(float* %0, float* %0, float* %17)
%20 = call i32 @invViewport16fv(float* %17, i32 %11, i32 %12)
%21 = call i32 @Mult16fv(float* %0, float* %0, float* %17)
ret float* %0
}