; LLVM IR from robinrodricks/InspiritImage :: Inspirit.Assurf/clib/rpp (rpp_vecmat)

; 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.mat33_t = type { [9 x double] }

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

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

; Function Attrs: inlinehint nounwind uwtable
declare void @mat33_clear(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @mat33_svd2(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [9 x double], align 16
  %10 = alloca [3 x double], align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  call void @mat33_clear(ptr noundef %16)
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  call void @mat33_clear(ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 24, i1 false)
  %18 = getelementptr inbounds [9 x double], ptr %9, i64 0, i64 0
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.mat33_t, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds [9 x double], ptr %20, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 8 %21, i64 72, i1 false)
  %22 = getelementptr inbounds [9 x double], ptr %9, i64 0, i64 0
  %23 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mat33_t, ptr %24, i32 0, i32 0
  %26 = getelementptr inbounds [9 x double], ptr %25, i64 0, i64 0
  %27 = call i32 @svdcmp(ptr noundef %22, i32 noundef 3, i32 noundef 3, ptr noundef %23, ptr noundef %26)
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.mat33_t, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds [9 x double], ptr %29, i64 0, i64 0
  %31 = getelementptr inbounds [9 x double], ptr %9, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 16 %31, i64 72, i1 false)
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mat33_clear(ptr noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.mat33_t, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds [9 x double], ptr %34, i64 0, i64 0
  store ptr %35, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.mat33_t, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds [9 x double], ptr %37, i64 0, i64 0
  store ptr %38, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.mat33_t, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds [9 x double], ptr %40, i64 0, i64 0
  store ptr %41, ptr %13, align 8, !tbaa !5
  %42 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %43 = load double, ptr %42, align 16, !tbaa !9
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = getelementptr inbounds double, ptr %44, i64 0
  store double %43, ptr %45, align 8, !tbaa !9
  %46 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 1
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %48, i64 4
  store double %47, ptr %49, align 8, !tbaa !9
  %50 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 2
  %51 = load double, ptr %50, align 16, !tbaa !9
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %52, i64 8
  store double %51, ptr %53, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  br label %54

54:                                               ; preds = %229, %4
  %55 = load i32, ptr %14, align 4, !tbaa !11
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %230

57:                                               ; preds = %54
  store i32 1, ptr %14, align 4, !tbaa !11
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i64 0
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %61, i64 4
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = fcmp olt double %60, %63
  br i1 %64, label %65, label %143

65:                                               ; preds = %57
  store i32 0, ptr %14, align 4, !tbaa !11
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %66, i64 0
  %68 = load double, ptr %67, align 8, !tbaa !9
  store double %68, ptr %15, align 8, !tbaa !9
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = getelementptr inbounds double, ptr %69, i64 4
  %71 = load double, ptr %70, align 8, !tbaa !9
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %72, i64 0
  store double %71, ptr %73, align 8, !tbaa !9
  %74 = load double, ptr %15, align 8, !tbaa !9
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 4
  store double %74, ptr %76, align 8, !tbaa !9
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 0
  %79 = load double, ptr %78, align 8, !tbaa !9
  store double %79, ptr %15, align 8, !tbaa !9
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %80, i64 1
  %82 = load double, ptr %81, align 8, !tbaa !9
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds double, ptr %83, i64 0
  store double %82, ptr %84, align 8, !tbaa !9
  %85 = load double, ptr %15, align 8, !tbaa !9
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 1
  store double %85, ptr %87, align 8, !tbaa !9
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %88, i64 0
  %90 = load double, ptr %89, align 8, !tbaa !9
  store double %90, ptr %15, align 8, !tbaa !9
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds double, ptr %91, i64 1
  %93 = load double, ptr %92, align 8, !tbaa !9
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i64 0
  store double %93, ptr %95, align 8, !tbaa !9
  %96 = load double, ptr %15, align 8, !tbaa !9
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = getelementptr inbounds double, ptr %97, i64 1
  store double %96, ptr %98, align 8, !tbaa !9
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds double, ptr %99, i64 3
  %101 = load double, ptr %100, align 8, !tbaa !9
  store double %101, ptr %15, align 8, !tbaa !9
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds double, ptr %102, i64 4
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds double, ptr %105, i64 3
  store double %104, ptr %106, align 8, !tbaa !9
  %107 = load double, ptr %15, align 8, !tbaa !9
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds double, ptr %108, i64 4
  store double %107, ptr %109, align 8, !tbaa !9
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = getelementptr inbounds double, ptr %110, i64 3
  %112 = load double, ptr %111, align 8, !tbaa !9
  store double %112, ptr %15, align 8, !tbaa !9
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = getelementptr inbounds double, ptr %113, i64 4
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = getelementptr inbounds double, ptr %116, i64 3
  store double %115, ptr %117, align 8, !tbaa !9
  %118 = load double, ptr %15, align 8, !tbaa !9
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 4
  store double %118, ptr %120, align 8, !tbaa !9
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds double, ptr %121, i64 6
  %123 = load double, ptr %122, align 8, !tbaa !9
  store double %123, ptr %15, align 8, !tbaa !9
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = getelementptr inbounds double, ptr %124, i64 7
  %126 = load double, ptr %125, align 8, !tbaa !9
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  %128 = getelementptr inbounds double, ptr %127, i64 6
  store double %126, ptr %128, align 8, !tbaa !9
  %129 = load double, ptr %15, align 8, !tbaa !9
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = getelementptr inbounds double, ptr %130, i64 7
  store double %129, ptr %131, align 8, !tbaa !9
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = getelementptr inbounds double, ptr %132, i64 6
  %134 = load double, ptr %133, align 8, !tbaa !9
  store double %134, ptr %15, align 8, !tbaa !9
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %135, i64 7
  %137 = load double, ptr %136, align 8, !tbaa !9
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %138, i64 6
  store double %137, ptr %139, align 8, !tbaa !9
  %140 = load double, ptr %15, align 8, !tbaa !9
  %141 = load ptr, ptr %13, align 8, !tbaa !5
  %142 = getelementptr inbounds double, ptr %141, i64 7
  store double %140, ptr %142, align 8, !tbaa !9
  br label %143

143:                                              ; preds = %65, %57
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 4
  %146 = load double, ptr %145, align 8, !tbaa !9
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = getelementptr inbounds double, ptr %147, i64 8
  %149 = load double, ptr %148, align 8, !tbaa !9
  %150 = fcmp olt double %146, %149
  br i1 %150, label %151, label %229

151:                                              ; preds = %143
  store i32 0, ptr %14, align 4, !tbaa !11
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds double, ptr %152, i64 4
  %154 = load double, ptr %153, align 8, !tbaa !9
  store double %154, ptr %15, align 8, !tbaa !9
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds double, ptr %155, i64 8
  %157 = load double, ptr %156, align 8, !tbaa !9
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = getelementptr inbounds double, ptr %158, i64 4
  store double %157, ptr %159, align 8, !tbaa !9
  %160 = load double, ptr %15, align 8, !tbaa !9
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = getelementptr inbounds double, ptr %161, i64 8
  store double %160, ptr %162, align 8, !tbaa !9
  %163 = load ptr, ptr %12, align 8, !tbaa !5
  %164 = getelementptr inbounds double, ptr %163, i64 1
  %165 = load double, ptr %164, align 8, !tbaa !9
  store double %165, ptr %15, align 8, !tbaa !9
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = getelementptr inbounds double, ptr %166, i64 2
  %168 = load double, ptr %167, align 8, !tbaa !9
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  %170 = getelementptr inbounds double, ptr %169, i64 1
  store double %168, ptr %170, align 8, !tbaa !9
  %171 = load double, ptr %15, align 8, !tbaa !9
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = getelementptr inbounds double, ptr %172, i64 2
  store double %171, ptr %173, align 8, !tbaa !9
  %174 = load ptr, ptr %13, align 8, !tbaa !5
  %175 = getelementptr inbounds double, ptr %174, i64 1
  %176 = load double, ptr %175, align 8, !tbaa !9
  store double %176, ptr %15, align 8, !tbaa !9
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = getelementptr inbounds double, ptr %177, i64 2
  %179 = load double, ptr %178, align 8, !tbaa !9
  %180 = load ptr, ptr %13, align 8, !tbaa !5
  %181 = getelementptr inbounds double, ptr %180, i64 1
  store double %179, ptr %181, align 8, !tbaa !9
  %182 = load double, ptr %15, align 8, !tbaa !9
  %183 = load ptr, ptr %13, align 8, !tbaa !5
  %184 = getelementptr inbounds double, ptr %183, i64 2
  store double %182, ptr %184, align 8, !tbaa !9
  %185 = load ptr, ptr %12, align 8, !tbaa !5
  %186 = getelementptr inbounds double, ptr %185, i64 4
  %187 = load double, ptr %186, align 8, !tbaa !9
  store double %187, ptr %15, align 8, !tbaa !9
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = getelementptr inbounds double, ptr %188, i64 5
  %190 = load double, ptr %189, align 8, !tbaa !9
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = getelementptr inbounds double, ptr %191, i64 4
  store double %190, ptr %192, align 8, !tbaa !9
  %193 = load double, ptr %15, align 8, !tbaa !9
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = getelementptr inbounds double, ptr %194, i64 5
  store double %193, ptr %195, align 8, !tbaa !9
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = getelementptr inbounds double, ptr %196, i64 4
  %198 = load double, ptr %197, align 8, !tbaa !9
  store double %198, ptr %15, align 8, !tbaa !9
  %199 = load ptr, ptr %13, align 8, !tbaa !5
  %200 = getelementptr inbounds double, ptr %199, i64 5
  %201 = load double, ptr %200, align 8, !tbaa !9
  %202 = load ptr, ptr %13, align 8, !tbaa !5
  %203 = getelementptr inbounds double, ptr %202, i64 4
  store double %201, ptr %203, align 8, !tbaa !9
  %204 = load double, ptr %15, align 8, !tbaa !9
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = getelementptr inbounds double, ptr %205, i64 5
  store double %204, ptr %206, align 8, !tbaa !9
  %207 = load ptr, ptr %12, align 8, !tbaa !5
  %208 = getelementptr inbounds double, ptr %207, i64 7
  %209 = load double, ptr %208, align 8, !tbaa !9
  store double %209, ptr %15, align 8, !tbaa !9
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  %211 = getelementptr inbounds double, ptr %210, i64 8
  %212 = load double, ptr %211, align 8, !tbaa !9
  %213 = load ptr, ptr %12, align 8, !tbaa !5
  %214 = getelementptr inbounds double, ptr %213, i64 7
  store double %212, ptr %214, align 8, !tbaa !9
  %215 = load double, ptr %15, align 8, !tbaa !9
  %216 = load ptr, ptr %12, align 8, !tbaa !5
  %217 = getelementptr inbounds double, ptr %216, i64 8
  store double %215, ptr %217, align 8, !tbaa !9
  %218 = load ptr, ptr %13, align 8, !tbaa !5
  %219 = getelementptr inbounds double, ptr %218, i64 7
  %220 = load double, ptr %219, align 8, !tbaa !9
  store double %220, ptr %15, align 8, !tbaa !9
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = getelementptr inbounds double, ptr %221, i64 8
  %223 = load double, ptr %222, align 8, !tbaa !9
  %224 = load ptr, ptr %13, align 8, !tbaa !5
  %225 = getelementptr inbounds double, ptr %224, i64 7
  store double %223, ptr %225, align 8, !tbaa !9
  %226 = load double, ptr %15, align 8, !tbaa !9
  %227 = load ptr, ptr %13, align 8, !tbaa !5
  %228 = getelementptr inbounds double, ptr %227, i64 8
  store double %226, ptr %228, align 8, !tbaa !9
  br label %229

229:                                              ; preds = %151, %143
  br label %54, !llvm.loop !13

230:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #6
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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) #4

declare i32 @svdcmp(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 }

!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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: inlinehint nounwind uwtable
declare void @mat33_clear(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @mat33_svd2(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #2 {
  %5 = alloca [9 x double], align 16
  %6 = alloca [3 x double], align 16
  tail call void @mat33_clear(ptr noundef %0)
  tail call void @mat33_clear(ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(72) %5, ptr noundef nonnull align 8 dereferenceable(72) %3, i64 72, i1 false)
  %7 = call i32 @svdcmp(ptr noundef nonnull %5, i32 noundef 3, i32 noundef 3, ptr noundef nonnull %6, ptr noundef %2) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 16 dereferenceable(72) %5, i64 72, i1 false)
  call void @mat33_clear(ptr noundef %1)
  %8 = load double, ptr %6, align 16, !tbaa !5
  store double %8, ptr %1, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 32
  store double %10, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %6, i64 16
  %13 = load double, ptr %12, align 16, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %1, i64 64
  store double %13, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %19 = getelementptr inbounds i8, ptr %2, i64 24
  %20 = getelementptr inbounds i8, ptr %2, i64 32
  %21 = getelementptr inbounds i8, ptr %0, i64 48
  %22 = getelementptr inbounds i8, ptr %0, i64 56
  %23 = getelementptr inbounds i8, ptr %2, i64 48
  %24 = getelementptr inbounds i8, ptr %2, i64 56
  br label %25

25:                                               ; preds = %4, %59
  %26 = load double, ptr %1, align 8, !tbaa !5
  %27 = load double, ptr %11, align 8, !tbaa !5
  %28 = fcmp olt double %26, %27
  br i1 %28, label %29, label %42

29:                                               ; preds = %25
  store double %27, ptr %1, align 8, !tbaa !5
  store double %26, ptr %11, align 8, !tbaa !5
  %30 = load <2 x double>, ptr %0, align 8, !tbaa !5
  %31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %31, ptr %0, align 8, !tbaa !5
  %32 = load <2 x double>, ptr %2, align 8, !tbaa !5
  %33 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %33, ptr %2, align 8, !tbaa !5
  %34 = load <2 x double>, ptr %17, align 8, !tbaa !5
  %35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %35, ptr %17, align 8, !tbaa !5
  %36 = load <2 x double>, ptr %19, align 8, !tbaa !5
  %37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %37, ptr %19, align 8, !tbaa !5
  %38 = load <2 x double>, ptr %21, align 8, !tbaa !5
  %39 = shufflevector <2 x double> %38, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %39, ptr %21, align 8, !tbaa !5
  %40 = load <2 x double>, ptr %23, align 8, !tbaa !5
  %41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %41, ptr %23, align 8, !tbaa !5
  %.pre = load double, ptr %11, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %29, %25
  %43 = phi double [ %.pre, %29 ], [ %27, %25 ]
  %.1 = phi i32 [ 0, %29 ], [ 1, %25 ]
  %44 = load double, ptr %14, align 8, !tbaa !5
  %45 = fcmp olt double %43, %44
  br i1 %45, label %46, label %59

46:                                               ; preds = %42
  store double %44, ptr %11, align 8, !tbaa !5
  store double %43, ptr %14, align 8, !tbaa !5
  %47 = load <2 x double>, ptr %15, align 8, !tbaa !5
  %48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %48, ptr %15, align 8, !tbaa !5
  %49 = load <2 x double>, ptr %16, align 8, !tbaa !5
  %50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %50, ptr %16, align 8, !tbaa !5
  %51 = load <2 x double>, ptr %18, align 8, !tbaa !5
  %52 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %52, ptr %18, align 8, !tbaa !5
  %53 = load <2 x double>, ptr %20, align 8, !tbaa !5
  %54 = shufflevector <2 x double> %53, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %54, ptr %20, align 8, !tbaa !5
  %55 = load <2 x double>, ptr %22, align 8, !tbaa !5
  %56 = shufflevector <2 x double> %55, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %56, ptr %22, align 8, !tbaa !5
  %57 = load <2 x double>, ptr %24, align 8, !tbaa !5
  %58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %58, ptr %24, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %46, %42
  %.2 = phi i32 [ 0, %46 ], [ %.1, %42 ]
  %60 = icmp eq i32 %.2, 0
  br i1 %60, label %25, label %61, !llvm.loop !9

61:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress 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) #4

declare i32 @svdcmp(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass