; LLVM IR from Try/Tempest :: Engine/thirdparty/squish/maths.ll (ZN6squish25ComputePrincipleComponentERKNS_6Sym3x3E)

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

%"class.squish::Vec3" = type { float, float, float }

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, float } @_ZN6squish25ComputePrincipleComponentERKNS_6Sym3x3E(ptr noundef nonnull align 4 dereferenceable(24) %0) #4 {
  %2 = alloca %"class.squish::Vec3", align 4
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %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
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca { <2 x float>, float }, align 8
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca { <2 x float>, float }, align 8
  %25 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %26, i32 noundef 0)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %28, i32 noundef 3)
  %30 = fmul float %27, %29
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %31, i32 noundef 5)
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %33, i32 noundef 1)
  %35 = fmul float 2.000000e+00, %34
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %36, i32 noundef 2)
  %38 = fmul float %35, %37
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %39, i32 noundef 4)
  %41 = fmul float %38, %40
  %42 = call float @llvm.fmuladd.f32(float %30, float %32, float %41)
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %43, i32 noundef 0)
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %45, i32 noundef 4)
  %47 = fmul float %44, %46
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %48, i32 noundef 4)
  %50 = fneg float %47
  %51 = call float @llvm.fmuladd.f32(float %50, float %49, float %42)
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %52, i32 noundef 3)
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %54, i32 noundef 2)
  %56 = fmul float %53, %55
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %57, i32 noundef 2)
  %59 = fneg float %56
  %60 = call float @llvm.fmuladd.f32(float %59, float %58, float %51)
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %61, i32 noundef 5)
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %63, i32 noundef 1)
  %65 = fmul float %62, %64
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %66, i32 noundef 1)
  %68 = fneg float %65
  %69 = call float @llvm.fmuladd.f32(float %68, float %67, float %60)
  store float %69, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %70, i32 noundef 0)
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %72, i32 noundef 3)
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %74, i32 noundef 0)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %76, i32 noundef 5)
  %78 = fmul float %75, %77
  %79 = call float @llvm.fmuladd.f32(float %71, float %73, float %78)
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %80, i32 noundef 3)
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %82, i32 noundef 5)
  %84 = call float @llvm.fmuladd.f32(float %81, float %83, float %79)
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %85, i32 noundef 1)
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %87, i32 noundef 1)
  %89 = fneg float %86
  %90 = call float @llvm.fmuladd.f32(float %89, float %88, float %84)
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %91, i32 noundef 2)
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %93, i32 noundef 2)
  %95 = fneg float %92
  %96 = call float @llvm.fmuladd.f32(float %95, float %94, float %90)
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %97, i32 noundef 4)
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %99, i32 noundef 4)
  %101 = fneg float %98
  %102 = call float @llvm.fmuladd.f32(float %101, float %100, float %96)
  store float %102, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %103, i32 noundef 0)
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %105, i32 noundef 3)
  %107 = fadd float %104, %106
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %108, i32 noundef 5)
  %110 = fadd float %107, %109
  store float %110, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %111 = load float, ptr %5, align 4, !tbaa !9
  %112 = load float, ptr %6, align 4, !tbaa !9
  %113 = fmul float 0x3FD5555560000000, %112
  %114 = load float, ptr %6, align 4, !tbaa !9
  %115 = fneg float %113
  %116 = call float @llvm.fmuladd.f32(float %115, float %114, float %111)
  store float %116, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %117 = load float, ptr %6, align 4, !tbaa !9
  %118 = fmul float 0xBFB2F684C0000000, %117
  %119 = load float, ptr %6, align 4, !tbaa !9
  %120 = fmul float %118, %119
  %121 = load float, ptr %6, align 4, !tbaa !9
  %122 = load float, ptr %5, align 4, !tbaa !9
  %123 = fmul float 0x3FD5555560000000, %122
  %124 = load float, ptr %6, align 4, !tbaa !9
  %125 = fmul float %123, %124
  %126 = call float @llvm.fmuladd.f32(float %120, float %121, float %125)
  %127 = load float, ptr %4, align 4, !tbaa !9
  %128 = fsub float %126, %127
  store float %128, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %129 = load float, ptr %8, align 4, !tbaa !9
  %130 = fmul float 2.500000e-01, %129
  %131 = load float, ptr %8, align 4, !tbaa !9
  %132 = load float, ptr %7, align 4, !tbaa !9
  %133 = fmul float 0x3FA2F684C0000000, %132
  %134 = load float, ptr %7, align 4, !tbaa !9
  %135 = fmul float %133, %134
  %136 = load float, ptr %7, align 4, !tbaa !9
  %137 = fmul float %135, %136
  %138 = call float @llvm.fmuladd.f32(float %130, float %131, float %137)
  store float %138, ptr %9, align 4, !tbaa !9
  %139 = load float, ptr %9, align 4, !tbaa !9
  %140 = fcmp olt float 0x3E80000000000000, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %1
  call void @_ZN6squish4Vec3C2Ef(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef 1.000000e+00)
  store i32 1, ptr %10, align 4
  br label %248

142:                                              ; preds = %1
  %143 = load float, ptr %9, align 4, !tbaa !9
  %144 = fcmp olt float %143, 0xBE80000000000000
  br i1 %144, label %145, label %213

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %146 = load float, ptr %9, align 4, !tbaa !9
  %147 = fneg float %146
  %148 = call noundef float @_ZSt4sqrtf(float noundef %147)
  %149 = load float, ptr %8, align 4, !tbaa !9
  %150 = fmul float -5.000000e-01, %149
  %151 = call noundef float @_ZSt5atan2ff(float noundef %148, float noundef %150)
  store float %151, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %152 = load float, ptr %8, align 4, !tbaa !9
  %153 = fmul float 2.500000e-01, %152
  %154 = load float, ptr %8, align 4, !tbaa !9
  %155 = load float, ptr %9, align 4, !tbaa !9
  %156 = fneg float %155
  %157 = call float @llvm.fmuladd.f32(float %153, float %154, float %156)
  %158 = call noundef float @_ZSt4sqrtf(float noundef %157)
  store float %158, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %159 = load float, ptr %12, align 4, !tbaa !9
  %160 = call noundef float @_ZSt3powff(float noundef %159, float noundef 0x3FD5555560000000)
  store float %160, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %161 = load float, ptr %11, align 4, !tbaa !9
  %162 = fdiv float %161, 3.000000e+00
  %163 = call noundef float @_ZSt3cosf(float noundef %162)
  store float %163, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %164 = load float, ptr %11, align 4, !tbaa !9
  %165 = fdiv float %164, 3.000000e+00
  %166 = call noundef float @_ZSt3sinf(float noundef %165)
  store float %166, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %167 = load float, ptr %6, align 4, !tbaa !9
  %168 = load float, ptr %13, align 4, !tbaa !9
  %169 = fmul float 2.000000e+00, %168
  %170 = load float, ptr %14, align 4, !tbaa !9
  %171 = fmul float %169, %170
  %172 = call float @llvm.fmuladd.f32(float 0x3FD5555560000000, float %167, float %171)
  store float %172, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %173 = load float, ptr %6, align 4, !tbaa !9
  %174 = load float, ptr %13, align 4, !tbaa !9
  %175 = load float, ptr %14, align 4, !tbaa !9
  %176 = call double @sqrt(double noundef 3.000000e+00) #8
  %177 = fptrunc double %176 to float
  %178 = load float, ptr %15, align 4, !tbaa !9
  %179 = call float @llvm.fmuladd.f32(float %177, float %178, float %175)
  %180 = fmul float %174, %179
  %181 = fneg float %180
  %182 = call float @llvm.fmuladd.f32(float 0x3FD5555560000000, float %173, float %181)
  store float %182, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %183 = load float, ptr %6, align 4, !tbaa !9
  %184 = load float, ptr %13, align 4, !tbaa !9
  %185 = load float, ptr %14, align 4, !tbaa !9
  %186 = call double @sqrt(double noundef 3.000000e+00) #8
  %187 = fptrunc double %186 to float
  %188 = load float, ptr %15, align 4, !tbaa !9
  %189 = fneg float %187
  %190 = call float @llvm.fmuladd.f32(float %189, float %188, float %185)
  %191 = fmul float %184, %190
  %192 = fneg float %191
  %193 = call float @llvm.fmuladd.f32(float 0x3FD5555560000000, float %183, float %192)
  store float %193, ptr %18, align 4, !tbaa !9
  %194 = load float, ptr %17, align 4, !tbaa !9
  %195 = call noundef float @_ZSt4fabsf(float noundef %194)
  %196 = load float, ptr %16, align 4, !tbaa !9
  %197 = call noundef float @_ZSt4fabsf(float noundef %196)
  %198 = fcmp ogt float %195, %197
  br i1 %198, label %199, label %201

199:                                              ; preds = %145
  %200 = load float, ptr %17, align 4, !tbaa !9
  store float %200, ptr %16, align 4, !tbaa !9
  br label %201

201:                                              ; preds = %199, %145
  %202 = load float, ptr %18, align 4, !tbaa !9
  %203 = call noundef float @_ZSt4fabsf(float noundef %202)
  %204 = load float, ptr %16, align 4, !tbaa !9
  %205 = call noundef float @_ZSt4fabsf(float noundef %204)
  %206 = fcmp ogt float %203, %205
  br i1 %206, label %207, label %209

207:                                              ; preds = %201
  %208 = load float, ptr %18, align 4, !tbaa !9
  store float %208, ptr %16, align 4, !tbaa !9
  br label %209

209:                                              ; preds = %207, %201
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = load float, ptr %16, align 4, !tbaa !9
  %212 = call { <2 x float>, float } @_ZN6squishL23GetMultiplicity1EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24) %210, float noundef %211)
  store { <2 x float>, float } %212, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 8 %19, i64 12, i1 false)
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %248

213:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %214 = load float, ptr %8, align 4, !tbaa !9
  %215 = fcmp olt float %214, 0.000000e+00
  br i1 %215, label %216, label %221

216:                                              ; preds = %213
  %217 = load float, ptr %8, align 4, !tbaa !9
  %218 = fmul float -5.000000e-01, %217
  %219 = call noundef float @_ZSt3powff(float noundef %218, float noundef 0x3FD5555560000000)
  %220 = fneg float %219
  store float %220, ptr %20, align 4, !tbaa !9
  br label %225

221:                                              ; preds = %213
  %222 = load float, ptr %8, align 4, !tbaa !9
  %223 = fmul float 5.000000e-01, %222
  %224 = call noundef float @_ZSt3powff(float noundef %223, float noundef 0x3FD5555560000000)
  store float %224, ptr %20, align 4, !tbaa !9
  br label %225

225:                                              ; preds = %221, %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %226 = load float, ptr %6, align 4, !tbaa !9
  %227 = load float, ptr %20, align 4, !tbaa !9
  %228 = call float @llvm.fmuladd.f32(float 0x3FD5555560000000, float %226, float %227)
  store float %228, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %229 = load float, ptr %6, align 4, !tbaa !9
  %230 = load float, ptr %20, align 4, !tbaa !9
  %231 = fmul float 2.000000e+00, %230
  %232 = fneg float %231
  %233 = call float @llvm.fmuladd.f32(float 0x3FD5555560000000, float %229, float %232)
  store float %233, ptr %22, align 4, !tbaa !9
  %234 = load float, ptr %21, align 4, !tbaa !9
  %235 = call noundef float @_ZSt4fabsf(float noundef %234)
  %236 = load float, ptr %22, align 4, !tbaa !9
  %237 = call noundef float @_ZSt4fabsf(float noundef %236)
  %238 = fcmp ogt float %235, %237
  br i1 %238, label %239, label %243

239:                                              ; preds = %225
  %240 = load ptr, ptr %3, align 8, !tbaa !5
  %241 = load float, ptr %21, align 4, !tbaa !9
  %242 = call { <2 x float>, float } @_ZN6squishL23GetMultiplicity2EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24) %240, float noundef %241)
  store { <2 x float>, float } %242, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 8 %23, i64 12, i1 false)
  store i32 1, ptr %10, align 4
  br label %247

243:                                              ; preds = %225
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = load float, ptr %22, align 4, !tbaa !9
  %246 = call { <2 x float>, float } @_ZN6squishL23GetMultiplicity1EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24) %244, float noundef %245)
  store { <2 x float>, float } %246, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 8 %24, i64 12, i1 false)
  store i32 1, ptr %10, align 4
  br label %247

247:                                              ; preds = %243, %239
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %248

248:                                              ; preds = %247, %209, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 4 %2, i64 12, i1 false)
  %249 = load { <2 x float>, float }, ptr %25, align 8
  ret { <2 x float>, float } %249
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5atan2ff(float noundef, float noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3powff(float noundef, float noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, float } @_ZN6squishL23GetMultiplicity1EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24), float noundef) #7

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, float } @_ZN6squishL23GetMultiplicity2EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24), float noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { inlinehint 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 #6 = { 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 #7 = { 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 #8 = { 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}


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

%"class.squish::Vec3" = type { float, float, float }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6squish4Vec3C2Ef(ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, float } @_ZN6squish25ComputePrincipleComponentERKNS_6Sym3x3E(ptr noundef nonnull align 4 dereferenceable(24) %0) local_unnamed_addr #2 {
  %2 = alloca %"class.squish::Vec3", align 8
  %3 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 0)
  %4 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 3)
  %5 = fmul float %3, %4
  %6 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 5)
  %7 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 1)
  %8 = fmul float %7, 2.000000e+00
  %9 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 2)
  %10 = fmul float %8, %9
  %11 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 4)
  %12 = fmul float %10, %11
  %13 = tail call float @llvm.fmuladd.f32(float %5, float %6, float %12)
  %14 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 0)
  %15 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 4)
  %16 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 4)
  %17 = fneg float %14
  %18 = fmul float %15, %17
  %19 = tail call float @llvm.fmuladd.f32(float %18, float %16, float %13)
  %20 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 3)
  %21 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 2)
  %22 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 2)
  %23 = fneg float %20
  %24 = fmul float %21, %23
  %25 = tail call float @llvm.fmuladd.f32(float %24, float %22, float %19)
  %26 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 5)
  %27 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 1)
  %28 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 1)
  %29 = fneg float %26
  %30 = fmul float %27, %29
  %31 = tail call float @llvm.fmuladd.f32(float %30, float %28, float %25)
  %32 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 0)
  %33 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 3)
  %34 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 0)
  %35 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 5)
  %36 = fmul float %34, %35
  %37 = tail call float @llvm.fmuladd.f32(float %32, float %33, float %36)
  %38 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 3)
  %39 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 5)
  %40 = tail call float @llvm.fmuladd.f32(float %38, float %39, float %37)
  %41 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 1)
  %42 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 1)
  %43 = fneg float %41
  %44 = tail call float @llvm.fmuladd.f32(float %43, float %42, float %40)
  %45 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 2)
  %46 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 2)
  %47 = fneg float %45
  %48 = tail call float @llvm.fmuladd.f32(float %47, float %46, float %44)
  %49 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 4)
  %50 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 4)
  %51 = fneg float %49
  %52 = tail call float @llvm.fmuladd.f32(float %51, float %50, float %48)
  %53 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 0)
  %54 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 3)
  %55 = fadd float %53, %54
  %56 = tail call noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef 5)
  %57 = fadd float %55, %56
  %58 = fmul float %57, 0xBFD5555560000000
  %59 = tail call float @llvm.fmuladd.f32(float %58, float %57, float %52)
  %60 = fmul float %57, 0xBFB2F684C0000000
  %61 = fmul float %57, %60
  %62 = fmul float %52, 0x3FD5555560000000
  %63 = fmul float %62, %57
  %64 = tail call float @llvm.fmuladd.f32(float %61, float %57, float %63)
  %65 = fsub float %64, %31
  %66 = fmul float %65, 2.500000e-01
  %67 = fmul float %59, 0x3FA2F684C0000000
  %68 = fmul float %59, %67
  %69 = fmul float %59, %68
  %70 = tail call float @llvm.fmuladd.f32(float %66, float %65, float %69)
  %71 = fcmp ogt float %70, 0x3E80000000000000
  br i1 %71, label %72, label %73

72:                                               ; preds = %1
  call void @_ZN6squish4Vec3C2Ef(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef 1.000000e+00)
  %.sroa.0.0.copyload.pre = load <2 x float>, ptr %2, align 8
  %.sroa.2.0..sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 8
  %.sroa.2.0.copyload.pre = load float, ptr %.sroa.2.0..sroa_idx.phi.trans.insert, align 8
  br label %123

73:                                               ; preds = %1
  %74 = fcmp olt float %70, 0xBE80000000000000
  br i1 %74, label %75, label %103

75:                                               ; preds = %73
  %76 = fneg float %70
  %77 = tail call noundef float @_ZSt4sqrtf(float noundef %76)
  %78 = fmul float %65, -5.000000e-01
  %79 = tail call noundef float @_ZSt5atan2ff(float noundef %77, float noundef %78)
  %80 = tail call float @llvm.fmuladd.f32(float %66, float %65, float %76)
  %81 = tail call noundef float @_ZSt4sqrtf(float noundef %80)
  %82 = tail call noundef float @_ZSt3powff(float noundef %81, float noundef 0x3FD5555560000000)
  %83 = fdiv float %79, 3.000000e+00
  %84 = tail call noundef float @_ZSt3cosf(float noundef %83)
  %85 = tail call noundef float @_ZSt3sinf(float noundef %83)
  %86 = fmul float %82, 2.000000e+00
  %87 = fmul float %86, %84
  %88 = tail call float @llvm.fmuladd.f32(float %57, float 0x3FD5555560000000, float %87)
  %89 = tail call float @llvm.fmuladd.f32(float %85, float 0x3FFBB67AE0000000, float %84)
  %90 = fneg float %82
  %91 = fmul float %89, %90
  %92 = tail call float @llvm.fmuladd.f32(float %57, float 0x3FD5555560000000, float %91)
  %93 = tail call float @llvm.fmuladd.f32(float %85, float 0xBFFBB67AE0000000, float %84)
  %94 = fmul float %93, %90
  %95 = tail call float @llvm.fmuladd.f32(float %57, float 0x3FD5555560000000, float %94)
  %96 = tail call noundef float @_ZSt4fabsf(float noundef %92)
  %97 = tail call noundef float @_ZSt4fabsf(float noundef %88)
  %98 = fcmp ogt float %96, %97
  %.0 = select i1 %98, float %92, float %88
  %99 = tail call noundef float @_ZSt4fabsf(float noundef %95)
  %100 = tail call noundef float @_ZSt4fabsf(float noundef %.0)
  %101 = fcmp ogt float %99, %100
  %.1 = select i1 %101, float %95, float %.0
  %102 = tail call { <2 x float>, float } @_ZN6squishL23GetMultiplicity1EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24) %0, float noundef %.1)
  %.fca.0.extract12 = extractvalue { <2 x float>, float } %102, 0
  %.fca.1.extract13 = extractvalue { <2 x float>, float } %102, 1
  br label %123

103:                                              ; preds = %73
  %104 = fcmp olt float %65, 0.000000e+00
  br i1 %104, label %105, label %109

105:                                              ; preds = %103
  %106 = fmul float %65, -5.000000e-01
  %107 = tail call noundef float @_ZSt3powff(float noundef %106, float noundef 0x3FD5555560000000)
  %108 = fneg float %107
  br label %112

109:                                              ; preds = %103
  %110 = fmul float %65, 5.000000e-01
  %111 = tail call noundef float @_ZSt3powff(float noundef %110, float noundef 0x3FD5555560000000)
  br label %112

112:                                              ; preds = %109, %105
  %.096 = phi float [ %108, %105 ], [ %111, %109 ]
  %113 = tail call float @llvm.fmuladd.f32(float %57, float 0x3FD5555560000000, float %.096)
  %114 = fmul float %.096, -2.000000e+00
  %115 = tail call float @llvm.fmuladd.f32(float %57, float 0x3FD5555560000000, float %114)
  %116 = tail call noundef float @_ZSt4fabsf(float noundef %113)
  %117 = tail call noundef float @_ZSt4fabsf(float noundef %115)
  %118 = fcmp ogt float %116, %117
  br i1 %118, label %119, label %121

119:                                              ; preds = %112
  %120 = tail call { <2 x float>, float } @_ZN6squishL23GetMultiplicity2EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24) %0, float noundef %113)
  %.fca.0.extract3 = extractvalue { <2 x float>, float } %120, 0
  %.fca.1.extract4 = extractvalue { <2 x float>, float } %120, 1
  br label %123

121:                                              ; preds = %112
  %122 = tail call { <2 x float>, float } @_ZN6squishL23GetMultiplicity1EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24) %0, float noundef %115)
  %.fca.0.extract = extractvalue { <2 x float>, float } %122, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %122, 1
  br label %123

123:                                              ; preds = %119, %121, %75, %72
  %.sroa.2.0.copyload = phi float [ %.fca.1.extract4, %119 ], [ %.fca.1.extract, %121 ], [ %.fca.1.extract13, %75 ], [ %.sroa.2.0.copyload.pre, %72 ]
  %.sroa.0.0.copyload = phi <2 x float> [ %.fca.0.extract3, %119 ], [ %.fca.0.extract, %121 ], [ %.fca.0.extract12, %75 ], [ %.sroa.0.0.copyload.pre, %72 ]
  %.fca.0.insert = insertvalue { <2 x float>, float } poison, <2 x float> %.sroa.0.0.copyload, 0
  %.fca.1.insert = insertvalue { <2 x float>, float } %.fca.0.insert, float %.sroa.2.0.copyload, 1
  ret { <2 x float>, float } %.fca.1.insert
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6squish6Sym3x3ixEi(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5atan2ff(float noundef, float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3powff(float noundef, float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, float } @_ZN6squishL23GetMultiplicity1EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24), float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, float } @_ZN6squishL23GetMultiplicity2EvectorERKNS_6Sym3x3Ef(ptr noundef nonnull align 4 dereferenceable(24), float noundef) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { inlinehint 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 = { 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" }

!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)"}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass