; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Matrix.ll (ZNK7SGTELIB6Matrix8col_normENS_6norm_tE)

; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.79 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, double noundef) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7SGTELIB6Matrix8col_normENS_6norm_tE(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i1, align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8
  store i1 false, ptr %7, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.79, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %17 unwind label %28

17:                                               ; preds = %3
  %18 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 3
  %19 = load i32, ptr %18, align 4, !tbaa !11
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 1, i32 noundef %19)
          to label %20 unwind label %32

20:                                               ; preds = %17
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !17
  br label %21

21:                                               ; preds = %168, %20
  %22 = load i32, ptr %13, align 4, !tbaa !17
  %23 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 3
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %26, label %171

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 0.000000e+00, ptr %14, align 8, !tbaa !18
  %27 = load i32, ptr %6, align 4, !tbaa !9
  switch i32 %27, label %165 [
    i32 0, label %37
    i32 1, label %68
    i32 2, label %97
    i32 3, label %136
  ]

28:                                               ; preds = %3
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %10, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %11, align 4
  br label %36

32:                                               ; preds = %17
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %10, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %36

36:                                               ; preds = %32, %28
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %175

37:                                               ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %38

38:                                               ; preds = %59, %37
  %39 = load i32, ptr %12, align 4, !tbaa !17
  %40 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 2
  %41 = load i32, ptr %40, align 8, !tbaa !20
  %42 = icmp slt i32 %39, %41
  br i1 %42, label %43, label %62

43:                                               ; preds = %38
  %44 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !21
  %46 = load i32, ptr %12, align 4, !tbaa !17
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds ptr, ptr %45, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = load i32, ptr %13, align 4, !tbaa !17
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %49, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !18
  %54 = call double @llvm.fabs.f64(double %53)
  %55 = fcmp olt double %54, 1.000000e-13
  %56 = uitofp i1 %55 to double
  %57 = load double, ptr %14, align 8, !tbaa !18
  %58 = fadd double %57, %56
  store double %58, ptr %14, align 8, !tbaa !18
  br label %59

59:                                               ; preds = %43
  %60 = load i32, ptr %12, align 4, !tbaa !17
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %12, align 4, !tbaa !17
  br label %38, !llvm.loop !22

62:                                               ; preds = %38
  %63 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 3
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = sitofp i32 %64 to double
  %66 = load double, ptr %14, align 8, !tbaa !18
  %67 = fdiv double %66, %65
  store double %67, ptr %14, align 8, !tbaa !18
  br label %165

68:                                               ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %69

69:                                               ; preds = %88, %68
  %70 = load i32, ptr %12, align 4, !tbaa !17
  %71 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 2
  %72 = load i32, ptr %71, align 8, !tbaa !20
  %73 = icmp slt i32 %70, %72
  br i1 %73, label %74, label %91

74:                                               ; preds = %69
  %75 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !21
  %77 = load i32, ptr %12, align 4, !tbaa !17
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i32, ptr %13, align 4, !tbaa !17
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !18
  %85 = call double @llvm.fabs.f64(double %84)
  %86 = load double, ptr %14, align 8, !tbaa !18
  %87 = fadd double %86, %85
  store double %87, ptr %14, align 8, !tbaa !18
  br label %88

88:                                               ; preds = %74
  %89 = load i32, ptr %12, align 4, !tbaa !17
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %12, align 4, !tbaa !17
  br label %69, !llvm.loop !24

91:                                               ; preds = %69
  %92 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 3
  %93 = load i32, ptr %92, align 4, !tbaa !11
  %94 = sitofp i32 %93 to double
  %95 = load double, ptr %14, align 8, !tbaa !18
  %96 = fdiv double %95, %94
  store double %96, ptr %14, align 8, !tbaa !18
  br label %165

97:                                               ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %98

98:                                               ; preds = %126, %97
  %99 = load i32, ptr %12, align 4, !tbaa !17
  %100 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 2
  %101 = load i32, ptr %100, align 8, !tbaa !20
  %102 = icmp slt i32 %99, %101
  br i1 %102, label %103, label %129

103:                                              ; preds = %98
  %104 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = load i32, ptr %12, align 4, !tbaa !17
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds ptr, ptr %105, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = load i32, ptr %13, align 4, !tbaa !17
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !18
  %114 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !21
  %116 = load i32, ptr %12, align 4, !tbaa !17
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !17
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !18
  %124 = load double, ptr %14, align 8, !tbaa !18
  %125 = call double @llvm.fmuladd.f64(double %113, double %123, double %124)
  store double %125, ptr %14, align 8, !tbaa !18
  br label %126

126:                                              ; preds = %103
  %127 = load i32, ptr %12, align 4, !tbaa !17
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %12, align 4, !tbaa !17
  br label %98, !llvm.loop !25

129:                                              ; preds = %98
  %130 = load double, ptr %14, align 8, !tbaa !18
  %131 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 3
  %132 = load i32, ptr %131, align 4, !tbaa !11
  %133 = sitofp i32 %132 to double
  %134 = fdiv double %130, %133
  %135 = call double @sqrt(double noundef %134) #6
  store double %135, ptr %14, align 8, !tbaa !18
  br label %165

136:                                              ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !17
  br label %137

137:                                              ; preds = %157, %136
  %138 = load i32, ptr %12, align 4, !tbaa !17
  %139 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 2
  %140 = load i32, ptr %139, align 8, !tbaa !20
  %141 = icmp slt i32 %138, %140
  br i1 %141, label %142, label %164

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %143 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %16, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = load i32, ptr %12, align 4, !tbaa !17
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load i32, ptr %13, align 4, !tbaa !17
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !18
  %153 = call double @llvm.fabs.f64(double %152)
  store double %153, ptr %15, align 8, !tbaa !18
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %155 unwind label %160

155:                                              ; preds = %142
  %156 = load double, ptr %154, align 8, !tbaa !18
  store double %156, ptr %14, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %157

157:                                              ; preds = %155
  %158 = load i32, ptr %12, align 4, !tbaa !17
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %12, align 4, !tbaa !17
  br label %137, !llvm.loop !26

160:                                              ; preds = %142
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %10, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  br label %175

164:                                              ; preds = %137
  br label %165

165:                                              ; preds = %164, %129, %91, %62, %26
  %166 = load i32, ptr %13, align 4, !tbaa !17
  %167 = load double, ptr %14, align 8, !tbaa !18
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %166, double noundef %167)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %168

168:                                              ; preds = %165
  %169 = load i32, ptr %13, align 4, !tbaa !17
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %13, align 4, !tbaa !17
  br label %21, !llvm.loop !27

171:                                              ; preds = %21
  store i1 true, ptr %7, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %172 = load i1, ptr %7, align 1
  br i1 %172, label %174, label %173

173:                                              ; preds = %171
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  br label %174

174:                                              ; preds = %173, %171
  ret void

175:                                              ; preds = %160, %36
  %176 = load ptr, ptr %10, align 8
  %177 = load i32, ptr %11, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr, ptr, i32, i32)

declare void @_ZN7SGTELIB6MatrixD1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN7SGTELIB6norm_tE", !7, i64 0}
!11 = !{!12, !16, i64 44}
!12 = !{!"_ZTSN7SGTELIB6MatrixE", !13, i64 8, !16, i64 40, !16, i64 44, !6, i64 48}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!12, !16, i64 40}
!21 = !{!12, !6, i64 48}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}


; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.79 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, double noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7SGTELIB6Matrix8col_normENS_6norm_tE(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(56) %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.79, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %8 unwind label %161

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %1, i64 44
  %10 = load i32, ptr %9, align 4, !tbaa !5
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1, i32 noundef %10)
          to label %11 unwind label %163

11:                                               ; preds = %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %12 = load i32, ptr %9, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %11
  %14 = getelementptr inbounds i8, ptr %1, i64 40
  %15 = getelementptr inbounds i8, ptr %1, i64 48
  switch i32 %2, label %.lr.ph46.split [
    i32 0, label %.preheader.us
    i32 1, label %.preheader29.us
    i32 2, label %.preheader30.us
    i32 3, label %.preheader31.us
  ]

.preheader.us:                                    ; preds = %.lr.ph46, %._crit_edge42.us
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %._crit_edge42.us ], [ 0, %.lr.ph46 ]
  %16 = phi i32 [ %31, %._crit_edge42.us ], [ %12, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %17 = load i32, ptr %14, align 8, !tbaa !14
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph41.us, label %._crit_edge42.us

._crit_edge42.us.loopexit.unr-lcssa:              ; preds = %34, %.lr.ph41.us
  %.lcssa.ph = phi double [ poison, %.lr.ph41.us ], [ %51, %34 ]
  %indvars.iv79.unr = phi i64 [ 0, %.lr.ph41.us ], [ %indvars.iv.next80.1, %34 ]
  %.unr120 = phi double [ 0.000000e+00, %.lr.ph41.us ], [ %51, %34 ]
  %lcmp.mod121.not = icmp eq i64 %xtraiter118, 0
  br i1 %lcmp.mod121.not, label %._crit_edge42.us, label %._crit_edge42.us.loopexit.epilog-lcssa

._crit_edge42.us.loopexit.epilog-lcssa:           ; preds = %._crit_edge42.us.loopexit.unr-lcssa
  %19 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv79.unr
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = getelementptr inbounds double, ptr %20, i64 %indvars.iv84
  %22 = load double, ptr %21, align 8, !tbaa !16
  %23 = call double @llvm.fabs.f64(double %22)
  %24 = fcmp olt double %23, 1.000000e-13
  %25 = uitofp i1 %24 to double
  %26 = fadd double %.unr120, %25
  br label %._crit_edge42.us

._crit_edge42.us:                                 ; preds = %._crit_edge42.us.loopexit.epilog-lcssa, %._crit_edge42.us.loopexit.unr-lcssa, %.preheader.us
  %27 = phi double [ 0.000000e+00, %.preheader.us ], [ %.lcssa.ph, %._crit_edge42.us.loopexit.unr-lcssa ], [ %26, %._crit_edge42.us.loopexit.epilog-lcssa ]
  %28 = sitofp i32 %16 to double
  %29 = fdiv double %27, %28
  %30 = trunc nuw nsw i64 %indvars.iv84 to i32
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %30, double noundef %29)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next85, %32
  br i1 %33, label %.preheader.us, label %._crit_edge47, !llvm.loop !18

34:                                               ; preds = %34, %.lr.ph41.us.new
  %indvars.iv79 = phi i64 [ 0, %.lr.ph41.us.new ], [ %indvars.iv.next80.1, %34 ]
  %35 = phi double [ 0.000000e+00, %.lr.ph41.us.new ], [ %51, %34 ]
  %niter124 = phi i64 [ 0, %.lr.ph41.us.new ], [ %niter124.next.1, %34 ]
  %36 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv79
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds double, ptr %37, i64 %indvars.iv84
  %39 = load double, ptr %38, align 8, !tbaa !16
  %40 = call double @llvm.fabs.f64(double %39)
  %41 = fcmp olt double %40, 1.000000e-13
  %42 = uitofp i1 %41 to double
  %43 = fadd double %35, %42
  %indvars.iv.next80 = or disjoint i64 %indvars.iv79, 1
  %44 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv.next80
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  %46 = getelementptr inbounds double, ptr %45, i64 %indvars.iv84
  %47 = load double, ptr %46, align 8, !tbaa !16
  %48 = call double @llvm.fabs.f64(double %47)
  %49 = fcmp olt double %48, 1.000000e-13
  %50 = uitofp i1 %49 to double
  %51 = fadd double %43, %50
  %indvars.iv.next80.1 = add nuw nsw i64 %indvars.iv79, 2
  %niter124.next.1 = add i64 %niter124, 2
  %niter124.ncmp.1 = icmp eq i64 %niter124.next.1, %unroll_iter123
  br i1 %niter124.ncmp.1, label %._crit_edge42.us.loopexit.unr-lcssa, label %34, !llvm.loop !20

.lr.ph41.us:                                      ; preds = %.preheader.us
  %52 = load ptr, ptr %15, align 8, !tbaa !21
  %wide.trip.count82 = zext nneg i32 %17 to i64
  %xtraiter118 = and i64 %wide.trip.count82, 1
  %53 = icmp eq i32 %17, 1
  br i1 %53, label %._crit_edge42.us.loopexit.unr-lcssa, label %.lr.ph41.us.new

.lr.ph41.us.new:                                  ; preds = %.lr.ph41.us
  %unroll_iter123 = and i64 %wide.trip.count82, 2147483646
  br label %34

.preheader29.us:                                  ; preds = %.lr.ph46, %._crit_edge38.us
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %._crit_edge38.us ], [ 0, %.lr.ph46 ]
  %54 = phi i32 [ %68, %._crit_edge38.us ], [ %12, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %55 = load i32, ptr %14, align 8, !tbaa !14
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph37.us, label %._crit_edge38.us

._crit_edge38.us.loopexit.unr-lcssa:              ; preds = %71, %.lr.ph37.us
  %.lcssa103.ph = phi double [ poison, %.lr.ph37.us ], [ %96, %71 ]
  %indvars.iv71.unr = phi i64 [ 0, %.lr.ph37.us ], [ %indvars.iv.next72.3, %71 ]
  %.unr112 = phi double [ 0.000000e+00, %.lr.ph37.us ], [ %96, %71 ]
  %lcmp.mod113.not = icmp eq i64 %xtraiter110, 0
  br i1 %lcmp.mod113.not, label %._crit_edge38.us, label %.epil.preheader109

.epil.preheader109:                               ; preds = %._crit_edge38.us.loopexit.unr-lcssa, %.epil.preheader109
  %indvars.iv71.epil = phi i64 [ %indvars.iv.next72.epil, %.epil.preheader109 ], [ %indvars.iv71.unr, %._crit_edge38.us.loopexit.unr-lcssa ]
  %57 = phi double [ %63, %.epil.preheader109 ], [ %.unr112, %._crit_edge38.us.loopexit.unr-lcssa ]
  %epil.iter111 = phi i64 [ %epil.iter111.next, %.epil.preheader109 ], [ 0, %._crit_edge38.us.loopexit.unr-lcssa ]
  %58 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv71.epil
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = getelementptr inbounds double, ptr %59, i64 %indvars.iv76
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = call double @llvm.fabs.f64(double %61)
  %63 = fadd double %57, %62
  %indvars.iv.next72.epil = add nuw nsw i64 %indvars.iv71.epil, 1
  %epil.iter111.next = add i64 %epil.iter111, 1
  %epil.iter111.cmp.not = icmp eq i64 %epil.iter111.next, %xtraiter110
  br i1 %epil.iter111.cmp.not, label %._crit_edge38.us, label %.epil.preheader109, !llvm.loop !22

._crit_edge38.us:                                 ; preds = %._crit_edge38.us.loopexit.unr-lcssa, %.epil.preheader109, %.preheader29.us
  %64 = phi double [ 0.000000e+00, %.preheader29.us ], [ %.lcssa103.ph, %._crit_edge38.us.loopexit.unr-lcssa ], [ %63, %.epil.preheader109 ]
  %65 = sitofp i32 %54 to double
  %66 = fdiv double %64, %65
  %67 = trunc nuw nsw i64 %indvars.iv76 to i32
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %67, double noundef %66)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %68 = load i32, ptr %9, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next77, %69
  br i1 %70, label %.preheader29.us, label %._crit_edge47, !llvm.loop !18

71:                                               ; preds = %71, %.lr.ph37.us.new
  %indvars.iv71 = phi i64 [ 0, %.lr.ph37.us.new ], [ %indvars.iv.next72.3, %71 ]
  %72 = phi double [ 0.000000e+00, %.lr.ph37.us.new ], [ %96, %71 ]
  %niter116 = phi i64 [ 0, %.lr.ph37.us.new ], [ %niter116.next.3, %71 ]
  %73 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv71
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = getelementptr inbounds double, ptr %74, i64 %indvars.iv76
  %76 = load double, ptr %75, align 8, !tbaa !16
  %77 = call double @llvm.fabs.f64(double %76)
  %78 = fadd double %72, %77
  %indvars.iv.next72 = or disjoint i64 %indvars.iv71, 1
  %79 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv.next72
  %80 = load ptr, ptr %79, align 8, !tbaa !15
  %81 = getelementptr inbounds double, ptr %80, i64 %indvars.iv76
  %82 = load double, ptr %81, align 8, !tbaa !16
  %83 = call double @llvm.fabs.f64(double %82)
  %84 = fadd double %78, %83
  %indvars.iv.next72.1 = or disjoint i64 %indvars.iv71, 2
  %85 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv.next72.1
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = getelementptr inbounds double, ptr %86, i64 %indvars.iv76
  %88 = load double, ptr %87, align 8, !tbaa !16
  %89 = call double @llvm.fabs.f64(double %88)
  %90 = fadd double %84, %89
  %indvars.iv.next72.2 = or disjoint i64 %indvars.iv71, 3
  %91 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv.next72.2
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %93 = getelementptr inbounds double, ptr %92, i64 %indvars.iv76
  %94 = load double, ptr %93, align 8, !tbaa !16
  %95 = call double @llvm.fabs.f64(double %94)
  %96 = fadd double %90, %95
  %indvars.iv.next72.3 = add nuw nsw i64 %indvars.iv71, 4
  %niter116.next.3 = add i64 %niter116, 4
  %niter116.ncmp.3 = icmp eq i64 %niter116.next.3, %unroll_iter115
  br i1 %niter116.ncmp.3, label %._crit_edge38.us.loopexit.unr-lcssa, label %71, !llvm.loop !24

.lr.ph37.us:                                      ; preds = %.preheader29.us
  %97 = load ptr, ptr %15, align 8, !tbaa !21
  %wide.trip.count74 = zext nneg i32 %55 to i64
  %xtraiter110 = and i64 %wide.trip.count74, 3
  %98 = icmp ult i32 %55, 4
  br i1 %98, label %._crit_edge38.us.loopexit.unr-lcssa, label %.lr.ph37.us.new

.lr.ph37.us.new:                                  ; preds = %.lr.ph37.us
  %unroll_iter115 = and i64 %wide.trip.count74, 2147483644
  br label %71

.preheader30.us:                                  ; preds = %.lr.ph46, %._crit_edge.us
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %._crit_edge.us ], [ 0, %.lr.ph46 ]
  %99 = phi i32 [ %113, %._crit_edge.us ], [ %12, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %100 = load i32, ptr %14, align 8, !tbaa !14
  %101 = icmp sgt i32 %100, 0
  br i1 %101, label %.lr.ph34.us, label %._crit_edge.us

._crit_edge.us.loopexit.unr-lcssa:                ; preds = %116, %.lr.ph34.us
  %.lcssa105.ph = phi double [ poison, %.lr.ph34.us ], [ %137, %116 ]
  %indvars.iv65.unr = phi i64 [ 0, %.lr.ph34.us ], [ %indvars.iv.next66.3, %116 ]
  %.unr = phi double [ 0.000000e+00, %.lr.ph34.us ], [ %137, %116 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv65.epil = phi i64 [ %indvars.iv.next66.epil, %.epil.preheader ], [ %indvars.iv65.unr, %._crit_edge.us.loopexit.unr-lcssa ]
  %102 = phi double [ %107, %.epil.preheader ], [ %.unr, %._crit_edge.us.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.loopexit.unr-lcssa ]
  %103 = getelementptr inbounds ptr, ptr %138, i64 %indvars.iv65.epil
  %104 = load ptr, ptr %103, align 8, !tbaa !15
  %105 = getelementptr inbounds double, ptr %104, i64 %indvars.iv68
  %106 = load double, ptr %105, align 8, !tbaa !16
  %107 = call double @llvm.fmuladd.f64(double %106, double %106, double %102)
  %indvars.iv.next66.epil = add nuw nsw i64 %indvars.iv65.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us, label %.epil.preheader, !llvm.loop !25

._crit_edge.us:                                   ; preds = %._crit_edge.us.loopexit.unr-lcssa, %.epil.preheader, %.preheader30.us
  %108 = phi double [ 0.000000e+00, %.preheader30.us ], [ %.lcssa105.ph, %._crit_edge.us.loopexit.unr-lcssa ], [ %107, %.epil.preheader ]
  %109 = sitofp i32 %99 to double
  %110 = fdiv double %108, %109
  %111 = call double @sqrt(double noundef %110) #6
  %112 = trunc nuw nsw i64 %indvars.iv68 to i32
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %112, double noundef %111)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next69, %114
  br i1 %115, label %.preheader30.us, label %._crit_edge47, !llvm.loop !18

116:                                              ; preds = %116, %.lr.ph34.us.new
  %indvars.iv65 = phi i64 [ 0, %.lr.ph34.us.new ], [ %indvars.iv.next66.3, %116 ]
  %117 = phi double [ 0.000000e+00, %.lr.ph34.us.new ], [ %137, %116 ]
  %niter = phi i64 [ 0, %.lr.ph34.us.new ], [ %niter.next.3, %116 ]
  %118 = getelementptr inbounds ptr, ptr %138, i64 %indvars.iv65
  %119 = load ptr, ptr %118, align 8, !tbaa !15
  %120 = getelementptr inbounds double, ptr %119, i64 %indvars.iv68
  %121 = load double, ptr %120, align 8, !tbaa !16
  %122 = call double @llvm.fmuladd.f64(double %121, double %121, double %117)
  %indvars.iv.next66 = or disjoint i64 %indvars.iv65, 1
  %123 = getelementptr inbounds ptr, ptr %138, i64 %indvars.iv.next66
  %124 = load ptr, ptr %123, align 8, !tbaa !15
  %125 = getelementptr inbounds double, ptr %124, i64 %indvars.iv68
  %126 = load double, ptr %125, align 8, !tbaa !16
  %127 = call double @llvm.fmuladd.f64(double %126, double %126, double %122)
  %indvars.iv.next66.1 = or disjoint i64 %indvars.iv65, 2
  %128 = getelementptr inbounds ptr, ptr %138, i64 %indvars.iv.next66.1
  %129 = load ptr, ptr %128, align 8, !tbaa !15
  %130 = getelementptr inbounds double, ptr %129, i64 %indvars.iv68
  %131 = load double, ptr %130, align 8, !tbaa !16
  %132 = call double @llvm.fmuladd.f64(double %131, double %131, double %127)
  %indvars.iv.next66.2 = or disjoint i64 %indvars.iv65, 3
  %133 = getelementptr inbounds ptr, ptr %138, i64 %indvars.iv.next66.2
  %134 = load ptr, ptr %133, align 8, !tbaa !15
  %135 = getelementptr inbounds double, ptr %134, i64 %indvars.iv68
  %136 = load double, ptr %135, align 8, !tbaa !16
  %137 = call double @llvm.fmuladd.f64(double %136, double %136, double %132)
  %indvars.iv.next66.3 = add nuw nsw i64 %indvars.iv65, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.loopexit.unr-lcssa, label %116, !llvm.loop !26

.lr.ph34.us:                                      ; preds = %.preheader30.us
  %138 = load ptr, ptr %15, align 8, !tbaa !21
  %wide.trip.count = zext nneg i32 %100 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %139 = icmp ult i32 %100, 4
  br i1 %139, label %._crit_edge.us.loopexit.unr-lcssa, label %.lr.ph34.us.new

.lr.ph34.us.new:                                  ; preds = %.lr.ph34.us
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %116

.preheader31.us:                                  ; preds = %.lr.ph46, %.loopexit.us
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.loopexit.us ], [ 0, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store double 0.000000e+00, ptr %6, align 8, !tbaa !16
  %140 = load i32, ptr %14, align 8, !tbaa !14
  %141 = icmp sgt i32 %140, 0
  br i1 %141, label %.lr.ph.us, label %.loopexit.us

.lr.ph.us:                                        ; preds = %.preheader31.us, %.lr.ph.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.us ], [ 0, %.preheader31.us ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %142 = load ptr, ptr %15, align 8, !tbaa !21
  %143 = getelementptr inbounds ptr, ptr %142, i64 %indvars.iv
  %144 = load ptr, ptr %143, align 8, !tbaa !15
  %145 = getelementptr inbounds double, ptr %144, i64 %indvars.iv62
  %146 = load double, ptr %145, align 8, !tbaa !16
  %147 = call double @llvm.fabs.f64(double %146)
  store double %147, ptr %7, align 8, !tbaa !16
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %149 = load double, ptr %148, align 8, !tbaa !16
  store double %149, ptr %6, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %150 = load i32, ptr %14, align 8, !tbaa !14
  %151 = sext i32 %150 to i64
  %152 = icmp slt i64 %indvars.iv.next, %151
  br i1 %152, label %.lr.ph.us, label %.loopexit.us, !llvm.loop !27

.loopexit.us:                                     ; preds = %.lr.ph.us, %.preheader31.us
  %153 = phi double [ 0.000000e+00, %.preheader31.us ], [ %149, %.lr.ph.us ]
  %154 = trunc nuw nsw i64 %indvars.iv62 to i32
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %154, double noundef %153)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %155 = load i32, ptr %9, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = icmp slt i64 %indvars.iv.next63, %156
  br i1 %157, label %.preheader31.us, label %._crit_edge47, !llvm.loop !18

.lr.ph46.split:                                   ; preds = %.lr.ph46, %.lr.ph46.split
  %.043 = phi i32 [ %158, %.lr.ph46.split ], [ 0, %.lr.ph46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef 0, i32 noundef %.043, double noundef 0.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %158 = add nuw nsw i32 %.043, 1
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %.lr.ph46.split, label %._crit_edge47, !llvm.loop !18

161:                                              ; preds = %3
  %162 = landingpad { ptr, i32 }
          cleanup
  br label %165

163:                                              ; preds = %8
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %165

165:                                              ; preds = %163, %161
  %.pn = phi { ptr, i32 } [ %164, %163 ], [ %162, %161 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn

._crit_edge47:                                    ; preds = %.loopexit.us, %._crit_edge.us, %._crit_edge38.us, %._crit_edge42.us, %.lr.ph46.split, %11
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr, ptr, i32, i32) local_unnamed_addr

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass