; LLVM IR from Algo-Phantoms/Algo-Tree :: Code/C++/matrix_operations.ll (Z19inverse_of_matricesiPA20_d)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19inverse_of_matricesiPA20_d(i32 noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store double 0.000000e+00, ptr %5, align 8, !tbaa !11
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = zext i32 %15 to i64
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = call ptr @llvm.stacksave.p0()
  store ptr %19, ptr %6, align 8
  %20 = mul nuw i64 %16, %18
  %21 = alloca double, i64 %20, align 16
  store i64 %16, ptr %7, align 8
  store i64 %18, ptr %8, align 8
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 2
  br i1 %23, label %24, label %102

24:                                               ; preds = %2
  %25 = load ptr, ptr %4, align 8, !tbaa !9
  %26 = getelementptr inbounds [20 x double], ptr %25, i64 0
  %27 = getelementptr inbounds [20 x double], ptr %26, i64 0, i64 0
  %28 = load double, ptr %27, align 8, !tbaa !11
  %29 = load ptr, ptr %4, align 8, !tbaa !9
  %30 = getelementptr inbounds [20 x double], ptr %29, i64 1
  %31 = getelementptr inbounds [20 x double], ptr %30, i64 0, i64 1
  %32 = load double, ptr %31, align 8, !tbaa !11
  %33 = load ptr, ptr %4, align 8, !tbaa !9
  %34 = getelementptr inbounds [20 x double], ptr %33, i64 1
  %35 = getelementptr inbounds [20 x double], ptr %34, i64 0, i64 0
  %36 = load double, ptr %35, align 8, !tbaa !11
  %37 = load ptr, ptr %4, align 8, !tbaa !9
  %38 = getelementptr inbounds [20 x double], ptr %37, i64 0
  %39 = getelementptr inbounds [20 x double], ptr %38, i64 0, i64 1
  %40 = load double, ptr %39, align 8, !tbaa !11
  %41 = fmul double %36, %40
  %42 = fneg double %41
  %43 = call double @llvm.fmuladd.f64(double %28, double %32, double %42)
  store double %43, ptr %5, align 8, !tbaa !11
  %44 = load double, ptr %5, align 8, !tbaa !11
  %45 = fcmp oeq double %44, 0.000000e+00
  br i1 %45, label %46, label %48

46:                                               ; preds = %24
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  store i32 1, ptr %9, align 4
  br label %239

48:                                               ; preds = %24
  %49 = load ptr, ptr %4, align 8, !tbaa !9
  %50 = getelementptr inbounds [20 x double], ptr %49, i64 0
  %51 = getelementptr inbounds [20 x double], ptr %50, i64 0, i64 0
  %52 = load ptr, ptr %4, align 8, !tbaa !9
  %53 = getelementptr inbounds [20 x double], ptr %52, i64 1
  %54 = getelementptr inbounds [20 x double], ptr %53, i64 0, i64 1
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  %55 = load ptr, ptr %4, align 8, !tbaa !9
  %56 = getelementptr inbounds [20 x double], ptr %55, i64 0
  %57 = getelementptr inbounds [20 x double], ptr %56, i64 0, i64 1
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fneg double %58
  %60 = load ptr, ptr %4, align 8, !tbaa !9
  %61 = getelementptr inbounds [20 x double], ptr %60, i64 0
  %62 = getelementptr inbounds [20 x double], ptr %61, i64 0, i64 1
  store double %59, ptr %62, align 8, !tbaa !11
  %63 = load ptr, ptr %4, align 8, !tbaa !9
  %64 = getelementptr inbounds [20 x double], ptr %63, i64 1
  %65 = getelementptr inbounds [20 x double], ptr %64, i64 0, i64 0
  %66 = load double, ptr %65, align 8, !tbaa !11
  %67 = fneg double %66
  %68 = load ptr, ptr %4, align 8, !tbaa !9
  %69 = getelementptr inbounds [20 x double], ptr %68, i64 1
  %70 = getelementptr inbounds [20 x double], ptr %69, i64 0, i64 0
  store double %67, ptr %70, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %98, %48
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = icmp slt i32 %72, 2
  br i1 %73, label %75, label %74

74:                                               ; preds = %71
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %101

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %93, %75
  %77 = load i32, ptr %11, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 2
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %96

80:                                               ; preds = %76
  %81 = load ptr, ptr %4, align 8, !tbaa !9
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [20 x double], ptr %81, i64 %83
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [20 x double], ptr %84, i64 0, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = load double, ptr %5, align 8, !tbaa !11
  %90 = fdiv double %88, %89
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @.str)
  br label %93

93:                                               ; preds = %80
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !5
  br label %76, !llvm.loop !13

96:                                               ; preds = %79
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %98

98:                                               ; preds = %96
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %10, align 4, !tbaa !5
  br label %71, !llvm.loop !15

101:                                              ; preds = %74
  br label %102

102:                                              ; preds = %101, %2
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp eq i32 %103, 3
  br i1 %104, label %105, label %238

105:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %154, %105
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = icmp slt i32 %107, 3
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %157

110:                                              ; preds = %106
  %111 = load ptr, ptr %4, align 8, !tbaa !9
  %112 = getelementptr inbounds [20 x double], ptr %111, i64 0
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [20 x double], ptr %112, i64 0, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = load ptr, ptr %4, align 8, !tbaa !9
  %118 = getelementptr inbounds [20 x double], ptr %117, i64 1
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = srem i32 %120, 3
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [20 x double], ptr %118, i64 0, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = load ptr, ptr %4, align 8, !tbaa !9
  %126 = getelementptr inbounds [20 x double], ptr %125, i64 2
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = add nsw i32 %127, 2
  %129 = srem i32 %128, 3
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [20 x double], ptr %126, i64 0, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !11
  %133 = load ptr, ptr %4, align 8, !tbaa !9
  %134 = getelementptr inbounds [20 x double], ptr %133, i64 1
  %135 = load i32, ptr %12, align 4, !tbaa !5
  %136 = add nsw i32 %135, 2
  %137 = srem i32 %136, 3
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [20 x double], ptr %134, i64 0, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !11
  %141 = load ptr, ptr %4, align 8, !tbaa !9
  %142 = getelementptr inbounds [20 x double], ptr %141, i64 2
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  %145 = srem i32 %144, 3
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [20 x double], ptr %142, i64 0, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = fmul double %140, %148
  %150 = fneg double %149
  %151 = call double @llvm.fmuladd.f64(double %124, double %132, double %150)
  %152 = load double, ptr %5, align 8, !tbaa !11
  %153 = call double @llvm.fmuladd.f64(double %116, double %151, double %152)
  store double %153, ptr %5, align 8, !tbaa !11
  br label %154

154:                                              ; preds = %110
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %12, align 4, !tbaa !5
  br label %106, !llvm.loop !16

157:                                              ; preds = %109
  %158 = load double, ptr %5, align 8, !tbaa !11
  %159 = fcmp oeq double %158, 0.000000e+00
  br i1 %159, label %160, label %162

160:                                              ; preds = %157
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  store i32 1, ptr %9, align 4
  br label %239

162:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %233, %162
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = icmp slt i32 %164, 3
  br i1 %165, label %167, label %166

166:                                              ; preds = %163
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %236

167:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %228, %167
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = icmp slt i32 %169, 3
  br i1 %170, label %172, label %171

171:                                              ; preds = %168
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %231

172:                                              ; preds = %168
  %173 = load ptr, ptr %4, align 8, !tbaa !9
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  %176 = srem i32 %175, 3
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [20 x double], ptr %173, i64 %177
  %179 = load i32, ptr %13, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  %181 = srem i32 %180, 3
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [20 x double], ptr %178, i64 0, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = load ptr, ptr %4, align 8, !tbaa !9
  %186 = load i32, ptr %14, align 4, !tbaa !5
  %187 = add nsw i32 %186, 2
  %188 = srem i32 %187, 3
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [20 x double], ptr %185, i64 %189
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = add nsw i32 %191, 2
  %193 = srem i32 %192, 3
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [20 x double], ptr %190, i64 0, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !11
  %197 = load ptr, ptr %4, align 8, !tbaa !9
  %198 = load i32, ptr %14, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  %200 = srem i32 %199, 3
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [20 x double], ptr %197, i64 %201
  %203 = load i32, ptr %13, align 4, !tbaa !5
  %204 = add nsw i32 %203, 2
  %205 = srem i32 %204, 3
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [20 x double], ptr %202, i64 0, i64 %206
  %208 = load double, ptr %207, align 8, !tbaa !11
  %209 = load ptr, ptr %4, align 8, !tbaa !9
  %210 = load i32, ptr %14, align 4, !tbaa !5
  %211 = add nsw i32 %210, 2
  %212 = srem i32 %211, 3
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [20 x double], ptr %209, i64 %213
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  %217 = srem i32 %216, 3
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [20 x double], ptr %214, i64 0, i64 %218
  %220 = load double, ptr %219, align 8, !tbaa !11
  %221 = fmul double %208, %220
  %222 = fneg double %221
  %223 = call double @llvm.fmuladd.f64(double %184, double %196, double %222)
  %224 = load double, ptr %5, align 8, !tbaa !11
  %225 = fdiv double %223, %224
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %225)
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %226, ptr noundef @.str)
  br label %228

228:                                              ; preds = %172
  %229 = load i32, ptr %14, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %14, align 4, !tbaa !5
  br label %168, !llvm.loop !17

231:                                              ; preds = %171
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %233

233:                                              ; preds = %231
  %234 = load i32, ptr %13, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %13, align 4, !tbaa !5
  br label %163, !llvm.loop !18

236:                                              ; preds = %166
  br label %237

237:                                              ; preds = %236
  br label %238

238:                                              ; preds = %237, %102
  store i32 0, ptr %9, align 4
  br label %239

239:                                              ; preds = %238, %160, %46
  %240 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %240)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %241 = load i32, ptr %9, align 4
  switch i32 %241, label %243 [
    i32 0, label %242
    i32 1, label %242
  ]

242:                                              ; preds = %239, %239
  ret void

243:                                              ; preds = %239
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #3 align 2

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19inverse_of_matricesiPA20_d(i32 noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  switch i32 %0, label %.loopexit [
    i32 2, label %3
    i32 3, label %.preheader64
  ]

3:                                                ; preds = %2
  %4 = load double, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 160
  %6 = getelementptr inbounds i8, ptr %1, i64 168
  %7 = load double, ptr %6, align 8, !tbaa !5
  %8 = load double, ptr %5, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = fneg double %8
  %12 = fmul double %10, %11
  %13 = tail call double @llvm.fmuladd.f64(double %4, double %7, double %12)
  %14 = fcmp oeq double %13, 0.000000e+00
  br i1 %14, label %15, label %.loopexit66.thread

15:                                               ; preds = %3
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  br label %.loopexit

.loopexit66.thread:                               ; preds = %3
  tail call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %17 = load double, ptr %9, align 8, !tbaa !5
  %18 = fneg double %17
  store double %18, ptr %9, align 8, !tbaa !5
  %19 = load double, ptr %5, align 8, !tbaa !5
  %20 = fneg double %19
  store double %20, ptr %5, align 8, !tbaa !5
  %21 = load double, ptr %1, align 8, !tbaa !5
  %22 = fdiv double %21, %13
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %22)
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull @.str)
  %25 = load double, ptr %9, align 8, !tbaa !5
  %26 = fdiv double %25, %13
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %26)
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull @.str)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %30 = load double, ptr %5, align 8, !tbaa !5
  %31 = fdiv double %30, %13
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %31)
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str)
  %34 = load double, ptr %6, align 8, !tbaa !5
  %35 = fdiv double %34, %13
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %35)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str)
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

.preheader64:                                     ; preds = %2
  %39 = getelementptr inbounds i8, ptr %1, i64 160
  %40 = getelementptr inbounds i8, ptr %1, i64 320
  %41 = load double, ptr %1, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %1, i64 168
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %1, i64 336
  %45 = load double, ptr %44, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %1, i64 176
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %1, i64 328
  %49 = load double, ptr %48, align 8, !tbaa !5
  %50 = fneg double %47
  %51 = fmul double %49, %50
  %52 = tail call double @llvm.fmuladd.f64(double %43, double %45, double %51)
  %53 = tail call double @llvm.fmuladd.f64(double %41, double %52, double 0.000000e+00)
  %54 = getelementptr inbounds i8, ptr %1, i64 8
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = load double, ptr %40, align 8, !tbaa !5
  %57 = load double, ptr %39, align 8, !tbaa !5
  %58 = fneg double %57
  %59 = fmul double %45, %58
  %60 = tail call double @llvm.fmuladd.f64(double %47, double %56, double %59)
  %61 = tail call double @llvm.fmuladd.f64(double %55, double %60, double %53)
  %62 = getelementptr inbounds i8, ptr %1, i64 16
  %63 = load double, ptr %62, align 8, !tbaa !5
  %64 = fneg double %43
  %65 = fmul double %56, %64
  %66 = tail call double @llvm.fmuladd.f64(double %57, double %49, double %65)
  %67 = tail call double @llvm.fmuladd.f64(double %63, double %66, double %61)
  %68 = fcmp oeq double %67, 0.000000e+00
  br i1 %68, label %159, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader64
  %69 = getelementptr inbounds i8, ptr %1, i64 168
  %70 = getelementptr inbounds i8, ptr %1, i64 336
  %71 = getelementptr inbounds i8, ptr %1, i64 176
  %72 = getelementptr inbounds i8, ptr %1, i64 328
  %73 = fdiv double %52, %67
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %73)
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @.str)
  %76 = load double, ptr %72, align 8, !tbaa !5
  %77 = load double, ptr %62, align 8, !tbaa !5
  %78 = load double, ptr %70, align 8, !tbaa !5
  %79 = load double, ptr %54, align 8, !tbaa !5
  %80 = fneg double %78
  %81 = fmul double %79, %80
  %82 = tail call double @llvm.fmuladd.f64(double %76, double %77, double %81)
  %83 = fdiv double %82, %67
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %83)
  %85 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @.str)
  %86 = load double, ptr %54, align 8, !tbaa !5
  %87 = load double, ptr %71, align 8, !tbaa !5
  %88 = load double, ptr %62, align 8, !tbaa !5
  %89 = load double, ptr %69, align 8, !tbaa !5
  %90 = fneg double %88
  %91 = fmul double %89, %90
  %92 = tail call double @llvm.fmuladd.f64(double %86, double %87, double %91)
  %93 = fdiv double %92, %67
  %94 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %93)
  %95 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull @.str)
  %96 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %97 = load double, ptr %71, align 8, !tbaa !5
  %98 = load double, ptr %40, align 8, !tbaa !5
  %99 = load double, ptr %39, align 8, !tbaa !5
  %100 = load double, ptr %70, align 8, !tbaa !5
  %101 = fneg double %99
  %102 = fmul double %100, %101
  %103 = tail call double @llvm.fmuladd.f64(double %97, double %98, double %102)
  %104 = fdiv double %103, %67
  %105 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %104)
  %106 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull @.str)
  %107 = load double, ptr %70, align 8, !tbaa !5
  %108 = load double, ptr %1, align 8, !tbaa !5
  %109 = load double, ptr %40, align 8, !tbaa !5
  %110 = load double, ptr %62, align 8, !tbaa !5
  %111 = fneg double %109
  %112 = fmul double %110, %111
  %113 = tail call double @llvm.fmuladd.f64(double %107, double %108, double %112)
  %114 = fdiv double %113, %67
  %115 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %114)
  %116 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @.str)
  %117 = load double, ptr %62, align 8, !tbaa !5
  %118 = load double, ptr %39, align 8, !tbaa !5
  %119 = load double, ptr %1, align 8, !tbaa !5
  %120 = load double, ptr %71, align 8, !tbaa !5
  %121 = fneg double %119
  %122 = fmul double %120, %121
  %123 = tail call double @llvm.fmuladd.f64(double %117, double %118, double %122)
  %124 = fdiv double %123, %67
  %125 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %124)
  %126 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @.str)
  %127 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %128 = load double, ptr %39, align 8, !tbaa !5
  %129 = load double, ptr %72, align 8, !tbaa !5
  %130 = load double, ptr %69, align 8, !tbaa !5
  %131 = load double, ptr %40, align 8, !tbaa !5
  %132 = fneg double %130
  %133 = fmul double %131, %132
  %134 = tail call double @llvm.fmuladd.f64(double %128, double %129, double %133)
  %135 = fdiv double %134, %67
  %136 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %135)
  %137 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull @.str)
  %138 = load double, ptr %40, align 8, !tbaa !5
  %139 = load double, ptr %54, align 8, !tbaa !5
  %140 = load double, ptr %72, align 8, !tbaa !5
  %141 = load double, ptr %1, align 8, !tbaa !5
  %142 = fneg double %140
  %143 = fmul double %141, %142
  %144 = tail call double @llvm.fmuladd.f64(double %138, double %139, double %143)
  %145 = fdiv double %144, %67
  %146 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %145)
  %147 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @.str)
  %148 = load double, ptr %1, align 8, !tbaa !5
  %149 = load double, ptr %69, align 8, !tbaa !5
  %150 = load double, ptr %54, align 8, !tbaa !5
  %151 = load double, ptr %39, align 8, !tbaa !5
  %152 = fneg double %150
  %153 = fmul double %151, %152
  %154 = tail call double @llvm.fmuladd.f64(double %148, double %149, double %153)
  %155 = fdiv double %154, %67
  %156 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %155)
  %157 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull @.str)
  %158 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

159:                                              ; preds = %.preheader64
  %160 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  br label %.loopexit

.loopexit:                                        ; preds = %2, %.loopexit66.thread, %.preheader.preheader, %159, %15
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #1 align 2

attributes #0 = { 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 #1 = { 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass