#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*/ mat4_copy(float const **, float **);
void bbox_grow(const float b[4][4], float x, float y, float z,
               float out[4][4]) {
  mat4_copy(b, out);
  out[0][0] += x;
  out[1][1] += y;
  out[2][2] += z;
}


x86 assembly (clang, -O0):
<bbox_grow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <mat4_copy@plt>
movss  -0xc(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0x14(%rax),%xmm0
movss  %xmm0,0x14(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0x28(%rax),%xmm0
movss  %xmm0,0x28(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbox_grow>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0x4(%rsp)
call   1030 <mat4_copy@plt>
movss  0x4(%rsp),%xmm0
addss  (%rbx),%xmm0
movss  %xmm0,(%rbx)
movss  0x8(%rsp),%xmm0
addss  0x14(%rbx),%xmm0
movss  %xmm0,0x14(%rbx)
movss  0xc(%rsp),%xmm0
addss  0x28(%rbx),%xmm0
movss  %xmm0,0x28(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @bbox_grow([4 x float]* %0, float %1, float %2, float %3, [4 x float]* %4) {
%6 = alloca [4 x float]*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca [4 x float]*
store [4 x float]* %0, [4 x float]** %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store [4 x float]* %4, [4 x float]** %10
%11 = load [4 x float]*, [4 x float]** %6
%12 = bitcast [4 x float]* %11 to float**
%13 = load [4 x float]*, [4 x float]** %10
%14 = bitcast [4 x float]* %13 to float**
%15 = call i32 @mat4_copy(float** %12, float** %14)
%16 = load float, float* %7
%17 = load [4 x float]*, [4 x float]** %10
%18 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 0
%19 = getelementptr inbounds [4 x float], [4 x float]* %18, i64 0, i64 0
%20 = load float, float* %19
%21 = fadd float %20, %16
store float %21, float* %19
%22 = load float, float* %8
%23 = load [4 x float]*, [4 x float]** %10
%24 = getelementptr inbounds [4 x float], [4 x float]* %23, i64 1
%25 = getelementptr inbounds [4 x float], [4 x float]* %24, i64 0, i64 1
%26 = load float, float* %25
%27 = fadd float %26, %22
store float %27, float* %25
%28 = load float, float* %9
%29 = load [4 x float]*, [4 x float]** %10
%30 = getelementptr inbounds [4 x float], [4 x float]* %29, i64 2
%31 = getelementptr inbounds [4 x float], [4 x float]* %30, i64 0, i64 2
%32 = load float, float* %31
%33 = fadd float %32, %28
store float %33, float* %31
ret void
}

LLVM IR (-O2):
define void @bbox_grow([4 x float]* %0, float %1, float %2, float %3, [4 x float]* %4) {
%6 = bitcast [4 x float]* %0 to float**
%7 = bitcast [4 x float]* %4 to float**
%8 = tail call i32 @mat4_copy(float** %6, float** %7)
%9 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%10 = load float, float* %9
%11 = fadd float %10, %1
store float %11, float* %9
%12 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 1, i64 1
%13 = load float, float* %12
%14 = fadd float %13, %2
store float %14, float* %12
%15 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 2, i64 2
%16 = load float, float* %15
%17 = fadd float %16, %3
store float %17, float* %15
ret void
}