; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Quaternion.ll (ZN12R3QuaternionC2ERK8R4Matrixi)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Quaternion = type { [4 x double] }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12R3Quaternion9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12R3QuaternionC2ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef %2) unnamed_addr #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %7 = load ptr, ptr %4, align 8
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %8, i32 noundef 0)
  %10 = getelementptr inbounds double, ptr %9, i64 0
  %11 = load double, ptr %10, align 8, !tbaa !11
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %12, i32 noundef 1)
  %14 = getelementptr inbounds double, ptr %13, i64 1
  %15 = load double, ptr %14, align 8, !tbaa !11
  %16 = fadd double %11, %15
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %17, i32 noundef 2)
  %19 = getelementptr inbounds double, ptr %18, i64 2
  %20 = load double, ptr %19, align 8, !tbaa !11
  %21 = fadd double %16, %20
  %22 = fadd double %21, 1.000000e+00
  %23 = fdiv double %22, 4.000000e+00
  %24 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %25 = getelementptr inbounds [4 x double], ptr %24, i64 0, i64 0
  store double %23, ptr %25, align 8, !tbaa !11
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %26, i32 noundef 0)
  %28 = getelementptr inbounds double, ptr %27, i64 0
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %30, i32 noundef 1)
  %32 = getelementptr inbounds double, ptr %31, i64 1
  %33 = load double, ptr %32, align 8, !tbaa !11
  %34 = fsub double %29, %33
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %35, i32 noundef 2)
  %37 = getelementptr inbounds double, ptr %36, i64 2
  %38 = load double, ptr %37, align 8, !tbaa !11
  %39 = fsub double %34, %38
  %40 = fadd double %39, 1.000000e+00
  %41 = fdiv double %40, 4.000000e+00
  %42 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %43 = getelementptr inbounds [4 x double], ptr %42, i64 0, i64 1
  store double %41, ptr %43, align 8, !tbaa !11
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %44, i32 noundef 0)
  %46 = getelementptr inbounds double, ptr %45, i64 0
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = fneg double %47
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %49, i32 noundef 1)
  %51 = getelementptr inbounds double, ptr %50, i64 1
  %52 = load double, ptr %51, align 8, !tbaa !11
  %53 = fadd double %48, %52
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %54, i32 noundef 2)
  %56 = getelementptr inbounds double, ptr %55, i64 2
  %57 = load double, ptr %56, align 8, !tbaa !11
  %58 = fsub double %53, %57
  %59 = fadd double %58, 1.000000e+00
  %60 = fdiv double %59, 4.000000e+00
  %61 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %62 = getelementptr inbounds [4 x double], ptr %61, i64 0, i64 2
  store double %60, ptr %62, align 8, !tbaa !11
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %63, i32 noundef 0)
  %65 = getelementptr inbounds double, ptr %64, i64 0
  %66 = load double, ptr %65, align 8, !tbaa !11
  %67 = fneg double %66
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %68, i32 noundef 1)
  %70 = getelementptr inbounds double, ptr %69, i64 1
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = fsub double %67, %71
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %73, i32 noundef 2)
  %75 = getelementptr inbounds double, ptr %74, i64 2
  %76 = load double, ptr %75, align 8, !tbaa !11
  %77 = fadd double %72, %76
  %78 = fadd double %77, 1.000000e+00
  %79 = fdiv double %78, 4.000000e+00
  %80 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %81 = getelementptr inbounds [4 x double], ptr %80, i64 0, i64 3
  store double %79, ptr %81, align 8, !tbaa !11
  %82 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %83 = getelementptr inbounds [4 x double], ptr %82, i64 0, i64 0
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = fcmp olt double %84, 0.000000e+00
  br i1 %85, label %86, label %89

86:                                               ; preds = %3
  %87 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %88 = getelementptr inbounds [4 x double], ptr %87, i64 0, i64 0
  store double 0.000000e+00, ptr %88, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %86, %3
  %90 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %91 = getelementptr inbounds [4 x double], ptr %90, i64 0, i64 1
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = fcmp olt double %92, 0.000000e+00
  br i1 %93, label %94, label %97

94:                                               ; preds = %89
  %95 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %96 = getelementptr inbounds [4 x double], ptr %95, i64 0, i64 1
  store double 0.000000e+00, ptr %96, align 8, !tbaa !11
  br label %97

97:                                               ; preds = %94, %89
  %98 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %99 = getelementptr inbounds [4 x double], ptr %98, i64 0, i64 2
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = fcmp olt double %100, 0.000000e+00
  br i1 %101, label %102, label %105

102:                                              ; preds = %97
  %103 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %104 = getelementptr inbounds [4 x double], ptr %103, i64 0, i64 2
  store double 0.000000e+00, ptr %104, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %102, %97
  %106 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %107 = getelementptr inbounds [4 x double], ptr %106, i64 0, i64 3
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = fcmp olt double %108, 0.000000e+00
  br i1 %109, label %110, label %113

110:                                              ; preds = %105
  %111 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %112 = getelementptr inbounds [4 x double], ptr %111, i64 0, i64 3
  store double 0.000000e+00, ptr %112, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %110, %105
  %114 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %115 = getelementptr inbounds [4 x double], ptr %114, i64 0, i64 0
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = call double @sqrt(double noundef %116) #4
  %118 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %119 = getelementptr inbounds [4 x double], ptr %118, i64 0, i64 0
  store double %117, ptr %119, align 8, !tbaa !11
  %120 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %121 = getelementptr inbounds [4 x double], ptr %120, i64 0, i64 1
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = call double @sqrt(double noundef %122) #4
  %124 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %125 = getelementptr inbounds [4 x double], ptr %124, i64 0, i64 1
  store double %123, ptr %125, align 8, !tbaa !11
  %126 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %127 = getelementptr inbounds [4 x double], ptr %126, i64 0, i64 2
  %128 = load double, ptr %127, align 8, !tbaa !11
  %129 = call double @sqrt(double noundef %128) #4
  %130 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %131 = getelementptr inbounds [4 x double], ptr %130, i64 0, i64 2
  store double %129, ptr %131, align 8, !tbaa !11
  %132 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %133 = getelementptr inbounds [4 x double], ptr %132, i64 0, i64 3
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = call double @sqrt(double noundef %134) #4
  %136 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %137 = getelementptr inbounds [4 x double], ptr %136, i64 0, i64 3
  store double %135, ptr %137, align 8, !tbaa !11
  %138 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %139 = getelementptr inbounds [4 x double], ptr %138, i64 0, i64 0
  %140 = load double, ptr %139, align 8, !tbaa !11
  %141 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %142 = getelementptr inbounds [4 x double], ptr %141, i64 0, i64 1
  %143 = load double, ptr %142, align 8, !tbaa !11
  %144 = fcmp oge double %140, %143
  br i1 %144, label %145, label %204

145:                                              ; preds = %113
  %146 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %147 = getelementptr inbounds [4 x double], ptr %146, i64 0, i64 0
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %150 = getelementptr inbounds [4 x double], ptr %149, i64 0, i64 2
  %151 = load double, ptr %150, align 8, !tbaa !11
  %152 = fcmp oge double %148, %151
  br i1 %152, label %153, label %204

153:                                              ; preds = %145
  %154 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %155 = getelementptr inbounds [4 x double], ptr %154, i64 0, i64 0
  %156 = load double, ptr %155, align 8, !tbaa !11
  %157 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %158 = getelementptr inbounds [4 x double], ptr %157, i64 0, i64 3
  %159 = load double, ptr %158, align 8, !tbaa !11
  %160 = fcmp oge double %156, %159
  br i1 %160, label %161, label %204

161:                                              ; preds = %153
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %162, i32 noundef 2)
  %164 = getelementptr inbounds double, ptr %163, i64 1
  %165 = load double, ptr %164, align 8, !tbaa !11
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %166, i32 noundef 1)
  %168 = getelementptr inbounds double, ptr %167, i64 2
  %169 = load double, ptr %168, align 8, !tbaa !11
  %170 = fsub double %165, %169
  %171 = call noundef double @_Z6RNSignd(double noundef %170)
  %172 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %173 = getelementptr inbounds [4 x double], ptr %172, i64 0, i64 1
  %174 = load double, ptr %173, align 8, !tbaa !11
  %175 = fmul double %174, %171
  store double %175, ptr %173, align 8, !tbaa !11
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %176, i32 noundef 0)
  %178 = getelementptr inbounds double, ptr %177, i64 2
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %180, i32 noundef 2)
  %182 = getelementptr inbounds double, ptr %181, i64 0
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = fsub double %179, %183
  %185 = call noundef double @_Z6RNSignd(double noundef %184)
  %186 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %187 = getelementptr inbounds [4 x double], ptr %186, i64 0, i64 2
  %188 = load double, ptr %187, align 8, !tbaa !11
  %189 = fmul double %188, %185
  store double %189, ptr %187, align 8, !tbaa !11
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %190, i32 noundef 1)
  %192 = getelementptr inbounds double, ptr %191, i64 0
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %194, i32 noundef 0)
  %196 = getelementptr inbounds double, ptr %195, i64 1
  %197 = load double, ptr %196, align 8, !tbaa !11
  %198 = fsub double %193, %197
  %199 = call noundef double @_Z6RNSignd(double noundef %198)
  %200 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %201 = getelementptr inbounds [4 x double], ptr %200, i64 0, i64 3
  %202 = load double, ptr %201, align 8, !tbaa !11
  %203 = fmul double %202, %199
  store double %203, ptr %201, align 8, !tbaa !11
  br label %417

204:                                              ; preds = %153, %145, %113
  %205 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %206 = getelementptr inbounds [4 x double], ptr %205, i64 0, i64 1
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %209 = getelementptr inbounds [4 x double], ptr %208, i64 0, i64 0
  %210 = load double, ptr %209, align 8, !tbaa !11
  %211 = fcmp oge double %207, %210
  br i1 %211, label %212, label %271

212:                                              ; preds = %204
  %213 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %214 = getelementptr inbounds [4 x double], ptr %213, i64 0, i64 1
  %215 = load double, ptr %214, align 8, !tbaa !11
  %216 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %217 = getelementptr inbounds [4 x double], ptr %216, i64 0, i64 2
  %218 = load double, ptr %217, align 8, !tbaa !11
  %219 = fcmp oge double %215, %218
  br i1 %219, label %220, label %271

220:                                              ; preds = %212
  %221 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %222 = getelementptr inbounds [4 x double], ptr %221, i64 0, i64 1
  %223 = load double, ptr %222, align 8, !tbaa !11
  %224 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %225 = getelementptr inbounds [4 x double], ptr %224, i64 0, i64 3
  %226 = load double, ptr %225, align 8, !tbaa !11
  %227 = fcmp oge double %223, %226
  br i1 %227, label %228, label %271

228:                                              ; preds = %220
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %229, i32 noundef 2)
  %231 = getelementptr inbounds double, ptr %230, i64 1
  %232 = load double, ptr %231, align 8, !tbaa !11
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %233, i32 noundef 1)
  %235 = getelementptr inbounds double, ptr %234, i64 2
  %236 = load double, ptr %235, align 8, !tbaa !11
  %237 = fsub double %232, %236
  %238 = call noundef double @_Z6RNSignd(double noundef %237)
  %239 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %240 = getelementptr inbounds [4 x double], ptr %239, i64 0, i64 0
  %241 = load double, ptr %240, align 8, !tbaa !11
  %242 = fmul double %241, %238
  store double %242, ptr %240, align 8, !tbaa !11
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  %244 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %243, i32 noundef 1)
  %245 = getelementptr inbounds double, ptr %244, i64 0
  %246 = load double, ptr %245, align 8, !tbaa !11
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %247, i32 noundef 0)
  %249 = getelementptr inbounds double, ptr %248, i64 1
  %250 = load double, ptr %249, align 8, !tbaa !11
  %251 = fadd double %246, %250
  %252 = call noundef double @_Z6RNSignd(double noundef %251)
  %253 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %254 = getelementptr inbounds [4 x double], ptr %253, i64 0, i64 2
  %255 = load double, ptr %254, align 8, !tbaa !11
  %256 = fmul double %255, %252
  store double %256, ptr %254, align 8, !tbaa !11
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %257, i32 noundef 0)
  %259 = getelementptr inbounds double, ptr %258, i64 2
  %260 = load double, ptr %259, align 8, !tbaa !11
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  %262 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %261, i32 noundef 2)
  %263 = getelementptr inbounds double, ptr %262, i64 0
  %264 = load double, ptr %263, align 8, !tbaa !11
  %265 = fadd double %260, %264
  %266 = call noundef double @_Z6RNSignd(double noundef %265)
  %267 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %268 = getelementptr inbounds [4 x double], ptr %267, i64 0, i64 3
  %269 = load double, ptr %268, align 8, !tbaa !11
  %270 = fmul double %269, %266
  store double %270, ptr %268, align 8, !tbaa !11
  br label %416

271:                                              ; preds = %220, %212, %204
  %272 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %273 = getelementptr inbounds [4 x double], ptr %272, i64 0, i64 2
  %274 = load double, ptr %273, align 8, !tbaa !11
  %275 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %276 = getelementptr inbounds [4 x double], ptr %275, i64 0, i64 0
  %277 = load double, ptr %276, align 8, !tbaa !11
  %278 = fcmp oge double %274, %277
  br i1 %278, label %279, label %338

279:                                              ; preds = %271
  %280 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %281 = getelementptr inbounds [4 x double], ptr %280, i64 0, i64 2
  %282 = load double, ptr %281, align 8, !tbaa !11
  %283 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %284 = getelementptr inbounds [4 x double], ptr %283, i64 0, i64 1
  %285 = load double, ptr %284, align 8, !tbaa !11
  %286 = fcmp oge double %282, %285
  br i1 %286, label %287, label %338

287:                                              ; preds = %279
  %288 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %289 = getelementptr inbounds [4 x double], ptr %288, i64 0, i64 2
  %290 = load double, ptr %289, align 8, !tbaa !11
  %291 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %292 = getelementptr inbounds [4 x double], ptr %291, i64 0, i64 3
  %293 = load double, ptr %292, align 8, !tbaa !11
  %294 = fcmp oge double %290, %293
  br i1 %294, label %295, label %338

295:                                              ; preds = %287
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  %297 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %296, i32 noundef 0)
  %298 = getelementptr inbounds double, ptr %297, i64 2
  %299 = load double, ptr %298, align 8, !tbaa !11
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  %301 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %300, i32 noundef 2)
  %302 = getelementptr inbounds double, ptr %301, i64 0
  %303 = load double, ptr %302, align 8, !tbaa !11
  %304 = fsub double %299, %303
  %305 = call noundef double @_Z6RNSignd(double noundef %304)
  %306 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %307 = getelementptr inbounds [4 x double], ptr %306, i64 0, i64 0
  %308 = load double, ptr %307, align 8, !tbaa !11
  %309 = fmul double %308, %305
  store double %309, ptr %307, align 8, !tbaa !11
  %310 = load ptr, ptr %5, align 8, !tbaa !5
  %311 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %310, i32 noundef 1)
  %312 = getelementptr inbounds double, ptr %311, i64 0
  %313 = load double, ptr %312, align 8, !tbaa !11
  %314 = load ptr, ptr %5, align 8, !tbaa !5
  %315 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %314, i32 noundef 0)
  %316 = getelementptr inbounds double, ptr %315, i64 1
  %317 = load double, ptr %316, align 8, !tbaa !11
  %318 = fadd double %313, %317
  %319 = call noundef double @_Z6RNSignd(double noundef %318)
  %320 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %321 = getelementptr inbounds [4 x double], ptr %320, i64 0, i64 1
  %322 = load double, ptr %321, align 8, !tbaa !11
  %323 = fmul double %322, %319
  store double %323, ptr %321, align 8, !tbaa !11
  %324 = load ptr, ptr %5, align 8, !tbaa !5
  %325 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %324, i32 noundef 2)
  %326 = getelementptr inbounds double, ptr %325, i64 1
  %327 = load double, ptr %326, align 8, !tbaa !11
  %328 = load ptr, ptr %5, align 8, !tbaa !5
  %329 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %328, i32 noundef 1)
  %330 = getelementptr inbounds double, ptr %329, i64 2
  %331 = load double, ptr %330, align 8, !tbaa !11
  %332 = fadd double %327, %331
  %333 = call noundef double @_Z6RNSignd(double noundef %332)
  %334 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %335 = getelementptr inbounds [4 x double], ptr %334, i64 0, i64 3
  %336 = load double, ptr %335, align 8, !tbaa !11
  %337 = fmul double %336, %333
  store double %337, ptr %335, align 8, !tbaa !11
  br label %415

338:                                              ; preds = %287, %279, %271
  %339 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %340 = getelementptr inbounds [4 x double], ptr %339, i64 0, i64 3
  %341 = load double, ptr %340, align 8, !tbaa !11
  %342 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %343 = getelementptr inbounds [4 x double], ptr %342, i64 0, i64 0
  %344 = load double, ptr %343, align 8, !tbaa !11
  %345 = fcmp oge double %341, %344
  br i1 %345, label %346, label %405

346:                                              ; preds = %338
  %347 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %348 = getelementptr inbounds [4 x double], ptr %347, i64 0, i64 3
  %349 = load double, ptr %348, align 8, !tbaa !11
  %350 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %351 = getelementptr inbounds [4 x double], ptr %350, i64 0, i64 1
  %352 = load double, ptr %351, align 8, !tbaa !11
  %353 = fcmp oge double %349, %352
  br i1 %353, label %354, label %405

354:                                              ; preds = %346
  %355 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %356 = getelementptr inbounds [4 x double], ptr %355, i64 0, i64 3
  %357 = load double, ptr %356, align 8, !tbaa !11
  %358 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %359 = getelementptr inbounds [4 x double], ptr %358, i64 0, i64 2
  %360 = load double, ptr %359, align 8, !tbaa !11
  %361 = fcmp oge double %357, %360
  br i1 %361, label %362, label %405

362:                                              ; preds = %354
  %363 = load ptr, ptr %5, align 8, !tbaa !5
  %364 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %363, i32 noundef 1)
  %365 = getelementptr inbounds double, ptr %364, i64 0
  %366 = load double, ptr %365, align 8, !tbaa !11
  %367 = load ptr, ptr %5, align 8, !tbaa !5
  %368 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %367, i32 noundef 0)
  %369 = getelementptr inbounds double, ptr %368, i64 1
  %370 = load double, ptr %369, align 8, !tbaa !11
  %371 = fsub double %366, %370
  %372 = call noundef double @_Z6RNSignd(double noundef %371)
  %373 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %374 = getelementptr inbounds [4 x double], ptr %373, i64 0, i64 0
  %375 = load double, ptr %374, align 8, !tbaa !11
  %376 = fmul double %375, %372
  store double %376, ptr %374, align 8, !tbaa !11
  %377 = load ptr, ptr %5, align 8, !tbaa !5
  %378 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %377, i32 noundef 2)
  %379 = getelementptr inbounds double, ptr %378, i64 0
  %380 = load double, ptr %379, align 8, !tbaa !11
  %381 = load ptr, ptr %5, align 8, !tbaa !5
  %382 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %381, i32 noundef 0)
  %383 = getelementptr inbounds double, ptr %382, i64 2
  %384 = load double, ptr %383, align 8, !tbaa !11
  %385 = fadd double %380, %384
  %386 = call noundef double @_Z6RNSignd(double noundef %385)
  %387 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %388 = getelementptr inbounds [4 x double], ptr %387, i64 0, i64 1
  %389 = load double, ptr %388, align 8, !tbaa !11
  %390 = fmul double %389, %386
  store double %390, ptr %388, align 8, !tbaa !11
  %391 = load ptr, ptr %5, align 8, !tbaa !5
  %392 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %391, i32 noundef 2)
  %393 = getelementptr inbounds double, ptr %392, i64 1
  %394 = load double, ptr %393, align 8, !tbaa !11
  %395 = load ptr, ptr %5, align 8, !tbaa !5
  %396 = call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %395, i32 noundef 1)
  %397 = getelementptr inbounds double, ptr %396, i64 2
  %398 = load double, ptr %397, align 8, !tbaa !11
  %399 = fadd double %394, %398
  %400 = call noundef double @_Z6RNSignd(double noundef %399)
  %401 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %402 = getelementptr inbounds [4 x double], ptr %401, i64 0, i64 2
  %403 = load double, ptr %402, align 8, !tbaa !11
  %404 = fmul double %403, %400
  store double %404, ptr %402, align 8, !tbaa !11
  br label %414

405:                                              ; preds = %354, %346, %338
  %406 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %407 = getelementptr inbounds [4 x double], ptr %406, i64 0, i64 0
  store double 0.000000e+00, ptr %407, align 8, !tbaa !11
  %408 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %409 = getelementptr inbounds [4 x double], ptr %408, i64 0, i64 1
  store double 0.000000e+00, ptr %409, align 8, !tbaa !11
  %410 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %411 = getelementptr inbounds [4 x double], ptr %410, i64 0, i64 2
  store double 0.000000e+00, ptr %411, align 8, !tbaa !11
  %412 = getelementptr inbounds %class.R3Quaternion, ptr %7, i32 0, i32 0
  %413 = getelementptr inbounds [4 x double], ptr %412, i64 0, i64 3
  store double 0.000000e+00, ptr %413, align 8, !tbaa !11
  br label %414

414:                                              ; preds = %405, %362
  br label %415

415:                                              ; preds = %414, %295
  br label %416

416:                                              ; preds = %415, %228
  br label %417

417:                                              ; preds = %416, %161
  call void @_ZN12R3Quaternion9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_Z6RNSignd(double noundef) #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12R3Quaternion9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12R3QuaternionC2ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef %2) unnamed_addr #0 align 2 {
  %4 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %5 = load double, ptr %4, align 8, !tbaa !5
  %6 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = fadd double %5, %8
  %10 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load double, ptr %11, align 8, !tbaa !5
  %13 = fadd double %9, %12
  %14 = fadd double %13, 1.000000e+00
  %15 = fmul double %14, 2.500000e-01
  store double %15, ptr %0, align 8, !tbaa !5
  %16 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = fsub double %17, %20
  %22 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = fsub double %21, %24
  %26 = fadd double %25, 1.000000e+00
  %27 = fmul double %26, 2.500000e-01
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  store double %27, ptr %28, align 8, !tbaa !5
  %29 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = fsub double %33, %30
  %35 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = fsub double %34, %37
  %39 = fadd double %38, 1.000000e+00
  %40 = fmul double %39, 2.500000e-01
  %41 = getelementptr inbounds i8, ptr %0, i64 16
  store double %40, ptr %41, align 8, !tbaa !5
  %42 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = fneg double %43
  %45 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = fsub double %44, %47
  %49 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = fadd double %48, %51
  %53 = fadd double %52, 1.000000e+00
  %54 = fmul double %53, 2.500000e-01
  %55 = getelementptr inbounds i8, ptr %0, i64 24
  store double %54, ptr %55, align 8, !tbaa !5
  %56 = load double, ptr %0, align 8, !tbaa !5
  %57 = fcmp olt double %56, 0.000000e+00
  %58 = select i1 %57, double 0.000000e+00, double %56
  %59 = load double, ptr %28, align 8, !tbaa !5
  %60 = fcmp olt double %59, 0.000000e+00
  br i1 %60, label %61, label %62

61:                                               ; preds = %3
  store double 0.000000e+00, ptr %28, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %61, %3
  %63 = load double, ptr %41, align 8, !tbaa !5
  %64 = fcmp olt double %63, 0.000000e+00
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store double 0.000000e+00, ptr %41, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %65, %62
  %67 = fcmp olt double %54, 0.000000e+00
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  store double 0.000000e+00, ptr %55, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %68, %66
  %70 = tail call double @sqrt(double noundef %58) #5
  store double %70, ptr %0, align 8, !tbaa !5
  %71 = load double, ptr %28, align 8, !tbaa !5
  %72 = tail call double @sqrt(double noundef %71) #5
  store double %72, ptr %28, align 8, !tbaa !5
  %73 = load double, ptr %41, align 8, !tbaa !5
  %74 = tail call double @sqrt(double noundef %73) #5
  store double %74, ptr %41, align 8, !tbaa !5
  %75 = load double, ptr %55, align 8, !tbaa !5
  %76 = tail call double @sqrt(double noundef %75) #5
  store double %76, ptr %55, align 8, !tbaa !5
  %77 = load double, ptr %0, align 8, !tbaa !5
  %78 = load double, ptr %28, align 8
  %79 = fcmp ult double %77, %78
  %80 = load double, ptr %41, align 8
  %81 = fcmp ult double %77, %80
  %or.cond = select i1 %79, i1 true, i1 %81
  %82 = fcmp ult double %77, %76
  %or.cond41 = select i1 %or.cond, i1 true, i1 %82
  br i1 %or.cond41, label %112, label %83

83:                                               ; preds = %69
  %84 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  %86 = load double, ptr %85, align 8, !tbaa !5
  %87 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %89 = load double, ptr %88, align 8, !tbaa !5
  %90 = fsub double %86, %89
  %91 = tail call noundef double @_Z6RNSignd(double noundef %90)
  %92 = load double, ptr %28, align 8, !tbaa !5
  %93 = fmul double %91, %92
  store double %93, ptr %28, align 8, !tbaa !5
  %94 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  %96 = load double, ptr %95, align 8, !tbaa !5
  %97 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = fsub double %96, %98
  %100 = tail call noundef double @_Z6RNSignd(double noundef %99)
  %101 = load double, ptr %41, align 8, !tbaa !5
  %102 = fmul double %100, %101
  store double %102, ptr %41, align 8, !tbaa !5
  %103 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %104 = load double, ptr %103, align 8, !tbaa !5
  %105 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = load double, ptr %106, align 8, !tbaa !5
  %108 = fsub double %104, %107
  %109 = tail call noundef double @_Z6RNSignd(double noundef %108)
  %110 = load double, ptr %55, align 8, !tbaa !5
  %111 = fmul double %109, %110
  store double %111, ptr %55, align 8, !tbaa !5
  br label %212

112:                                              ; preds = %69
  %113 = fcmp ult double %78, %77
  %114 = fcmp ult double %78, %80
  %or.cond43 = select i1 %113, i1 true, i1 %114
  %115 = fcmp ult double %78, %76
  %or.cond45 = select i1 %or.cond43, i1 true, i1 %115
  br i1 %or.cond45, label %145, label %116

116:                                              ; preds = %112
  %117 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  %119 = load double, ptr %118, align 8, !tbaa !5
  %120 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %121 = getelementptr inbounds i8, ptr %120, i64 16
  %122 = load double, ptr %121, align 8, !tbaa !5
  %123 = fsub double %119, %122
  %124 = tail call noundef double @_Z6RNSignd(double noundef %123)
  %125 = load double, ptr %0, align 8, !tbaa !5
  %126 = fmul double %124, %125
  store double %126, ptr %0, align 8, !tbaa !5
  %127 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %128 = load double, ptr %127, align 8, !tbaa !5
  %129 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %130 = getelementptr inbounds i8, ptr %129, i64 8
  %131 = load double, ptr %130, align 8, !tbaa !5
  %132 = fadd double %128, %131
  %133 = tail call noundef double @_Z6RNSignd(double noundef %132)
  %134 = load double, ptr %41, align 8, !tbaa !5
  %135 = fmul double %133, %134
  store double %135, ptr %41, align 8, !tbaa !5
  %136 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %137 = getelementptr inbounds i8, ptr %136, i64 16
  %138 = load double, ptr %137, align 8, !tbaa !5
  %139 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %140 = load double, ptr %139, align 8, !tbaa !5
  %141 = fadd double %138, %140
  %142 = tail call noundef double @_Z6RNSignd(double noundef %141)
  %143 = load double, ptr %55, align 8, !tbaa !5
  %144 = fmul double %142, %143
  store double %144, ptr %55, align 8, !tbaa !5
  br label %212

145:                                              ; preds = %112
  %146 = fcmp ult double %80, %77
  %147 = fcmp ult double %80, %78
  %or.cond47 = or i1 %146, %147
  %148 = fcmp ult double %80, %76
  %or.cond49 = select i1 %or.cond47, i1 true, i1 %148
  br i1 %or.cond49, label %178, label %149

149:                                              ; preds = %145
  %150 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %151 = getelementptr inbounds i8, ptr %150, i64 16
  %152 = load double, ptr %151, align 8, !tbaa !5
  %153 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %154 = load double, ptr %153, align 8, !tbaa !5
  %155 = fsub double %152, %154
  %156 = tail call noundef double @_Z6RNSignd(double noundef %155)
  %157 = load double, ptr %0, align 8, !tbaa !5
  %158 = fmul double %156, %157
  store double %158, ptr %0, align 8, !tbaa !5
  %159 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %160 = load double, ptr %159, align 8, !tbaa !5
  %161 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %162 = getelementptr inbounds i8, ptr %161, i64 8
  %163 = load double, ptr %162, align 8, !tbaa !5
  %164 = fadd double %160, %163
  %165 = tail call noundef double @_Z6RNSignd(double noundef %164)
  %166 = load double, ptr %28, align 8, !tbaa !5
  %167 = fmul double %165, %166
  store double %167, ptr %28, align 8, !tbaa !5
  %168 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %169 = getelementptr inbounds i8, ptr %168, i64 8
  %170 = load double, ptr %169, align 8, !tbaa !5
  %171 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %172 = getelementptr inbounds i8, ptr %171, i64 16
  %173 = load double, ptr %172, align 8, !tbaa !5
  %174 = fadd double %170, %173
  %175 = tail call noundef double @_Z6RNSignd(double noundef %174)
  %176 = load double, ptr %55, align 8, !tbaa !5
  %177 = fmul double %175, %176
  store double %177, ptr %55, align 8, !tbaa !5
  br label %212

178:                                              ; preds = %145
  %179 = fcmp ult double %76, %77
  %180 = fcmp ult double %76, %78
  %or.cond51 = or i1 %179, %180
  %181 = fcmp ult double %76, %80
  %or.cond53 = select i1 %or.cond51, i1 true, i1 %181
  br i1 %or.cond53, label %211, label %182

182:                                              ; preds = %178
  %183 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %184 = load double, ptr %183, align 8, !tbaa !5
  %185 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %186 = getelementptr inbounds i8, ptr %185, i64 8
  %187 = load double, ptr %186, align 8, !tbaa !5
  %188 = fsub double %184, %187
  %189 = tail call noundef double @_Z6RNSignd(double noundef %188)
  %190 = load double, ptr %0, align 8, !tbaa !5
  %191 = fmul double %189, %190
  store double %191, ptr %0, align 8, !tbaa !5
  %192 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %193 = load double, ptr %192, align 8, !tbaa !5
  %194 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %195 = getelementptr inbounds i8, ptr %194, i64 16
  %196 = load double, ptr %195, align 8, !tbaa !5
  %197 = fadd double %193, %196
  %198 = tail call noundef double @_Z6RNSignd(double noundef %197)
  %199 = load double, ptr %28, align 8, !tbaa !5
  %200 = fmul double %198, %199
  store double %200, ptr %28, align 8, !tbaa !5
  %201 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %202 = getelementptr inbounds i8, ptr %201, i64 8
  %203 = load double, ptr %202, align 8, !tbaa !5
  %204 = tail call noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %205 = getelementptr inbounds i8, ptr %204, i64 16
  %206 = load double, ptr %205, align 8, !tbaa !5
  %207 = fadd double %203, %206
  %208 = tail call noundef double @_Z6RNSignd(double noundef %207)
  %209 = load double, ptr %41, align 8, !tbaa !5
  %210 = fmul double %208, %209
  store double %210, ptr %41, align 8, !tbaa !5
  br label %212

211:                                              ; preds = %178
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 0, i64 32, i1 false)
  br label %212

212:                                              ; preds = %116, %182, %211, %149, %83
  tail call void @_ZN12R3Quaternion9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

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

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


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