#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 */
double pow(float, int);
void predict_state7(float az_dyn, float dt, float h, float pitch,
                    float pitch_rate, float roll, float roll_rate, float v,
                    float *out_7294160474070428019) {
  out_7294160474070428019[0] = dt * roll_rate + roll;
  out_7294160474070428019[1] = dt * pitch_rate + pitch;
  out_7294160474070428019[2] = roll_rate;
  out_7294160474070428019[3] = pitch_rate;
  out_7294160474070428019[4] = 0.5 * az_dyn * pow(dt, 2) + dt * v + h;
  out_7294160474070428019[5] = az_dyn * dt + v;
  out_7294160474070428019[6] = az_dyn;
}


x86 assembly (clang, -O0):
<predict_state7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
movss  %xmm7,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x1c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0xc(%rax)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe50(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x4(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x18(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<predict_state7>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movss  %xmm7,0x10(%rsp)
movss  %xmm2,0x14(%rsp)
movss  %xmm0,0xc(%rsp)
movaps %xmm1,%xmm2
mulss  %xmm6,%xmm2
addss  %xmm5,%xmm2
movss  %xmm2,(%rdi)
movaps %xmm1,%xmm2
movss  %xmm1,0x8(%rsp)
mulss  %xmm4,%xmm2
addss  %xmm3,%xmm2
movss  %xmm2,0x4(%rdi)
movss  %xmm6,0x8(%rdi)
movss  %xmm4,0xc(%rdi)
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mulsd  0xe98(%rip),%xmm2
movsd  %xmm2,0x18(%rsp)
movaps %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movss  0xc(%rsp),%xmm4
movaps %xmm4,%xmm1
movss  0x8(%rsp),%xmm2
mulss  %xmm2,%xmm1
movss  0x10(%rsp),%xmm3
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  0x18(%rsp),%xmm0
addsd  %xmm2,%xmm0
movss  0x14(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,0x10(%rbx)
addss  %xmm3,%xmm1
movss  %xmm1,0x14(%rbx)
movss  %xmm4,0x18(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @predict_state7(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float* %8) {
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float*
store float %0, float* %10
store float %1, float* %11
store float %2, float* %12
store float %3, float* %13
store float %4, float* %14
store float %5, float* %15
store float %6, float* %16
store float %7, float* %17
store float* %8, float** %18
%19 = load float, float* %11
%20 = load float, float* %16
%21 = load float, float* %15
%22 = call float @llvm.fmuladd.f32(float %19, float %20, float %21)
%23 = load float*, float** %18
%24 = getelementptr inbounds float, float* %23, i64 0
store float %22, float* %24
%25 = load float, float* %11
%26 = load float, float* %14
%27 = load float, float* %13
%28 = call float @llvm.fmuladd.f32(float %25, float %26, float %27)
%29 = load float*, float** %18
%30 = getelementptr inbounds float, float* %29, i64 1
store float %28, float* %30
%31 = load float, float* %16
%32 = load float*, float** %18
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
%34 = load float, float* %14
%35 = load float*, float** %18
%36 = getelementptr inbounds float, float* %35, i64 3
store float %34, float* %36
%37 = load float, float* %10
%38 = fpext float %37 to double
%39 = fmul double 5.000000e-01, %38
%40 = load float, float* %11
%41 = call double @pow(float %40, i32 2)
%42 = load float, float* %11
%43 = load float, float* %17
%44 = fmul float %42, %43
%45 = fpext float %44 to double
%46 = call double @llvm.fmuladd.f64(double %39, double %41, double %45)
%47 = load float, float* %12
%48 = fpext float %47 to double
%49 = fadd double %46, %48
%50 = fptrunc double %49 to float
%51 = load float*, float** %18
%52 = getelementptr inbounds float, float* %51, i64 4
store float %50, float* %52
%53 = load float, float* %10
%54 = load float, float* %11
%55 = load float, float* %17
%56 = call float @llvm.fmuladd.f32(float %53, float %54, float %55)
%57 = load float*, float** %18
%58 = getelementptr inbounds float, float* %57, i64 5
store float %56, float* %58
%59 = load float, float* %10
%60 = load float*, float** %18
%61 = getelementptr inbounds float, float* %60, i64 6
store float %59, float* %61
ret void
}

LLVM IR (-O2):
define void @predict_state7(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float* nocapture writeonly %8) {
%10 = tail call float @llvm.fmuladd.f32(float %1, float %6, float %5)
store float %10, float* %8
%11 = tail call float @llvm.fmuladd.f32(float %1, float %4, float %3)
%12 = getelementptr inbounds float, float* %8, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %8, i64 2
store float %6, float* %13
%14 = getelementptr inbounds float, float* %8, i64 3
store float %4, float* %14
%15 = fpext float %0 to double
%16 = fmul double %15, 5.000000e-01
%17 = tail call double @pow(float %1, i32 2)
%18 = fmul float %1, %7
%19 = fpext float %18 to double
%20 = tail call double @llvm.fmuladd.f64(double %16, double %17, double %19)
%21 = fpext float %2 to double
%22 = fadd double %20, %21
%23 = fptrunc double %22 to float
%24 = getelementptr inbounds float, float* %8, i64 4
store float %23, float* %24
%25 = tail call float @llvm.fmuladd.f32(float %0, float %1, float %7)
%26 = getelementptr inbounds float, float* %8, i64 5
store float %25, float* %26
%27 = getelementptr inbounds float, float* %8, i64 6
store float %0, float* %27
ret void
}