#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*/ MatrixAdd(float **, float **, float **);
int /*<<< orphan*/ MatrixMultiply(float **, float **, float **);
void Kalman_calcPp(float **Pp, float **A, float **P, float **A_trans,
                   float **Q) {
  float Pp_part1[4][4];
  float Pp_part2[4][4];
  MatrixMultiply(Pp_part1, A, P);
  MatrixMultiply(Pp_part2, Pp_part1, A_trans);
  MatrixAdd(Pp, Pp_part2, Q);
}


x86 assembly (clang, -O0):
<Kalman_calcPp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <MatrixMultiply@plt>
lea    -0xb0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <MatrixMultiply@plt>
mov    -0x8(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <MatrixAdd@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kalman_calcPp>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %r8,%r14
mov    %rcx,%rbx
mov    %rdi,%r15
lea    0x40(%rsp),%r12
mov    %r12,%rdi
call   1030 <MatrixMultiply@plt>
mov    %rsp,%r13
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1030 <MatrixMultiply@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1040 <MatrixAdd@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @Kalman_calcPp(float** %0, float** %1, float** %2, float** %3, float** %4) {
%6 = alloca [4 x [4 x float]]
%7 = alloca [4 x [4 x float]]
%8 = bitcast [4 x [4 x float]]* %6 to i8*
%9 = bitcast [4 x [4 x float]]* %7 to i8*
%10 = bitcast [4 x [4 x float]]* %6 to float**
%11 = call i32 @MatrixMultiply(float** %10, float** %1, float** %2)
%12 = bitcast [4 x [4 x float]]* %7 to float**
%13 = call i32 @MatrixMultiply(float** %12, float** %10, float** %3)
%14 = call i32 @MatrixAdd(float** %0, float** %12, float** %4)
ret void
}