; LLVM IR from 4N1Z/Sorting-Searching-Algorithms :: Sorting/Bucket-Sort/in_C++.ll (Z10BucketSortPi)

; 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 }
%struct.Node = type { i32, ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10BucketSortPi(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %11 = call noalias ptr @malloc(i64 noundef 48) #8
  store ptr %11, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %20, %1
  %13 = load i32, ptr %3, align 4, !tbaa !9
  %14 = icmp slt i32 %13, 6
  br i1 %14, label %15, label %23

15:                                               ; preds = %12
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds ptr, ptr %16, i64 %18
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %15
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %3, align 4, !tbaa !9
  br label %12, !llvm.loop !11

23:                                               ; preds = %12
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %54, %23
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = icmp slt i32 %25, 7
  br i1 %26, label %27, label %57

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %28, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = call noundef i32 @_Z14getBucketIndexi(i32 noundef %32)
  store i32 %33, ptr %7, align 4, !tbaa !9
  %34 = call noalias ptr @malloc(i64 noundef 16) #8
  store ptr %34, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = load i32, ptr %3, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %35, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Node, ptr %40, i32 0, i32 0
  store i32 %39, ptr %41, align 8, !tbaa !13
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Node, ptr %47, i32 0, i32 1
  store ptr %46, ptr %48, align 8, !tbaa !15
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = load i32, ptr %7, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds ptr, ptr %50, i64 %52
  store ptr %49, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %54

54:                                               ; preds = %27
  %55 = load i32, ptr %3, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %3, align 4, !tbaa !9
  br label %24, !llvm.loop !16

57:                                               ; preds = %24
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %72, %57
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 6
  br i1 %60, label %61, label %75

61:                                               ; preds = %58
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %62, i32 noundef %63)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @.str.1)
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  call void @_Z12printBucketsP4Node(ptr noundef %70)
  %71 = 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 %72

72:                                               ; preds = %61
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %3, align 4, !tbaa !9
  br label %58, !llvm.loop !17

75:                                               ; preds = %58
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %90, %75
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = icmp slt i32 %77, 6
  br i1 %78, label %79, label %93

79:                                               ; preds = %76
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = load i32, ptr %3, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %84)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = load i32, ptr %3, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %86, i64 %88
  store ptr %85, ptr %89, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %79
  %91 = load i32, ptr %3, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %3, align 4, !tbaa !9
  br label %76, !llvm.loop !18

93:                                               ; preds = %76
  %94 = 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)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %112, %93
  %99 = load i32, ptr %3, align 4, !tbaa !9
  %100 = icmp slt i32 %99, 6
  br i1 %100, label %101, label %115

101:                                              ; preds = %98
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %103 = load i32, ptr %3, align 4, !tbaa !9
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %102, i32 noundef %103)
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef @.str.1)
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = load i32, ptr %3, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %106, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  call void @_Z12printBucketsP4Node(ptr noundef %110)
  %111 = 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 %112

112:                                              ; preds = %101
  %113 = load i32, ptr %3, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %3, align 4, !tbaa !9
  br label %98, !llvm.loop !19

115:                                              ; preds = %98
  store i32 0, ptr %4, align 4, !tbaa !9
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %141, %115
  %117 = load i32, ptr %3, align 4, !tbaa !9
  %118 = icmp slt i32 %117, 6
  br i1 %118, label %119, label %144

119:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load i32, ptr %3, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  store ptr %124, ptr %8, align 8, !tbaa !5
  br label %125

125:                                              ; preds = %128, %119
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %140

128:                                              ; preds = %125
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.Node, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 8, !tbaa !13
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = load i32, ptr %4, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %4, align 4, !tbaa !9
  %135 = sext i32 %133 to i64
  %136 = getelementptr inbounds i32, ptr %132, i64 %135
  store i32 %131, ptr %136, align 4, !tbaa !9
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.Node, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !15
  store ptr %139, ptr %8, align 8, !tbaa !5
  br label %125, !llvm.loop !20

140:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %3, align 4, !tbaa !9
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %3, align 4, !tbaa !9
  br label %116, !llvm.loop !21

144:                                              ; preds = %116
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %164, %144
  %146 = load i32, ptr %3, align 4, !tbaa !9
  %147 = icmp slt i32 %146, 6
  br i1 %147, label %148, label %167

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = load i32, ptr %3, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  store ptr %153, ptr %9, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %157, %148
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %163

157:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %158, ptr %10, align 8, !tbaa !5
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.Node, ptr %159, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !15
  store ptr %161, ptr %9, align 8, !tbaa !5
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %162) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %154, !llvm.loop !22

163:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %3, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %3, align 4, !tbaa !9
  br label %145, !llvm.loop !23

167:                                              ; preds = %145
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %168) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  ret void
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14getBucketIndexi(i32 noundef) #3

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12printBucketsP4Node(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z13InsertionSortP4Node(ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS4Node", !10, i64 0, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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

%"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 [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10BucketSortPi(ptr nocapture noundef %0) local_unnamed_addr #0 {
.preheader58.preheader:
  %calloc = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %1 = load i32, ptr %0, align 4, !tbaa !5
  %2 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %1)
  %3 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %4 = load i32, ptr %0, align 4, !tbaa !5
  store i32 %4, ptr %3, align 8, !tbaa !9
  %5 = sext i32 %2 to i64
  %6 = getelementptr inbounds ptr, ptr %calloc, i64 %5
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %7, ptr %8, align 8, !tbaa !13
  store ptr %3, ptr %6, align 8, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %10)
  %12 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %13 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %13, ptr %12, align 8, !tbaa !9
  %14 = sext i32 %11 to i64
  %15 = getelementptr inbounds ptr, ptr %calloc, i64 %14
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %16, ptr %17, align 8, !tbaa !13
  store ptr %12, ptr %15, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %19)
  %21 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %22 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %22, ptr %21, align 8, !tbaa !9
  %23 = sext i32 %20 to i64
  %24 = getelementptr inbounds ptr, ptr %calloc, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %21, i64 8
  store ptr %25, ptr %26, align 8, !tbaa !13
  store ptr %21, ptr %24, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %0, i64 12
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %28)
  %30 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %31 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %31, ptr %30, align 8, !tbaa !9
  %32 = sext i32 %29 to i64
  %33 = getelementptr inbounds ptr, ptr %calloc, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %30, i64 8
  store ptr %34, ptr %35, align 8, !tbaa !13
  store ptr %30, ptr %33, align 8, !tbaa !12
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %37)
  %39 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %40 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %40, ptr %39, align 8, !tbaa !9
  %41 = sext i32 %38 to i64
  %42 = getelementptr inbounds ptr, ptr %calloc, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %39, i64 8
  store ptr %43, ptr %44, align 8, !tbaa !13
  store ptr %39, ptr %42, align 8, !tbaa !12
  %45 = getelementptr inbounds i8, ptr %0, i64 20
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %46)
  %48 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %49 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %49, ptr %48, align 8, !tbaa !9
  %50 = sext i32 %47 to i64
  %51 = getelementptr inbounds ptr, ptr %calloc, i64 %50
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %48, i64 8
  store ptr %52, ptr %53, align 8, !tbaa !13
  store ptr %48, ptr %51, align 8, !tbaa !12
  %54 = getelementptr inbounds i8, ptr %0, i64 24
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = tail call noundef i32 @_Z14getBucketIndexi(i32 noundef %55)
  %57 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7
  %58 = load i32, ptr %54, align 4, !tbaa !5
  store i32 %58, ptr %57, align 8, !tbaa !9
  %59 = sext i32 %56 to i64
  %60 = getelementptr inbounds ptr, ptr %calloc, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !12
  %62 = getelementptr inbounds i8, ptr %57, i64 8
  store ptr %61, ptr %62, align 8, !tbaa !13
  store ptr %57, ptr %60, align 8, !tbaa !12
  %63 = 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)
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef 0)
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @.str.1)
  %66 = load ptr, ptr %calloc, align 8, !tbaa !12
  tail call void @_Z12printBucketsP4Node(ptr noundef %66)
  %67 = 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_)
  %68 = 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)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef 1)
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.1)
  %71 = getelementptr inbounds i8, ptr %calloc, i64 8
  %72 = load ptr, ptr %71, align 8, !tbaa !12
  tail call void @_Z12printBucketsP4Node(ptr noundef %72)
  %73 = 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_)
  %74 = 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)
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef 2)
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @.str.1)
  %77 = getelementptr inbounds i8, ptr %calloc, i64 16
  %78 = load ptr, ptr %77, align 8, !tbaa !12
  tail call void @_Z12printBucketsP4Node(ptr noundef %78)
  %79 = 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_)
  %80 = 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)
  %81 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %80, i32 noundef 3)
  %82 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull @.str.1)
  %83 = getelementptr inbounds i8, ptr %calloc, i64 24
  %84 = load ptr, ptr %83, align 8, !tbaa !12
  tail call void @_Z12printBucketsP4Node(ptr noundef %84)
  %85 = 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_)
  %86 = 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)
  %87 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %86, i32 noundef 4)
  %88 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull @.str.1)
  %89 = getelementptr inbounds i8, ptr %calloc, i64 32
  %90 = load ptr, ptr %89, align 8, !tbaa !12
  tail call void @_Z12printBucketsP4Node(ptr noundef %90)
  %91 = 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_)
  %92 = 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)
  %93 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %92, i32 noundef 5)
  %94 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @.str.1)
  %95 = getelementptr inbounds i8, ptr %calloc, i64 40
  %96 = load ptr, ptr %95, align 8, !tbaa !12
  tail call void @_Z12printBucketsP4Node(ptr noundef %96)
  %97 = 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_)
  %98 = tail call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %66)
  store ptr %98, ptr %calloc, align 8, !tbaa !12
  %99 = tail call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %72)
  store ptr %99, ptr %71, align 8, !tbaa !12
  %100 = tail call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %78)
  store ptr %100, ptr %77, align 8, !tbaa !12
  %101 = tail call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %84)
  store ptr %101, ptr %83, align 8, !tbaa !12
  %102 = tail call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %90)
  store ptr %102, ptr %89, align 8, !tbaa !12
  %103 = tail call noundef ptr @_Z13InsertionSortP4Node(ptr noundef %96)
  store ptr %103, ptr %95, align 8, !tbaa !12
  %104 = 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)
  %105 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %106 = 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.3)
  %107 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %108 = 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)
  %109 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %108, i32 noundef 0)
  %110 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull @.str.1)
  tail call void @_Z12printBucketsP4Node(ptr noundef %98)
  %111 = 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_)
  %112 = 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)
  %113 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %112, i32 noundef 1)
  %114 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull @.str.1)
  tail call void @_Z12printBucketsP4Node(ptr noundef %99)
  %115 = 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_)
  %116 = 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)
  %117 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %116, i32 noundef 2)
  %118 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @.str.1)
  tail call void @_Z12printBucketsP4Node(ptr noundef %100)
  %119 = 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_)
  %120 = 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)
  %121 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %120, i32 noundef 3)
  %122 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @.str.1)
  tail call void @_Z12printBucketsP4Node(ptr noundef %101)
  %123 = 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_)
  %124 = 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)
  %125 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %124, i32 noundef 4)
  %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.1)
  tail call void @_Z12printBucketsP4Node(ptr noundef %102)
  %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 = 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)
  %129 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %128, i32 noundef 5)
  %130 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %129, ptr noundef nonnull @.str.1)
  tail call void @_Z12printBucketsP4Node(ptr noundef %103)
  %131 = 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_)
  %.not5465 = icmp eq ptr %98, null
  br i1 %.not5465, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader58.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader58.preheader ]
  %.05167 = phi ptr [ %.051, %.lr.ph ], [ %98, %.preheader58.preheader ]
  %132 = load i32, ptr %.05167, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %133 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  store i32 %132, ptr %133, align 4, !tbaa !5
  %134 = getelementptr inbounds i8, ptr %.05167, i64 8
  %.051 = load ptr, ptr %134, align 8, !tbaa !12
  %.not54 = icmp eq ptr %.051, null
  br i1 %.not54, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %135 = trunc nsw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader58.preheader
  %.153.lcssa = phi i32 [ 0, %.preheader58.preheader ], [ %135, %._crit_edge.loopexit ]
  %.not5465.1 = icmp eq ptr %99, null
  br i1 %.not5465.1, label %._crit_edge.1, label %.lr.ph.preheader.1

.lr.ph.preheader.1:                               ; preds = %._crit_edge
  %136 = sext i32 %.153.lcssa to i64
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph.1, %.lr.ph.preheader.1
  %indvars.iv.1 = phi i64 [ %136, %.lr.ph.preheader.1 ], [ %indvars.iv.next.1, %.lr.ph.1 ]
  %.05167.1 = phi ptr [ %99, %.lr.ph.preheader.1 ], [ %.051.1, %.lr.ph.1 ]
  %137 = load i32, ptr %.05167.1, align 8, !tbaa !9
  %indvars.iv.next.1 = add nsw i64 %indvars.iv.1, 1
  %138 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.1
  store i32 %137, ptr %138, align 4, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %.05167.1, i64 8
  %.051.1 = load ptr, ptr %139, align 8, !tbaa !12
  %.not54.1 = icmp eq ptr %.051.1, null
  br i1 %.not54.1, label %._crit_edge.loopexit.1, label %.lr.ph.1, !llvm.loop !14

._crit_edge.loopexit.1:                           ; preds = %.lr.ph.1
  %140 = trunc nsw i64 %indvars.iv.next.1 to i32
  br label %._crit_edge.1

._crit_edge.1:                                    ; preds = %._crit_edge.loopexit.1, %._crit_edge
  %.153.lcssa.1 = phi i32 [ %.153.lcssa, %._crit_edge ], [ %140, %._crit_edge.loopexit.1 ]
  %.not5465.2 = icmp eq ptr %100, null
  br i1 %.not5465.2, label %._crit_edge.2, label %.lr.ph.preheader.2

.lr.ph.preheader.2:                               ; preds = %._crit_edge.1
  %141 = sext i32 %.153.lcssa.1 to i64
  br label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.lr.ph.2, %.lr.ph.preheader.2
  %indvars.iv.2 = phi i64 [ %141, %.lr.ph.preheader.2 ], [ %indvars.iv.next.2, %.lr.ph.2 ]
  %.05167.2 = phi ptr [ %100, %.lr.ph.preheader.2 ], [ %.051.2, %.lr.ph.2 ]
  %142 = load i32, ptr %.05167.2, align 8, !tbaa !9
  %indvars.iv.next.2 = add nsw i64 %indvars.iv.2, 1
  %143 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.2
  store i32 %142, ptr %143, align 4, !tbaa !5
  %144 = getelementptr inbounds i8, ptr %.05167.2, i64 8
  %.051.2 = load ptr, ptr %144, align 8, !tbaa !12
  %.not54.2 = icmp eq ptr %.051.2, null
  br i1 %.not54.2, label %._crit_edge.loopexit.2, label %.lr.ph.2, !llvm.loop !14

._crit_edge.loopexit.2:                           ; preds = %.lr.ph.2
  %145 = trunc nsw i64 %indvars.iv.next.2 to i32
  br label %._crit_edge.2

._crit_edge.2:                                    ; preds = %._crit_edge.loopexit.2, %._crit_edge.1
  %.153.lcssa.2 = phi i32 [ %.153.lcssa.1, %._crit_edge.1 ], [ %145, %._crit_edge.loopexit.2 ]
  %.not5465.3 = icmp eq ptr %101, null
  br i1 %.not5465.3, label %._crit_edge.3, label %.lr.ph.preheader.3

.lr.ph.preheader.3:                               ; preds = %._crit_edge.2
  %146 = sext i32 %.153.lcssa.2 to i64
  br label %.lr.ph.3

.lr.ph.3:                                         ; preds = %.lr.ph.3, %.lr.ph.preheader.3
  %indvars.iv.3 = phi i64 [ %146, %.lr.ph.preheader.3 ], [ %indvars.iv.next.3, %.lr.ph.3 ]
  %.05167.3 = phi ptr [ %101, %.lr.ph.preheader.3 ], [ %.051.3, %.lr.ph.3 ]
  %147 = load i32, ptr %.05167.3, align 8, !tbaa !9
  %indvars.iv.next.3 = add nsw i64 %indvars.iv.3, 1
  %148 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.3
  store i32 %147, ptr %148, align 4, !tbaa !5
  %149 = getelementptr inbounds i8, ptr %.05167.3, i64 8
  %.051.3 = load ptr, ptr %149, align 8, !tbaa !12
  %.not54.3 = icmp eq ptr %.051.3, null
  br i1 %.not54.3, label %._crit_edge.loopexit.3, label %.lr.ph.3, !llvm.loop !14

._crit_edge.loopexit.3:                           ; preds = %.lr.ph.3
  %150 = trunc nsw i64 %indvars.iv.next.3 to i32
  br label %._crit_edge.3

._crit_edge.3:                                    ; preds = %._crit_edge.loopexit.3, %._crit_edge.2
  %.153.lcssa.3 = phi i32 [ %.153.lcssa.2, %._crit_edge.2 ], [ %150, %._crit_edge.loopexit.3 ]
  %.not5465.4 = icmp eq ptr %102, null
  br i1 %.not5465.4, label %._crit_edge.4, label %.lr.ph.preheader.4

.lr.ph.preheader.4:                               ; preds = %._crit_edge.3
  %151 = sext i32 %.153.lcssa.3 to i64
  br label %.lr.ph.4

.lr.ph.4:                                         ; preds = %.lr.ph.4, %.lr.ph.preheader.4
  %indvars.iv.4 = phi i64 [ %151, %.lr.ph.preheader.4 ], [ %indvars.iv.next.4, %.lr.ph.4 ]
  %.05167.4 = phi ptr [ %102, %.lr.ph.preheader.4 ], [ %.051.4, %.lr.ph.4 ]
  %152 = load i32, ptr %.05167.4, align 8, !tbaa !9
  %indvars.iv.next.4 = add nsw i64 %indvars.iv.4, 1
  %153 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.4
  store i32 %152, ptr %153, align 4, !tbaa !5
  %154 = getelementptr inbounds i8, ptr %.05167.4, i64 8
  %.051.4 = load ptr, ptr %154, align 8, !tbaa !12
  %.not54.4 = icmp eq ptr %.051.4, null
  br i1 %.not54.4, label %._crit_edge.loopexit.4, label %.lr.ph.4, !llvm.loop !14

._crit_edge.loopexit.4:                           ; preds = %.lr.ph.4
  %155 = trunc nsw i64 %indvars.iv.next.4 to i32
  br label %._crit_edge.4

._crit_edge.4:                                    ; preds = %._crit_edge.loopexit.4, %._crit_edge.3
  %.153.lcssa.4 = phi i32 [ %.153.lcssa.3, %._crit_edge.3 ], [ %155, %._crit_edge.loopexit.4 ]
  %.not5465.5 = icmp eq ptr %103, null
  br i1 %.not5465.5, label %._crit_edge.5, label %.lr.ph.preheader.5

.lr.ph.preheader.5:                               ; preds = %._crit_edge.4
  %156 = sext i32 %.153.lcssa.4 to i64
  br label %.lr.ph.5

.lr.ph.5:                                         ; preds = %.lr.ph.5, %.lr.ph.preheader.5
  %indvars.iv.5 = phi i64 [ %156, %.lr.ph.preheader.5 ], [ %indvars.iv.next.5, %.lr.ph.5 ]
  %.05167.5 = phi ptr [ %103, %.lr.ph.preheader.5 ], [ %.051.5, %.lr.ph.5 ]
  %157 = load i32, ptr %.05167.5, align 8, !tbaa !9
  %indvars.iv.next.5 = add nsw i64 %indvars.iv.5, 1
  %158 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.5
  store i32 %157, ptr %158, align 4, !tbaa !5
  %159 = getelementptr inbounds i8, ptr %.05167.5, i64 8
  %.051.5 = load ptr, ptr %159, align 8, !tbaa !12
  %.not54.5 = icmp eq ptr %.051.5, null
  br i1 %.not54.5, label %._crit_edge.5, label %.lr.ph.5, !llvm.loop !14

._crit_edge.5:                                    ; preds = %.lr.ph.5, %._crit_edge.4
  br i1 %.not5465, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %._crit_edge.5, %.lr.ph73
  %.05071 = phi ptr [ %161, %.lr.ph73 ], [ %98, %._crit_edge.5 ]
  %160 = getelementptr inbounds i8, ptr %.05071, i64 8
  %161 = load ptr, ptr %160, align 8, !tbaa !13
  tail call void @free(ptr noundef nonnull %.05071) #8
  %.not = icmp eq ptr %161, null
  br i1 %.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !16

._crit_edge74:                                    ; preds = %.lr.ph73, %._crit_edge.5
  br i1 %.not5465.1, label %._crit_edge74.1, label %.lr.ph73.1

.lr.ph73.1:                                       ; preds = %._crit_edge74, %.lr.ph73.1
  %.05071.1 = phi ptr [ %163, %.lr.ph73.1 ], [ %99, %._crit_edge74 ]
  %162 = getelementptr inbounds i8, ptr %.05071.1, i64 8
  %163 = load ptr, ptr %162, align 8, !tbaa !13
  tail call void @free(ptr noundef nonnull %.05071.1) #8
  %.not.1 = icmp eq ptr %163, null
  br i1 %.not.1, label %._crit_edge74.1, label %.lr.ph73.1, !llvm.loop !16

._crit_edge74.1:                                  ; preds = %.lr.ph73.1, %._crit_edge74
  br i1 %.not5465.2, label %._crit_edge74.2, label %.lr.ph73.2

.lr.ph73.2:                                       ; preds = %._crit_edge74.1, %.lr.ph73.2
  %.05071.2 = phi ptr [ %165, %.lr.ph73.2 ], [ %100, %._crit_edge74.1 ]
  %164 = getelementptr inbounds i8, ptr %.05071.2, i64 8
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  tail call void @free(ptr noundef nonnull %.05071.2) #8
  %.not.2 = icmp eq ptr %165, null
  br i1 %.not.2, label %._crit_edge74.2, label %.lr.ph73.2, !llvm.loop !16

._crit_edge74.2:                                  ; preds = %.lr.ph73.2, %._crit_edge74.1
  br i1 %.not5465.3, label %._crit_edge74.3, label %.lr.ph73.3

.lr.ph73.3:                                       ; preds = %._crit_edge74.2, %.lr.ph73.3
  %.05071.3 = phi ptr [ %167, %.lr.ph73.3 ], [ %101, %._crit_edge74.2 ]
  %166 = getelementptr inbounds i8, ptr %.05071.3, i64 8
  %167 = load ptr, ptr %166, align 8, !tbaa !13
  tail call void @free(ptr noundef nonnull %.05071.3) #8
  %.not.3 = icmp eq ptr %167, null
  br i1 %.not.3, label %._crit_edge74.3, label %.lr.ph73.3, !llvm.loop !16

._crit_edge74.3:                                  ; preds = %.lr.ph73.3, %._crit_edge74.2
  br i1 %.not5465.4, label %._crit_edge74.4, label %.lr.ph73.4

.lr.ph73.4:                                       ; preds = %._crit_edge74.3, %.lr.ph73.4
  %.05071.4 = phi ptr [ %169, %.lr.ph73.4 ], [ %102, %._crit_edge74.3 ]
  %168 = getelementptr inbounds i8, ptr %.05071.4, i64 8
  %169 = load ptr, ptr %168, align 8, !tbaa !13
  tail call void @free(ptr noundef nonnull %.05071.4) #8
  %.not.4 = icmp eq ptr %169, null
  br i1 %.not.4, label %._crit_edge74.4, label %.lr.ph73.4, !llvm.loop !16

._crit_edge74.4:                                  ; preds = %.lr.ph73.4, %._crit_edge74.3
  br i1 %.not5465.5, label %._crit_edge74.5, label %.lr.ph73.5

.lr.ph73.5:                                       ; preds = %._crit_edge74.4, %.lr.ph73.5
  %.05071.5 = phi ptr [ %171, %.lr.ph73.5 ], [ %103, %._crit_edge74.4 ]
  %170 = getelementptr inbounds i8, ptr %.05071.5, i64 8
  %171 = load ptr, ptr %170, align 8, !tbaa !13
  tail call void @free(ptr noundef nonnull %.05071.5) #8
  %.not.5 = icmp eq ptr %171, null
  br i1 %.not.5, label %._crit_edge74.5, label %.lr.ph73.5, !llvm.loop !16

._crit_edge74.5:                                  ; preds = %.lr.ph73.5, %._crit_edge74.4
  tail call void @free(ptr noundef %calloc) #8
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14getBucketIndexi(i32 noundef) local_unnamed_addr #2

; 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 #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12printBucketsP4Node(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 #0 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)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z13InsertionSortP4Node(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #6

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { 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, !6, i64 0}
!10 = !{!"_ZTS4Node", !6, i64 0, !11, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass