; LLVM IR from moarseniy/CudaFEMproject :: FEMproject/matrix_pack/src/cpu_matrix.ll (ZN10CPU_Matrix11sort_by_keyER6Matrix)

; 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::multimap" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<float, std::pair<const float, float>, std::_Select1st<std::pair<const float, float>>, std::less<float>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<float, std::pair<const float, float>, std::_Select1st<std::pair<const float, float>>, std::less<float>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { float, float }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.Matrix = type <{ ptr, i32, [4 x i8], i64, i64, i64, ptr, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [100 x i8], align 1
@__FUNCTION__._ZN10CPU_Matrix11sort_by_keyER6Matrix = external hidden unnamed_addr constant [12 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare void @_Z10_my_assertbPKciS0_(i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef) #0

declare noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49)) #0

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

declare noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49)) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10CPU_Matrix11sort_by_keyER6Matrix(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 8 dereferenceable(49) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::multimap", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  %17 = getelementptr inbounds %class.Matrix, ptr %16, i32 0, i32 5
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = icmp ugt i64 %18, 0
  br i1 %19, label %20, label %26

20:                                               ; preds = %2
  %21 = getelementptr inbounds %class.Matrix, ptr %16, i32 0, i32 5
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49) %23)
  %25 = icmp eq i64 %22, %24
  br label %26

26:                                               ; preds = %20, %2
  %27 = phi i1 [ false, %2 ], [ %25, %20 ]
  call void @_Z10_my_assertbPKciS0_(i1 noundef zeroext %27, ptr noundef @.str, i32 noundef 190, ptr noundef @__FUNCTION__._ZN10CPU_Matrix11sort_by_keyER6Matrix)
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #4
  call void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !14
  br label %28

28:                                               ; preds = %51, %26
  %29 = load i32, ptr %6, align 4, !tbaa !14
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %class.Matrix, ptr %16, i32 0, i32 5
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %58

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = invoke noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %36)
          to label %38 unwind label %54

38:                                               ; preds = %35
  %39 = load i32, ptr %6, align 4, !tbaa !14
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds float, ptr %37, i64 %40
  %42 = getelementptr inbounds %class.Matrix, ptr %16, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  %44 = load i32, ptr %6, align 4, !tbaa !14
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds float, ptr %43, i64 %45
  invoke void @_ZNSt4pairIKffEC2IRfS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %47 unwind label %54

47:                                               ; preds = %38
  %48 = invoke ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %49 unwind label %54

49:                                               ; preds = %47
  %50 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %10, i32 0, i32 0
  store ptr %48, ptr %50, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %51

51:                                               ; preds = %49
  %52 = load i32, ptr %6, align 4, !tbaa !14
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !14
  br label %28, !llvm.loop !17

54:                                               ; preds = %47, %38, %35
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %94

58:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = call ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %59) #4
  %61 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = call ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %62) #4
  %64 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  br label %65

65:                                               ; preds = %87, %58
  %66 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKffEES5_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %93

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %69 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKffEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  store ptr %69, ptr %15, align 8, !tbaa !5
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = load float, ptr %71, align 4, !tbaa !20
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = invoke noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %73)
          to label %75 unwind label %89

75:                                               ; preds = %68
  %76 = load i64, ptr %11, align 8, !tbaa !19
  %77 = getelementptr inbounds float, ptr %74, i64 %76
  store float %72, ptr %77, align 4, !tbaa !23
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.std::pair", ptr %78, i32 0, i32 1
  %80 = load float, ptr %79, align 4, !tbaa !24
  %81 = getelementptr inbounds %class.Matrix, ptr %16, i32 0, i32 6
  %82 = load ptr, ptr %81, align 8, !tbaa !16
  %83 = load i64, ptr %11, align 8, !tbaa !19
  %84 = getelementptr inbounds float, ptr %82, i64 %83
  store float %80, ptr %84, align 4, !tbaa !23
  %85 = load i64, ptr %11, align 8, !tbaa !19
  %86 = add i64 %85, 1
  store i64 %86, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %87

87:                                               ; preds = %75
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKffEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br label %65

89:                                               ; preds = %68
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %94

93:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #4
  ret void

94:                                               ; preds = %89, %54
  call void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #4
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %8, align 8
  %97 = load i32, ptr %9, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIKffEC2IRfS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKffEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKffEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKffEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

attributes #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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, !12, i64 32}
!10 = !{!"_ZTS6Matrix", !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !6, i64 40, !13, i64 48}
!11 = !{!"_ZTS11DEVICE_NAME", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!10, !6, i64 40}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTSSt4pairIKffE", !22, i64 0, !22, i64 4}
!22 = !{!"float", !7, i64 0}
!23 = !{!22, !22, i64 0}
!24 = !{!21, !22, i64 4}


; 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::multimap" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<float, std::pair<const float, float>, std::_Select1st<std::pair<const float, float>>, std::less<float>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<float, std::pair<const float, float>, std::_Select1st<std::pair<const float, float>>, std::less<float>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { float, float }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [100 x i8], align 1
@__FUNCTION__._ZN10CPU_Matrix11sort_by_keyER6Matrix = external hidden unnamed_addr constant [12 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare void @_Z10_my_assertbPKciS0_(i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #0

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

declare noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10CPU_Matrix11sort_by_keyER6Matrix(ptr nocapture noundef nonnull readonly align 8 dereferenceable(49) %0, ptr noundef nonnull align 8 dereferenceable(49) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::multimap", align 8
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %12, label %9

9:                                                ; preds = %2
  %10 = tail call noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %11 = icmp eq i64 %8, %10
  br label %12

12:                                               ; preds = %9, %2
  %13 = phi i1 [ false, %2 ], [ %11, %9 ]
  tail call void @_Z10_my_assertbPKciS0_(i1 noundef zeroext %13, ptr noundef nonnull @.str, i32 noundef 190, ptr noundef nonnull @__FUNCTION__._ZN10CPU_Matrix11sort_by_keyER6Matrix)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #4
  call void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  %14 = load i64, ptr %7, align 8, !tbaa !5
  %.not27 = icmp eq i64 %14, 0
  br i1 %.not27, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  br label %20

._crit_edge:                                      ; preds = %27, %12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %16 = call ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  store ptr %16, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %17 = call ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  store ptr %17, ptr %6, align 8
  %18 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKffEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %18, label %.lr.ph25, label %._crit_edge26

.lr.ph25:                                         ; preds = %._crit_edge
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  br label %32

20:                                               ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %27 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %21 = invoke noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
          to label %22 unwind label %30

22:                                               ; preds = %20
  %23 = getelementptr inbounds float, ptr %21, i64 %indvars.iv
  %24 = load ptr, ptr %15, align 8, !tbaa !13
  %25 = getelementptr inbounds float, ptr %24, i64 %indvars.iv
  call void @_ZNSt4pairIKffEC2IRfS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %26 = invoke ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %27 unwind label %30

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i64, ptr %7, align 8, !tbaa !5
  %29 = icmp ugt i64 %28, %indvars.iv.next
  br i1 %29, label %20, label %._crit_edge, !llvm.loop !14

30:                                               ; preds = %22, %20
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %47

._crit_edge26:                                    ; preds = %36, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #4
  ret void

32:                                               ; preds = %.lr.ph25, %36
  %.01723 = phi i64 [ 0, %.lr.ph25 ], [ %42, %36 ]
  %33 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKffEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %34 = load float, ptr %33, align 4, !tbaa !16
  %35 = invoke noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
          to label %36 unwind label %45

36:                                               ; preds = %32
  %37 = getelementptr inbounds float, ptr %35, i64 %.01723
  store float %34, ptr %37, align 4, !tbaa !19
  %38 = getelementptr inbounds i8, ptr %33, i64 4
  %39 = load float, ptr %38, align 4, !tbaa !20
  %40 = load ptr, ptr %19, align 8, !tbaa !13
  %41 = getelementptr inbounds float, ptr %40, i64 %.01723
  store float %39, ptr %41, align 4, !tbaa !19
  %42 = add i64 %.01723, 1
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKffEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %44 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKffEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %44, label %32, label %._crit_edge26

45:                                               ; preds = %32
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %47

47:                                               ; preds = %45, %30
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %46, %45 ]
  call void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE6insertEOS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIKffEC2IRfS3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKffEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKffEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKffEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multimapIffSt4lessIfESaISt4pairIKffEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

attributes #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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, !10, i64 32}
!6 = !{!"_ZTS6Matrix", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !11, i64 40, !12, i64 48}
!7 = !{!"_ZTS11DEVICE_NAME", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!6, !11, i64 40}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTSSt4pairIKffE", !18, i64 0, !18, i64 4}
!18 = !{!"float", !8, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{!17, !18, i64 4}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass