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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @rpyMat(ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

declare void @vec3_clear(ptr noundef) #1

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

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_mult_mat2(ptr noundef, ptr noundef, ptr noundef) #1

declare void @mat33_eye(ptr noundef) #1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @getRotationY_wrtT(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8) #3 {
  %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 i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca %struct.mat33_t, align 8
  %25 = alloca %struct.mat33_t, align 8
  %26 = alloca %struct.mat33_t, align 8
  %27 = alloca %struct.mat33_t, align 8
  %28 = alloca %struct.mat33_t, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca double, align 8
  %44 = alloca double, align 8
  %45 = alloca double, align 8
  %46 = alloca double, align 8
  %47 = alloca double, align 8
  %48 = alloca double, align 8
  %49 = alloca double, align 8
  %50 = alloca %struct.mat33_t, align 8
  %51 = alloca %struct.mat33_t, align 8
  %52 = alloca [5 x double], align 16
  %53 = alloca double, align 8
  %54 = alloca double, align 8
  %55 = alloca double, align 8
  %56 = alloca %struct.mat33_t, align 8
  %57 = alloca %struct.mat33_t, align 8
  %58 = alloca %struct.mat33_t, align 8
  %59 = alloca %struct.mat33_t, align 8
  %60 = alloca %struct.vec3_t, align 8
  %61 = alloca %struct.vec3_t, align 8
  %62 = alloca %struct.vec3_t, align 8
  %63 = alloca %struct.vec3_t, align 8
  %64 = alloca %struct.vec3_t, align 8
  %65 = alloca %struct.vec3_t, align 8
  %66 = alloca %struct.vec3_t, align 8
  %67 = alloca %struct.vec3_t, align 8
  %68 = alloca %struct.vec3_t, align 8
  %69 = alloca [5 x double], align 16
  %70 = alloca [5 x double], align 16
  %71 = alloca i32, align 4
  %72 = alloca i64, align 8
  %73 = alloca i64, align 8
  %74 = alloca i64, align 8
  %75 = alloca i64, align 8
  %76 = alloca i64, align 8
  %77 = alloca i64, align 8
  %78 = alloca i64, align 8
  %79 = alloca i64, align 8
  %80 = alloca i64, align 8
  %81 = alloca i64, align 8
  %82 = alloca i32, align 4
  %83 = alloca i32, align 4
  %84 = alloca %struct.vec3_t, align 8
  %85 = alloca %struct.mat33_t, align 8
  %86 = alloca %struct.mat33_t, align 8
  %87 = alloca %struct.vec3_t, align 8
  %88 = alloca %struct.mat33_t, align 8
  %89 = alloca %struct.mat33_t, align 8
  %90 = alloca %struct.vec3_t, align 8
  %91 = alloca %struct.vec3_t, align 8
  %92 = 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 i32 %7, ptr %17, align 4, !tbaa !9
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = call ptr @llvm.stacksave.p0()
  store ptr %95, ptr %22, align 8
  %96 = alloca %struct.mat33_t, i64 %94, align 16
  store i64 %94, ptr %23, align 8
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %125, %9
  %98 = load i32, ptr %19, align 4, !tbaa !9
  %99 = load i32, ptr %17, align 4, !tbaa !9
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %128

101:                                              ; preds = %97
  %102 = load i32, ptr %19, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %103
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load i32, ptr %19, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %struct.vec3_t, ptr %105, i64 %107
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load i32, ptr %19, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.vec3_t, ptr %109, i64 %111
  call void @vec3_mul_vec3trans(ptr noundef %104, ptr noundef %108, ptr noundef %112)
  %113 = load i32, ptr %19, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %114
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = load i32, ptr %19, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.vec3_t, ptr %116, i64 %118
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = load i32, ptr %19, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %struct.vec3_t, ptr %120, i64 %122
  %124 = call double @vec3trans_mul_vec3(ptr noundef %119, ptr noundef %123)
  call void @mat33_div(ptr noundef %115, double noundef %124)
  br label %125

125:                                              ; preds = %101
  %126 = load i32, ptr %19, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %19, align 4, !tbaa !9
  br label %97, !llvm.loop !11

128:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 72, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %27) #7
  %129 = load i32, ptr %17, align 4, !tbaa !9
  call void @mat33_array_sum(ptr noundef %25, ptr noundef %96, i32 noundef %129)
  call void @mat33_eye(ptr noundef %26)
  %130 = load i32, ptr %17, align 4, !tbaa !9
  %131 = sitofp i32 %130 to double
  call void @mat33_div(ptr noundef %25, double noundef %131)
  call void @mat33_sub_mat2(ptr noundef %27, ptr noundef %26, ptr noundef %25)
  call void @mat33_inv(ptr noundef %24, ptr noundef %27)
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = sitofp i32 %132 to double
  call void @mat33_div(ptr noundef %24, double noundef %133)
  call void @llvm.lifetime.start.p0(i64 72, ptr %28) #7
  call void @mat33_clear(ptr noundef %28)
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %598, %128
  %135 = load i32, ptr %19, align 4, !tbaa !9
  %136 = load i32, ptr %17, align 4, !tbaa !9
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %138, label %601

138:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %139 = load i32, ptr %19, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %140
  %142 = getelementptr inbounds %struct.mat33_t, ptr %141, i32 0, i32 0
  %143 = getelementptr inbounds [9 x double], ptr %142, i64 0, i64 0
  %144 = load double, ptr %143, align 8, !tbaa !13
  store double %144, ptr %29, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %145 = load i32, ptr %19, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %146
  %148 = getelementptr inbounds %struct.mat33_t, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds [9 x double], ptr %148, i64 0, i64 3
  %150 = load double, ptr %149, align 8, !tbaa !13
  store double %150, ptr %30, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %151 = load i32, ptr %19, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %152
  %154 = getelementptr inbounds %struct.mat33_t, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds [9 x double], ptr %154, i64 0, i64 6
  %156 = load double, ptr %155, align 8, !tbaa !13
  store double %156, ptr %31, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %157 = load i32, ptr %19, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %158
  %160 = getelementptr inbounds %struct.mat33_t, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds [9 x double], ptr %160, i64 0, i64 1
  %162 = load double, ptr %161, align 8, !tbaa !13
  store double %162, ptr %32, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %163 = load i32, ptr %19, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %164
  %166 = getelementptr inbounds %struct.mat33_t, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds [9 x double], ptr %166, i64 0, i64 4
  %168 = load double, ptr %167, align 8, !tbaa !13
  store double %168, ptr %33, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %169 = load i32, ptr %19, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %170
  %172 = getelementptr inbounds %struct.mat33_t, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds [9 x double], ptr %172, i64 0, i64 7
  %174 = load double, ptr %173, align 8, !tbaa !13
  store double %174, ptr %34, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %175 = load i32, ptr %19, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %176
  %178 = getelementptr inbounds %struct.mat33_t, ptr %177, i32 0, i32 0
  %179 = getelementptr inbounds [9 x double], ptr %178, i64 0, i64 2
  %180 = load double, ptr %179, align 8, !tbaa !13
  store double %180, ptr %35, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %181 = load i32, ptr %19, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %182
  %184 = getelementptr inbounds %struct.mat33_t, ptr %183, i32 0, i32 0
  %185 = getelementptr inbounds [9 x double], ptr %184, i64 0, i64 5
  %186 = load double, ptr %185, align 8, !tbaa !13
  store double %186, ptr %36, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %187 = load i32, ptr %19, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %188
  %190 = getelementptr inbounds %struct.mat33_t, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds [9 x double], ptr %190, i64 0, i64 8
  %192 = load double, ptr %191, align 8, !tbaa !13
  store double %192, ptr %37, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %193 = load ptr, ptr %13, align 8, !tbaa !5
  %194 = load i32, ptr %19, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds %struct.vec3_t, ptr %193, i64 %195
  %197 = getelementptr inbounds %struct.vec3_t, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds [3 x double], ptr %197, i64 0, i64 0
  %199 = load double, ptr %198, align 8, !tbaa !13
  store double %199, ptr %38, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %200 = load ptr, ptr %13, align 8, !tbaa !5
  %201 = load i32, ptr %19, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds %struct.vec3_t, ptr %200, i64 %202
  %204 = getelementptr inbounds %struct.vec3_t, ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds [3 x double], ptr %204, i64 0, i64 1
  %206 = load double, ptr %205, align 8, !tbaa !13
  store double %206, ptr %39, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %207 = load ptr, ptr %13, align 8, !tbaa !5
  %208 = load i32, ptr %19, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds %struct.vec3_t, ptr %207, i64 %209
  %211 = getelementptr inbounds %struct.vec3_t, ptr %210, i32 0, i32 0
  %212 = getelementptr inbounds [3 x double], ptr %211, i64 0, i64 2
  %213 = load double, ptr %212, align 8, !tbaa !13
  store double %213, ptr %40, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %214 = load ptr, ptr %16, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.mat33_t, ptr %214, i32 0, i32 0
  %216 = getelementptr inbounds [9 x double], ptr %215, i64 0, i64 0
  %217 = load double, ptr %216, align 8, !tbaa !13
  store double %217, ptr %41, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.mat33_t, ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds [9 x double], ptr %219, i64 0, i64 1
  %221 = load double, ptr %220, align 8, !tbaa !13
  store double %221, ptr %42, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %222 = load ptr, ptr %16, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.mat33_t, ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds [9 x double], ptr %223, i64 0, i64 2
  %225 = load double, ptr %224, align 8, !tbaa !13
  store double %225, ptr %43, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %226 = load ptr, ptr %16, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.mat33_t, ptr %226, i32 0, i32 0
  %228 = getelementptr inbounds [9 x double], ptr %227, i64 0, i64 3
  %229 = load double, ptr %228, align 8, !tbaa !13
  store double %229, ptr %44, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %230 = load ptr, ptr %16, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.mat33_t, ptr %230, i32 0, i32 0
  %232 = getelementptr inbounds [9 x double], ptr %231, i64 0, i64 4
  %233 = load double, ptr %232, align 8, !tbaa !13
  store double %233, ptr %45, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  %234 = load ptr, ptr %16, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.mat33_t, ptr %234, i32 0, i32 0
  %236 = getelementptr inbounds [9 x double], ptr %235, i64 0, i64 5
  %237 = load double, ptr %236, align 8, !tbaa !13
  store double %237, ptr %46, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %238 = load ptr, ptr %16, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.mat33_t, ptr %238, i32 0, i32 0
  %240 = getelementptr inbounds [9 x double], ptr %239, i64 0, i64 6
  %241 = load double, ptr %240, align 8, !tbaa !13
  store double %241, ptr %47, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  %242 = load ptr, ptr %16, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.mat33_t, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds [9 x double], ptr %243, i64 0, i64 7
  %245 = load double, ptr %244, align 8, !tbaa !13
  store double %245, ptr %48, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %246 = load ptr, ptr %16, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.mat33_t, ptr %246, i32 0, i32 0
  %248 = getelementptr inbounds [9 x double], ptr %247, i64 0, i64 8
  %249 = load double, ptr %248, align 8, !tbaa !13
  store double %249, ptr %49, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 72, ptr %50) #7
  %250 = load double, ptr %29, align 8, !tbaa !13
  %251 = fsub double %250, 1.000000e+00
  %252 = load double, ptr %42, align 8, !tbaa !13
  %253 = load double, ptr %32, align 8, !tbaa !13
  %254 = load double, ptr %45, align 8, !tbaa !13
  %255 = fmul double %253, %254
  %256 = call double @llvm.fmuladd.f64(double %251, double %252, double %255)
  %257 = load double, ptr %35, align 8, !tbaa !13
  %258 = load double, ptr %48, align 8, !tbaa !13
  %259 = call double @llvm.fmuladd.f64(double %257, double %258, double %256)
  %260 = load double, ptr %39, align 8, !tbaa !13
  %261 = load double, ptr %29, align 8, !tbaa !13
  %262 = fsub double %261, 1.000000e+00
  %263 = fneg double %262
  %264 = load double, ptr %41, align 8, !tbaa !13
  %265 = load double, ptr %32, align 8, !tbaa !13
  %266 = load double, ptr %44, align 8, !tbaa !13
  %267 = fmul double %265, %266
  %268 = fneg double %267
  %269 = call double @llvm.fmuladd.f64(double %263, double %264, double %268)
  %270 = load double, ptr %35, align 8, !tbaa !13
  %271 = load double, ptr %47, align 8, !tbaa !13
  %272 = fneg double %270
  %273 = call double @llvm.fmuladd.f64(double %272, double %271, double %269)
  %274 = load double, ptr %38, align 8, !tbaa !13
  %275 = fmul double %273, %274
  %276 = call double @llvm.fmuladd.f64(double %259, double %260, double %275)
  %277 = load double, ptr %29, align 8, !tbaa !13
  %278 = fsub double %277, 1.000000e+00
  %279 = fneg double %278
  %280 = load double, ptr %43, align 8, !tbaa !13
  %281 = load double, ptr %32, align 8, !tbaa !13
  %282 = load double, ptr %46, align 8, !tbaa !13
  %283 = fmul double %281, %282
  %284 = fneg double %283
  %285 = call double @llvm.fmuladd.f64(double %279, double %280, double %284)
  %286 = load double, ptr %35, align 8, !tbaa !13
  %287 = load double, ptr %49, align 8, !tbaa !13
  %288 = fneg double %286
  %289 = call double @llvm.fmuladd.f64(double %288, double %287, double %285)
  %290 = load double, ptr %40, align 8, !tbaa !13
  %291 = call double @llvm.fmuladd.f64(double %289, double %290, double %276)
  %292 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %293 = getelementptr inbounds [9 x double], ptr %292, i64 0, i64 0
  store double %291, ptr %293, align 8, !tbaa !13
  %294 = load double, ptr %29, align 8, !tbaa !13
  %295 = fsub double %294, 1.000000e+00
  %296 = fmul double 2.000000e+00, %295
  %297 = load double, ptr %41, align 8, !tbaa !13
  %298 = load double, ptr %32, align 8, !tbaa !13
  %299 = fmul double 2.000000e+00, %298
  %300 = load double, ptr %44, align 8, !tbaa !13
  %301 = fmul double %299, %300
  %302 = call double @llvm.fmuladd.f64(double %296, double %297, double %301)
  %303 = load double, ptr %35, align 8, !tbaa !13
  %304 = fmul double 2.000000e+00, %303
  %305 = load double, ptr %47, align 8, !tbaa !13
  %306 = call double @llvm.fmuladd.f64(double %304, double %305, double %302)
  %307 = load double, ptr %40, align 8, !tbaa !13
  %308 = load double, ptr %29, align 8, !tbaa !13
  %309 = fsub double %308, 1.000000e+00
  %310 = fmul double -2.000000e+00, %309
  %311 = load double, ptr %43, align 8, !tbaa !13
  %312 = load double, ptr %32, align 8, !tbaa !13
  %313 = fmul double 2.000000e+00, %312
  %314 = load double, ptr %46, align 8, !tbaa !13
  %315 = fmul double %313, %314
  %316 = fneg double %315
  %317 = call double @llvm.fmuladd.f64(double %310, double %311, double %316)
  %318 = load double, ptr %35, align 8, !tbaa !13
  %319 = fmul double 2.000000e+00, %318
  %320 = load double, ptr %49, align 8, !tbaa !13
  %321 = fneg double %319
  %322 = call double @llvm.fmuladd.f64(double %321, double %320, double %317)
  %323 = load double, ptr %38, align 8, !tbaa !13
  %324 = fmul double %322, %323
  %325 = call double @llvm.fmuladd.f64(double %306, double %307, double %324)
  %326 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %327 = getelementptr inbounds [9 x double], ptr %326, i64 0, i64 1
  store double %325, ptr %327, align 8, !tbaa !13
  %328 = load double, ptr %29, align 8, !tbaa !13
  %329 = fsub double %328, 1.000000e+00
  %330 = load double, ptr %41, align 8, !tbaa !13
  %331 = load double, ptr %32, align 8, !tbaa !13
  %332 = load double, ptr %44, align 8, !tbaa !13
  %333 = fmul double %331, %332
  %334 = call double @llvm.fmuladd.f64(double %329, double %330, double %333)
  %335 = load double, ptr %35, align 8, !tbaa !13
  %336 = load double, ptr %47, align 8, !tbaa !13
  %337 = call double @llvm.fmuladd.f64(double %335, double %336, double %334)
  %338 = load double, ptr %38, align 8, !tbaa !13
  %339 = load double, ptr %29, align 8, !tbaa !13
  %340 = fsub double %339, 1.000000e+00
  %341 = load double, ptr %43, align 8, !tbaa !13
  %342 = load double, ptr %32, align 8, !tbaa !13
  %343 = load double, ptr %46, align 8, !tbaa !13
  %344 = fmul double %342, %343
  %345 = call double @llvm.fmuladd.f64(double %340, double %341, double %344)
  %346 = load double, ptr %35, align 8, !tbaa !13
  %347 = load double, ptr %49, align 8, !tbaa !13
  %348 = call double @llvm.fmuladd.f64(double %346, double %347, double %345)
  %349 = load double, ptr %40, align 8, !tbaa !13
  %350 = fmul double %348, %349
  %351 = call double @llvm.fmuladd.f64(double %337, double %338, double %350)
  %352 = load double, ptr %29, align 8, !tbaa !13
  %353 = fsub double %352, 1.000000e+00
  %354 = load double, ptr %42, align 8, !tbaa !13
  %355 = load double, ptr %32, align 8, !tbaa !13
  %356 = load double, ptr %45, align 8, !tbaa !13
  %357 = fmul double %355, %356
  %358 = call double @llvm.fmuladd.f64(double %353, double %354, double %357)
  %359 = load double, ptr %35, align 8, !tbaa !13
  %360 = load double, ptr %48, align 8, !tbaa !13
  %361 = call double @llvm.fmuladd.f64(double %359, double %360, double %358)
  %362 = load double, ptr %39, align 8, !tbaa !13
  %363 = call double @llvm.fmuladd.f64(double %361, double %362, double %351)
  %364 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %365 = getelementptr inbounds [9 x double], ptr %364, i64 0, i64 2
  store double %363, ptr %365, align 8, !tbaa !13
  %366 = load double, ptr %30, align 8, !tbaa !13
  %367 = load double, ptr %42, align 8, !tbaa !13
  %368 = load double, ptr %33, align 8, !tbaa !13
  %369 = fsub double %368, 1.000000e+00
  %370 = load double, ptr %45, align 8, !tbaa !13
  %371 = fmul double %369, %370
  %372 = call double @llvm.fmuladd.f64(double %366, double %367, double %371)
  %373 = load double, ptr %36, align 8, !tbaa !13
  %374 = load double, ptr %48, align 8, !tbaa !13
  %375 = call double @llvm.fmuladd.f64(double %373, double %374, double %372)
  %376 = load double, ptr %39, align 8, !tbaa !13
  %377 = load double, ptr %30, align 8, !tbaa !13
  %378 = fneg double %377
  %379 = load double, ptr %41, align 8, !tbaa !13
  %380 = load double, ptr %33, align 8, !tbaa !13
  %381 = fsub double %380, 1.000000e+00
  %382 = load double, ptr %44, align 8, !tbaa !13
  %383 = fmul double %381, %382
  %384 = fneg double %383
  %385 = call double @llvm.fmuladd.f64(double %378, double %379, double %384)
  %386 = load double, ptr %36, align 8, !tbaa !13
  %387 = load double, ptr %47, align 8, !tbaa !13
  %388 = fneg double %386
  %389 = call double @llvm.fmuladd.f64(double %388, double %387, double %385)
  %390 = load double, ptr %38, align 8, !tbaa !13
  %391 = fmul double %389, %390
  %392 = call double @llvm.fmuladd.f64(double %375, double %376, double %391)
  %393 = load double, ptr %30, align 8, !tbaa !13
  %394 = fneg double %393
  %395 = load double, ptr %43, align 8, !tbaa !13
  %396 = load double, ptr %33, align 8, !tbaa !13
  %397 = fsub double %396, 1.000000e+00
  %398 = load double, ptr %46, align 8, !tbaa !13
  %399 = fmul double %397, %398
  %400 = fneg double %399
  %401 = call double @llvm.fmuladd.f64(double %394, double %395, double %400)
  %402 = load double, ptr %36, align 8, !tbaa !13
  %403 = load double, ptr %49, align 8, !tbaa !13
  %404 = fneg double %402
  %405 = call double @llvm.fmuladd.f64(double %404, double %403, double %401)
  %406 = load double, ptr %40, align 8, !tbaa !13
  %407 = call double @llvm.fmuladd.f64(double %405, double %406, double %392)
  %408 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %409 = getelementptr inbounds [9 x double], ptr %408, i64 0, i64 3
  store double %407, ptr %409, align 8, !tbaa !13
  %410 = load double, ptr %30, align 8, !tbaa !13
  %411 = fmul double 2.000000e+00, %410
  %412 = load double, ptr %41, align 8, !tbaa !13
  %413 = load double, ptr %33, align 8, !tbaa !13
  %414 = fsub double %413, 1.000000e+00
  %415 = fmul double 2.000000e+00, %414
  %416 = load double, ptr %44, align 8, !tbaa !13
  %417 = fmul double %415, %416
  %418 = call double @llvm.fmuladd.f64(double %411, double %412, double %417)
  %419 = load double, ptr %36, align 8, !tbaa !13
  %420 = fmul double 2.000000e+00, %419
  %421 = load double, ptr %47, align 8, !tbaa !13
  %422 = call double @llvm.fmuladd.f64(double %420, double %421, double %418)
  %423 = load double, ptr %40, align 8, !tbaa !13
  %424 = load double, ptr %30, align 8, !tbaa !13
  %425 = fmul double -2.000000e+00, %424
  %426 = load double, ptr %43, align 8, !tbaa !13
  %427 = load double, ptr %33, align 8, !tbaa !13
  %428 = fsub double %427, 1.000000e+00
  %429 = fmul double 2.000000e+00, %428
  %430 = load double, ptr %46, align 8, !tbaa !13
  %431 = fmul double %429, %430
  %432 = fneg double %431
  %433 = call double @llvm.fmuladd.f64(double %425, double %426, double %432)
  %434 = load double, ptr %36, align 8, !tbaa !13
  %435 = fmul double 2.000000e+00, %434
  %436 = load double, ptr %49, align 8, !tbaa !13
  %437 = fneg double %435
  %438 = call double @llvm.fmuladd.f64(double %437, double %436, double %433)
  %439 = load double, ptr %38, align 8, !tbaa !13
  %440 = fmul double %438, %439
  %441 = call double @llvm.fmuladd.f64(double %422, double %423, double %440)
  %442 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %443 = getelementptr inbounds [9 x double], ptr %442, i64 0, i64 4
  store double %441, ptr %443, align 8, !tbaa !13
  %444 = load double, ptr %30, align 8, !tbaa !13
  %445 = load double, ptr %41, align 8, !tbaa !13
  %446 = load double, ptr %33, align 8, !tbaa !13
  %447 = fsub double %446, 1.000000e+00
  %448 = load double, ptr %44, align 8, !tbaa !13
  %449 = fmul double %447, %448
  %450 = call double @llvm.fmuladd.f64(double %444, double %445, double %449)
  %451 = load double, ptr %36, align 8, !tbaa !13
  %452 = load double, ptr %47, align 8, !tbaa !13
  %453 = call double @llvm.fmuladd.f64(double %451, double %452, double %450)
  %454 = load double, ptr %38, align 8, !tbaa !13
  %455 = load double, ptr %30, align 8, !tbaa !13
  %456 = load double, ptr %43, align 8, !tbaa !13
  %457 = load double, ptr %33, align 8, !tbaa !13
  %458 = fsub double %457, 1.000000e+00
  %459 = load double, ptr %46, align 8, !tbaa !13
  %460 = fmul double %458, %459
  %461 = call double @llvm.fmuladd.f64(double %455, double %456, double %460)
  %462 = load double, ptr %36, align 8, !tbaa !13
  %463 = load double, ptr %49, align 8, !tbaa !13
  %464 = call double @llvm.fmuladd.f64(double %462, double %463, double %461)
  %465 = load double, ptr %40, align 8, !tbaa !13
  %466 = fmul double %464, %465
  %467 = call double @llvm.fmuladd.f64(double %453, double %454, double %466)
  %468 = load double, ptr %30, align 8, !tbaa !13
  %469 = load double, ptr %42, align 8, !tbaa !13
  %470 = load double, ptr %33, align 8, !tbaa !13
  %471 = fsub double %470, 1.000000e+00
  %472 = load double, ptr %45, align 8, !tbaa !13
  %473 = fmul double %471, %472
  %474 = call double @llvm.fmuladd.f64(double %468, double %469, double %473)
  %475 = load double, ptr %36, align 8, !tbaa !13
  %476 = load double, ptr %48, align 8, !tbaa !13
  %477 = call double @llvm.fmuladd.f64(double %475, double %476, double %474)
  %478 = load double, ptr %39, align 8, !tbaa !13
  %479 = call double @llvm.fmuladd.f64(double %477, double %478, double %467)
  %480 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %481 = getelementptr inbounds [9 x double], ptr %480, i64 0, i64 5
  store double %479, ptr %481, align 8, !tbaa !13
  %482 = load double, ptr %31, align 8, !tbaa !13
  %483 = load double, ptr %42, align 8, !tbaa !13
  %484 = load double, ptr %34, align 8, !tbaa !13
  %485 = load double, ptr %45, align 8, !tbaa !13
  %486 = fmul double %484, %485
  %487 = call double @llvm.fmuladd.f64(double %482, double %483, double %486)
  %488 = load double, ptr %37, align 8, !tbaa !13
  %489 = fsub double %488, 1.000000e+00
  %490 = load double, ptr %48, align 8, !tbaa !13
  %491 = call double @llvm.fmuladd.f64(double %489, double %490, double %487)
  %492 = load double, ptr %39, align 8, !tbaa !13
  %493 = load double, ptr %31, align 8, !tbaa !13
  %494 = fneg double %493
  %495 = load double, ptr %41, align 8, !tbaa !13
  %496 = load double, ptr %34, align 8, !tbaa !13
  %497 = load double, ptr %44, align 8, !tbaa !13
  %498 = fmul double %496, %497
  %499 = fneg double %498
  %500 = call double @llvm.fmuladd.f64(double %494, double %495, double %499)
  %501 = load double, ptr %37, align 8, !tbaa !13
  %502 = fsub double %501, 1.000000e+00
  %503 = load double, ptr %47, align 8, !tbaa !13
  %504 = fneg double %502
  %505 = call double @llvm.fmuladd.f64(double %504, double %503, double %500)
  %506 = load double, ptr %38, align 8, !tbaa !13
  %507 = fmul double %505, %506
  %508 = call double @llvm.fmuladd.f64(double %491, double %492, double %507)
  %509 = load double, ptr %31, align 8, !tbaa !13
  %510 = fneg double %509
  %511 = load double, ptr %43, align 8, !tbaa !13
  %512 = load double, ptr %34, align 8, !tbaa !13
  %513 = load double, ptr %46, align 8, !tbaa !13
  %514 = fmul double %512, %513
  %515 = fneg double %514
  %516 = call double @llvm.fmuladd.f64(double %510, double %511, double %515)
  %517 = load double, ptr %37, align 8, !tbaa !13
  %518 = fsub double %517, 1.000000e+00
  %519 = load double, ptr %49, align 8, !tbaa !13
  %520 = fneg double %518
  %521 = call double @llvm.fmuladd.f64(double %520, double %519, double %516)
  %522 = load double, ptr %40, align 8, !tbaa !13
  %523 = call double @llvm.fmuladd.f64(double %521, double %522, double %508)
  %524 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %525 = getelementptr inbounds [9 x double], ptr %524, i64 0, i64 6
  store double %523, ptr %525, align 8, !tbaa !13
  %526 = load double, ptr %31, align 8, !tbaa !13
  %527 = fmul double 2.000000e+00, %526
  %528 = load double, ptr %41, align 8, !tbaa !13
  %529 = load double, ptr %34, align 8, !tbaa !13
  %530 = fmul double 2.000000e+00, %529
  %531 = load double, ptr %44, align 8, !tbaa !13
  %532 = fmul double %530, %531
  %533 = call double @llvm.fmuladd.f64(double %527, double %528, double %532)
  %534 = load double, ptr %37, align 8, !tbaa !13
  %535 = fsub double %534, 1.000000e+00
  %536 = fmul double 2.000000e+00, %535
  %537 = load double, ptr %47, align 8, !tbaa !13
  %538 = call double @llvm.fmuladd.f64(double %536, double %537, double %533)
  %539 = load double, ptr %40, align 8, !tbaa !13
  %540 = load double, ptr %31, align 8, !tbaa !13
  %541 = fmul double -2.000000e+00, %540
  %542 = load double, ptr %43, align 8, !tbaa !13
  %543 = load double, ptr %34, align 8, !tbaa !13
  %544 = fmul double 2.000000e+00, %543
  %545 = load double, ptr %46, align 8, !tbaa !13
  %546 = fmul double %544, %545
  %547 = fneg double %546
  %548 = call double @llvm.fmuladd.f64(double %541, double %542, double %547)
  %549 = load double, ptr %37, align 8, !tbaa !13
  %550 = fsub double %549, 1.000000e+00
  %551 = fmul double 2.000000e+00, %550
  %552 = load double, ptr %49, align 8, !tbaa !13
  %553 = fneg double %551
  %554 = call double @llvm.fmuladd.f64(double %553, double %552, double %548)
  %555 = load double, ptr %38, align 8, !tbaa !13
  %556 = fmul double %554, %555
  %557 = call double @llvm.fmuladd.f64(double %538, double %539, double %556)
  %558 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %559 = getelementptr inbounds [9 x double], ptr %558, i64 0, i64 7
  store double %557, ptr %559, align 8, !tbaa !13
  %560 = load double, ptr %31, align 8, !tbaa !13
  %561 = load double, ptr %41, align 8, !tbaa !13
  %562 = load double, ptr %34, align 8, !tbaa !13
  %563 = load double, ptr %44, align 8, !tbaa !13
  %564 = fmul double %562, %563
  %565 = call double @llvm.fmuladd.f64(double %560, double %561, double %564)
  %566 = load double, ptr %37, align 8, !tbaa !13
  %567 = fsub double %566, 1.000000e+00
  %568 = load double, ptr %47, align 8, !tbaa !13
  %569 = call double @llvm.fmuladd.f64(double %567, double %568, double %565)
  %570 = load double, ptr %38, align 8, !tbaa !13
  %571 = load double, ptr %31, align 8, !tbaa !13
  %572 = load double, ptr %43, align 8, !tbaa !13
  %573 = load double, ptr %34, align 8, !tbaa !13
  %574 = load double, ptr %46, align 8, !tbaa !13
  %575 = fmul double %573, %574
  %576 = call double @llvm.fmuladd.f64(double %571, double %572, double %575)
  %577 = load double, ptr %37, align 8, !tbaa !13
  %578 = fsub double %577, 1.000000e+00
  %579 = load double, ptr %49, align 8, !tbaa !13
  %580 = call double @llvm.fmuladd.f64(double %578, double %579, double %576)
  %581 = load double, ptr %40, align 8, !tbaa !13
  %582 = fmul double %580, %581
  %583 = call double @llvm.fmuladd.f64(double %569, double %570, double %582)
  %584 = load double, ptr %31, align 8, !tbaa !13
  %585 = load double, ptr %42, align 8, !tbaa !13
  %586 = load double, ptr %34, align 8, !tbaa !13
  %587 = load double, ptr %45, align 8, !tbaa !13
  %588 = fmul double %586, %587
  %589 = call double @llvm.fmuladd.f64(double %584, double %585, double %588)
  %590 = load double, ptr %37, align 8, !tbaa !13
  %591 = fsub double %590, 1.000000e+00
  %592 = load double, ptr %48, align 8, !tbaa !13
  %593 = call double @llvm.fmuladd.f64(double %591, double %592, double %589)
  %594 = load double, ptr %39, align 8, !tbaa !13
  %595 = call double @llvm.fmuladd.f64(double %593, double %594, double %583)
  %596 = getelementptr inbounds %struct.mat33_t, ptr %50, i32 0, i32 0
  %597 = getelementptr inbounds [9 x double], ptr %596, i64 0, i64 8
  store double %595, ptr %597, align 8, !tbaa !13
  call void @mat33_add(ptr noundef %28, ptr noundef %50)
  call void @llvm.lifetime.end.p0(i64 72, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %598

598:                                              ; preds = %138
  %599 = load i32, ptr %19, align 4, !tbaa !9
  %600 = add nsw i32 %599, 1
  store i32 %600, ptr %19, align 4, !tbaa !9
  br label %134, !llvm.loop !15

601:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 72, ptr %51) #7
  call void @mat33_mult_mat2(ptr noundef %51, ptr noundef %24, ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 40, ptr %52) #7
  call void @llvm.memset.p0.i64(ptr align 16 %52, i8 0, i64 40, i1 false)
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %602

602:                                              ; preds = %664, %601
  %603 = load i32, ptr %19, align 4, !tbaa !9
  %604 = load i32, ptr %17, align 4, !tbaa !9
  %605 = icmp slt i32 %603, %604
  br i1 %605, label %606, label %667

606:                                              ; preds = %602
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #7
  %607 = load ptr, ptr %13, align 8, !tbaa !5
  %608 = load i32, ptr %19, align 4, !tbaa !9
  %609 = sext i32 %608 to i64
  %610 = getelementptr inbounds %struct.vec3_t, ptr %607, i64 %609
  %611 = getelementptr inbounds %struct.vec3_t, ptr %610, i32 0, i32 0
  %612 = getelementptr inbounds [3 x double], ptr %611, i64 0, i64 0
  %613 = load double, ptr %612, align 8, !tbaa !13
  store double %613, ptr %53, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  %614 = load ptr, ptr %13, align 8, !tbaa !5
  %615 = load i32, ptr %19, align 4, !tbaa !9
  %616 = sext i32 %615 to i64
  %617 = getelementptr inbounds %struct.vec3_t, ptr %614, i64 %616
  %618 = getelementptr inbounds %struct.vec3_t, ptr %617, i32 0, i32 0
  %619 = getelementptr inbounds [3 x double], ptr %618, i64 0, i64 1
  %620 = load double, ptr %619, align 8, !tbaa !13
  store double %620, ptr %54, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #7
  %621 = load ptr, ptr %13, align 8, !tbaa !5
  %622 = load i32, ptr %19, align 4, !tbaa !9
  %623 = sext i32 %622 to i64
  %624 = getelementptr inbounds %struct.vec3_t, ptr %621, i64 %623
  %625 = getelementptr inbounds %struct.vec3_t, ptr %624, i32 0, i32 0
  %626 = getelementptr inbounds [3 x double], ptr %625, i64 0, i64 2
  %627 = load double, ptr %626, align 8, !tbaa !13
  store double %627, ptr %55, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 72, ptr %56) #7
  %628 = load double, ptr %53, align 8, !tbaa !13
  %629 = fneg double %628
  %630 = load double, ptr %55, align 8, !tbaa !13
  %631 = fmul double 2.000000e+00, %630
  %632 = load double, ptr %53, align 8, !tbaa !13
  %633 = load double, ptr %54, align 8, !tbaa !13
  %634 = load double, ptr %54, align 8, !tbaa !13
  %635 = load double, ptr %55, align 8, !tbaa !13
  %636 = fneg double %635
  %637 = load double, ptr %53, align 8, !tbaa !13
  %638 = fmul double -2.000000e+00, %637
  %639 = load double, ptr %55, align 8, !tbaa !13
  call void @mat33_assign(ptr noundef %56, double noundef %629, double noundef %631, double noundef %632, double noundef %633, double noundef 0.000000e+00, double noundef %634, double noundef %636, double noundef %638, double noundef %639)
  call void @llvm.lifetime.start.p0(i64 72, ptr %57) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %58) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %59) #7
  call void @mat33_eye(ptr noundef %58)
  %640 = load i32, ptr %19, align 4, !tbaa !9
  %641 = sext i32 %640 to i64
  %642 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %641
  call void @mat33_sub(ptr noundef %58, ptr noundef %642)
  %643 = load ptr, ptr %16, align 8, !tbaa !5
  call void @mat33_mult_mat2(ptr noundef %59, ptr noundef %643, ptr noundef %56)
  call void @mat33_add(ptr noundef %59, ptr noundef %51)
  call void @mat33_mult_mat2(ptr noundef %57, ptr noundef %58, ptr noundef %59)
  call void @llvm.lifetime.start.p0(i64 24, ptr %60) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %61) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %62) #7
  call void @mat33_to_col_vec3(ptr noundef %60, ptr noundef %61, ptr noundef %62, ptr noundef %57)
  call void @llvm.lifetime.start.p0(i64 24, ptr %63) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %64) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %65) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %66) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %67) #7
  call void @vec3_copy(ptr noundef %63, ptr noundef %60)
  call void @vec3_mult_vec(ptr noundef %63, ptr noundef %60)
  call void @vec3_copy(ptr noundef %64, ptr noundef %61)
  call void @vec3_mult_vec(ptr noundef %64, ptr noundef %60)
  call void @vec3_mult(ptr noundef %64, double noundef 2.000000e+00)
  call void @vec3_copy(ptr noundef %65, ptr noundef %62)
  call void @vec3_mult_vec(ptr noundef %65, ptr noundef %60)
  call void @vec3_mult(ptr noundef %65, double noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr %68) #7
  call void @vec3_copy(ptr noundef %68, ptr noundef %61)
  call void @vec3_mult_vec(ptr noundef %68, ptr noundef %61)
  call void @vec3_add_vec(ptr noundef %65, ptr noundef %68)
  call void @vec3_copy(ptr noundef %66, ptr noundef %62)
  call void @vec3_mult_vec(ptr noundef %66, ptr noundef %61)
  call void @vec3_mult(ptr noundef %66, double noundef 2.000000e+00)
  call void @vec3_copy(ptr noundef %67, ptr noundef %62)
  call void @vec3_mult_vec(ptr noundef %67, ptr noundef %62)
  %644 = call double @vec3_sum(ptr noundef %63)
  %645 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 0
  %646 = load double, ptr %645, align 16, !tbaa !13
  %647 = fadd double %646, %644
  store double %647, ptr %645, align 16, !tbaa !13
  %648 = call double @vec3_sum(ptr noundef %64)
  %649 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 1
  %650 = load double, ptr %649, align 8, !tbaa !13
  %651 = fadd double %650, %648
  store double %651, ptr %649, align 8, !tbaa !13
  %652 = call double @vec3_sum(ptr noundef %65)
  %653 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 2
  %654 = load double, ptr %653, align 16, !tbaa !13
  %655 = fadd double %654, %652
  store double %655, ptr %653, align 16, !tbaa !13
  %656 = call double @vec3_sum(ptr noundef %66)
  %657 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 3
  %658 = load double, ptr %657, align 8, !tbaa !13
  %659 = fadd double %658, %656
  store double %659, ptr %657, align 8, !tbaa !13
  %660 = call double @vec3_sum(ptr noundef %67)
  %661 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 4
  %662 = load double, ptr %661, align 16, !tbaa !13
  %663 = fadd double %662, %660
  store double %663, ptr %661, align 16, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 24, ptr %68) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %67) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %66) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %57) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  br label %664

664:                                              ; preds = %606
  %665 = load i32, ptr %19, align 4, !tbaa !9
  %666 = add nsw i32 %665, 1
  store i32 %666, ptr %19, align 4, !tbaa !9
  br label %602, !llvm.loop !16

667:                                              ; preds = %602
  call void @llvm.lifetime.start.p0(i64 40, ptr %69) #7
  %668 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 1
  %669 = load double, ptr %668, align 8, !tbaa !13
  %670 = fneg double %669
  %671 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 4
  store double %670, ptr %671, align 16, !tbaa !13
  %672 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 0
  %673 = load double, ptr %672, align 16, !tbaa !13
  %674 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 2
  %675 = load double, ptr %674, align 16, !tbaa !13
  %676 = fmul double 2.000000e+00, %675
  %677 = fneg double %676
  %678 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %673, double %677)
  %679 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 3
  store double %678, ptr %679, align 8, !tbaa !13
  %680 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 3
  %681 = load double, ptr %680, align 8, !tbaa !13
  %682 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 1
  %683 = load double, ptr %682, align 8, !tbaa !13
  %684 = fmul double 3.000000e+00, %683
  %685 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %681, double %684)
  %686 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 2
  store double %685, ptr %686, align 16, !tbaa !13
  %687 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 4
  %688 = load double, ptr %687, align 16, !tbaa !13
  %689 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 2
  %690 = load double, ptr %689, align 16, !tbaa !13
  %691 = fmul double 2.000000e+00, %690
  %692 = call double @llvm.fmuladd.f64(double -4.000000e+00, double %688, double %691)
  %693 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 1
  store double %692, ptr %693, align 8, !tbaa !13
  %694 = getelementptr inbounds [5 x double], ptr %52, i64 0, i64 3
  %695 = load double, ptr %694, align 8, !tbaa !13
  %696 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 0
  store double %695, ptr %696, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 40, ptr %70) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #7
  %697 = getelementptr inbounds [5 x double], ptr %70, i64 0, i64 0
  %698 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 0
  %699 = call i32 @solve_polynomial(ptr noundef %697, ptr noundef %698, i32 noundef 5)
  store i32 %699, ptr %71, align 4, !tbaa !9
  %700 = load i32, ptr %71, align 4, !tbaa !9
  %701 = zext i32 %700 to i64
  %702 = alloca double, i64 %701, align 16
  store i64 %701, ptr %72, align 8
  %703 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_clear(ptr noundef %702, i32 noundef %703)
  %704 = load i32, ptr %71, align 4, !tbaa !9
  %705 = zext i32 %704 to i64
  %706 = alloca double, i64 %705, align 16
  store i64 %705, ptr %73, align 8
  %707 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 4
  %708 = load double, ptr %707, align 16, !tbaa !13
  %709 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_add(ptr noundef %702, double noundef %708, i32 noundef %709)
  store i32 3, ptr %20, align 4, !tbaa !9
  br label %710

710:                                              ; preds = %739, %667
  %711 = load i32, ptr %20, align 4, !tbaa !9
  %712 = icmp sgt i32 %711, 0
  br i1 %712, label %713, label %742

713:                                              ; preds = %710
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %714

714:                                              ; preds = %735, %713
  %715 = load i32, ptr %21, align 4, !tbaa !9
  %716 = load i32, ptr %71, align 4, !tbaa !9
  %717 = icmp slt i32 %715, %716
  br i1 %717, label %718, label %738

718:                                              ; preds = %714
  %719 = load i32, ptr %21, align 4, !tbaa !9
  %720 = sext i32 %719 to i64
  %721 = getelementptr inbounds double, ptr %702, i64 %720
  %722 = load double, ptr %721, align 8, !tbaa !13
  %723 = load i32, ptr %21, align 4, !tbaa !9
  %724 = sext i32 %723 to i64
  %725 = getelementptr inbounds [5 x double], ptr %70, i64 0, i64 %724
  %726 = load double, ptr %725, align 8, !tbaa !13
  %727 = load i32, ptr %20, align 4, !tbaa !9
  %728 = sext i32 %727 to i64
  %729 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 %728
  %730 = load double, ptr %729, align 8, !tbaa !13
  %731 = call double @llvm.fmuladd.f64(double %722, double %726, double %730)
  %732 = load i32, ptr %21, align 4, !tbaa !9
  %733 = sext i32 %732 to i64
  %734 = getelementptr inbounds double, ptr %702, i64 %733
  store double %731, ptr %734, align 8, !tbaa !13
  br label %735

735:                                              ; preds = %718
  %736 = load i32, ptr %21, align 4, !tbaa !9
  %737 = add nsw i32 %736, 1
  store i32 %737, ptr %21, align 4, !tbaa !9
  br label %714, !llvm.loop !17

738:                                              ; preds = %714
  br label %739

739:                                              ; preds = %738
  %740 = load i32, ptr %20, align 4, !tbaa !9
  %741 = add nsw i32 %740, -1
  store i32 %741, ptr %20, align 4, !tbaa !9
  br label %710, !llvm.loop !18

742:                                              ; preds = %710
  %743 = getelementptr inbounds [5 x double], ptr %70, i64 0, i64 0
  %744 = load i32, ptr %71, align 4, !tbaa !9
  %745 = sext i32 %744 to i64
  %746 = mul i64 %745, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %706, ptr align 16 %743, i64 %746, i1 false)
  %747 = load i32, ptr %71, align 4, !tbaa !9
  %748 = zext i32 %747 to i64
  %749 = alloca double, i64 %748, align 16
  store i64 %748, ptr %74, align 8
  %750 = load i32, ptr %71, align 4, !tbaa !9
  %751 = sext i32 %750 to i64
  %752 = mul i64 %751, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %749, ptr align 16 %706, i64 %752, i1 false)
  %753 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_mult(ptr noundef %749, double noundef 2.000000e+00, i32 noundef %753)
  %754 = load i32, ptr %71, align 4, !tbaa !9
  %755 = zext i32 %754 to i64
  %756 = alloca double, i64 %755, align 16
  store i64 %755, ptr %75, align 8
  %757 = load i32, ptr %71, align 4, !tbaa !9
  %758 = sext i32 %757 to i64
  %759 = mul i64 %758, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %756, ptr align 16 %706, i64 %759, i1 false)
  %760 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_pow(ptr noundef %756, double noundef 2.000000e+00, i32 noundef %760)
  %761 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_add(ptr noundef %756, double noundef 1.000000e+00, i32 noundef %761)
  %762 = load i32, ptr %71, align 4, !tbaa !9
  %763 = zext i32 %762 to i64
  %764 = alloca double, i64 %763, align 16
  store i64 %763, ptr %76, align 8
  %765 = load i32, ptr %71, align 4, !tbaa !9
  %766 = sext i32 %765 to i64
  %767 = mul i64 %766, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %764, ptr align 16 %706, i64 %767, i1 false)
  %768 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_pow(ptr noundef %764, double noundef 2.000000e+00, i32 noundef %768)
  %769 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_negate(ptr noundef %764, i32 noundef %769)
  %770 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_add(ptr noundef %764, double noundef 1.000000e+00, i32 noundef %770)
  %771 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_div_vec(ptr noundef %764, ptr noundef %756, i32 noundef %771)
  %772 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_div_vec(ptr noundef %749, ptr noundef %756, i32 noundef %772)
  %773 = load i32, ptr %71, align 4, !tbaa !9
  %774 = zext i32 %773 to i64
  %775 = alloca double, i64 %774, align 16
  store i64 %774, ptr %77, align 8
  %776 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_atan2(ptr noundef %775, ptr noundef %749, ptr noundef %764, i32 noundef %776)
  %777 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_mult(ptr noundef %775, double noundef 0x404CA5DC1A63C1F8, i32 noundef %777)
  %778 = load i32, ptr %71, align 4, !tbaa !9
  %779 = zext i32 %778 to i64
  %780 = alloca double, i64 %779, align 16
  store i64 %779, ptr %78, align 8
  %781 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_clear(ptr noundef %780, i32 noundef %781)
  %782 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 1
  %783 = load double, ptr %782, align 8, !tbaa !13
  %784 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_add(ptr noundef %780, double noundef %783, i32 noundef %784)
  %785 = load i32, ptr %71, align 4, !tbaa !9
  %786 = zext i32 %785 to i64
  %787 = alloca double, i64 %786, align 16
  store i64 %786, ptr %79, align 8
  %788 = load i32, ptr %71, align 4, !tbaa !9
  %789 = sext i32 %788 to i64
  %790 = mul i64 %789, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %787, ptr align 16 %706, i64 %790, i1 false)
  %791 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 2
  %792 = load double, ptr %791, align 16, !tbaa !13
  %793 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_mult(ptr noundef %787, double noundef %792, i32 noundef %793)
  %794 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_mult(ptr noundef %787, double noundef 2.000000e+00, i32 noundef %794)
  %795 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_add_vec(ptr noundef %780, ptr noundef %787, i32 noundef %795)
  store i32 3, ptr %20, align 4, !tbaa !9
  br label %796

796:                                              ; preds = %816, %742
  %797 = load i32, ptr %20, align 4, !tbaa !9
  %798 = icmp sle i32 %797, 4
  br i1 %798, label %799, label %819

799:                                              ; preds = %796
  %800 = load i32, ptr %71, align 4, !tbaa !9
  %801 = sext i32 %800 to i64
  %802 = mul i64 %801, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %787, ptr align 16 %706, i64 %802, i1 false)
  %803 = load i32, ptr %20, align 4, !tbaa !9
  %804 = sitofp i32 %803 to double
  %805 = fsub double %804, 1.000000e+00
  %806 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_pow(ptr noundef %787, double noundef %805, i32 noundef %806)
  %807 = load i32, ptr %20, align 4, !tbaa !9
  %808 = sext i32 %807 to i64
  %809 = getelementptr inbounds [5 x double], ptr %69, i64 0, i64 %808
  %810 = load double, ptr %809, align 8, !tbaa !13
  %811 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_mult(ptr noundef %787, double noundef %810, i32 noundef %811)
  %812 = load i32, ptr %20, align 4, !tbaa !9
  %813 = sitofp i32 %812 to double
  %814 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_mult(ptr noundef %787, double noundef %813, i32 noundef %814)
  %815 = load i32, ptr %71, align 4, !tbaa !9
  call void @scalar_array_add_vec(ptr noundef %780, ptr noundef %787, i32 noundef %815)
  br label %816

816:                                              ; preds = %799
  %817 = load i32, ptr %20, align 4, !tbaa !9
  %818 = add nsw i32 %817, 1
  store i32 %818, ptr %20, align 4, !tbaa !9
  br label %796, !llvm.loop !19

819:                                              ; preds = %796
  %820 = load i32, ptr %71, align 4, !tbaa !9
  %821 = zext i32 %820 to i64
  %822 = alloca double, i64 %821, align 16
  store i64 %821, ptr %80, align 8
  %823 = load i32, ptr %71, align 4, !tbaa !9
  %824 = zext i32 %823 to i64
  %825 = alloca double, i64 %824, align 16
  store i64 %824, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %82) #7
  store i32 0, ptr %82, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #7
  %826 = load i32, ptr %71, align 4, !tbaa !9
  %827 = sext i32 %826 to i64
  %828 = mul i64 %827, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %822, ptr align 16 %780, i64 %828, i1 false)
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %829

829:                                              ; preds = %849, %819
  %830 = load i32, ptr %19, align 4, !tbaa !9
  %831 = load i32, ptr %71, align 4, !tbaa !9
  %832 = icmp slt i32 %830, %831
  br i1 %832, label %833, label %852

833:                                              ; preds = %829
  %834 = load i32, ptr %19, align 4, !tbaa !9
  %835 = sext i32 %834 to i64
  %836 = getelementptr inbounds double, ptr %822, i64 %835
  %837 = load double, ptr %836, align 8, !tbaa !13
  %838 = fcmp ogt double %837, 0.000000e+00
  br i1 %838, label %839, label %848

839:                                              ; preds = %833
  %840 = load i32, ptr %19, align 4, !tbaa !9
  %841 = sext i32 %840 to i64
  %842 = getelementptr inbounds double, ptr %775, i64 %841
  %843 = load double, ptr %842, align 8, !tbaa !13
  %844 = load i32, ptr %82, align 4, !tbaa !9
  %845 = add nsw i32 %844, 1
  store i32 %845, ptr %82, align 4, !tbaa !9
  %846 = sext i32 %844 to i64
  %847 = getelementptr inbounds double, ptr %825, i64 %846
  store double %843, ptr %847, align 8, !tbaa !13
  br label %848

848:                                              ; preds = %839, %833
  br label %849

849:                                              ; preds = %848
  %850 = load i32, ptr %19, align 4, !tbaa !9
  %851 = add nsw i32 %850, 1
  store i32 %851, ptr %19, align 4, !tbaa !9
  br label %829, !llvm.loop !20

852:                                              ; preds = %829
  store i32 0, ptr %83, align 4, !tbaa !9
  br label %853

853:                                              ; preds = %885, %852
  %854 = load i32, ptr %83, align 4, !tbaa !9
  %855 = load i32, ptr %82, align 4, !tbaa !9
  %856 = icmp slt i32 %854, %855
  br i1 %856, label %857, label %888

857:                                              ; preds = %853
  call void @llvm.lifetime.start.p0(i64 24, ptr %84) #7
  %858 = load i32, ptr %83, align 4, !tbaa !9
  %859 = sext i32 %858 to i64
  %860 = getelementptr inbounds double, ptr %825, i64 %859
  %861 = load double, ptr %860, align 8, !tbaa !13
  %862 = fmul double %861, 0x400921FB54442D18
  %863 = fdiv double %862, 1.800000e+02
  call void @vec3_assign(ptr noundef %84, double noundef 0.000000e+00, double noundef %863, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 72, ptr %85) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %86) #7
  call void @rpyMat(ptr noundef %86, ptr noundef %84)
  %864 = load ptr, ptr %16, align 8, !tbaa !5
  call void @mat33_mult_mat2(ptr noundef %85, ptr noundef %864, ptr noundef %86)
  call void @llvm.lifetime.start.p0(i64 24, ptr %87) #7
  call void @vec3_clear(ptr noundef %87)
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %865

865:                                              ; preds = %877, %857
  %866 = load i32, ptr %19, align 4, !tbaa !9
  %867 = load i32, ptr %17, align 4, !tbaa !9
  %868 = icmp slt i32 %866, %867
  br i1 %868, label %869, label %880

869:                                              ; preds = %865
  call void @llvm.lifetime.start.p0(i64 72, ptr %88) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %89) #7
  call void @mat33_eye(ptr noundef %89)
  %870 = load i32, ptr %19, align 4, !tbaa !9
  %871 = sext i32 %870 to i64
  %872 = getelementptr inbounds %struct.mat33_t, ptr %96, i64 %871
  call void @mat33_copy(ptr noundef %88, ptr noundef %872)
  call void @mat33_sub(ptr noundef %88, ptr noundef %89)
  call void @llvm.lifetime.start.p0(i64 24, ptr %90) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %91) #7
  %873 = load ptr, ptr %13, align 8, !tbaa !5
  %874 = load i32, ptr %19, align 4, !tbaa !9
  %875 = sext i32 %874 to i64
  %876 = getelementptr inbounds %struct.vec3_t, ptr %873, i64 %875
  call void @vec3_mult_mat(ptr noundef %90, ptr noundef %85, ptr noundef %876)
  call void @vec3_mult_mat(ptr noundef %91, ptr noundef %88, ptr noundef %90)
  call void @vec3_add_vec(ptr noundef %87, ptr noundef %91)
  call void @llvm.lifetime.end.p0(i64 24, ptr %91) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %90) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %89) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %88) #7
  br label %877

877:                                              ; preds = %869
  %878 = load i32, ptr %19, align 4, !tbaa !9
  %879 = add nsw i32 %878, 1
  store i32 %879, ptr %19, align 4, !tbaa !9
  br label %865, !llvm.loop !21

880:                                              ; preds = %865
  call void @llvm.lifetime.start.p0(i64 24, ptr %92) #7
  call void @vec3_mult_mat(ptr noundef %92, ptr noundef %24, ptr noundef %87)
  %881 = load ptr, ptr %11, align 8, !tbaa !5
  %882 = load i32, ptr %83, align 4, !tbaa !9
  %883 = sext i32 %882 to i64
  %884 = getelementptr inbounds %struct.vec3_t, ptr %881, i64 %883
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %884, ptr align 8 %92, i64 24, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 24, ptr %92) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %87) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %86) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %85) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %84) #7
  br label %885

885:                                              ; preds = %880
  %886 = load i32, ptr %83, align 4, !tbaa !9
  %887 = add nsw i32 %886, 1
  store i32 %887, ptr %83, align 4, !tbaa !9
  br label %853, !llvm.loop !24

888:                                              ; preds = %853
  %889 = load ptr, ptr %10, align 8, !tbaa !5
  %890 = load i32, ptr %82, align 4, !tbaa !9
  %891 = sext i32 %890 to i64
  %892 = mul i64 %891, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %889, ptr align 16 %825, i64 %892, i1 false)
  %893 = load i32, ptr %82, align 4, !tbaa !9
  %894 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 %893, ptr %894, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %70) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %69) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %24) #7
  %895 = load ptr, ptr %22, align 8
  call void @llvm.stackrestore.p0(ptr %895)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  ret void
}

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

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

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

declare double @vec3_sum(ptr noundef) #1

declare i32 @solve_polynomial(ptr noundef, ptr noundef, i32 noundef) #1

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

declare void @scalar_array_add(ptr noundef, double noundef, i32 noundef) #1

declare void @scalar_array_mult(ptr noundef, double noundef, i32 noundef) #1

declare void @scalar_array_pow(ptr noundef, double noundef, i32 noundef) #1

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

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

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

declare void @scalar_array_add_vec(ptr noundef, ptr noundef, i32 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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{i64 0, i64 24, !23}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !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.mat33_t = type { [9 x double] }
%struct.vec3_t = type { [3 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

declare void @vec3_mult(ptr noundef, double 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 void @mat33_assign(ptr noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

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

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

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

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

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

declare void @vec3_clear(ptr noundef) local_unnamed_addr #1

; 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 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_mult_mat2(ptr noundef, ptr noundef, 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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @getRotationY_wrtT(ptr nocapture noundef writeonly %0, ptr nocapture noundef writeonly %1, ptr noundef %2, ptr noundef %3, ptr nocapture noundef readnone %4, ptr nocapture noundef readnone %5, ptr noundef %6, i32 noundef %7, ptr nocapture noundef writeonly %8) local_unnamed_addr #2 {
  %10 = alloca %struct.mat33_t, align 8
  %11 = alloca %struct.mat33_t, align 8
  %12 = alloca %struct.mat33_t, align 8
  %13 = alloca %struct.mat33_t, align 8
  %14 = alloca %struct.mat33_t, align 8
  %15 = alloca %struct.mat33_t, align 16
  %16 = alloca %struct.mat33_t, align 8
  %17 = alloca %struct.mat33_t, align 8
  %18 = alloca %struct.mat33_t, align 8
  %19 = alloca %struct.mat33_t, align 8
  %20 = alloca %struct.mat33_t, align 8
  %21 = alloca %struct.vec3_t, align 8
  %22 = alloca %struct.vec3_t, align 8
  %23 = alloca %struct.vec3_t, 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.vec3_t, align 8
  %28 = alloca %struct.vec3_t, align 8
  %29 = alloca %struct.vec3_t, align 8
  %30 = alloca [5 x double], align 16
  %31 = alloca [5 x double], align 16
  %32 = alloca %struct.vec3_t, align 8
  %33 = alloca %struct.mat33_t, align 8
  %34 = alloca %struct.mat33_t, align 8
  %35 = alloca %struct.vec3_t, align 8
  %36 = alloca %struct.mat33_t, align 8
  %37 = alloca %struct.mat33_t, align 8
  %38 = alloca %struct.vec3_t, align 8
  %39 = alloca %struct.vec3_t, align 8
  %40 = alloca %struct.vec3_t, align 8
  %41 = zext i32 %7 to i64
  %42 = alloca %struct.mat33_t, i64 %41, align 16
  %43 = icmp sgt i32 %7, 0
  br i1 %43, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %9, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %9 ]
  %44 = getelementptr inbounds %struct.mat33_t, ptr %42, i64 %indvars.iv
  %45 = getelementptr inbounds %struct.vec3_t, ptr %2, i64 %indvars.iv
  call void @vec3_mul_vec3trans(ptr noundef nonnull %44, ptr noundef %45, ptr noundef %45) #6
  %46 = call double @vec3trans_mul_vec3(ptr noundef %45, ptr noundef %45) #6
  call void @mat33_div(ptr noundef nonnull %44, double noundef %46) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %41
  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 72, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #6
  call void @mat33_array_sum(ptr noundef nonnull %11, ptr noundef nonnull %42, i32 noundef %7) #6
  call void @mat33_eye(ptr noundef nonnull %12) #6
  %47 = sitofp i32 %7 to double
  call void @mat33_div(ptr noundef nonnull %11, double noundef %47) #6
  call void @mat33_sub_mat2(ptr noundef nonnull %13, ptr noundef nonnull %12, ptr noundef nonnull %11) #6
  call void @mat33_inv(ptr noundef nonnull %10, ptr noundef nonnull %13) #6
  call void @mat33_div(ptr noundef nonnull %10, double noundef %47) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %14) #6
  call void @mat33_clear(ptr noundef nonnull %14) #6
  br i1 %43, label %.lr.ph325, label %._crit_edge326.thread

._crit_edge326.thread:                            ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %16) #6
  call void @mat33_mult_mat2(ptr noundef nonnull %16, ptr noundef nonnull %10, ptr noundef nonnull %14) #6
  br label %._crit_edge335

.lr.ph325:                                        ; preds = %._crit_edge
  %48 = getelementptr inbounds i8, ptr %6, i64 8
  %49 = getelementptr inbounds i8, ptr %6, i64 24
  %50 = getelementptr inbounds i8, ptr %6, i64 40
  %51 = getelementptr inbounds i8, ptr %6, i64 48
  %52 = getelementptr inbounds i8, ptr %6, i64 56
  %53 = getelementptr inbounds i8, ptr %15, i64 16
  %54 = getelementptr inbounds i8, ptr %15, i64 32
  %55 = getelementptr inbounds i8, ptr %15, i64 48
  %56 = getelementptr inbounds i8, ptr %15, i64 64
  br label %57

57:                                               ; preds = %.lr.ph325, %57
  %indvars.iv365 = phi i64 [ 0, %.lr.ph325 ], [ %indvars.iv.next366, %57 ]
  %58 = getelementptr inbounds %struct.mat33_t, ptr %42, i64 %indvars.iv365
  %59 = load double, ptr %58, align 8, !tbaa !7
  %60 = getelementptr inbounds i8, ptr %58, i64 24
  %61 = load double, ptr %60, align 8, !tbaa !7
  %62 = getelementptr inbounds i8, ptr %58, i64 48
  %63 = load double, ptr %62, align 8, !tbaa !7
  %64 = getelementptr inbounds i8, ptr %58, i64 8
  %65 = load double, ptr %64, align 8, !tbaa !7
  %66 = getelementptr inbounds i8, ptr %58, i64 32
  %67 = load double, ptr %66, align 8, !tbaa !7
  %68 = getelementptr inbounds i8, ptr %58, i64 56
  %69 = load double, ptr %68, align 8, !tbaa !7
  %70 = getelementptr inbounds i8, ptr %58, i64 16
  %71 = load double, ptr %70, align 8, !tbaa !7
  %72 = getelementptr inbounds i8, ptr %58, i64 40
  %73 = load double, ptr %72, align 8, !tbaa !7
  %74 = getelementptr inbounds i8, ptr %58, i64 64
  %75 = load double, ptr %74, align 8, !tbaa !7
  %76 = getelementptr inbounds %struct.vec3_t, ptr %3, i64 %indvars.iv365
  %77 = load double, ptr %76, align 8, !tbaa !7
  %78 = getelementptr inbounds i8, ptr %76, i64 8
  %79 = load double, ptr %6, align 8, !tbaa !7
  %80 = load double, ptr %50, align 8, !tbaa !7
  %81 = load double, ptr %51, align 8, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %15) #6
  %82 = fadd double %59, -1.000000e+00
  %83 = fneg double %82
  %84 = fneg double %71
  %85 = fmul double %65, %80
  %86 = fneg double %85
  %87 = fmul double %82, 2.000000e+00
  %88 = fmul double %65, 2.000000e+00
  %89 = fmul double %71, 2.000000e+00
  %90 = fmul double %82, -2.000000e+00
  %91 = fneg double %88
  %92 = fmul double %80, %91
  %93 = fneg double %89
  %94 = insertelement <2 x double> poison, double %83, i64 0
  %95 = insertelement <2 x double> %94, double %87, i64 1
  %96 = insertelement <2 x double> poison, double %86, i64 0
  %97 = insertelement <2 x double> poison, double %84, i64 0
  %98 = insertelement <2 x double> %97, double %89, i64 1
  %99 = fadd double %67, -1.000000e+00
  %100 = fneg double %61
  %101 = fneg double %73
  %102 = fmul double %99, %80
  %103 = fneg double %102
  %104 = load <2 x double>, ptr %78, align 8, !tbaa !7
  %105 = load <2 x double>, ptr %48, align 8, !tbaa !7
  %106 = load <2 x double>, ptr %49, align 8, !tbaa !7
  %107 = load <2 x double>, ptr %52, align 8, !tbaa !7
  %108 = extractelement <2 x double> %106, i64 1
  %109 = fmul double %65, %108
  %110 = insertelement <2 x double> poison, double %65, i64 0
  %111 = insertelement <2 x double> %110, double %99, i64 1
  %112 = fmul <2 x double> %111, %106
  %113 = extractelement <2 x double> %112, i64 0
  %114 = fneg double %113
  %115 = call double @llvm.fmuladd.f64(double %83, double %79, double %114)
  %116 = call double @llvm.fmuladd.f64(double %84, double %81, double %115)
  %117 = fmul double %77, %116
  %118 = insertelement <2 x double> poison, double %82, i64 0
  %119 = insertelement <2 x double> %118, double %100, i64 1
  %120 = insertelement <2 x double> poison, double %109, i64 0
  %121 = insertelement <2 x double> %120, double %103, i64 1
  %122 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %119, <2 x double> %105, <2 x double> %121)
  %123 = insertelement <2 x double> poison, double %71, i64 0
  %124 = insertelement <2 x double> %123, double %101, i64 1
  %125 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %124, <2 x double> %107, <2 x double> %122)
  %126 = extractelement <2 x double> %125, i64 0
  %127 = extractelement <2 x double> %104, i64 0
  %128 = call double @llvm.fmuladd.f64(double %126, double %127, double %117)
  %129 = extractelement <2 x double> %106, i64 0
  %130 = fmul double %88, %129
  %131 = extractelement <2 x double> %105, i64 1
  %132 = call double @llvm.fmuladd.f64(double %90, double %131, double %92)
  %133 = extractelement <2 x double> %107, i64 1
  %134 = call double @llvm.fmuladd.f64(double %93, double %133, double %132)
  %135 = fmul double %77, %134
  %136 = shufflevector <2 x double> %105, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %137 = insertelement <2 x double> %136, double %79, i64 1
  %138 = insertelement <2 x double> %96, double %130, i64 1
  %139 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %137, <2 x double> %138)
  %140 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %141 = insertelement <2 x double> %140, double %81, i64 1
  %142 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %98, <2 x double> %141, <2 x double> %139)
  %143 = shufflevector <2 x double> %104, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %144 = insertelement <2 x double> poison, double %128, i64 0
  %145 = insertelement <2 x double> %144, double %135, i64 1
  %146 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %142, <2 x double> %143, <2 x double> %145)
  store <2 x double> %146, ptr %15, align 16, !tbaa !7
  %147 = insertelement <2 x double> %119, double %61, i64 1
  %148 = insertelement <2 x double> poison, double %79, i64 0
  %149 = shufflevector <2 x double> %148, <2 x double> %105, <2 x i32> <i32 0, i32 2>
  %150 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %147, <2 x double> %149, <2 x double> %112)
  %151 = insertelement <2 x double> %123, double %73, i64 1
  %152 = insertelement <2 x double> poison, double %81, i64 0
  %153 = shufflevector <2 x double> %152, <2 x double> %107, <2 x i32> <i32 0, i32 2>
  %154 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %151, <2 x double> %153, <2 x double> %150)
  %155 = fmul double %99, %129
  %156 = fneg double %155
  %157 = insertelement <2 x double> poison, double %85, i64 0
  %158 = insertelement <2 x double> %157, double %156, i64 1
  %159 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %119, <2 x double> %137, <2 x double> %158)
  %160 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %124, <2 x double> %141, <2 x double> %159)
  %161 = insertelement <2 x double> %143, double %77, i64 1
  %162 = fmul <2 x double> %161, %160
  %163 = insertelement <2 x double> poison, double %77, i64 0
  %164 = shufflevector <2 x double> %163, <2 x double> %104, <2 x i32> <i32 0, i32 2>
  %165 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %154, <2 x double> %164, <2 x double> %162)
  %166 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %125, <2 x double> %104, <2 x double> %165)
  store <2 x double> %166, ptr %53, align 16, !tbaa !7
  %167 = fmul double %61, 2.000000e+00
  %168 = fmul double %99, 2.000000e+00
  %169 = fmul double %168, %129
  %170 = call double @llvm.fmuladd.f64(double %167, double %79, double %169)
  %171 = fmul double %73, 2.000000e+00
  %172 = call double @llvm.fmuladd.f64(double %171, double %81, double %170)
  %173 = fmul double %61, -2.000000e+00
  %174 = fneg double %168
  %175 = fmul double %80, %174
  %176 = call double @llvm.fmuladd.f64(double %173, double %131, double %175)
  %177 = fneg double %171
  %178 = call double @llvm.fmuladd.f64(double %177, double %133, double %176)
  %179 = fmul double %77, %178
  %180 = call double @llvm.fmuladd.f64(double %61, double %79, double %155)
  %181 = call double @llvm.fmuladd.f64(double %73, double %81, double %180)
  %182 = call double @llvm.fmuladd.f64(double %61, double %131, double %102)
  %183 = call double @llvm.fmuladd.f64(double %73, double %133, double %182)
  %184 = extractelement <2 x double> %104, i64 1
  %185 = fmul double %184, %183
  %186 = call double @llvm.fmuladd.f64(double %181, double %77, double %185)
  %187 = shufflevector <2 x double> %154, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %188 = insertelement <2 x double> %187, double %172, i64 1
  %189 = insertelement <2 x double> poison, double %186, i64 0
  %190 = insertelement <2 x double> %189, double %179, i64 1
  %191 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %188, <2 x double> %104, <2 x double> %190)
  %192 = shufflevector <2 x double> %191, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %192, ptr %54, align 16, !tbaa !7
  %193 = fmul double %69, %108
  %194 = extractelement <2 x double> %105, i64 0
  %195 = call double @llvm.fmuladd.f64(double %63, double %194, double %193)
  %196 = fadd double %75, -1.000000e+00
  %197 = extractelement <2 x double> %107, i64 0
  %198 = call double @llvm.fmuladd.f64(double %196, double %197, double %195)
  %199 = fneg double %63
  %200 = fmul double %69, %129
  %201 = fneg double %200
  %202 = call double @llvm.fmuladd.f64(double %199, double %79, double %201)
  %203 = fneg double %196
  %204 = call double @llvm.fmuladd.f64(double %203, double %81, double %202)
  %205 = fmul double %77, %204
  %206 = call double @llvm.fmuladd.f64(double %198, double %127, double %205)
  %207 = fmul double %69, %80
  %208 = fneg double %207
  %209 = fmul double %63, 2.000000e+00
  %210 = fmul double %69, 2.000000e+00
  %211 = fmul double %210, %129
  %212 = fmul double %196, 2.000000e+00
  %213 = fmul double %63, -2.000000e+00
  %214 = fneg double %210
  %215 = fmul double %80, %214
  %216 = call double @llvm.fmuladd.f64(double %213, double %131, double %215)
  %217 = fneg double %212
  %218 = call double @llvm.fmuladd.f64(double %217, double %133, double %216)
  %219 = fmul double %77, %218
  %220 = insertelement <2 x double> poison, double %199, i64 0
  %221 = insertelement <2 x double> %220, double %209, i64 1
  %222 = insertelement <2 x double> poison, double %208, i64 0
  %223 = insertelement <2 x double> %222, double %211, i64 1
  %224 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %221, <2 x double> %137, <2 x double> %223)
  %225 = insertelement <2 x double> poison, double %203, i64 0
  %226 = insertelement <2 x double> %225, double %212, i64 1
  %227 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %226, <2 x double> %141, <2 x double> %224)
  %228 = insertelement <2 x double> poison, double %206, i64 0
  %229 = insertelement <2 x double> %228, double %219, i64 1
  %230 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %227, <2 x double> %143, <2 x double> %229)
  store <2 x double> %230, ptr %55, align 16, !tbaa !7
  %231 = call double @llvm.fmuladd.f64(double %63, double %79, double %200)
  %232 = call double @llvm.fmuladd.f64(double %196, double %81, double %231)
  %233 = call double @llvm.fmuladd.f64(double %63, double %131, double %207)
  %234 = call double @llvm.fmuladd.f64(double %196, double %133, double %233)
  %235 = fmul double %184, %234
  %236 = call double @llvm.fmuladd.f64(double %232, double %77, double %235)
  %237 = call double @llvm.fmuladd.f64(double %198, double %127, double %236)
  store double %237, ptr %56, align 16, !tbaa !7
  call void @mat33_add(ptr noundef nonnull %14, ptr noundef nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %15) #6
  %indvars.iv.next366 = add nuw nsw i64 %indvars.iv365, 1
  %exitcond369.not = icmp eq i64 %indvars.iv.next366, %41
  br i1 %exitcond369.not, label %._crit_edge326, label %57, !llvm.loop !11

._crit_edge326:                                   ; preds = %57
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %16) #6
  call void @mat33_mult_mat2(ptr noundef nonnull %16, ptr noundef nonnull %10, ptr noundef nonnull %14) #6
  br i1 %43, label %.lr.ph334, label %._crit_edge335

.lr.ph334:                                        ; preds = %._crit_edge326, %.lr.ph334
  %indvars.iv370 = phi i64 [ %indvars.iv.next371, %.lr.ph334 ], [ 0, %._crit_edge326 ]
  %.sroa.0.0331 = phi double [ %251, %.lr.ph334 ], [ 0.000000e+00, %._crit_edge326 ]
  %.sroa.6.0330 = phi double [ %253, %.lr.ph334 ], [ 0.000000e+00, %._crit_edge326 ]
  %.sroa.10.0329 = phi double [ %255, %.lr.ph334 ], [ 0.000000e+00, %._crit_edge326 ]
  %238 = phi <2 x double> [ %260, %.lr.ph334 ], [ zeroinitializer, %._crit_edge326 ]
  %239 = getelementptr inbounds %struct.vec3_t, ptr %3, i64 %indvars.iv370
  %240 = load double, ptr %239, align 8, !tbaa !7
  %241 = getelementptr inbounds i8, ptr %239, i64 8
  %242 = load double, ptr %241, align 8, !tbaa !7
  %243 = getelementptr inbounds i8, ptr %239, i64 16
  %244 = load double, ptr %243, align 8, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %17) #6
  %245 = fneg double %240
  %246 = fmul double %244, 2.000000e+00
  %247 = fneg double %244
  %248 = fmul double %240, -2.000000e+00
  call void @mat33_assign(ptr noundef nonnull %17, double noundef %245, double noundef %246, double noundef %240, double noundef %242, double noundef 0.000000e+00, double noundef %242, double noundef %247, double noundef %248, double noundef %244) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %20) #6
  call void @mat33_eye(ptr noundef nonnull %19) #6
  %249 = getelementptr inbounds %struct.mat33_t, ptr %42, i64 %indvars.iv370
  call void @mat33_sub(ptr noundef nonnull %19, ptr noundef nonnull %249) #6
  call void @mat33_mult_mat2(ptr noundef nonnull %20, ptr noundef nonnull %6, ptr noundef nonnull %17) #6
  call void @mat33_add(ptr noundef nonnull %20, ptr noundef nonnull %16) #6
  call void @mat33_mult_mat2(ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #6
  call void @mat33_to_col_vec3(ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %28) #6
  call void @vec3_copy(ptr noundef nonnull %24, ptr noundef nonnull %21) #6
  call void @vec3_mult_vec(ptr noundef nonnull %24, ptr noundef nonnull %21) #6
  call void @vec3_copy(ptr noundef nonnull %25, ptr noundef nonnull %22) #6
  call void @vec3_mult_vec(ptr noundef nonnull %25, ptr noundef nonnull %21) #6
  call void @vec3_mult(ptr noundef nonnull %25, double noundef 2.000000e+00) #6
  call void @vec3_copy(ptr noundef nonnull %26, ptr noundef nonnull %23) #6
  call void @vec3_mult_vec(ptr noundef nonnull %26, ptr noundef nonnull %21) #6
  call void @vec3_mult(ptr noundef nonnull %26, double noundef 2.000000e+00) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %29) #6
  call void @vec3_copy(ptr noundef nonnull %29, ptr noundef nonnull %22) #6
  call void @vec3_mult_vec(ptr noundef nonnull %29, ptr noundef nonnull %22) #6
  call void @vec3_add_vec(ptr noundef nonnull %26, ptr noundef nonnull %29) #6
  call void @vec3_copy(ptr noundef nonnull %27, ptr noundef nonnull %23) #6
  call void @vec3_mult_vec(ptr noundef nonnull %27, ptr noundef nonnull %22) #6
  call void @vec3_mult(ptr noundef nonnull %27, double noundef 2.000000e+00) #6
  call void @vec3_copy(ptr noundef nonnull %28, ptr noundef nonnull %23) #6
  call void @vec3_mult_vec(ptr noundef nonnull %28, ptr noundef nonnull %23) #6
  %250 = call double @vec3_sum(ptr noundef nonnull %24) #6
  %251 = fadd double %.sroa.0.0331, %250
  %252 = call double @vec3_sum(ptr noundef nonnull %25) #6
  %253 = fadd double %.sroa.6.0330, %252
  %254 = call double @vec3_sum(ptr noundef nonnull %26) #6
  %255 = fadd double %.sroa.10.0329, %254
  %256 = call double @vec3_sum(ptr noundef nonnull %27) #6
  %257 = call double @vec3_sum(ptr noundef nonnull %28) #6
  %258 = insertelement <2 x double> poison, double %257, i64 0
  %259 = insertelement <2 x double> %258, double %256, i64 1
  %260 = fadd <2 x double> %238, %259
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %29) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %17) #6
  %indvars.iv.next371 = add nuw nsw i64 %indvars.iv370, 1
  %exitcond374.not = icmp eq i64 %indvars.iv.next371, %41
  br i1 %exitcond374.not, label %._crit_edge335.loopexit, label %.lr.ph334, !llvm.loop !12

._crit_edge335.loopexit:                          ; preds = %.lr.ph334
  %261 = fmul double %255, 2.000000e+00
  br label %._crit_edge335

._crit_edge335:                                   ; preds = %._crit_edge326.thread, %._crit_edge335.loopexit, %._crit_edge326
  %.sroa.10.0.lcssa = phi double [ 0.000000e+00, %._crit_edge326 ], [ %261, %._crit_edge335.loopexit ], [ 0.000000e+00, %._crit_edge326.thread ]
  %.sroa.6.0.lcssa = phi double [ 0.000000e+00, %._crit_edge326 ], [ %253, %._crit_edge335.loopexit ], [ 0.000000e+00, %._crit_edge326.thread ]
  %.sroa.0.0.lcssa = phi double [ 0.000000e+00, %._crit_edge326 ], [ %251, %._crit_edge335.loopexit ], [ 0.000000e+00, %._crit_edge326.thread ]
  %262 = phi <2 x double> [ zeroinitializer, %._crit_edge326 ], [ %260, %._crit_edge335.loopexit ], [ zeroinitializer, %._crit_edge326.thread ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %30) #6
  %263 = fneg double %.sroa.6.0.lcssa
  %264 = getelementptr inbounds i8, ptr %30, i64 32
  store double %263, ptr %264, align 16, !tbaa !7
  %265 = fneg double %.sroa.10.0.lcssa
  %266 = call double @llvm.fmuladd.f64(double %.sroa.0.0.lcssa, double 4.000000e+00, double %265)
  %267 = getelementptr inbounds i8, ptr %30, i64 24
  store double %266, ptr %267, align 8, !tbaa !7
  %268 = fmul double %.sroa.6.0.lcssa, 3.000000e+00
  %269 = getelementptr inbounds i8, ptr %30, i64 16
  %270 = getelementptr inbounds i8, ptr %30, i64 8
  %271 = insertelement <2 x double> poison, double %.sroa.10.0.lcssa, i64 0
  %272 = insertelement <2 x double> %271, double %268, i64 1
  %273 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %262, <2 x double> <double -4.000000e+00, double -3.000000e+00>, <2 x double> %272)
  store <2 x double> %273, ptr %270, align 8, !tbaa !7
  %274 = extractelement <2 x double> %262, i64 1
  store double %274, ptr %30, align 16, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %31) #6
  %275 = call i32 @solve_polynomial(ptr noundef nonnull %31, ptr noundef nonnull %30, i32 noundef 5) #6
  %276 = zext i32 %275 to i64
  %277 = alloca double, i64 %276, align 16
  call void @scalar_array_clear(ptr noundef nonnull %277, i32 noundef %275) #6
  %278 = alloca double, i64 %276, align 16
  %279 = load double, ptr %264, align 16, !tbaa !7
  call void @scalar_array_add(ptr noundef nonnull %277, double noundef %279, i32 noundef %275) #6
  %280 = icmp sgt i32 %275, 0
  br i1 %280, label %.preheader321.us.preheader, label %.split345.us

.preheader321.us.preheader:                       ; preds = %._crit_edge335
  %281 = load double, ptr %267, align 8, !tbaa !7
  %min.iters.check = icmp ult i32 %275, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader321.us.preheader
  %n.vec = and i64 %276, 2147483644
  %broadcast.splatinsert = insertelement <2 x double> poison, double %281, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %282 = getelementptr inbounds double, ptr %277, i64 %index
  %283 = getelementptr inbounds i8, ptr %282, i64 16
  %wide.load = load <2 x double>, ptr %282, align 16, !tbaa !7
  %wide.load412 = load <2 x double>, ptr %283, align 16, !tbaa !7
  %284 = getelementptr inbounds [5 x double], ptr %31, i64 0, i64 %index
  %285 = getelementptr inbounds i8, ptr %284, i64 16
  %wide.load413 = load <2 x double>, ptr %284, align 16, !tbaa !7
  %wide.load414 = load <2 x double>, ptr %285, align 16, !tbaa !7
  %286 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %wide.load413, <2 x double> %broadcast.splat)
  %287 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load412, <2 x double> %wide.load414, <2 x double> %broadcast.splat)
  store <2 x double> %286, ptr %282, align 16, !tbaa !7
  store <2 x double> %287, ptr %283, align 16, !tbaa !7
  %index.next = add nuw i64 %index, 4
  %288 = icmp eq i64 %index.next, %n.vec
  br i1 %288, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %276
  br i1 %cmp.n, label %._crit_edge342.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader321.us.preheader
  %indvars.iv375.ph = phi i64 [ 0, %.preheader321.us.preheader ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv375 = phi i64 [ %indvars.iv.next376, %scalar.ph ], [ %indvars.iv375.ph, %scalar.ph.preheader ]
  %289 = getelementptr inbounds double, ptr %277, i64 %indvars.iv375
  %290 = load double, ptr %289, align 8, !tbaa !7
  %291 = getelementptr inbounds [5 x double], ptr %31, i64 0, i64 %indvars.iv375
  %292 = load double, ptr %291, align 8, !tbaa !7
  %293 = call double @llvm.fmuladd.f64(double %290, double %292, double %281)
  store double %293, ptr %289, align 8, !tbaa !7
  %indvars.iv.next376 = add nuw nsw i64 %indvars.iv375, 1
  %exitcond379.not = icmp eq i64 %indvars.iv.next376, %276
  br i1 %exitcond379.not, label %._crit_edge342.us, label %scalar.ph, !llvm.loop !16

._crit_edge342.us:                                ; preds = %scalar.ph, %middle.block
  %294 = load double, ptr %269, align 16, !tbaa !7
  %min.iters.check417 = icmp ult i32 %275, 4
  br i1 %min.iters.check417, label %scalar.ph416.preheader, label %vector.ph418

vector.ph418:                                     ; preds = %._crit_edge342.us
  %n.vec420 = and i64 %276, 2147483644
  %broadcast.splatinsert428 = insertelement <2 x double> poison, double %294, i64 0
  %broadcast.splat429 = shufflevector <2 x double> %broadcast.splatinsert428, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body422

vector.body422:                                   ; preds = %vector.body422, %vector.ph418
  %index423 = phi i64 [ 0, %vector.ph418 ], [ %index.next430, %vector.body422 ]
  %295 = getelementptr inbounds double, ptr %277, i64 %index423
  %296 = getelementptr inbounds i8, ptr %295, i64 16
  %wide.load424 = load <2 x double>, ptr %295, align 16, !tbaa !7
  %wide.load425 = load <2 x double>, ptr %296, align 16, !tbaa !7
  %297 = getelementptr inbounds [5 x double], ptr %31, i64 0, i64 %index423
  %298 = getelementptr inbounds i8, ptr %297, i64 16
  %wide.load426 = load <2 x double>, ptr %297, align 16, !tbaa !7
  %wide.load427 = load <2 x double>, ptr %298, align 16, !tbaa !7
  %299 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load424, <2 x double> %wide.load426, <2 x double> %broadcast.splat429)
  %300 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load425, <2 x double> %wide.load427, <2 x double> %broadcast.splat429)
  store <2 x double> %299, ptr %295, align 16, !tbaa !7
  store <2 x double> %300, ptr %296, align 16, !tbaa !7
  %index.next430 = add nuw i64 %index423, 4
  %301 = icmp eq i64 %index.next430, %n.vec420
  br i1 %301, label %middle.block415, label %vector.body422, !llvm.loop !17

middle.block415:                                  ; preds = %vector.body422
  %cmp.n431 = icmp eq i64 %n.vec420, %276
  br i1 %cmp.n431, label %._crit_edge342.us.1, label %scalar.ph416.preheader

scalar.ph416.preheader:                           ; preds = %middle.block415, %._crit_edge342.us
  %indvars.iv375.1.ph = phi i64 [ 0, %._crit_edge342.us ], [ %n.vec420, %middle.block415 ]
  br label %scalar.ph416

scalar.ph416:                                     ; preds = %scalar.ph416.preheader, %scalar.ph416
  %indvars.iv375.1 = phi i64 [ %indvars.iv.next376.1, %scalar.ph416 ], [ %indvars.iv375.1.ph, %scalar.ph416.preheader ]
  %302 = getelementptr inbounds double, ptr %277, i64 %indvars.iv375.1
  %303 = load double, ptr %302, align 8, !tbaa !7
  %304 = getelementptr inbounds [5 x double], ptr %31, i64 0, i64 %indvars.iv375.1
  %305 = load double, ptr %304, align 8, !tbaa !7
  %306 = call double @llvm.fmuladd.f64(double %303, double %305, double %294)
  store double %306, ptr %302, align 8, !tbaa !7
  %indvars.iv.next376.1 = add nuw nsw i64 %indvars.iv375.1, 1
  %exitcond379.1.not = icmp eq i64 %indvars.iv.next376.1, %276
  br i1 %exitcond379.1.not, label %._crit_edge342.us.1, label %scalar.ph416, !llvm.loop !18

._crit_edge342.us.1:                              ; preds = %scalar.ph416, %middle.block415
  %307 = load double, ptr %270, align 8, !tbaa !7
  %min.iters.check434 = icmp ult i32 %275, 4
  br i1 %min.iters.check434, label %scalar.ph433.preheader, label %vector.ph435

vector.ph435:                                     ; preds = %._crit_edge342.us.1
  %n.vec437 = and i64 %276, 2147483644
  %broadcast.splatinsert445 = insertelement <2 x double> poison, double %307, i64 0
  %broadcast.splat446 = shufflevector <2 x double> %broadcast.splatinsert445, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body439

vector.body439:                                   ; preds = %vector.body439, %vector.ph435
  %index440 = phi i64 [ 0, %vector.ph435 ], [ %index.next447, %vector.body439 ]
  %308 = getelementptr inbounds double, ptr %277, i64 %index440
  %309 = getelementptr inbounds i8, ptr %308, i64 16
  %wide.load441 = load <2 x double>, ptr %308, align 16, !tbaa !7
  %wide.load442 = load <2 x double>, ptr %309, align 16, !tbaa !7
  %310 = getelementptr inbounds [5 x double], ptr %31, i64 0, i64 %index440
  %311 = getelementptr inbounds i8, ptr %310, i64 16
  %wide.load443 = load <2 x double>, ptr %310, align 16, !tbaa !7
  %wide.load444 = load <2 x double>, ptr %311, align 16, !tbaa !7
  %312 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load441, <2 x double> %wide.load443, <2 x double> %broadcast.splat446)
  %313 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load442, <2 x double> %wide.load444, <2 x double> %broadcast.splat446)
  store <2 x double> %312, ptr %308, align 16, !tbaa !7
  store <2 x double> %313, ptr %309, align 16, !tbaa !7
  %index.next447 = add nuw i64 %index440, 4
  %314 = icmp eq i64 %index.next447, %n.vec437
  br i1 %314, label %middle.block432, label %vector.body439, !llvm.loop !19

middle.block432:                                  ; preds = %vector.body439
  %cmp.n448 = icmp eq i64 %n.vec437, %276
  br i1 %cmp.n448, label %.split345.us, label %scalar.ph433.preheader

scalar.ph433.preheader:                           ; preds = %middle.block432, %._crit_edge342.us.1
  %indvars.iv375.2.ph = phi i64 [ 0, %._crit_edge342.us.1 ], [ %n.vec437, %middle.block432 ]
  br label %scalar.ph433

scalar.ph433:                                     ; preds = %scalar.ph433.preheader, %scalar.ph433
  %indvars.iv375.2 = phi i64 [ %indvars.iv.next376.2, %scalar.ph433 ], [ %indvars.iv375.2.ph, %scalar.ph433.preheader ]
  %315 = getelementptr inbounds double, ptr %277, i64 %indvars.iv375.2
  %316 = load double, ptr %315, align 8, !tbaa !7
  %317 = getelementptr inbounds [5 x double], ptr %31, i64 0, i64 %indvars.iv375.2
  %318 = load double, ptr %317, align 8, !tbaa !7
  %319 = call double @llvm.fmuladd.f64(double %316, double %318, double %307)
  store double %319, ptr %315, align 8, !tbaa !7
  %indvars.iv.next376.2 = add nuw nsw i64 %indvars.iv375.2, 1
  %exitcond379.2.not = icmp eq i64 %indvars.iv.next376.2, %276
  br i1 %exitcond379.2.not, label %.split345.us, label %scalar.ph433, !llvm.loop !20

.split345.us:                                     ; preds = %scalar.ph433, %middle.block432, %._crit_edge335
  %320 = sext i32 %275 to i64
  %321 = shl nsw i64 %320, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %278, ptr nonnull align 16 %31, i64 %321, i1 false)
  %322 = alloca double, i64 %276, align 16
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %322, ptr nonnull align 16 %31, i64 %321, i1 false)
  call void @scalar_array_mult(ptr noundef nonnull %322, double noundef 2.000000e+00, i32 noundef %275) #6
  %323 = alloca double, i64 %276, align 16
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %323, ptr nonnull align 16 %278, i64 %321, i1 false)
  call void @scalar_array_pow(ptr noundef nonnull %323, double noundef 2.000000e+00, i32 noundef %275) #6
  call void @scalar_array_add(ptr noundef nonnull %323, double noundef 1.000000e+00, i32 noundef %275) #6
  %324 = alloca double, i64 %276, align 16
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %324, ptr nonnull align 16 %278, i64 %321, i1 false)
  call void @scalar_array_pow(ptr noundef nonnull %324, double noundef 2.000000e+00, i32 noundef %275) #6
  call void @scalar_array_negate(ptr noundef nonnull %324, i32 noundef %275) #6
  call void @scalar_array_add(ptr noundef nonnull %324, double noundef 1.000000e+00, i32 noundef %275) #6
  call void @scalar_array_div_vec(ptr noundef nonnull %324, ptr noundef nonnull %323, i32 noundef %275) #6
  call void @scalar_array_div_vec(ptr noundef nonnull %322, ptr noundef nonnull %323, i32 noundef %275) #6
  %325 = alloca double, i64 %276, align 16
  call void @scalar_array_atan2(ptr noundef nonnull %325, ptr noundef nonnull %322, ptr noundef nonnull %324, i32 noundef %275) #6
  call void @scalar_array_mult(ptr noundef nonnull %325, double noundef 0x404CA5DC1A63C1F8, i32 noundef %275) #6
  %326 = alloca double, i64 %276, align 16
  call void @scalar_array_clear(ptr noundef nonnull %326, i32 noundef %275) #6
  %327 = load double, ptr %270, align 8, !tbaa !7
  call void @scalar_array_add(ptr noundef nonnull %326, double noundef %327, i32 noundef %275) #6
  %328 = alloca double, i64 %276, align 16
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %328, ptr nonnull align 16 %278, i64 %321, i1 false)
  %329 = load double, ptr %269, align 16, !tbaa !7
  call void @scalar_array_mult(ptr noundef nonnull %328, double noundef %329, i32 noundef %275) #6
  call void @scalar_array_mult(ptr noundef nonnull %328, double noundef 2.000000e+00, i32 noundef %275) #6
  call void @scalar_array_add_vec(ptr noundef nonnull %326, ptr noundef nonnull %328, i32 noundef %275) #6
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %328, ptr nonnull align 16 %278, i64 %321, i1 false)
  call void @scalar_array_pow(ptr noundef nonnull %328, double noundef 2.000000e+00, i32 noundef %275) #6
  %330 = load double, ptr %267, align 8, !tbaa !7
  call void @scalar_array_mult(ptr noundef nonnull %328, double noundef %330, i32 noundef %275) #6
  call void @scalar_array_mult(ptr noundef nonnull %328, double noundef 3.000000e+00, i32 noundef %275) #6
  call void @scalar_array_add_vec(ptr noundef nonnull %326, ptr noundef nonnull %328, i32 noundef %275) #6
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %328, ptr nonnull align 16 %278, i64 %321, i1 false)
  call void @scalar_array_pow(ptr noundef nonnull %328, double noundef 3.000000e+00, i32 noundef %275) #6
  %331 = load double, ptr %264, align 16, !tbaa !7
  call void @scalar_array_mult(ptr noundef nonnull %328, double noundef %331, i32 noundef %275) #6
  call void @scalar_array_mult(ptr noundef nonnull %328, double noundef 4.000000e+00, i32 noundef %275) #6
  call void @scalar_array_add_vec(ptr noundef nonnull %326, ptr noundef nonnull %328, i32 noundef %275) #6
  %332 = alloca double, i64 %276, align 16
  %333 = alloca double, i64 %276, align 16
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %332, ptr nonnull align 16 %326, i64 %321, i1 false)
  br i1 %280, label %.lr.ph350.preheader, label %._crit_edge358

.lr.ph350.preheader:                              ; preds = %.split345.us
  %xtraiter = and i64 %276, 1
  %334 = icmp eq i32 %275, 1
  br i1 %334, label %.preheader.unr-lcssa, label %.lr.ph350.preheader.new

.lr.ph350.preheader.new:                          ; preds = %.lr.ph350.preheader
  %unroll_iter = and i64 %276, 2147483646
  br label %.lr.ph350

.preheader.unr-lcssa:                             ; preds = %363, %.lr.ph350.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph350.preheader ], [ %.1.1, %363 ]
  %indvars.iv387.unr = phi i64 [ 0, %.lr.ph350.preheader ], [ %indvars.iv.next388.1, %363 ]
  %.0314348.unr = phi i32 [ 0, %.lr.ph350.preheader ], [ %.1.1, %363 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph350.epil

.lr.ph350.epil:                                   ; preds = %.preheader.unr-lcssa
  %335 = getelementptr inbounds double, ptr %332, i64 %indvars.iv387.unr
  %336 = load double, ptr %335, align 8, !tbaa !7
  %337 = fcmp ogt double %336, 0.000000e+00
  br i1 %337, label %338, label %.preheader

338:                                              ; preds = %.lr.ph350.epil
  %339 = getelementptr inbounds double, ptr %325, i64 %indvars.iv387.unr
  %340 = load double, ptr %339, align 8, !tbaa !7
  %341 = add nsw i32 %.0314348.unr, 1
  %342 = sext i32 %.0314348.unr to i64
  %343 = getelementptr inbounds double, ptr %333, i64 %342
  store double %340, ptr %343, align 8, !tbaa !7
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph350.epil, %338, %.preheader.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %.preheader.unr-lcssa ], [ %341, %338 ], [ %.0314348.unr, %.lr.ph350.epil ]
  %344 = icmp sgt i32 %.1.lcssa, 0
  br i1 %344, label %.lr.ph357, label %._crit_edge358

.lr.ph357:                                        ; preds = %.preheader
  %wide.trip.count400 = zext nneg i32 %.1.lcssa to i64
  br label %364

.lr.ph350:                                        ; preds = %363, %.lr.ph350.preheader.new
  %indvars.iv387 = phi i64 [ 0, %.lr.ph350.preheader.new ], [ %indvars.iv.next388.1, %363 ]
  %.0314348 = phi i32 [ 0, %.lr.ph350.preheader.new ], [ %.1.1, %363 ]
  %niter = phi i64 [ 0, %.lr.ph350.preheader.new ], [ %niter.next.1, %363 ]
  %345 = getelementptr inbounds double, ptr %332, i64 %indvars.iv387
  %346 = load double, ptr %345, align 16, !tbaa !7
  %347 = fcmp ogt double %346, 0.000000e+00
  br i1 %347, label %348, label %.lr.ph350.1

348:                                              ; preds = %.lr.ph350
  %349 = getelementptr inbounds double, ptr %325, i64 %indvars.iv387
  %350 = load double, ptr %349, align 16, !tbaa !7
  %351 = add nsw i32 %.0314348, 1
  %352 = sext i32 %.0314348 to i64
  %353 = getelementptr inbounds double, ptr %333, i64 %352
  store double %350, ptr %353, align 8, !tbaa !7
  br label %.lr.ph350.1

.lr.ph350.1:                                      ; preds = %.lr.ph350, %348
  %.1 = phi i32 [ %351, %348 ], [ %.0314348, %.lr.ph350 ]
  %indvars.iv.next388 = or disjoint i64 %indvars.iv387, 1
  %354 = getelementptr inbounds double, ptr %332, i64 %indvars.iv.next388
  %355 = load double, ptr %354, align 8, !tbaa !7
  %356 = fcmp ogt double %355, 0.000000e+00
  br i1 %356, label %357, label %363

357:                                              ; preds = %.lr.ph350.1
  %358 = getelementptr inbounds double, ptr %325, i64 %indvars.iv.next388
  %359 = load double, ptr %358, align 8, !tbaa !7
  %360 = add nsw i32 %.1, 1
  %361 = sext i32 %.1 to i64
  %362 = getelementptr inbounds double, ptr %333, i64 %361
  store double %359, ptr %362, align 8, !tbaa !7
  br label %363

363:                                              ; preds = %357, %.lr.ph350.1
  %.1.1 = phi i32 [ %360, %357 ], [ %.1, %.lr.ph350.1 ]
  %indvars.iv.next388.1 = add nuw nsw i64 %indvars.iv387, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.unr-lcssa, label %.lr.ph350, !llvm.loop !21

364:                                              ; preds = %.lr.ph357, %._crit_edge355
  %indvars.iv397 = phi i64 [ 0, %.lr.ph357 ], [ %indvars.iv.next398, %._crit_edge355 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %32) #6
  %365 = getelementptr inbounds double, ptr %333, i64 %indvars.iv397
  %366 = load double, ptr %365, align 8, !tbaa !7
  %367 = fmul double %366, 0x400921FB54442D18
  %368 = fdiv double %367, 1.800000e+02
  call void @vec3_assign(ptr noundef nonnull %32, double noundef 0.000000e+00, double noundef %368, double noundef 0.000000e+00) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %33) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %34) #6
  call void @rpyMat(ptr noundef nonnull %34, ptr noundef nonnull %32)
  call void @mat33_mult_mat2(ptr noundef nonnull %33, ptr noundef %6, ptr noundef nonnull %34) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %35) #6
  call void @vec3_clear(ptr noundef nonnull %35) #6
  br i1 %43, label %.lr.ph354, label %._crit_edge355

.lr.ph354:                                        ; preds = %364, %.lr.ph354
  %indvars.iv392 = phi i64 [ %indvars.iv.next393, %.lr.ph354 ], [ 0, %364 ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %36) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %37) #6
  call void @mat33_eye(ptr noundef nonnull %37) #6
  %369 = getelementptr inbounds %struct.mat33_t, ptr %42, i64 %indvars.iv392
  call void @mat33_copy(ptr noundef nonnull %36, ptr noundef nonnull %369) #6
  call void @mat33_sub(ptr noundef nonnull %36, ptr noundef nonnull %37) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %38) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %39) #6
  %370 = getelementptr inbounds %struct.vec3_t, ptr %3, i64 %indvars.iv392
  call void @vec3_mult_mat(ptr noundef nonnull %38, ptr noundef nonnull %33, ptr noundef %370) #6
  call void @vec3_mult_mat(ptr noundef nonnull %39, ptr noundef nonnull %36, ptr noundef nonnull %38) #6
  call void @vec3_add_vec(ptr noundef nonnull %35, ptr noundef nonnull %39) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %39) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %38) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %37) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %36) #6
  %indvars.iv.next393 = add nuw nsw i64 %indvars.iv392, 1
  %exitcond396.not = icmp eq i64 %indvars.iv.next393, %41
  br i1 %exitcond396.not, label %._crit_edge355, label %.lr.ph354, !llvm.loop !22

._crit_edge355:                                   ; preds = %.lr.ph354, %364
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %40) #6
  call void @vec3_mult_mat(ptr noundef nonnull %40, ptr noundef nonnull %10, ptr noundef nonnull %35) #6
  %371 = getelementptr inbounds %struct.vec3_t, ptr %1, i64 %indvars.iv397
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %371, ptr noundef nonnull align 8 dereferenceable(24) %40, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %40) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %35) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %34) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %33) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %32) #6
  %indvars.iv.next398 = add nuw nsw i64 %indvars.iv397, 1
  %exitcond401.not = icmp eq i64 %indvars.iv.next398, %wide.trip.count400
  br i1 %exitcond401.not, label %._crit_edge358, label %364, !llvm.loop !25

._crit_edge358:                                   ; preds = %._crit_edge355, %.split345.us, %.preheader
  %.0314.lcssa403 = phi i32 [ %.1.lcssa, %.preheader ], [ 0, %.split345.us ], [ %.1.lcssa, %._crit_edge355 ]
  %372 = sext i32 %.0314.lcssa403 to i64
  %373 = shl nsw i64 %372, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr nonnull align 16 %333, i64 %373, i1 false)
  store i32 %.0314.lcssa403, ptr %8, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #6
  ret void
}

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

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

declare double @vec3_sum(ptr noundef) local_unnamed_addr #1

declare i32 @solve_polynomial(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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 nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !6, !15, !14}
!17 = distinct !{!17, !6, !14, !15}
!18 = distinct !{!18, !6, !15, !14}
!19 = distinct !{!19, !6, !14, !15}
!20 = distinct !{!20, !6, !15, !14}
!21 = distinct !{!21, !6}
!22 = distinct !{!22, !6}
!23 = !{i64 0, i64 24, !24}
!24 = !{!9, !9, i64 0}
!25 = distinct !{!25, !6}
!26 = !{!27, !27, i64 0}
!27 = !{!"int", !9, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass