#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*/ assert(double **);
int /*<<< orphan*/ matrix3_initialize(double **);
void matrix3_translation(double m[4][4], double x, double y, double z) {
  assert(m);
  matrix3_initialize(m);
  m[3][0] = x;
  m[3][1] = y;
  m[3][2] = z;
}


x86 assembly (clang, -O0):
<matrix3_translation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <matrix3_initialize@plt>
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x68(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x70(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix3_translation>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <matrix3_initialize@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x60(%rbx)
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x68(%rbx)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x70(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @matrix3_translation([4 x double]* %0, double %1, double %2, double %3) {
%5 = alloca [4 x double]*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store [4 x double]* %0, [4 x double]** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load [4 x double]*, [4 x double]** %5
%10 = bitcast [4 x double]* %9 to double**
%11 = call i32 @assert(double** %10)
%12 = load [4 x double]*, [4 x double]** %5
%13 = bitcast [4 x double]* %12 to double**
%14 = call i32 @matrix3_initialize(double** %13)
%15 = load double, double* %6
%16 = load [4 x double]*, [4 x double]** %5
%17 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 3
%18 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
store double %15, double* %18
%19 = load double, double* %7
%20 = load [4 x double]*, [4 x double]** %5
%21 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 3
%22 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 0, i64 1
store double %19, double* %22
%23 = load double, double* %8
%24 = load [4 x double]*, [4 x double]** %5
%25 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 3
%26 = getelementptr inbounds [4 x double], [4 x double]* %25, i64 0, i64 2
store double %23, double* %26
ret void
}

LLVM IR (-O2):
define void @matrix3_translation([4 x double]* %0, double %1, double %2, double %3) {
%5 = bitcast [4 x double]* %0 to double**
%6 = tail call i32 @assert(double** %5)
%7 = tail call i32 @matrix3_initialize(double** %5)
%8 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 0
store double %1, double* %8
%9 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 1
store double %2, double* %9
%10 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 2
store double %3, double* %10
ret void
}