; LLVM IR from pms67/HadesFCS :: Firmware/F4/HadesF4Testbed/Core/Src (KalmanRollPitch)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.KalmanRollPitch = type { float, float, [4 x float], [2 x float], [3 x float] }

; Function Attrs: nounwind uwtable
define dso_local void @KalmanRollPitch_Update(ptr noundef %0, ptr noundef %1, float noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca [4 x float], align 16
  %16 = alloca [4 x float], align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store float %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds float, ptr %17, i64 0
  %19 = load float, ptr %18, align 4, !tbaa !9
  store float %19, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds float, ptr %20, i64 1
  %22 = load float, ptr %21, align 4, !tbaa !9
  store float %22, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds float, ptr %23, i64 2
  %25 = load float, ptr %24, align 4, !tbaa !9
  store float %25, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.KalmanRollPitch, ptr %26, i32 0, i32 0
  %28 = load float, ptr %27, align 4, !tbaa !11
  %29 = fpext float %28 to double
  %30 = call double @sin(double noundef %29) #4
  %31 = fptrunc double %30 to float
  store float %31, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.KalmanRollPitch, ptr %32, i32 0, i32 0
  %34 = load float, ptr %33, align 4, !tbaa !11
  %35 = fpext float %34 to double
  %36 = call double @cos(double noundef %35) #4
  %37 = fptrunc double %36 to float
  store float %37, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.KalmanRollPitch, ptr %38, i32 0, i32 1
  %40 = load float, ptr %39, align 4, !tbaa !13
  %41 = fpext float %40 to double
  %42 = call double @tan(double noundef %41) #4
  %43 = fptrunc double %42 to float
  store float %43, ptr %12, align 4, !tbaa !9
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.KalmanRollPitch, ptr %44, i32 0, i32 0
  %46 = load float, ptr %45, align 4, !tbaa !11
  %47 = load float, ptr %6, align 4, !tbaa !9
  %48 = load float, ptr %7, align 4, !tbaa !9
  %49 = load float, ptr %12, align 4, !tbaa !9
  %50 = load float, ptr %8, align 4, !tbaa !9
  %51 = load float, ptr %10, align 4, !tbaa !9
  %52 = load float, ptr %9, align 4, !tbaa !9
  %53 = load float, ptr %11, align 4, !tbaa !9
  %54 = fmul float %52, %53
  %55 = call float @llvm.fmuladd.f32(float %50, float %51, float %54)
  %56 = call float @llvm.fmuladd.f32(float %49, float %55, float %48)
  %57 = call float @llvm.fmuladd.f32(float %47, float %56, float %46)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.KalmanRollPitch, ptr %58, i32 0, i32 0
  store float %57, ptr %59, align 4, !tbaa !11
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.KalmanRollPitch, ptr %60, i32 0, i32 1
  %62 = load float, ptr %61, align 4, !tbaa !13
  %63 = load float, ptr %6, align 4, !tbaa !9
  %64 = load float, ptr %8, align 4, !tbaa !9
  %65 = load float, ptr %11, align 4, !tbaa !9
  %66 = load float, ptr %9, align 4, !tbaa !9
  %67 = load float, ptr %10, align 4, !tbaa !9
  %68 = fmul float %66, %67
  %69 = fneg float %68
  %70 = call float @llvm.fmuladd.f32(float %64, float %65, float %69)
  %71 = call float @llvm.fmuladd.f32(float %63, float %70, float %62)
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.KalmanRollPitch, ptr %72, i32 0, i32 1
  store float %71, ptr %73, align 4, !tbaa !13
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.KalmanRollPitch, ptr %74, i32 0, i32 0
  %76 = load float, ptr %75, align 4, !tbaa !11
  %77 = fpext float %76 to double
  %78 = call double @sin(double noundef %77) #4
  %79 = fptrunc double %78 to float
  store float %79, ptr %10, align 4, !tbaa !9
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.KalmanRollPitch, ptr %80, i32 0, i32 0
  %82 = load float, ptr %81, align 4, !tbaa !11
  %83 = fpext float %82 to double
  %84 = call double @cos(double noundef %83) #4
  %85 = fptrunc double %84 to float
  store float %85, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.KalmanRollPitch, ptr %86, i32 0, i32 1
  %88 = load float, ptr %87, align 4, !tbaa !13
  %89 = fpext float %88 to double
  %90 = call double @sin(double noundef %89) #4
  %91 = fptrunc double %90 to float
  store float %91, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.KalmanRollPitch, ptr %92, i32 0, i32 1
  %94 = load float, ptr %93, align 4, !tbaa !13
  %95 = fpext float %94 to double
  %96 = call double @cos(double noundef %95) #4
  %97 = fptrunc double %96 to float
  store float %97, ptr %14, align 4, !tbaa !9
  %98 = load float, ptr %13, align 4, !tbaa !9
  %99 = load float, ptr %14, align 4, !tbaa !9
  %100 = fdiv float %98, %99
  store float %100, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %101 = load float, ptr %12, align 4, !tbaa !9
  %102 = load float, ptr %8, align 4, !tbaa !9
  %103 = load float, ptr %11, align 4, !tbaa !9
  %104 = load float, ptr %9, align 4, !tbaa !9
  %105 = load float, ptr %10, align 4, !tbaa !9
  %106 = fmul float %104, %105
  %107 = fneg float %106
  %108 = call float @llvm.fmuladd.f32(float %102, float %103, float %107)
  %109 = fmul float %101, %108
  store float %109, ptr %15, align 4, !tbaa !9
  %110 = getelementptr inbounds float, ptr %15, i64 1
  %111 = load float, ptr %9, align 4, !tbaa !9
  %112 = load float, ptr %11, align 4, !tbaa !9
  %113 = load float, ptr %8, align 4, !tbaa !9
  %114 = load float, ptr %10, align 4, !tbaa !9
  %115 = fmul float %113, %114
  %116 = call float @llvm.fmuladd.f32(float %111, float %112, float %115)
  %117 = load float, ptr %12, align 4, !tbaa !9
  %118 = load float, ptr %12, align 4, !tbaa !9
  %119 = call float @llvm.fmuladd.f32(float %117, float %118, float 1.000000e+00)
  %120 = fmul float %116, %119
  store float %120, ptr %110, align 4, !tbaa !9
  %121 = getelementptr inbounds float, ptr %15, i64 2
  %122 = load float, ptr %9, align 4, !tbaa !9
  %123 = load float, ptr %11, align 4, !tbaa !9
  %124 = load float, ptr %8, align 4, !tbaa !9
  %125 = load float, ptr %10, align 4, !tbaa !9
  %126 = fmul float %124, %125
  %127 = call float @llvm.fmuladd.f32(float %122, float %123, float %126)
  %128 = fneg float %127
  store float %128, ptr %121, align 4, !tbaa !9
  %129 = getelementptr inbounds float, ptr %15, i64 3
  store float 0.000000e+00, ptr %129, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %130 = load float, ptr %6, align 4, !tbaa !9
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.KalmanRollPitch, ptr %131, i32 0, i32 3
  %133 = getelementptr inbounds [2 x float], ptr %132, i64 0, i64 0
  %134 = load float, ptr %133, align 4, !tbaa !9
  %135 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 0
  %136 = load float, ptr %135, align 16, !tbaa !9
  %137 = fmul float 2.000000e+00, %136
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.KalmanRollPitch, ptr %138, i32 0, i32 2
  %140 = getelementptr inbounds [4 x float], ptr %139, i64 0, i64 0
  %141 = load float, ptr %140, align 4, !tbaa !9
  %142 = call float @llvm.fmuladd.f32(float %137, float %141, float %134)
  %143 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 1
  %144 = load float, ptr %143, align 4, !tbaa !9
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.KalmanRollPitch, ptr %145, i32 0, i32 2
  %147 = getelementptr inbounds [4 x float], ptr %146, i64 0, i64 1
  %148 = load float, ptr %147, align 4, !tbaa !9
  %149 = call float @llvm.fmuladd.f32(float %144, float %148, float %142)
  %150 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 1
  %151 = load float, ptr %150, align 4, !tbaa !9
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.KalmanRollPitch, ptr %152, i32 0, i32 2
  %154 = getelementptr inbounds [4 x float], ptr %153, i64 0, i64 2
  %155 = load float, ptr %154, align 4, !tbaa !9
  %156 = call float @llvm.fmuladd.f32(float %151, float %155, float %149)
  %157 = fmul float %130, %156
  store float %157, ptr %16, align 4, !tbaa !9
  %158 = getelementptr inbounds float, ptr %16, i64 1
  %159 = load float, ptr %6, align 4, !tbaa !9
  %160 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 0
  %161 = load float, ptr %160, align 16, !tbaa !9
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.KalmanRollPitch, ptr %162, i32 0, i32 2
  %164 = getelementptr inbounds [4 x float], ptr %163, i64 0, i64 1
  %165 = load float, ptr %164, align 4, !tbaa !9
  %166 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 2
  %167 = load float, ptr %166, align 8, !tbaa !9
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.KalmanRollPitch, ptr %168, i32 0, i32 2
  %170 = getelementptr inbounds [4 x float], ptr %169, i64 0, i64 0
  %171 = load float, ptr %170, align 4, !tbaa !9
  %172 = fmul float %167, %171
  %173 = call float @llvm.fmuladd.f32(float %161, float %165, float %172)
  %174 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 1
  %175 = load float, ptr %174, align 4, !tbaa !9
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.KalmanRollPitch, ptr %176, i32 0, i32 2
  %178 = getelementptr inbounds [4 x float], ptr %177, i64 0, i64 3
  %179 = load float, ptr %178, align 4, !tbaa !9
  %180 = call float @llvm.fmuladd.f32(float %175, float %179, float %173)
  %181 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 3
  %182 = load float, ptr %181, align 4, !tbaa !9
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.KalmanRollPitch, ptr %183, i32 0, i32 2
  %185 = getelementptr inbounds [4 x float], ptr %184, i64 0, i64 1
  %186 = load float, ptr %185, align 4, !tbaa !9
  %187 = call float @llvm.fmuladd.f32(float %182, float %186, float %180)
  %188 = fmul float %159, %187
  store float %188, ptr %158, align 4, !tbaa !9
  %189 = getelementptr inbounds float, ptr %16, i64 2
  %190 = load float, ptr %6, align 4, !tbaa !9
  %191 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 0
  %192 = load float, ptr %191, align 16, !tbaa !9
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.KalmanRollPitch, ptr %193, i32 0, i32 2
  %195 = getelementptr inbounds [4 x float], ptr %194, i64 0, i64 2
  %196 = load float, ptr %195, align 4, !tbaa !9
  %197 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 2
  %198 = load float, ptr %197, align 8, !tbaa !9
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.KalmanRollPitch, ptr %199, i32 0, i32 2
  %201 = getelementptr inbounds [4 x float], ptr %200, i64 0, i64 0
  %202 = load float, ptr %201, align 4, !tbaa !9
  %203 = fmul float %198, %202
  %204 = call float @llvm.fmuladd.f32(float %192, float %196, float %203)
  %205 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 1
  %206 = load float, ptr %205, align 4, !tbaa !9
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.KalmanRollPitch, ptr %207, i32 0, i32 2
  %209 = getelementptr inbounds [4 x float], ptr %208, i64 0, i64 3
  %210 = load float, ptr %209, align 4, !tbaa !9
  %211 = call float @llvm.fmuladd.f32(float %206, float %210, float %204)
  %212 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 3
  %213 = load float, ptr %212, align 4, !tbaa !9
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.KalmanRollPitch, ptr %214, i32 0, i32 2
  %216 = getelementptr inbounds [4 x float], ptr %215, i64 0, i64 2
  %217 = load float, ptr %216, align 4, !tbaa !9
  %218 = call float @llvm.fmuladd.f32(float %213, float %217, float %211)
  %219 = fmul float %190, %218
  store float %219, ptr %189, align 4, !tbaa !9
  %220 = getelementptr inbounds float, ptr %16, i64 3
  %221 = load float, ptr %6, align 4, !tbaa !9
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.KalmanRollPitch, ptr %222, i32 0, i32 3
  %224 = getelementptr inbounds [2 x float], ptr %223, i64 0, i64 1
  %225 = load float, ptr %224, align 4, !tbaa !9
  %226 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 2
  %227 = load float, ptr %226, align 8, !tbaa !9
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.KalmanRollPitch, ptr %228, i32 0, i32 2
  %230 = getelementptr inbounds [4 x float], ptr %229, i64 0, i64 1
  %231 = load float, ptr %230, align 4, !tbaa !9
  %232 = call float @llvm.fmuladd.f32(float %227, float %231, float %225)
  %233 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 2
  %234 = load float, ptr %233, align 8, !tbaa !9
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.KalmanRollPitch, ptr %235, i32 0, i32 2
  %237 = getelementptr inbounds [4 x float], ptr %236, i64 0, i64 2
  %238 = load float, ptr %237, align 4, !tbaa !9
  %239 = call float @llvm.fmuladd.f32(float %234, float %238, float %232)
  %240 = getelementptr inbounds [4 x float], ptr %15, i64 0, i64 3
  %241 = load float, ptr %240, align 4, !tbaa !9
  %242 = fmul float 2.000000e+00, %241
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.KalmanRollPitch, ptr %243, i32 0, i32 2
  %245 = getelementptr inbounds [4 x float], ptr %244, i64 0, i64 3
  %246 = load float, ptr %245, align 4, !tbaa !9
  %247 = call float @llvm.fmuladd.f32(float %242, float %246, float %239)
  %248 = fmul float %221, %247
  store float %248, ptr %220, align 4, !tbaa !9
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.KalmanRollPitch, ptr %249, i32 0, i32 2
  %251 = getelementptr inbounds [4 x float], ptr %250, i64 0, i64 0
  %252 = load float, ptr %251, align 4, !tbaa !9
  %253 = getelementptr inbounds [4 x float], ptr %16, i64 0, i64 0
  %254 = load float, ptr %253, align 16, !tbaa !9
  %255 = fadd float %252, %254
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.KalmanRollPitch, ptr %256, i32 0, i32 2
  %258 = getelementptr inbounds [4 x float], ptr %257, i64 0, i64 0
  store float %255, ptr %258, align 4, !tbaa !9
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.KalmanRollPitch, ptr %259, i32 0, i32 2
  %261 = getelementptr inbounds [4 x float], ptr %260, i64 0, i64 1
  %262 = load float, ptr %261, align 4, !tbaa !9
  %263 = getelementptr inbounds [4 x float], ptr %16, i64 0, i64 1
  %264 = load float, ptr %263, align 4, !tbaa !9
  %265 = fadd float %262, %264
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.KalmanRollPitch, ptr %266, i32 0, i32 2
  %268 = getelementptr inbounds [4 x float], ptr %267, i64 0, i64 1
  store float %265, ptr %268, align 4, !tbaa !9
  %269 = load ptr, ptr %4, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.KalmanRollPitch, ptr %269, i32 0, i32 2
  %271 = getelementptr inbounds [4 x float], ptr %270, i64 0, i64 2
  %272 = load float, ptr %271, align 4, !tbaa !9
  %273 = getelementptr inbounds [4 x float], ptr %16, i64 0, i64 2
  %274 = load float, ptr %273, align 8, !tbaa !9
  %275 = fadd float %272, %274
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.KalmanRollPitch, ptr %276, i32 0, i32 2
  %278 = getelementptr inbounds [4 x float], ptr %277, i64 0, i64 2
  store float %275, ptr %278, align 4, !tbaa !9
  %279 = load ptr, ptr %4, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.KalmanRollPitch, ptr %279, i32 0, i32 2
  %281 = getelementptr inbounds [4 x float], ptr %280, i64 0, i64 3
  %282 = load float, ptr %281, align 4, !tbaa !9
  %283 = getelementptr inbounds [4 x float], ptr %16, i64 0, i64 3
  %284 = load float, ptr %283, align 4, !tbaa !9
  %285 = fadd float %282, %284
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.KalmanRollPitch, ptr %286, i32 0, i32 2
  %288 = getelementptr inbounds [4 x float], ptr %287, i64 0, i64 3
  store float %285, ptr %288, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind
declare double @sin(double noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #2

; Function Attrs: nounwind
declare double @tan(double noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 24, !7, i64 32}
!13 = !{!12, !10, i64 4}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) uwtable
define dso_local void @KalmanRollPitch_Update(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, float noundef %2) local_unnamed_addr #0 {
  %4 = load float, ptr %1, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 4
  %6 = load float, ptr %5, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = load float, ptr %7, align 4, !tbaa !5
  %9 = load float, ptr %0, align 4, !tbaa !9
  %10 = fpext float %9 to double
  %11 = tail call double @sin(double noundef %10) #4
  %12 = fptrunc double %11 to float
  %13 = load float, ptr %0, align 4, !tbaa !9
  %14 = fpext float %13 to double
  %15 = tail call double @cos(double noundef %14) #4
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load float, ptr %16, align 4, !tbaa !11
  %18 = fpext float %17 to double
  %19 = tail call double @tan(double noundef %18) #4
  %20 = fneg float %8
  %21 = fmul float %20, %12
  %22 = insertelement <2 x double> poison, double %19, i64 0
  %23 = insertelement <2 x double> %22, double %15, i64 1
  %24 = fptrunc <2 x double> %23 to <2 x float>
  %25 = extractelement <2 x float> %24, i64 1
  %26 = fmul float %8, %25
  %27 = tail call float @llvm.fmuladd.f32(float %6, float %12, float %26)
  %28 = load <2 x float>, ptr %0, align 4, !tbaa !5
  %29 = insertelement <2 x float> poison, float %27, i64 0
  %30 = insertelement <2 x float> %29, float %6, i64 1
  %31 = insertelement <2 x float> poison, float %4, i64 0
  %32 = insertelement <2 x float> %31, float %21, i64 1
  %33 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %24, <2 x float> %30, <2 x float> %32)
  %34 = insertelement <2 x float> poison, float %2, i64 0
  %35 = shufflevector <2 x float> %34, <2 x float> poison, <2 x i32> zeroinitializer
  %36 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %35, <2 x float> %33, <2 x float> %28)
  store <2 x float> %36, ptr %0, align 4, !tbaa !5
  %37 = extractelement <2 x float> %36, i64 0
  %38 = fpext float %37 to double
  %39 = tail call double @sin(double noundef %38) #4
  %40 = fptrunc double %39 to float
  %41 = load float, ptr %0, align 4, !tbaa !9
  %42 = fpext float %41 to double
  %43 = tail call double @cos(double noundef %42) #4
  %44 = fptrunc double %43 to float
  %45 = load float, ptr %16, align 4, !tbaa !11
  %46 = fpext float %45 to double
  %47 = tail call double @sin(double noundef %46) #4
  %48 = fptrunc double %47 to float
  %49 = load float, ptr %16, align 4, !tbaa !11
  %50 = fpext float %49 to double
  %51 = tail call double @cos(double noundef %50) #4
  %52 = fptrunc double %51 to float
  %53 = fdiv float %48, %52
  %54 = fmul float %20, %40
  %55 = tail call float @llvm.fmuladd.f32(float %6, float %44, float %54)
  %56 = fmul float %55, %53
  %57 = fmul float %6, %40
  %58 = tail call float @llvm.fmuladd.f32(float %8, float %44, float %57)
  %59 = tail call float @llvm.fmuladd.f32(float %53, float %53, float 1.000000e+00)
  %60 = fmul float %58, %59
  %61 = fneg float %58
  %62 = getelementptr inbounds i8, ptr %0, i64 24
  %63 = load float, ptr %62, align 4, !tbaa !5
  %64 = fmul float %56, 2.000000e+00
  %65 = getelementptr inbounds i8, ptr %0, i64 8
  %66 = getelementptr inbounds i8, ptr %0, i64 28
  %67 = load float, ptr %66, align 4, !tbaa !5
  %68 = load <4 x float>, ptr %65, align 4, !tbaa !5
  %69 = extractelement <4 x float> %68, i64 0
  %70 = fmul float %69, %61
  %71 = insertelement <4 x float> poison, float %64, i64 0
  %72 = insertelement <4 x float> %71, float %56, i64 1
  %73 = insertelement <4 x float> %72, float %61, i64 3
  %74 = shufflevector <4 x float> %73, <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 1, i32 3>
  %75 = shufflevector <4 x float> %68, <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 1>
  %76 = insertelement <4 x float> poison, float %63, i64 0
  %77 = insertelement <4 x float> %76, float %70, i64 1
  %78 = insertelement <4 x float> %77, float %67, i64 3
  %79 = shufflevector <4 x float> %78, <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 1, i32 3>
  %80 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %74, <4 x float> %75, <4 x float> %79)
  %81 = shufflevector <4 x float> %73, <4 x float> poison, <2 x i32> <i32 poison, i32 3>
  %82 = insertelement <2 x float> %81, float %60, i64 0
  %83 = shufflevector <2 x float> %82, <2 x float> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
  %84 = shufflevector <4 x float> %68, <4 x float> poison, <4 x i32> <i32 1, i32 3, i32 3, i32 2>
  %85 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %83, <4 x float> %84, <4 x float> %80)
  %86 = shufflevector <4 x float> %83, <4 x float> <float poison, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
  %87 = shufflevector <4 x float> %68, <4 x float> poison, <4 x i32> <i32 2, i32 1, i32 2, i32 3>
  %88 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %86, <4 x float> %87, <4 x float> %85)
  %89 = insertelement <4 x float> poison, float %2, i64 0
  %90 = shufflevector <4 x float> %89, <4 x float> poison, <4 x i32> zeroinitializer
  %91 = fmul <4 x float> %88, %90
  %92 = fadd <4 x float> %68, %91
  store <4 x float> %92, ptr %65, align 4, !tbaa !5
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @tan(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #3

attributes #0 = { mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !6, i64 0, !6, i64 4, !7, i64 8, !7, i64 24, !7, i64 32}
!11 = !{!10, !6, i64 4}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass