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

; 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.vec3_t = type { [3 x double] }
%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

declare void @vec3_copy(ptr noundef, ptr noundef) #1

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

declare double @vec3_dot(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @xform(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @vec3_mult_mat(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: nounwind uwtable
declare dso_local void @optimal_t(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

53:                                               ; preds = %69, %9
  %54 = load i32, ptr %19, align 4, !tbaa !9
  %55 = load i32, ptr %18, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %72

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #5
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  %59 = load i32, ptr %19, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct.mat33_t, ptr %58, i64 %60
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  %63 = load i32, ptr %19, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %struct.vec3_t, ptr %62, i64 %64
  call void @vec3_mult_mat(ptr noundef %24, ptr noundef %61, ptr noundef %65)
  %66 = load i32, ptr %19, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct.vec3_t, ptr %44, i64 %67
  call void @vec3_copy(ptr noundef %68, ptr noundef %24)
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  br label %69

69:                                               ; preds = %57
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %19, align 4, !tbaa !9
  br label %53, !llvm.loop !11

72:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #5
  %73 = load i32, ptr %18, align 4, !tbaa !9
  call void @vec3_array_sum(ptr noundef %25, ptr noundef %41, i32 noundef %73)
  %74 = load i32, ptr %18, align 4, !tbaa !9
  %75 = sitofp i32 %74 to double
  call void @vec3_div(ptr noundef %25, double noundef %75)
  %76 = load i32, ptr %18, align 4, !tbaa !9
  call void @vec3_array_sub(ptr noundef %41, ptr noundef %25, i32 noundef %76)
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #5
  %77 = load i32, ptr %18, align 4, !tbaa !9
  call void @vec3_array_sum(ptr noundef %26, ptr noundef %44, i32 noundef %77)
  %78 = load i32, ptr %18, align 4, !tbaa !9
  %79 = sitofp i32 %78 to double
  call void @vec3_div(ptr noundef %26, double noundef %79)
  %80 = load i32, ptr %18, align 4, !tbaa !9
  call void @vec3_array_sub(ptr noundef %44, ptr noundef %26, i32 noundef %80)
  call void @llvm.lifetime.start.p0(i64 72, ptr %27) #5
  call void @mat33_clear(ptr noundef %27)
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %92, %72
  %82 = load i32, ptr %20, align 4, !tbaa !9
  %83 = load i32, ptr %18, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %95

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 72, ptr %28) #5
  %86 = load i32, ptr %20, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.vec3_t, ptr %41, i64 %87
  %89 = load i32, ptr %20, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds %struct.vec3_t, ptr %44, i64 %90
  call void @vec3_mul_vec3trans(ptr noundef %28, ptr noundef %88, ptr noundef %91)
  call void @mat33_add(ptr noundef %27, ptr noundef %28)
  call void @llvm.lifetime.end.p0(i64 72, ptr %28) #5
  br label %92

92:                                               ; preds = %85
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %20, align 4, !tbaa !9
  br label %81, !llvm.loop !13

95:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 72, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %31) #5
  call void @mat33_clear(ptr noundef %29)
  call void @mat33_clear(ptr noundef %30)
  call void @mat33_clear(ptr noundef %31)
  call void @mat33_svd2(ptr noundef %29, ptr noundef %30, ptr noundef %31, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 72, ptr %32) #5
  call void @mat33_transpose(ptr noundef %32, ptr noundef byval(%struct.mat33_t) align 8 %29)
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mat33_mult_mat2(ptr noundef %96, ptr noundef %31, ptr noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = call double @mat33_det(ptr noundef %97)
  store double %98, ptr %33, align 8, !tbaa !14
  %99 = load double, ptr %33, align 8, !tbaa !14
  %100 = fcmp olt double %99, 0.000000e+00
  br i1 %100, label %101, label %223

101:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 72, ptr %34) #5
  %102 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %103 = getelementptr inbounds [9 x double], ptr %102, i64 0, i64 0
  %104 = load double, ptr %103, align 8, !tbaa !14
  %105 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %106 = getelementptr inbounds [9 x double], ptr %105, i64 0, i64 0
  store double %104, ptr %106, align 8, !tbaa !14
  %107 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %108 = getelementptr inbounds [9 x double], ptr %107, i64 0, i64 1
  %109 = load double, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %111 = getelementptr inbounds [9 x double], ptr %110, i64 0, i64 1
  store double %109, ptr %111, align 8, !tbaa !14
  %112 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %113 = getelementptr inbounds [9 x double], ptr %112, i64 0, i64 2
  %114 = load double, ptr %113, align 8, !tbaa !14
  %115 = fneg double %114
  %116 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %117 = getelementptr inbounds [9 x double], ptr %116, i64 0, i64 2
  store double %115, ptr %117, align 8, !tbaa !14
  %118 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %119 = getelementptr inbounds [9 x double], ptr %118, i64 0, i64 3
  %120 = load double, ptr %119, align 8, !tbaa !14
  %121 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %122 = getelementptr inbounds [9 x double], ptr %121, i64 0, i64 3
  store double %120, ptr %122, align 8, !tbaa !14
  %123 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %124 = getelementptr inbounds [9 x double], ptr %123, i64 0, i64 4
  %125 = load double, ptr %124, align 8, !tbaa !14
  %126 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %127 = getelementptr inbounds [9 x double], ptr %126, i64 0, i64 4
  store double %125, ptr %127, align 8, !tbaa !14
  %128 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %129 = getelementptr inbounds [9 x double], ptr %128, i64 0, i64 5
  %130 = load double, ptr %129, align 8, !tbaa !14
  %131 = fneg double %130
  %132 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %133 = getelementptr inbounds [9 x double], ptr %132, i64 0, i64 5
  store double %131, ptr %133, align 8, !tbaa !14
  %134 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %135 = getelementptr inbounds [9 x double], ptr %134, i64 0, i64 6
  %136 = load double, ptr %135, align 8, !tbaa !14
  %137 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %138 = getelementptr inbounds [9 x double], ptr %137, i64 0, i64 6
  store double %136, ptr %138, align 8, !tbaa !14
  %139 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %140 = getelementptr inbounds [9 x double], ptr %139, i64 0, i64 7
  %141 = load double, ptr %140, align 8, !tbaa !14
  %142 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %143 = getelementptr inbounds [9 x double], ptr %142, i64 0, i64 7
  store double %141, ptr %143, align 8, !tbaa !14
  %144 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %145 = getelementptr inbounds [9 x double], ptr %144, i64 0, i64 8
  %146 = load double, ptr %145, align 8, !tbaa !14
  %147 = fneg double %146
  %148 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %149 = getelementptr inbounds [9 x double], ptr %148, i64 0, i64 8
  store double %147, ptr %149, align 8, !tbaa !14
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mat33_mult_mat2(ptr noundef %150, ptr noundef %34, ptr noundef %32)
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = load i32, ptr %18, align 4, !tbaa !9
  call void @optimal_t(ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %154, ptr noundef %41, i32 noundef %155)
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.vec3_t, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds [3 x double], ptr %157, i64 0, i64 2
  %159 = load double, ptr %158, align 8, !tbaa !14
  %160 = fcmp olt double %159, 0.000000e+00
  br i1 %160, label %161, label %222

161:                                              ; preds = %101
  %162 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %163 = getelementptr inbounds [9 x double], ptr %162, i64 0, i64 0
  %164 = load double, ptr %163, align 8, !tbaa !14
  %165 = fneg double %164
  %166 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %167 = getelementptr inbounds [9 x double], ptr %166, i64 0, i64 0
  store double %165, ptr %167, align 8, !tbaa !14
  %168 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %169 = getelementptr inbounds [9 x double], ptr %168, i64 0, i64 1
  %170 = load double, ptr %169, align 8, !tbaa !14
  %171 = fneg double %170
  %172 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %173 = getelementptr inbounds [9 x double], ptr %172, i64 0, i64 1
  store double %171, ptr %173, align 8, !tbaa !14
  %174 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %175 = getelementptr inbounds [9 x double], ptr %174, i64 0, i64 2
  %176 = load double, ptr %175, align 8, !tbaa !14
  %177 = fneg double %176
  %178 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %179 = getelementptr inbounds [9 x double], ptr %178, i64 0, i64 2
  store double %177, ptr %179, align 8, !tbaa !14
  %180 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %181 = getelementptr inbounds [9 x double], ptr %180, i64 0, i64 3
  %182 = load double, ptr %181, align 8, !tbaa !14
  %183 = fneg double %182
  %184 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %185 = getelementptr inbounds [9 x double], ptr %184, i64 0, i64 3
  store double %183, ptr %185, align 8, !tbaa !14
  %186 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %187 = getelementptr inbounds [9 x double], ptr %186, i64 0, i64 4
  %188 = load double, ptr %187, align 8, !tbaa !14
  %189 = fneg double %188
  %190 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %191 = getelementptr inbounds [9 x double], ptr %190, i64 0, i64 4
  store double %189, ptr %191, align 8, !tbaa !14
  %192 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %193 = getelementptr inbounds [9 x double], ptr %192, i64 0, i64 5
  %194 = load double, ptr %193, align 8, !tbaa !14
  %195 = fneg double %194
  %196 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %197 = getelementptr inbounds [9 x double], ptr %196, i64 0, i64 5
  store double %195, ptr %197, align 8, !tbaa !14
  %198 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %199 = getelementptr inbounds [9 x double], ptr %198, i64 0, i64 6
  %200 = load double, ptr %199, align 8, !tbaa !14
  %201 = fneg double %200
  %202 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %203 = getelementptr inbounds [9 x double], ptr %202, i64 0, i64 6
  store double %201, ptr %203, align 8, !tbaa !14
  %204 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %205 = getelementptr inbounds [9 x double], ptr %204, i64 0, i64 7
  %206 = load double, ptr %205, align 8, !tbaa !14
  %207 = fneg double %206
  %208 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %209 = getelementptr inbounds [9 x double], ptr %208, i64 0, i64 7
  store double %207, ptr %209, align 8, !tbaa !14
  %210 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %211 = getelementptr inbounds [9 x double], ptr %210, i64 0, i64 8
  %212 = load double, ptr %211, align 8, !tbaa !14
  %213 = fneg double %212
  %214 = getelementptr inbounds %struct.mat33_t, ptr %34, i32 0, i32 0
  %215 = getelementptr inbounds [9 x double], ptr %214, i64 0, i64 8
  store double %213, ptr %215, align 8, !tbaa !14
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mat33_mult_mat2(ptr noundef %216, ptr noundef %34, ptr noundef %32)
  %217 = load ptr, ptr %11, align 8, !tbaa !5
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = load ptr, ptr %17, align 8, !tbaa !5
  %220 = load ptr, ptr %16, align 8, !tbaa !5
  %221 = load i32, ptr %18, align 4, !tbaa !9
  call void @optimal_t(ptr noundef %217, ptr noundef %218, ptr noundef %219, ptr noundef %220, ptr noundef %41, i32 noundef %221)
  br label %222

222:                                              ; preds = %161, %101
  call void @llvm.lifetime.end.p0(i64 72, ptr %34) #5
  br label %293

223:                                              ; preds = %95
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = load ptr, ptr %10, align 8, !tbaa !5
  %226 = load ptr, ptr %17, align 8, !tbaa !5
  %227 = load ptr, ptr %16, align 8, !tbaa !5
  %228 = load i32, ptr %18, align 4, !tbaa !9
  call void @optimal_t(ptr noundef %224, ptr noundef %225, ptr noundef %226, ptr noundef %227, ptr noundef %41, i32 noundef %228)
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.vec3_t, ptr %229, i32 0, i32 0
  %231 = getelementptr inbounds [3 x double], ptr %230, i64 0, i64 2
  %232 = load double, ptr %231, align 8, !tbaa !14
  %233 = fcmp olt double %232, 0.000000e+00
  br i1 %233, label %234, label %292

234:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 72, ptr %35) #5
  %235 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %236 = getelementptr inbounds [9 x double], ptr %235, i64 0, i64 0
  %237 = load double, ptr %236, align 8, !tbaa !14
  %238 = fneg double %237
  %239 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %240 = getelementptr inbounds [9 x double], ptr %239, i64 0, i64 0
  store double %238, ptr %240, align 8, !tbaa !14
  %241 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %242 = getelementptr inbounds [9 x double], ptr %241, i64 0, i64 1
  %243 = load double, ptr %242, align 8, !tbaa !14
  %244 = fneg double %243
  %245 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %246 = getelementptr inbounds [9 x double], ptr %245, i64 0, i64 1
  store double %244, ptr %246, align 8, !tbaa !14
  %247 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %248 = getelementptr inbounds [9 x double], ptr %247, i64 0, i64 2
  %249 = load double, ptr %248, align 8, !tbaa !14
  %250 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %251 = getelementptr inbounds [9 x double], ptr %250, i64 0, i64 2
  store double %249, ptr %251, align 8, !tbaa !14
  %252 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %253 = getelementptr inbounds [9 x double], ptr %252, i64 0, i64 3
  %254 = load double, ptr %253, align 8, !tbaa !14
  %255 = fneg double %254
  %256 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %257 = getelementptr inbounds [9 x double], ptr %256, i64 0, i64 3
  store double %255, ptr %257, align 8, !tbaa !14
  %258 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %259 = getelementptr inbounds [9 x double], ptr %258, i64 0, i64 4
  %260 = load double, ptr %259, align 8, !tbaa !14
  %261 = fneg double %260
  %262 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %263 = getelementptr inbounds [9 x double], ptr %262, i64 0, i64 4
  store double %261, ptr %263, align 8, !tbaa !14
  %264 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %265 = getelementptr inbounds [9 x double], ptr %264, i64 0, i64 5
  %266 = load double, ptr %265, align 8, !tbaa !14
  %267 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %268 = getelementptr inbounds [9 x double], ptr %267, i64 0, i64 5
  store double %266, ptr %268, align 8, !tbaa !14
  %269 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %270 = getelementptr inbounds [9 x double], ptr %269, i64 0, i64 6
  %271 = load double, ptr %270, align 8, !tbaa !14
  %272 = fneg double %271
  %273 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %274 = getelementptr inbounds [9 x double], ptr %273, i64 0, i64 6
  store double %272, ptr %274, align 8, !tbaa !14
  %275 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %276 = getelementptr inbounds [9 x double], ptr %275, i64 0, i64 7
  %277 = load double, ptr %276, align 8, !tbaa !14
  %278 = fneg double %277
  %279 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %280 = getelementptr inbounds [9 x double], ptr %279, i64 0, i64 7
  store double %278, ptr %280, align 8, !tbaa !14
  %281 = getelementptr inbounds %struct.mat33_t, ptr %31, i32 0, i32 0
  %282 = getelementptr inbounds [9 x double], ptr %281, i64 0, i64 8
  %283 = load double, ptr %282, align 8, !tbaa !14
  %284 = getelementptr inbounds %struct.mat33_t, ptr %35, i32 0, i32 0
  %285 = getelementptr inbounds [9 x double], ptr %284, i64 0, i64 8
  store double %283, ptr %285, align 8, !tbaa !14
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mat33_mult_mat2(ptr noundef %286, ptr noundef %35, ptr noundef %32)
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  %288 = load ptr, ptr %10, align 8, !tbaa !5
  %289 = load ptr, ptr %17, align 8, !tbaa !5
  %290 = load ptr, ptr %16, align 8, !tbaa !5
  %291 = load i32, ptr %18, align 4, !tbaa !9
  call void @optimal_t(ptr noundef %287, ptr noundef %288, ptr noundef %289, ptr noundef %290, ptr noundef %41, i32 noundef %291)
  call void @llvm.lifetime.end.p0(i64 72, ptr %35) #5
  br label %292

292:                                              ; preds = %234, %223
  br label %293

293:                                              ; preds = %292, %222
  %294 = load ptr, ptr %12, align 8, !tbaa !5
  %295 = load ptr, ptr %10, align 8, !tbaa !5
  %296 = load ptr, ptr %11, align 8, !tbaa !5
  %297 = load i32, ptr %18, align 4, !tbaa !9
  call void @xform(ptr noundef %294, ptr noundef %41, ptr noundef %295, ptr noundef %296, i32 noundef %297)
  %298 = load ptr, ptr %13, align 8, !tbaa !5
  store double 0.000000e+00, ptr %298, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 72, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %299

299:                                              ; preds = %316, %293
  %300 = load i32, ptr %19, align 4, !tbaa !9
  %301 = load i32, ptr %18, align 4, !tbaa !9
  %302 = icmp slt i32 %300, %301
  br i1 %302, label %303, label %319

303:                                              ; preds = %299
  call void @mat33_eye(ptr noundef %36)
  %304 = load ptr, ptr %16, align 8, !tbaa !5
  %305 = load i32, ptr %19, align 4, !tbaa !9
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds %struct.mat33_t, ptr %304, i64 %306
  call void @mat33_sub(ptr noundef %36, ptr noundef %307)
  %308 = load ptr, ptr %12, align 8, !tbaa !5
  %309 = load i32, ptr %19, align 4, !tbaa !9
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds %struct.vec3_t, ptr %308, i64 %310
  call void @vec3_mult_mat(ptr noundef %37, ptr noundef %36, ptr noundef %311)
  %312 = call double @vec3_dot(ptr noundef %37, ptr noundef %37)
  %313 = load ptr, ptr %13, align 8, !tbaa !5
  %314 = load double, ptr %313, align 8, !tbaa !14
  %315 = fadd double %314, %312
  store double %315, ptr %313, align 8, !tbaa !14
  br label %316

316:                                              ; preds = %303
  %317 = load i32, ptr %19, align 4, !tbaa !9
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %19, align 4, !tbaa !9
  br label %299, !llvm.loop !16

319:                                              ; preds = %299
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  %320 = load ptr, ptr %21, align 8
  call void @llvm.stackrestore.p0(ptr %320)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  ret void
}

; 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 void @vec3_array_sum(ptr noundef, ptr noundef, i32 noundef) #1

declare void @vec3_div(ptr noundef, double noundef) #1

declare void @vec3_array_sub(ptr noundef, ptr noundef, i32 noundef) #1

declare void @mat33_clear(ptr noundef) #1

declare void @vec3_mul_vec3trans(ptr noundef, ptr noundef, ptr noundef) #1

declare void @mat33_add(ptr noundef, ptr noundef) #1

declare void @mat33_svd2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @mat33_transpose(ptr noundef, ptr noundef byval(%struct.mat33_t) align 8) #1

declare void @mat33_mult_mat2(ptr noundef, ptr noundef, ptr noundef) #1

declare double @mat33_det(ptr noundef) #1

declare void @mat33_eye(ptr noundef) #1

declare void @mat33_sub(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nosync nounwind willreturn }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !12}


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

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

declare void @vec3_copy(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare double @vec3_dot(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @xform(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @vec3_mult_mat(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @optimal_t(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @abskernel(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef %3, ptr nocapture noundef readonly %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8) local_unnamed_addr #2 {
  %10 = alloca %struct.vec3_t, align 8
  %11 = alloca %struct.vec3_t, align 8
  %12 = alloca %struct.vec3_t, align 8
  %13 = alloca %struct.mat33_t, align 8
  %14 = alloca %struct.mat33_t, align 8
  %15 = alloca %struct.mat33_t, align 8
  %16 = alloca %struct.mat33_t, align 8
  %17 = alloca %struct.mat33_t, align 16
  %18 = alloca %struct.mat33_t, align 8
  %19 = alloca %struct.mat33_t, align 16
  %20 = alloca %struct.mat33_t, align 16
  %21 = alloca %struct.mat33_t, align 8
  %22 = alloca %struct.vec3_t, align 8
  %23 = zext i32 %8 to i64
  %24 = alloca %struct.vec3_t, i64 %23, align 16
  %25 = alloca %struct.vec3_t, i64 %23, align 16
  %26 = sext i32 %8 to i64
  %27 = mul nsw i64 %26, 24
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %24, ptr align 8 %4, i64 %27, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %25, ptr align 8 %5, i64 %27, i1 false)
  %28 = icmp sgt i32 %8, 0
  br i1 %28, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %9, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %9 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  %29 = getelementptr inbounds %struct.mat33_t, ptr %6, i64 %indvars.iv
  %30 = getelementptr inbounds %struct.vec3_t, ptr %5, i64 %indvars.iv
  call void @vec3_mult_mat(ptr noundef nonnull %10, ptr noundef %29, ptr noundef %30) #4
  %31 = getelementptr inbounds %struct.vec3_t, ptr %25, i64 %indvars.iv
  call void @vec3_copy(ptr noundef nonnull %31, ptr noundef nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %23
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @vec3_array_sum(ptr noundef nonnull %11, ptr noundef nonnull %24, i32 noundef %8) #4
  %32 = sitofp i32 %8 to double
  call void @vec3_div(ptr noundef nonnull %11, double noundef %32) #4
  call void @vec3_array_sub(ptr noundef nonnull %24, ptr noundef nonnull %11, i32 noundef %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @vec3_array_sum(ptr noundef nonnull %12, ptr noundef nonnull %25, i32 noundef %8) #4
  call void @vec3_div(ptr noundef nonnull %12, double noundef %32) #4
  call void @vec3_array_sub(ptr noundef nonnull %25, ptr noundef nonnull %12, i32 noundef %8) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #4
  call void @mat33_clear(ptr noundef nonnull %13) #4
  br i1 %28, label %.lr.ph71, label %._crit_edge72

.lr.ph71:                                         ; preds = %._crit_edge, %.lr.ph71
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %.lr.ph71 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %14) #4
  %33 = getelementptr inbounds %struct.vec3_t, ptr %24, i64 %indvars.iv78
  %34 = getelementptr inbounds %struct.vec3_t, ptr %25, i64 %indvars.iv78
  call void @vec3_mul_vec3trans(ptr noundef nonnull %14, ptr noundef nonnull %33, ptr noundef nonnull %34) #4
  call void @mat33_add(ptr noundef nonnull %13, ptr noundef nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %14) #4
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %23
  br i1 %exitcond82.not, label %._crit_edge72, label %.lr.ph71, !llvm.loop !7

._crit_edge72:                                    ; preds = %.lr.ph71, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %17) #4
  call void @mat33_clear(ptr noundef nonnull %15) #4
  call void @mat33_clear(ptr noundef nonnull %16) #4
  call void @mat33_clear(ptr noundef nonnull %17) #4
  call void @mat33_svd2(ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %18) #4
  call void @mat33_transpose(ptr noundef nonnull %18, ptr noundef nonnull byval(%struct.mat33_t) align 8 %15) #4
  call void @mat33_mult_mat2(ptr noundef %0, ptr noundef nonnull %17, ptr noundef nonnull %18) #4
  %35 = call double @mat33_det(ptr noundef %0) #4
  %36 = fcmp olt double %35, 0.000000e+00
  br i1 %36, label %37, label %74

37:                                               ; preds = %._crit_edge72
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %19) #4
  %38 = load <2 x double>, ptr %17, align 16, !tbaa !8
  store <2 x double> %38, ptr %19, align 16, !tbaa !8
  %39 = getelementptr inbounds i8, ptr %17, i64 16
  %40 = load double, ptr %39, align 16, !tbaa !8
  %41 = fneg double %40
  %42 = getelementptr inbounds i8, ptr %19, i64 16
  store double %41, ptr %42, align 16, !tbaa !8
  %43 = getelementptr inbounds i8, ptr %17, i64 24
  %44 = getelementptr inbounds i8, ptr %19, i64 24
  %45 = load <2 x double>, ptr %43, align 8, !tbaa !8
  store <2 x double> %45, ptr %44, align 8, !tbaa !8
  %46 = getelementptr inbounds i8, ptr %17, i64 40
  %47 = load double, ptr %46, align 8, !tbaa !8
  %48 = fneg double %47
  %49 = getelementptr inbounds i8, ptr %19, i64 40
  store double %48, ptr %49, align 8, !tbaa !8
  %50 = getelementptr inbounds i8, ptr %17, i64 48
  %51 = getelementptr inbounds i8, ptr %19, i64 48
  %52 = load <2 x double>, ptr %50, align 16, !tbaa !8
  store <2 x double> %52, ptr %51, align 16, !tbaa !8
  %53 = getelementptr inbounds i8, ptr %17, i64 64
  %54 = load double, ptr %53, align 16, !tbaa !8
  %55 = fneg double %54
  %56 = getelementptr inbounds i8, ptr %19, i64 64
  store double %55, ptr %56, align 16, !tbaa !8
  call void @mat33_mult_mat2(ptr noundef %0, ptr noundef nonnull %19, ptr noundef nonnull %18) #4
  call void @optimal_t(ptr noundef %1, ptr noundef %0, ptr noundef %7, ptr noundef %6, ptr noundef nonnull %24, i32 noundef %8)
  %57 = getelementptr inbounds i8, ptr %1, i64 16
  %58 = load double, ptr %57, align 8, !tbaa !8
  %59 = fcmp olt double %58, 0.000000e+00
  br i1 %59, label %60, label %73

60:                                               ; preds = %37
  %61 = getelementptr inbounds i8, ptr %19, i64 32
  %62 = getelementptr inbounds i8, ptr %17, i64 32
  %63 = load <2 x double>, ptr %17, align 16, !tbaa !8
  %64 = fneg <2 x double> %63
  store <2 x double> %64, ptr %19, align 16, !tbaa !8
  %65 = load <2 x double>, ptr %39, align 16, !tbaa !8
  %66 = fneg <2 x double> %65
  store <2 x double> %66, ptr %42, align 16, !tbaa !8
  %67 = load <2 x double>, ptr %62, align 16, !tbaa !8
  %68 = fneg <2 x double> %67
  store <2 x double> %68, ptr %61, align 16, !tbaa !8
  %69 = load <2 x double>, ptr %50, align 16, !tbaa !8
  %70 = fneg <2 x double> %69
  store <2 x double> %70, ptr %51, align 16, !tbaa !8
  %71 = load double, ptr %53, align 16, !tbaa !8
  %72 = fneg double %71
  store double %72, ptr %56, align 16, !tbaa !8
  call void @mat33_mult_mat2(ptr noundef %0, ptr noundef nonnull %19, ptr noundef nonnull %18) #4
  call void @optimal_t(ptr noundef nonnull %1, ptr noundef %0, ptr noundef %7, ptr noundef %6, ptr noundef nonnull %24, i32 noundef %8)
  br label %73

73:                                               ; preds = %60, %37
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %19) #4
  br label %98

74:                                               ; preds = %._crit_edge72
  call void @optimal_t(ptr noundef %1, ptr noundef %0, ptr noundef %7, ptr noundef %6, ptr noundef nonnull %24, i32 noundef %8)
  %75 = getelementptr inbounds i8, ptr %1, i64 16
  %76 = load double, ptr %75, align 8, !tbaa !8
  %77 = fcmp olt double %76, 0.000000e+00
  br i1 %77, label %78, label %98

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %20) #4
  %79 = load <2 x double>, ptr %17, align 16, !tbaa !8
  %80 = fneg <2 x double> %79
  store <2 x double> %80, ptr %20, align 16, !tbaa !8
  %81 = getelementptr inbounds i8, ptr %17, i64 16
  %82 = load double, ptr %81, align 16, !tbaa !8
  %83 = getelementptr inbounds i8, ptr %20, i64 16
  store double %82, ptr %83, align 16, !tbaa !8
  %84 = getelementptr inbounds i8, ptr %17, i64 24
  %85 = getelementptr inbounds i8, ptr %20, i64 24
  %86 = load <2 x double>, ptr %84, align 8, !tbaa !8
  %87 = fneg <2 x double> %86
  store <2 x double> %87, ptr %85, align 8, !tbaa !8
  %88 = getelementptr inbounds i8, ptr %17, i64 40
  %89 = load double, ptr %88, align 8, !tbaa !8
  %90 = getelementptr inbounds i8, ptr %20, i64 40
  store double %89, ptr %90, align 8, !tbaa !8
  %91 = getelementptr inbounds i8, ptr %17, i64 48
  %92 = getelementptr inbounds i8, ptr %20, i64 48
  %93 = load <2 x double>, ptr %91, align 16, !tbaa !8
  %94 = fneg <2 x double> %93
  store <2 x double> %94, ptr %92, align 16, !tbaa !8
  %95 = getelementptr inbounds i8, ptr %17, i64 64
  %96 = load double, ptr %95, align 16, !tbaa !8
  %97 = getelementptr inbounds i8, ptr %20, i64 64
  store double %96, ptr %97, align 16, !tbaa !8
  call void @mat33_mult_mat2(ptr noundef %0, ptr noundef nonnull %20, ptr noundef nonnull %18) #4
  call void @optimal_t(ptr noundef nonnull %1, ptr noundef %0, ptr noundef %7, ptr noundef %6, ptr noundef nonnull %24, i32 noundef %8)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %20) #4
  br label %98

98:                                               ; preds = %74, %78, %73
  call void @xform(ptr noundef %2, ptr noundef nonnull %24, ptr noundef %0, ptr noundef nonnull %1, i32 noundef %8)
  store double 0.000000e+00, ptr %3, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #4
  br i1 %28, label %.lr.ph75, label %._crit_edge76

.lr.ph75:                                         ; preds = %98, %.lr.ph75
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph75 ], [ 0, %98 ]
  call void @mat33_eye(ptr noundef nonnull %21) #4
  %99 = getelementptr inbounds %struct.mat33_t, ptr %6, i64 %indvars.iv83
  call void @mat33_sub(ptr noundef nonnull %21, ptr noundef %99) #4
  %100 = getelementptr inbounds %struct.vec3_t, ptr %2, i64 %indvars.iv83
  call void @vec3_mult_mat(ptr noundef nonnull %22, ptr noundef nonnull %21, ptr noundef %100) #4
  %101 = call double @vec3_dot(ptr noundef nonnull %22, ptr noundef nonnull %22) #4
  %102 = load double, ptr %3, align 8, !tbaa !8
  %103 = fadd double %101, %102
  store double %103, ptr %3, align 8, !tbaa !8
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %23
  br i1 %exitcond87.not, label %._crit_edge76, label %.lr.ph75, !llvm.loop !12

._crit_edge76:                                    ; preds = %.lr.ph75, %98
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  ret void
}

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

declare void @vec3_array_sum(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @vec3_div(ptr noundef, double noundef) local_unnamed_addr #1

declare void @vec3_array_sub(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @mat33_clear(ptr noundef) local_unnamed_addr #1

declare void @vec3_mul_vec3trans(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @mat33_add(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @mat33_svd2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @mat33_transpose(ptr noundef, ptr noundef byval(%struct.mat33_t) align 8) local_unnamed_addr #1

declare void @mat33_mult_mat2(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare double @mat33_det(ptr noundef) local_unnamed_addr #1

declare void @mat33_eye(ptr noundef) local_unnamed_addr #1

declare void @mat33_sub(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass