; LLVM IR from keroro824/HashingDeepLearning :: SLIDE/DensifiedMinhash.ll (ZN16DensifiedMinhash7getHashEPiPfS0_i)

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN16DensifiedMinhash17getRandDoubleHashEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #4 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN16DensifiedMinhash7getHashEPiPfS0_i(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #6 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  %22 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %23 = getelementptr inbounds %class.DensifiedMinhash, ptr %22, i32 0, i32 2
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = sext i32 %24 to i64
  %26 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %25, i64 4)
  %27 = extractvalue { i64, i1 } %26, 1
  %28 = extractvalue { i64, i1 } %26, 0
  %29 = select i1 %27, i64 -1, i64 %28
  %30 = call noalias noundef nonnull ptr @_Znam(i64 noundef %29) #8
  store ptr %30, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %31 = getelementptr inbounds %class.DensifiedMinhash, ptr %22, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  %34 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %33, i64 4)
  %35 = extractvalue { i64, i1 } %34, 1
  %36 = extractvalue { i64, i1 } %34, 0
  %37 = select i1 %35, i64 -1, i64 %36
  %38 = call noalias noundef nonnull ptr @_Znam(i64 noundef %37) #8
  store ptr %38, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %50, %5
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = getelementptr inbounds %class.DensifiedMinhash, ptr %22, i32 0, i32 2
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %53

45:                                               ; preds = %39
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %46, i64 %48
  store i32 -2147483648, ptr %49, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %45
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %13, align 4, !tbaa !9
  br label %39, !llvm.loop !13

53:                                               ; preds = %44
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %53
  br label %57

57:                                               ; preds = %56, %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %95, %57
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %98

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load i32, ptr %14, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %64, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  store i32 %72, ptr %15, align 4, !tbaa !9
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load i32, ptr %15, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %78, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = icmp slt i32 %77, %82
  br i1 %83, label %84, label %94

84:                                               ; preds = %63
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = load i32, ptr %14, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %85, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = load i32, ptr %15, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  store i32 %89, ptr %93, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %84, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %14, align 4, !tbaa !9
  br label %58, !llvm.loop !15

98:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %157, %98
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = getelementptr inbounds %class.DensifiedMinhash, ptr %22, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = icmp slt i32 %100, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %99
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %160

105:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = load i32, ptr %16, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !9
  store i32 %110, ptr %18, align 4, !tbaa !9
  %111 = load i32, ptr %18, align 4, !tbaa !9
  %112 = icmp ne i32 %111, -2147483648
  br i1 %112, label %113, label %123

113:                                              ; preds = %105
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = load i32, ptr %16, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i32, ptr %114, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !9
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = load i32, ptr %16, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %119, i64 %121
  store i32 %118, ptr %122, align 4, !tbaa !9
  store i32 10, ptr %17, align 4
  br label %154

123:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %147, %123
  %125 = load i32, ptr %18, align 4, !tbaa !9
  %126 = icmp eq i32 %125, -2147483648
  br i1 %126, label %127, label %148

127:                                              ; preds = %124
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %130 = load i32, ptr %16, align 4, !tbaa !9
  %131 = load i32, ptr %19, align 4, !tbaa !9
  %132 = call noundef i32 @_ZN16DensifiedMinhash17getRandDoubleHashEii(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef %130, i32 noundef %131)
  store i32 %132, ptr %21, align 4, !tbaa !9
  %133 = getelementptr inbounds %class.DensifiedMinhash, ptr %22, i32 0, i32 2
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %133)
  %135 = load i32, ptr %134, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  store i32 %135, ptr %20, align 4, !tbaa !9
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = load i32, ptr %20, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !9
  store i32 %140, ptr %18, align 4, !tbaa !9
  %141 = load i32, ptr %19, align 4, !tbaa !9
  %142 = icmp sgt i32 %141, 100
  br i1 %142, label %143, label %144

143:                                              ; preds = %127
  store i32 12, ptr %17, align 4
  br label %145

144:                                              ; preds = %127
  store i32 0, ptr %17, align 4
  br label %145

145:                                              ; preds = %144, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  %146 = load i32, ptr %17, align 4
  switch i32 %146, label %166 [
    i32 0, label %147
    i32 12, label %148
  ]

147:                                              ; preds = %145
  br label %124, !llvm.loop !16

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

154:                                              ; preds = %148, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %155 = load i32, ptr %17, align 4
  switch i32 %155, label %166 [
    i32 0, label %156
    i32 10, label %157
  ]

156:                                              ; preds = %154
  br label %157

157:                                              ; preds = %156, %154
  %158 = load i32, ptr %16, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %16, align 4, !tbaa !9
  br label %99, !llvm.loop !17

160:                                              ; preds = %104
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = icmp eq ptr %161, null
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  call void @_ZdaPv(ptr noundef %161) #9
  br label %164

164:                                              ; preds = %163, %160
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  ret ptr %165

166:                                              ; preds = %154, %145
  unreachable
}

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

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

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


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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noalias noundef nonnull ptr @_ZN16DensifiedMinhash7getHashEPiPfS0_i(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readnone %2, ptr nocapture noundef readonly %3, i32 noundef %4) local_unnamed_addr #5 align 2 {
  %6 = alloca i32, align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = icmp slt i32 %8, 0
  %11 = shl nsw i64 %9, 2
  %12 = select i1 %10, i64 -1, i64 %11
  %13 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %12) #6
  %14 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %12) #6
  %15 = icmp sgt i32 %8, 0
  br i1 %15, label %.lr.ph.preheader, label %.preheader50

.lr.ph.preheader:                                 ; preds = %5
  %wide.trip.count = zext nneg i32 %8 to i64
  %min.iters.check = icmp ult i32 %8, 8
  br i1 %min.iters.check, label %.lr.ph.preheader66, label %vector.ph

.lr.ph.preheader66:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %16 = getelementptr inbounds i32, ptr %13, i64 %index
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  store <4 x i32> <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, ptr %16, align 4, !tbaa !11
  store <4 x i32> <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, ptr %17, align 4, !tbaa !11
  %index.next = add nuw i64 %index, 8
  %18 = icmp eq i64 %index.next, %n.vec
  br i1 %18, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader50, label %.lr.ph.preheader66

.preheader50:                                     ; preds = %.lr.ph, %middle.block, %5
  %19 = icmp sgt i32 %4, 0
  br i1 %19, label %.lr.ph53.preheader, label %.preheader49

.lr.ph53.preheader:                               ; preds = %.preheader50
  %wide.trip.count60 = zext nneg i32 %4 to i64
  %xtraiter = and i64 %wide.trip.count60, 1
  %20 = icmp eq i32 %4, 1
  br i1 %20, label %.preheader49.loopexit.unr-lcssa, label %.lr.ph53.preheader.new

.lr.ph53.preheader.new:                           ; preds = %.lr.ph53.preheader
  %unroll_iter = and i64 %wide.trip.count60, 2147483646
  br label %.lr.ph53

.lr.ph:                                           ; preds = %.lr.ph.preheader66, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader66 ]
  %21 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv
  store i32 -2147483648, ptr %21, align 4, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader50, label %.lr.ph, !llvm.loop !16

.preheader49.loopexit.unr-lcssa:                  ; preds = %52, %.lr.ph53.preheader
  %indvars.iv57.unr = phi i64 [ 0, %.lr.ph53.preheader ], [ %indvars.iv.next58.1, %52 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader49, label %.lr.ph53.epil

.lr.ph53.epil:                                    ; preds = %.preheader49.loopexit.unr-lcssa
  %22 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv57.unr
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr %3, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr %13, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = icmp slt i32 %29, %23
  br i1 %30, label %31, label %.preheader49

31:                                               ; preds = %.lr.ph53.epil
  store i32 %23, ptr %28, align 4, !tbaa !11
  br label %.preheader49

.preheader49:                                     ; preds = %.preheader49.loopexit.unr-lcssa, %31, %.lr.ph53.epil, %.preheader50
  br i1 %15, label %.lr.ph55, label %._crit_edge

.lr.ph53:                                         ; preds = %52, %.lr.ph53.preheader.new
  %indvars.iv57 = phi i64 [ 0, %.lr.ph53.preheader.new ], [ %indvars.iv.next58.1, %52 ]
  %niter = phi i64 [ 0, %.lr.ph53.preheader.new ], [ %niter.next.1, %52 ]
  %32 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv57
  %33 = load i32, ptr %32, align 4, !tbaa !11
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %3, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !11
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %13, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = icmp slt i32 %39, %33
  br i1 %40, label %41, label %.lr.ph53.1

41:                                               ; preds = %.lr.ph53
  store i32 %33, ptr %38, align 4, !tbaa !11
  br label %.lr.ph53.1

.lr.ph53.1:                                       ; preds = %41, %.lr.ph53
  %indvars.iv.next58 = or disjoint i64 %indvars.iv57, 1
  %42 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv.next58
  %43 = load i32, ptr %42, align 4, !tbaa !11
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %3, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !11
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %13, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = icmp slt i32 %49, %43
  br i1 %50, label %51, label %52

51:                                               ; preds = %.lr.ph53.1
  store i32 %43, ptr %48, align 4, !tbaa !11
  br label %52

52:                                               ; preds = %51, %.lr.ph53.1
  %indvars.iv.next58.1 = add nuw nsw i64 %indvars.iv57, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader49.loopexit.unr-lcssa, label %.lr.ph53, !llvm.loop !17

.lr.ph55:                                         ; preds = %.preheader49, %70
  %53 = phi i32 [ %71, %70 ], [ %8, %.preheader49 ]
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %70 ], [ 0, %.preheader49 ]
  %54 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv63
  %55 = load i32, ptr %54, align 4, !tbaa !11
  %.not = icmp eq i32 %55, -2147483648
  br i1 %.not, label %.preheader.preheader, label %57

.preheader.preheader:                             ; preds = %.lr.ph55
  %56 = trunc nuw nsw i64 %indvars.iv63 to i32
  br label %.preheader

57:                                               ; preds = %.lr.ph55
  %58 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv63
  store i32 %55, ptr %58, align 4, !tbaa !11
  br label %70

.preheader:                                       ; preds = %.preheader.preheader, %60
  %.042 = phi i32 [ %67, %60 ], [ -2147483648, %.preheader.preheader ]
  %.041 = phi i32 [ %61, %60 ], [ 0, %.preheader.preheader ]
  %59 = icmp eq i32 %.042, -2147483648
  br i1 %59, label %60, label %68

60:                                               ; preds = %.preheader
  %61 = add nuw nsw i32 %.041, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %62 = call noundef i32 @_ZN16DensifiedMinhash17getRandDoubleHashEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %56, i32 noundef %61)
  store i32 %62, ptr %6, align 4, !tbaa !11
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %64 = load i32, ptr %63, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %13, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %exitcond62 = icmp eq i32 %61, 101
  br i1 %exitcond62, label %68, label %.preheader

68:                                               ; preds = %60, %.preheader
  %.1 = phi i32 [ %67, %60 ], [ %.042, %.preheader ]
  %69 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv63
  store i32 %.1, ptr %69, align 4, !tbaa !11
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %68, %57
  %71 = phi i32 [ %.pre, %68 ], [ %53, %57 ]
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next64, %72
  br i1 %73, label %.lr.ph55, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %70, %.preheader49
  call void @_ZdaPv(ptr noundef nonnull %13) #8
  ret ptr %14
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin 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 #2 = { 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 #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 = { nobuiltin 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 = { 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 #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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 12}
!6 = !{!"_ZTS16DensifiedMinhash", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13, !14, !15}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !13, !15, !14}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass