#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*/ floats_mat44_translate(float const *, float *);
int /*<<< orphan*/ floats_mat_AB(float *, int, int, float *, int, int, float *,
                                 int, int);
int /*<<< orphan*/ memcpy(float *, float *, int);
void floats_mat44_translate_self(const float txyz[3], float out[16]) {
  float tmp[16], prod[16];
  floats_mat44_translate(txyz, tmp);
  floats_mat_AB(out, 4, 4, tmp, 4, 4, prod, 4, 4);
  memcpy(out, prod, sizeof(float) * 16);
}


x86 assembly (clang, -O0):
<floats_mat44_translate_self>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <floats_mat44_translate@plt>
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rcx
lea    -0x90(%rbp),%rax
mov    $0x4,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
mov    %rax,(%rsp)
movl   $0x4,0x8(%rsp)
movl   $0x4,0x10(%rsp)
call   1050 <floats_mat_AB@plt>
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats_mat44_translate_self>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rbx
lea    0x40(%rsp),%r14
mov    %r14,%rsi
call   1030 <floats_mat44_translate@plt>
sub    $0x8,%rsp
lea    0x8(%rsp),%r15
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    %r14,%rcx
mov    $0x4,%r8d
mov    $0x4,%r9d
push   $0x4
push   $0x4
push   %r15
call   1050 <floats_mat_AB@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @floats_mat44_translate_self(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [16 x float]
%6 = alloca [16 x float]
store float* %0, float** %3
store float* %1, float** %4
%7 = load float*, float** %3
%8 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%9 = call i32 @floats_mat44_translate(float* %7, float* %8)
%10 = load float*, float** %4
%11 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%12 = getelementptr inbounds [16 x float], [16 x float]* %6, i64 0, i64 0
%13 = call i32 @floats_mat_AB(float* %10, i32 4, i32 4, float* %11, i32 4, i32 4, float* %12, i32 4, i32 4)
%14 = load float*, float** %4
%15 = getelementptr inbounds [16 x float], [16 x float]* %6, i64 0, i64 0
%16 = call i32 @memcpy(float* %14, float* %15, i32 64)
ret void
}

LLVM IR (-O2):
define void @floats_mat44_translate_self(float* %0, float* %1) {
%3 = alloca [16 x float]
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %3 to i8*
%6 = bitcast [16 x float]* %4 to i8*
%7 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 0
%8 = call i32 @floats_mat44_translate(float* %0, float* %7)
%9 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%10 = call i32 @floats_mat_AB(float* %1, i32 4, i32 4, float* %7, i32 4, i32 4, float* %9, i32 4, i32 4)
%11 = call i32 @memcpy(float* %1, float* %9, i32 64)
ret void
}