#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 */
scalar_t__ calloc(int, int);
float *OrthographicMatrix(float right, float left, float top, float bottom,
                          float far, float near) {
  float *r;
  float zdifference, ydifference, xdifference;
  zdifference = far - near;
  ydifference = top - bottom;
  xdifference = right - left;
  r = (float *)calloc(sizeof(float), 16);
  r[0] = 2.0 / xdifference;
  r[1] = 0.0;
  r[2] = 0.0;
  r[3] = 0.0;
  r[4] = 0.0;
  r[5] = 2.0 / ydifference;
  r[6] = 0.0;
  r[7] = 0.0;
  r[8] = 0.0;
  r[9] = 0.0;
  r[10] = -2.0 / zdifference;
  r[11] = 0.0;
  r[12] = (-1.0 * (right + left)) / xdifference;
  r[13] = (-1.0 * (top + bottom)) / ydifference;
  r[14] = (-1.0 * (far + near)) / zdifference;
  r[15] = 1.0;
  return r;
}


x86 assembly (clang, -O0):
<OrthographicMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    $0x4,%edi
mov    $0x10,%esi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe40(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x14(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rax)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xde6(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdab(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x30(%rax)
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd77(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x34(%rax)
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd43(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x38(%rax)
mov    -0x20(%rbp),%rax
movss  0xd11(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OrthographicMatrix>:
sub    $0x28,%rsp
movss  %xmm5,0x20(%rsp)
movss  %xmm4,0x24(%rsp)
movss  %xmm3,0x18(%rsp)
movss  %xmm2,0x1c(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0x14(%rsp)
subss  %xmm5,%xmm4
movss  %xmm4,0xc(%rsp)
subss  %xmm3,%xmm2
movss  %xmm2,0x8(%rsp)
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%rsp)
mov    $0x4,%edi
mov    $0x10,%esi
call   1030 <calloc@plt>
movss  0x4(%rsp),%xmm3
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
movss  0xe86(%rip),%xmm1
movaps %xmm1,%xmm2
divss  %xmm3,%xmm2
movss  %xmm2,(%rax)
movss  0x8(%rsp),%xmm3
xorps  %xmm2,%xmm2
cvtss2sd %xmm3,%xmm2
divss  %xmm3,%xmm1
xorps  %xmm3,%xmm3
movups %xmm3,0x4(%rax)
movss  %xmm1,0x14(%rax)
movss  0xc(%rsp),%xmm5
xorps  %xmm1,%xmm1
cvtss2sd %xmm5,%xmm1
movss  0xe4d(%rip),%xmm4
divss  %xmm5,%xmm4
movups %xmm3,0x18(%rax)
movss  %xmm4,0x28(%rax)
movl   $0x0,0x2c(%rax)
movss  0x14(%rsp),%xmm3
addss  0x10(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movaps 0xe2e(%rip),%xmm4
xorps  %xmm4,%xmm3
divsd  %xmm0,%xmm3
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
movss  %xmm0,0x30(%rax)
movss  0x1c(%rsp),%xmm0
addss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm4,%xmm0
divsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
movss  0x24(%rsp),%xmm0
addss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm4,%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x38(%rax)
movl   $0x3f800000,0x3c(%rax)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float* @OrthographicMatrix(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 float*
%14 = alloca float
%15 = alloca float
%16 = alloca 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
%17 = load float, float* %11
%18 = load float, float* %12
%19 = fsub float %17, %18
store float %19, float* %14
%20 = load float, float* %9
%21 = load float, float* %10
%22 = fsub float %20, %21
store float %22, float* %15
%23 = load float, float* %7
%24 = load float, float* %8
%25 = fsub float %23, %24
store float %25, float* %16
%26 = call i64 @calloc(i32 4, i32 16)
%27 = inttoptr i64 %26 to float*
store float* %27, float** %13
%28 = load float, float* %16
%29 = fpext float %28 to double
%30 = fdiv double 2.000000e+00, %29
%31 = fptrunc double %30 to float
%32 = load float*, float** %13
%33 = getelementptr inbounds float, float* %32, i64 0
store float %31, float* %33
%34 = load float*, float** %13
%35 = getelementptr inbounds float, float* %34, i64 1
store float 0.000000e+00, float* %35
%36 = load float*, float** %13
%37 = getelementptr inbounds float, float* %36, i64 2
store float 0.000000e+00, float* %37
%38 = load float*, float** %13
%39 = getelementptr inbounds float, float* %38, i64 3
store float 0.000000e+00, float* %39
%40 = load float*, float** %13
%41 = getelementptr inbounds float, float* %40, i64 4
store float 0.000000e+00, float* %41
%42 = load float, float* %15
%43 = fpext float %42 to double
%44 = fdiv double 2.000000e+00, %43
%45 = fptrunc double %44 to float
%46 = load float*, float** %13
%47 = getelementptr inbounds float, float* %46, i64 5
store float %45, float* %47
%48 = load float*, float** %13
%49 = getelementptr inbounds float, float* %48, i64 6
store float 0.000000e+00, float* %49
%50 = load float*, float** %13
%51 = getelementptr inbounds float, float* %50, i64 7
store float 0.000000e+00, float* %51
%52 = load float*, float** %13
%53 = getelementptr inbounds float, float* %52, i64 8
store float 0.000000e+00, float* %53
%54 = load float*, float** %13
%55 = getelementptr inbounds float, float* %54, i64 9
store float 0.000000e+00, float* %55
%56 = load float, float* %14
%57 = fpext float %56 to double
%58 = fdiv double -2.000000e+00, %57
%59 = fptrunc double %58 to float
%60 = load float*, float** %13
%61 = getelementptr inbounds float, float* %60, i64 10
store float %59, float* %61
%62 = load float*, float** %13
%63 = getelementptr inbounds float, float* %62, i64 11
store float 0.000000e+00, float* %63
%64 = load float, float* %7
%65 = load float, float* %8
%66 = fadd float %64, %65
%67 = fpext float %66 to double
%68 = fmul double -1.000000e+00, %67
%69 = load float, float* %16
%70 = fpext float %69 to double
%71 = fdiv double %68, %70
%72 = fptrunc double %71 to float
%73 = load float*, float** %13
%74 = getelementptr inbounds float, float* %73, i64 12
store float %72, float* %74
%75 = load float, float* %9
%76 = load float, float* %10
%77 = fadd float %75, %76
%78 = fpext float %77 to double
%79 = fmul double -1.000000e+00, %78
%80 = load float, float* %15
%81 = fpext float %80 to double
%82 = fdiv double %79, %81
%83 = fptrunc double %82 to float
%84 = load float*, float** %13
%85 = getelementptr inbounds float, float* %84, i64 13
store float %83, float* %85
%86 = load float, float* %11
%87 = load float, float* %12
%88 = fadd float %86, %87
%89 = fpext float %88 to double
%90 = fmul double -1.000000e+00, %89
%91 = load float, float* %14
%92 = fpext float %91 to double
%93 = fdiv double %90, %92
%94 = fptrunc double %93 to float
%95 = load float*, float** %13
%96 = getelementptr inbounds float, float* %95, i64 14
store float %94, float* %96
%97 = load float*, float** %13
%98 = getelementptr inbounds float, float* %97, i64 15
store float 1.000000e+00, float* %98
%99 = load float*, float** %13
ret float* %99
}

LLVM IR (-O2):
define float* @OrthographicMatrix(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fsub float %4, %5
%8 = fsub float %2, %3
%9 = fsub float %0, %1
%10 = tail call i64 @calloc(i32 4, i32 16)
%11 = inttoptr i64 %10 to float*
%12 = fpext float %9 to double
%13 = fdiv float 2.000000e+00, %9
store float %13, float* %11
%14 = getelementptr inbounds float, float* %11, i64 1
%15 = fpext float %8 to double
%16 = fdiv float 2.000000e+00, %8
%17 = getelementptr inbounds float, float* %11, i64 5
%18 = bitcast float* %14 to i8*
store float %16, float* %17
%19 = getelementptr inbounds float, float* %11, i64 6
%20 = fpext float %7 to double
%21 = fdiv float -2.000000e+00, %7
%22 = getelementptr inbounds float, float* %11, i64 10
%23 = bitcast float* %19 to i8*
store float %21, float* %22
%24 = getelementptr inbounds float, float* %11, i64 11
store float 0.000000e+00, float* %24
%25 = fadd float %0, %1
%26 = fpext float %25 to double
%27 = fneg double %26
%28 = fdiv double %27, %12
%29 = fptrunc double %28 to float
%30 = getelementptr inbounds float, float* %11, i64 12
store float %29, float* %30
%31 = fadd float %2, %3
%32 = fpext float %31 to double
%33 = fneg double %32
%34 = fdiv double %33, %15
%35 = fptrunc double %34 to float
%36 = getelementptr inbounds float, float* %11, i64 13
store float %35, float* %36
%37 = fadd float %4, %5
%38 = fpext float %37 to double
%39 = fneg double %38
%40 = fdiv double %39, %20
%41 = fptrunc double %40 to float
%42 = getelementptr inbounds float, float* %11, i64 14
store float %41, float* %42
%43 = getelementptr inbounds float, float* %11, i64 15
store float 1.000000e+00, float* %43
ret float* %11
}