#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 float GLfloat;

/* Variables and functions */
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
void omul_ortho(GLfloat m[], GLfloat left, GLfloat right, GLfloat bottom,
                GLfloat top, GLfloat n, GLfloat f) {
  GLfloat x = 2.0f / (right - left);
  GLfloat y = 2.0f / (top - bottom);
  GLfloat z = -2.0f / (f - n);
  GLfloat tx = -((right + left) / (right - left));
  GLfloat ty = -((top + bottom) / (top - bottom));
  GLfloat tz = -((f + n) / (f - n));
  memset(m, 0, sizeof(GLfloat) * 16);
  m[0] = x;
  m[5] = y;
  m[10] = z;
  m[12] = tx;
  m[13] = ty;
  m[14] = tz;
  m[15] = 1.0f;
}


x86 assembly (clang, -O0):
<omul_ortho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movss  %xmm4,-0x1c(%rbp)
movss  %xmm5,-0x20(%rbp)
movss  -0x10(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  0xebc(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x18(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
movss  0xea1(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x20(%rbp),%xmm1
subss  -0x1c(%rbp),%xmm1
movss  0xe82(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
divss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
subss  -0x1c(%rbp),%xmm1
divss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
movss  -0x24(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x2c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
movss  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x30(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x34(%rax)
movss  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movss  0xd88(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<omul_ortho>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rbx
movaps %xmm1,%xmm10
subss  %xmm0,%xmm10
movss  0xed7(%rip),%xmm6
movaps %xmm6,%xmm7
divss  %xmm10,%xmm7
movss  %xmm7,0xc(%rsp)
movaps %xmm3,%xmm9
subss  %xmm2,%xmm9
divss  %xmm9,%xmm6
movss  %xmm6,0x8(%rsp)
movaps %xmm5,%xmm8
subss  %xmm4,%xmm8
movss  0xea8(%rip),%xmm6
divss  %xmm8,%xmm6
movss  %xmm6,0x4(%rsp)
addss  %xmm1,%xmm0
movaps 0xe9e(%rip),%xmm1
xorps  %xmm1,%xmm0
divss  %xmm10,%xmm0
movaps %xmm0,0x30(%rsp)
addss  %xmm3,%xmm2
xorps  %xmm1,%xmm2
divss  %xmm9,%xmm2
movaps %xmm2,0x20(%rsp)
addss  %xmm5,%xmm4
xorps  %xmm1,%xmm4
divss  %xmm8,%xmm4
movaps %xmm4,0x10(%rsp)
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
movss  0xc(%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x14(%rbx)
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x28(%rbx)
movaps 0x30(%rsp),%xmm0
movss  %xmm0,0x30(%rbx)
movaps 0x20(%rsp),%xmm0
movss  %xmm0,0x34(%rbx)
movaps 0x10(%rsp),%xmm0
movss  %xmm0,0x38(%rbx)
movl   $0x3f800000,0x3c(%rbx)
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @omul_ortho(float* %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%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
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
store float* %0, float** %8
store float %1, float* %9
store float %2, float* %10
store float %3, float* %11
store float %4, float* %12
store float %5, float* %13
store float %6, float* %14
%21 = load float, float* %10
%22 = load float, float* %9
%23 = fsub float %21, %22
%24 = fdiv float 2.000000e+00, %23
store float %24, float* %15
%25 = load float, float* %12
%26 = load float, float* %11
%27 = fsub float %25, %26
%28 = fdiv float 2.000000e+00, %27
store float %28, float* %16
%29 = load float, float* %14
%30 = load float, float* %13
%31 = fsub float %29, %30
%32 = fdiv float -2.000000e+00, %31
store float %32, float* %17
%33 = load float, float* %10
%34 = load float, float* %9
%35 = fadd float %33, %34
%36 = load float, float* %10
%37 = load float, float* %9
%38 = fsub float %36, %37
%39 = fdiv float %35, %38
%40 = fneg float %39
store float %40, float* %18
%41 = load float, float* %12
%42 = load float, float* %11
%43 = fadd float %41, %42
%44 = load float, float* %12
%45 = load float, float* %11
%46 = fsub float %44, %45
%47 = fdiv float %43, %46
%48 = fneg float %47
store float %48, float* %19
%49 = load float, float* %14
%50 = load float, float* %13
%51 = fadd float %49, %50
%52 = load float, float* %14
%53 = load float, float* %13
%54 = fsub float %52, %53
%55 = fdiv float %51, %54
%56 = fneg float %55
store float %56, float* %20
%57 = load float*, float** %8
%58 = call i32 @memset(float* %57, i32 0, i32 64)
%59 = load float, float* %15
%60 = load float*, float** %8
%61 = getelementptr inbounds float, float* %60, i64 0
store float %59, float* %61
%62 = load float, float* %16
%63 = load float*, float** %8
%64 = getelementptr inbounds float, float* %63, i64 5
store float %62, float* %64
%65 = load float, float* %17
%66 = load float*, float** %8
%67 = getelementptr inbounds float, float* %66, i64 10
store float %65, float* %67
%68 = load float, float* %18
%69 = load float*, float** %8
%70 = getelementptr inbounds float, float* %69, i64 12
store float %68, float* %70
%71 = load float, float* %19
%72 = load float*, float** %8
%73 = getelementptr inbounds float, float* %72, i64 13
store float %71, float* %73
%74 = load float, float* %20
%75 = load float*, float** %8
%76 = getelementptr inbounds float, float* %75, i64 14
store float %74, float* %76
%77 = load float*, float** %8
%78 = getelementptr inbounds float, float* %77, i64 15
store float 1.000000e+00, float* %78
ret void
}

LLVM IR (-O2):
define void @omul_ortho(float* %0, float %1, float %2, float %3, float %4, float %5, float %6) {
%8 = fsub float %2, %1
%9 = fdiv float 2.000000e+00, %8
%10 = fsub float %4, %3
%11 = fdiv float 2.000000e+00, %10
%12 = fsub float %6, %5
%13 = fdiv float -2.000000e+00, %12
%14 = fadd float %1, %2
%15 = fneg float %14
%16 = fdiv float %15, %8
%17 = fadd float %3, %4
%18 = fneg float %17
%19 = fdiv float %18, %10
%20 = fadd float %5, %6
%21 = fneg float %20
%22 = fdiv float %21, %12
%23 = tail call i32 @memset(float* %0, i32 0, i32 64)
store float %9, float* %0
%24 = getelementptr inbounds float, float* %0, i64 5
store float %11, float* %24
%25 = getelementptr inbounds float, float* %0, i64 10
store float %13, float* %25
%26 = getelementptr inbounds float, float* %0, i64 12
store float %16, float* %26
%27 = getelementptr inbounds float, float* %0, i64 13
store float %19, float* %27
%28 = getelementptr inbounds float, float* %0, i64 14
store float %22, float* %28
%29 = getelementptr inbounds float, float* %0, i64 15
store float 1.000000e+00, float* %29
ret void
}