#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*/ MatrixMultiply(float **, float **, float **);
int /*<<< orphan*/ MatrixSubtract(float **, float **, float **);
void Kalman_calcP(float **P, float **Pp, float **K, float **H) {
  float P_part1[4][4];
  float P_part2[4][4];
  MatrixMultiply(P_part1, K, H);
  MatrixMultiply(P_part2, P_part1, Pp);
  MatrixSubtract(P, Pp, P_part2);
}


x86 assembly (clang, -O0):
<Kalman_calcP>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <MatrixMultiply@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <MatrixMultiply@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
call   1030 <MatrixSubtract@plt>
add    $0xa0,%rsp
pop    %rbp
ret

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

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

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