; LLVM IR from yangfengzzz/DigitalVox3 :: vox.render/maths (quaternion)

; 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.vox::math::Quaternion" = type { float, float, float, float }
%"struct.vox::math::Matrix3x3" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x float] }

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, <2 x float> } @_ZN3vox4math10Quaternion17rotationMatrix3x3ERKNS0_9Matrix3x3E(ptr noundef nonnull align 4 dereferenceable(36) %0) #0 align 2 {
  %2 = alloca %"struct.vox::math::Quaternion", align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @_ZN3vox4math10QuaternionC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.vox::math::Matrix3x3", ptr %17, i32 0, i32 0
  store ptr %18, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %19, i64 noundef 0) #5
  store ptr %20, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %21, i64 noundef 1) #5
  %23 = load float, ptr %22, align 4, !tbaa !9
  store float %23, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %24, i64 noundef 2) #5
  %26 = load float, ptr %25, align 4, !tbaa !9
  store float %26, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %27, i64 noundef 3) #5
  store ptr %28, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %29, i64 noundef 4) #5
  %31 = load float, ptr %30, align 4, !tbaa !9
  store float %31, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %32, i64 noundef 5) #5
  %34 = load float, ptr %33, align 4, !tbaa !9
  store float %34, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %35, i64 noundef 6) #5
  store ptr %36, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %37, i64 noundef 7) #5
  %39 = load float, ptr %38, align 4, !tbaa !9
  store float %39, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %40, i64 noundef 8) #5
  %42 = load float, ptr %41, align 4, !tbaa !9
  store float %42, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load float, ptr %43, align 4, !tbaa !9
  %45 = load float, ptr %9, align 4, !tbaa !9
  %46 = fadd float %44, %45
  %47 = load float, ptr %13, align 4, !tbaa !9
  %48 = fadd float %46, %47
  store float %48, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %49 = load float, ptr %14, align 4, !tbaa !9
  %50 = fcmp ogt float %49, 0.000000e+00
  br i1 %50, label %51, label %86

51:                                               ; preds = %1
  %52 = load float, ptr %14, align 4, !tbaa !9
  %53 = fpext float %52 to double
  %54 = fadd double %53, 1.000000e+00
  %55 = call double @sqrt(double noundef %54) #5
  %56 = fptrunc double %55 to float
  store float %56, ptr %15, align 4, !tbaa !9
  %57 = load float, ptr %15, align 4, !tbaa !9
  %58 = fpext float %57 to double
  %59 = fmul double %58, 5.000000e-01
  %60 = fptrunc double %59 to float
  %61 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 3
  store float %60, ptr %61, align 4, !tbaa !11
  %62 = load float, ptr %15, align 4, !tbaa !9
  %63 = fpext float %62 to double
  %64 = fdiv double 5.000000e-01, %63
  %65 = fptrunc double %64 to float
  store float %65, ptr %15, align 4, !tbaa !9
  %66 = load float, ptr %10, align 4, !tbaa !9
  %67 = load float, ptr %12, align 4, !tbaa !9
  %68 = fsub float %66, %67
  %69 = load float, ptr %15, align 4, !tbaa !9
  %70 = fmul float %68, %69
  %71 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 0
  store float %70, ptr %71, align 4, !tbaa !13
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = load float, ptr %72, align 4, !tbaa !9
  %74 = load float, ptr %7, align 4, !tbaa !9
  %75 = fsub float %73, %74
  %76 = load float, ptr %15, align 4, !tbaa !9
  %77 = fmul float %75, %76
  %78 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 1
  store float %77, ptr %78, align 4, !tbaa !14
  %79 = load float, ptr %6, align 4, !tbaa !9
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load float, ptr %80, align 4, !tbaa !9
  %82 = fsub float %79, %81
  %83 = load float, ptr %15, align 4, !tbaa !9
  %84 = fmul float %82, %83
  %85 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 2
  store float %84, ptr %85, align 4, !tbaa !15
  br label %228

86:                                               ; preds = %1
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = load float, ptr %87, align 4, !tbaa !9
  %89 = load float, ptr %9, align 4, !tbaa !9
  %90 = fcmp oge float %88, %89
  br i1 %90, label %91, label %138

91:                                               ; preds = %86
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load float, ptr %92, align 4, !tbaa !9
  %94 = load float, ptr %13, align 4, !tbaa !9
  %95 = fcmp oge float %93, %94
  br i1 %95, label %96, label %138

96:                                               ; preds = %91
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load float, ptr %97, align 4, !tbaa !9
  %99 = fpext float %98 to double
  %100 = fadd double 1.000000e+00, %99
  %101 = load float, ptr %9, align 4, !tbaa !9
  %102 = fpext float %101 to double
  %103 = fsub double %100, %102
  %104 = load float, ptr %13, align 4, !tbaa !9
  %105 = fpext float %104 to double
  %106 = fsub double %103, %105
  %107 = call double @sqrt(double noundef %106) #5
  %108 = fptrunc double %107 to float
  store float %108, ptr %15, align 4, !tbaa !9
  %109 = load float, ptr %15, align 4, !tbaa !9
  %110 = fpext float %109 to double
  %111 = fdiv double 5.000000e-01, %110
  %112 = fptrunc double %111 to float
  store float %112, ptr %16, align 4, !tbaa !9
  %113 = load float, ptr %15, align 4, !tbaa !9
  %114 = fpext float %113 to double
  %115 = fmul double 5.000000e-01, %114
  %116 = fptrunc double %115 to float
  %117 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 0
  store float %116, ptr %117, align 4, !tbaa !13
  %118 = load float, ptr %6, align 4, !tbaa !9
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load float, ptr %119, align 4, !tbaa !9
  %121 = fadd float %118, %120
  %122 = load float, ptr %16, align 4, !tbaa !9
  %123 = fmul float %121, %122
  %124 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 1
  store float %123, ptr %124, align 4, !tbaa !14
  %125 = load float, ptr %7, align 4, !tbaa !9
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = load float, ptr %126, align 4, !tbaa !9
  %128 = fadd float %125, %127
  %129 = load float, ptr %16, align 4, !tbaa !9
  %130 = fmul float %128, %129
  %131 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 2
  store float %130, ptr %131, align 4, !tbaa !15
  %132 = load float, ptr %10, align 4, !tbaa !9
  %133 = load float, ptr %12, align 4, !tbaa !9
  %134 = fsub float %132, %133
  %135 = load float, ptr %16, align 4, !tbaa !9
  %136 = fmul float %134, %135
  %137 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 3
  store float %136, ptr %137, align 4, !tbaa !11
  br label %227

138:                                              ; preds = %91, %86
  %139 = load float, ptr %9, align 4, !tbaa !9
  %140 = load float, ptr %13, align 4, !tbaa !9
  %141 = fcmp ogt float %139, %140
  br i1 %141, label %142, label %184

142:                                              ; preds = %138
  %143 = load float, ptr %9, align 4, !tbaa !9
  %144 = fpext float %143 to double
  %145 = fadd double 1.000000e+00, %144
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load float, ptr %146, align 4, !tbaa !9
  %148 = fpext float %147 to double
  %149 = fsub double %145, %148
  %150 = load float, ptr %13, align 4, !tbaa !9
  %151 = fpext float %150 to double
  %152 = fsub double %149, %151
  %153 = call double @sqrt(double noundef %152) #5
  %154 = fptrunc double %153 to float
  store float %154, ptr %15, align 4, !tbaa !9
  %155 = load float, ptr %15, align 4, !tbaa !9
  %156 = fpext float %155 to double
  %157 = fdiv double 5.000000e-01, %156
  %158 = fptrunc double %157 to float
  store float %158, ptr %16, align 4, !tbaa !9
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = load float, ptr %159, align 4, !tbaa !9
  %161 = load float, ptr %6, align 4, !tbaa !9
  %162 = fadd float %160, %161
  %163 = load float, ptr %16, align 4, !tbaa !9
  %164 = fmul float %162, %163
  %165 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 0
  store float %164, ptr %165, align 4, !tbaa !13
  %166 = load float, ptr %15, align 4, !tbaa !9
  %167 = fpext float %166 to double
  %168 = fmul double 5.000000e-01, %167
  %169 = fptrunc double %168 to float
  %170 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 1
  store float %169, ptr %170, align 4, !tbaa !14
  %171 = load float, ptr %12, align 4, !tbaa !9
  %172 = load float, ptr %10, align 4, !tbaa !9
  %173 = fadd float %171, %172
  %174 = load float, ptr %16, align 4, !tbaa !9
  %175 = fmul float %173, %174
  %176 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 2
  store float %175, ptr %176, align 4, !tbaa !15
  %177 = load ptr, ptr %11, align 8, !tbaa !5
  %178 = load float, ptr %177, align 4, !tbaa !9
  %179 = load float, ptr %7, align 4, !tbaa !9
  %180 = fsub float %178, %179
  %181 = load float, ptr %16, align 4, !tbaa !9
  %182 = fmul float %180, %181
  %183 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 3
  store float %182, ptr %183, align 4, !tbaa !11
  br label %226

184:                                              ; preds = %138
  %185 = load float, ptr %13, align 4, !tbaa !9
  %186 = fpext float %185 to double
  %187 = fadd double 1.000000e+00, %186
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = load float, ptr %188, align 4, !tbaa !9
  %190 = fpext float %189 to double
  %191 = fsub double %187, %190
  %192 = load float, ptr %9, align 4, !tbaa !9
  %193 = fpext float %192 to double
  %194 = fsub double %191, %193
  %195 = call double @sqrt(double noundef %194) #5
  %196 = fptrunc double %195 to float
  store float %196, ptr %15, align 4, !tbaa !9
  %197 = load float, ptr %15, align 4, !tbaa !9
  %198 = fpext float %197 to double
  %199 = fdiv double 5.000000e-01, %198
  %200 = fptrunc double %199 to float
  store float %200, ptr %16, align 4, !tbaa !9
  %201 = load float, ptr %7, align 4, !tbaa !9
  %202 = load ptr, ptr %11, align 8, !tbaa !5
  %203 = load float, ptr %202, align 4, !tbaa !9
  %204 = fadd float %201, %203
  %205 = load float, ptr %16, align 4, !tbaa !9
  %206 = fmul float %204, %205
  %207 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 0
  store float %206, ptr %207, align 4, !tbaa !13
  %208 = load float, ptr %10, align 4, !tbaa !9
  %209 = load float, ptr %12, align 4, !tbaa !9
  %210 = fadd float %208, %209
  %211 = load float, ptr %16, align 4, !tbaa !9
  %212 = fmul float %210, %211
  %213 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 1
  store float %212, ptr %213, align 4, !tbaa !14
  %214 = load float, ptr %15, align 4, !tbaa !9
  %215 = fpext float %214 to double
  %216 = fmul double 5.000000e-01, %215
  %217 = fptrunc double %216 to float
  %218 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 2
  store float %217, ptr %218, align 4, !tbaa !15
  %219 = load float, ptr %6, align 4, !tbaa !9
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = load float, ptr %220, align 4, !tbaa !9
  %222 = fsub float %219, %221
  %223 = load float, ptr %16, align 4, !tbaa !9
  %224 = fmul float %222, %223
  %225 = getelementptr inbounds %"struct.vox::math::Quaternion", ptr %2, i32 0, i32 3
  store float %224, ptr %225, align 4, !tbaa !11
  br label %226

226:                                              ; preds = %184, %142
  br label %227

227:                                              ; preds = %226, %96
  br label %228

228:                                              ; preds = %227, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %229 = load { <2 x float>, <2 x float> }, ptr %2, align 4
  ret { <2 x float>, <2 x float> } %229
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3vox4math10QuaternionC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef) #3 align 2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

attributes #0 = { mustprogress 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 = { alwaysinline mustprogress 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 #4 = { 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 #5 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 12}
!12 = !{!"_ZTSN3vox4math10QuaternionE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !10, i64 8}


; 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"

%"struct.vox::math::Quaternion" = type { float, float, float, float }

; Function Attrs: mustprogress nounwind uwtable
define dso_local { <2 x float>, <2 x float> } @_ZN3vox4math10Quaternion17rotationMatrix3x3ERKNS0_9Matrix3x3E(ptr noundef nonnull align 4 dereferenceable(36) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"struct.vox::math::Quaternion", align 8
  call void @_ZN3vox4math10QuaternionC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %3 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 0) #3
  %4 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 1) #3
  %5 = load float, ptr %4, align 4, !tbaa !5
  %6 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 2) #3
  %7 = load float, ptr %6, align 4, !tbaa !5
  %8 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 3) #3
  %9 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 4) #3
  %10 = load float, ptr %9, align 4, !tbaa !5
  %11 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 5) #3
  %12 = load float, ptr %11, align 4, !tbaa !5
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 6) #3
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 7) #3
  %15 = load float, ptr %14, align 4, !tbaa !5
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36) %0, i64 noundef 8) #3
  %17 = load float, ptr %16, align 4, !tbaa !5
  %18 = load float, ptr %3, align 4, !tbaa !5
  %19 = fadd float %10, %18
  %20 = fadd float %17, %19
  %21 = fcmp ogt float %20, 0.000000e+00
  %.sink80.sroa.gep = getelementptr inbounds i8, ptr %2, i64 12
  %.sink80.sroa.gep81 = getelementptr inbounds i8, ptr %2, i64 12
  %.sink80.sroa.gep82 = getelementptr inbounds i8, ptr %2, i64 12
  br i1 %21, label %22, label %39

22:                                               ; preds = %1
  %.sink80.sroa.gep83 = getelementptr inbounds i8, ptr %2, i64 8
  %23 = fpext float %20 to double
  %24 = fadd double %23, 1.000000e+00
  %25 = call double @sqrt(double noundef %24) #3
  %26 = fptrunc double %25 to float
  %27 = fmul float %26, 5.000000e-01
  %28 = getelementptr inbounds i8, ptr %2, i64 12
  store float %27, ptr %28, align 4, !tbaa !9
  %29 = fdiv float 5.000000e-01, %26
  %30 = fsub float %12, %15
  %31 = fmul float %30, %29
  store float %31, ptr %2, align 8, !tbaa !11
  %32 = load float, ptr %13, align 4, !tbaa !5
  %33 = fsub float %32, %7
  %34 = fmul float %29, %33
  %35 = getelementptr inbounds i8, ptr %2, i64 4
  store float %34, ptr %35, align 4, !tbaa !12
  %36 = load float, ptr %8, align 4, !tbaa !5
  %37 = fsub float %5, %36
  %38 = fmul float %29, %37
  br label %109

39:                                               ; preds = %1
  %40 = fcmp ult float %18, %10
  %41 = fcmp ult float %18, %17
  %or.cond = or i1 %40, %41
  br i1 %or.cond, label %63, label %42

42:                                               ; preds = %39
  %43 = fpext float %18 to double
  %44 = fadd double %43, 1.000000e+00
  %45 = fpext float %10 to double
  %46 = fsub double %44, %45
  %47 = fpext float %17 to double
  %48 = fsub double %46, %47
  %49 = call double @sqrt(double noundef %48) #3
  %50 = fptrunc double %49 to float
  %51 = fdiv float 5.000000e-01, %50
  %52 = fmul float %50, 5.000000e-01
  store float %52, ptr %2, align 8, !tbaa !11
  %53 = load float, ptr %8, align 4, !tbaa !5
  %54 = fadd float %5, %53
  %55 = fmul float %51, %54
  %56 = getelementptr inbounds i8, ptr %2, i64 4
  store float %55, ptr %56, align 4, !tbaa !12
  %57 = load float, ptr %13, align 4, !tbaa !5
  %58 = fadd float %7, %57
  %59 = fmul float %51, %58
  %60 = getelementptr inbounds i8, ptr %2, i64 8
  store float %59, ptr %60, align 8, !tbaa !13
  %61 = fsub float %12, %15
  %62 = fmul float %61, %51
  br label %109

63:                                               ; preds = %39
  %64 = fcmp ogt float %10, %17
  %65 = fpext float %18 to double
  %66 = getelementptr inbounds i8, ptr %2, i64 8
  br i1 %64, label %67, label %87

67:                                               ; preds = %63
  %68 = fpext float %10 to double
  %69 = fadd double %68, 1.000000e+00
  %70 = fsub double %69, %65
  %71 = fpext float %17 to double
  %72 = fsub double %70, %71
  %73 = call double @sqrt(double noundef %72) #3
  %74 = fptrunc double %73 to float
  %75 = fdiv float 5.000000e-01, %74
  %76 = load float, ptr %8, align 4, !tbaa !5
  %77 = fadd float %5, %76
  %78 = insertelement <2 x float> poison, float %77, i64 0
  %79 = insertelement <2 x float> %78, float %74, i64 1
  %80 = insertelement <2 x float> <float poison, float 5.000000e-01>, float %75, i64 0
  %81 = fmul <2 x float> %79, %80
  store <2 x float> %81, ptr %2, align 8, !tbaa !5
  %82 = fadd float %12, %15
  %83 = fmul float %82, %75
  store float %83, ptr %66, align 8, !tbaa !13
  %84 = load float, ptr %13, align 4, !tbaa !5
  %85 = fsub float %84, %7
  %86 = fmul float %75, %85
  br label %109

87:                                               ; preds = %63
  %88 = fpext float %17 to double
  %89 = fadd double %88, 1.000000e+00
  %90 = fsub double %89, %65
  %91 = fpext float %10 to double
  %92 = fsub double %90, %91
  %93 = call double @sqrt(double noundef %92) #3
  %94 = fptrunc double %93 to float
  %95 = fdiv float 5.000000e-01, %94
  %96 = load float, ptr %13, align 4, !tbaa !5
  %97 = insertelement <2 x float> poison, float %7, i64 0
  %98 = insertelement <2 x float> %97, float %12, i64 1
  %99 = insertelement <2 x float> poison, float %96, i64 0
  %100 = insertelement <2 x float> %99, float %15, i64 1
  %101 = fadd <2 x float> %98, %100
  %102 = insertelement <2 x float> poison, float %95, i64 0
  %103 = shufflevector <2 x float> %102, <2 x float> poison, <2 x i32> zeroinitializer
  %104 = fmul <2 x float> %101, %103
  store <2 x float> %104, ptr %2, align 8, !tbaa !5
  %105 = fmul float %94, 5.000000e-01
  store float %105, ptr %66, align 8, !tbaa !13
  %106 = load float, ptr %8, align 4, !tbaa !5
  %107 = fsub float %5, %106
  %108 = fmul float %95, %107
  br label %109

109:                                              ; preds = %42, %87, %67, %22
  %.sink80.sroa.phi = phi ptr [ %.sink80.sroa.gep, %42 ], [ %.sink80.sroa.gep81, %87 ], [ %.sink80.sroa.gep82, %67 ], [ %.sink80.sroa.gep83, %22 ]
  %.sink = phi float [ %62, %42 ], [ %108, %87 ], [ %86, %67 ], [ %38, %22 ]
  store float %.sink, ptr %.sink80.sroa.phi, align 4, !tbaa !5
  %.fca.0.load = load <2 x float>, ptr %2, align 8
  %.fca.0.insert = insertvalue { <2 x float>, <2 x float> } poison, <2 x float> %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %2, i64 8
  %.fca.1.load = load <2 x float>, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { <2 x float>, <2 x float> } %.fca.0.insert, <2 x float> %.fca.1.load, 1
  ret { <2 x float>, <2 x float> } %.fca.1.insert
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3vox4math10QuaternionC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt5arrayIfLm9EEixEm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef) local_unnamed_addr #0 align 2

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

attributes #0 = { mustprogress 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 = { alwaysinline mustprogress 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 #2 = { 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 #3 = { 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++ TBAA"}
!9 = !{!10, !6, i64 12}
!10 = !{!"_ZTSN3vox4math10QuaternionE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = !{!10, !6, i64 0}
!12 = !{!10, !6, i64 4}
!13 = !{!10, !6, i64 8}


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