#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 */
float *matrix_change_base(float *, float const *, int const);
float *matrix_change_base_ext(const float matrix[4 * 4],
                              const float base_change_matrix[4 * 4],
                              const int invert_change,
                              float matrix_out[4 * 4]) {
  int i = 0;
  for (i = 0; i < 4 * 4; i++)
    matrix_out[i] = matrix[i];
  return matrix_change_base(matrix_out, base_change_matrix, invert_change);
}


x86 assembly (clang, -O0):
<matrix_change_base_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x10,-0x24(%rbp)
jge    1167 <matrix_change_base_ext+0x57>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1135 <matrix_change_base_ext+0x25>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <matrix_change_base@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_change_base_ext>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rcx)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xc(%rdi),%xmm0
movss  %xmm0,0xc(%rcx)
movss  0x10(%rdi),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x14(%rdi),%xmm0
movss  %xmm0,0x14(%rcx)
movss  0x18(%rdi),%xmm0
movss  %xmm0,0x18(%rcx)
movss  0x1c(%rdi),%xmm0
movss  %xmm0,0x1c(%rcx)
movss  0x20(%rdi),%xmm0
movss  %xmm0,0x20(%rcx)
movss  0x24(%rdi),%xmm0
movss  %xmm0,0x24(%rcx)
movss  0x28(%rdi),%xmm0
movss  %xmm0,0x28(%rcx)
movss  0x2c(%rdi),%xmm0
movss  %xmm0,0x2c(%rcx)
movss  0x30(%rdi),%xmm0
movss  %xmm0,0x30(%rcx)
movss  0x34(%rdi),%xmm0
movss  %xmm0,0x34(%rcx)
movss  0x38(%rdi),%xmm0
movss  %xmm0,0x38(%rcx)
movss  0x3c(%rdi),%xmm0
movss  %xmm0,0x3c(%rcx)
mov    %rcx,%rdi
jmp    1030 <matrix_change_base@plt>

LLVM IR (-O0):
define float* @matrix_change_base_ext(float* %0, float* %1, i32 %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
%8 = alloca float*
%9 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store i32 %2, i32* %7
store float* %3, float** %8
store i32 0, i32* %9
store i32 0, i32* %9
br label %10
10: ; preds = %23, %4
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 16
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load float*, float** %5
%15 = load i32, i32* %9
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = load float*, float** %8
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
store float %18, float* %22
br label %23
23: ; preds = %13
%24 = load i32, i32* %9
%25 = add nsw i32 %24, 1
store i32 %25, i32* %9
br label %10
26: ; preds = %10
%27 = load float*, float** %8
%28 = load float*, float** %6
%29 = load i32, i32* %7
%30 = call float* @matrix_change_base(float* %27, float* %28, i32 %29)
ret float* %30
}

LLVM IR (-O2):
define float* @matrix_change_base_ext(float* nocapture %0, float* %1, i32 %2, float* %3) {
%5 = load float, float* %0
store float %5, float* %3
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %3, i64 1
store float %7, float* %8
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = load float, float* %9
%11 = getelementptr inbounds float, float* %3, i64 2
store float %10, float* %11
%12 = getelementptr inbounds float, float* %0, i64 3
%13 = load float, float* %12
%14 = getelementptr inbounds float, float* %3, i64 3
store float %13, float* %14
%15 = getelementptr inbounds float, float* %0, i64 4
%16 = load float, float* %15
%17 = getelementptr inbounds float, float* %3, i64 4
store float %16, float* %17
%18 = getelementptr inbounds float, float* %0, i64 5
%19 = load float, float* %18
%20 = getelementptr inbounds float, float* %3, i64 5
store float %19, float* %20
%21 = getelementptr inbounds float, float* %0, i64 6
%22 = load float, float* %21
%23 = getelementptr inbounds float, float* %3, i64 6
store float %22, float* %23
%24 = getelementptr inbounds float, float* %0, i64 7
%25 = load float, float* %24
%26 = getelementptr inbounds float, float* %3, i64 7
store float %25, float* %26
%27 = getelementptr inbounds float, float* %0, i64 8
%28 = load float, float* %27
%29 = getelementptr inbounds float, float* %3, i64 8
store float %28, float* %29
%30 = getelementptr inbounds float, float* %0, i64 9
%31 = load float, float* %30
%32 = getelementptr inbounds float, float* %3, i64 9
store float %31, float* %32
%33 = getelementptr inbounds float, float* %0, i64 10
%34 = load float, float* %33
%35 = getelementptr inbounds float, float* %3, i64 10
store float %34, float* %35
%36 = getelementptr inbounds float, float* %0, i64 11
%37 = load float, float* %36
%38 = getelementptr inbounds float, float* %3, i64 11
store float %37, float* %38
%39 = getelementptr inbounds float, float* %0, i64 12
%40 = load float, float* %39
%41 = getelementptr inbounds float, float* %3, i64 12
store float %40, float* %41
%42 = getelementptr inbounds float, float* %0, i64 13
%43 = load float, float* %42
%44 = getelementptr inbounds float, float* %3, i64 13
store float %43, float* %44
%45 = getelementptr inbounds float, float* %0, i64 14
%46 = load float, float* %45
%47 = getelementptr inbounds float, float* %3, i64 14
store float %46, float* %47
%48 = getelementptr inbounds float, float* %0, i64 15
%49 = load float, float* %48
%50 = getelementptr inbounds float, float* %3, i64 15
store float %49, float* %50
%51 = tail call float* @matrix_change_base(float* %3, float* %1, i32 %2)
ret float* %51
}