; LLVM IR from keroro824/HashingDeepLearning :: SLIDE/DensifiedWtaHash.ll (ZN16DensifiedWtaHash7getHashEPiPfi)

; 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.DensifiedWtaHash = type <{ ptr, i32, i32, i32, i32, ptr, ptr, i32, [4 x i8] }>

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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) #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN16DensifiedWtaHash17getRandDoubleHashEii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN16DensifiedWtaHash7getHashEPiPfi(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #6 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %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 %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %23 = getelementptr inbounds %class.DensifiedWtaHash, 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 %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %31 = getelementptr inbounds %class.DensifiedWtaHash, 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 %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %39 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = sext i32 %40 to i64
  %42 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %41, i64 4)
  %43 = extractvalue { i64, i1 } %42, 1
  %44 = extractvalue { i64, i1 } %42, 0
  %45 = select i1 %43, i64 -1, i64 %44
  %46 = call noalias noundef nonnull ptr @_Znam(i64 noundef %45) #8
  store ptr %46, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %62, %4
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 2
  %50 = load i32, ptr %49, align 4, !tbaa !11
  %51 = icmp slt i32 %48, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %65

53:                                               ; preds = %47
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %54, i64 %56
  store i32 -2147483648, ptr %57, align 4, !tbaa !9
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds float, ptr %58, i64 %60
  store float 0xC1E0000000000000, ptr %61, align 4, !tbaa !13
  br label %62

62:                                               ; preds = %53
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %12, align 4, !tbaa !9
  br label %47, !llvm.loop !15

65:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %145, %65
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 7
  %69 = load i32, ptr %68, align 8, !tbaa !17
  %70 = icmp slt i32 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %148

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %141, %72
  %74 = load i32, ptr %15, align 4, !tbaa !9
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %144

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %79 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 5
  %80 = load ptr, ptr %79, align 8, !tbaa !18
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 3
  %83 = load i32, ptr %82, align 8, !tbaa !19
  %84 = mul nsw i32 %81, %83
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i32, ptr %15, 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 = add nsw i32 %84, %89
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %80, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !9
  store i32 %93, ptr %16, align 4, !tbaa !9
  %94 = load i32, ptr %16, align 4, !tbaa !9
  %95 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 2
  %96 = load i32, ptr %95, align 4, !tbaa !11
  %97 = icmp slt i32 %94, %96
  br i1 %97, label %98, label %140

98:                                               ; preds = %78
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %99, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !13
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load i32, ptr %15, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds float, ptr %104, i64 %106
  %108 = load float, ptr %107, align 4, !tbaa !13
  %109 = fcmp olt float %103, %108
  br i1 %109, label %110, label %139

110:                                              ; preds = %98
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %111, i64 %113
  %115 = load float, ptr %114, align 4, !tbaa !13
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds float, ptr %116, i64 %118
  store float %115, ptr %119, align 4, !tbaa !13
  %120 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 6
  %121 = load ptr, ptr %120, align 8, !tbaa !20
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 3
  %124 = load i32, ptr %123, align 8, !tbaa !19
  %125 = mul nsw i32 %122, %124
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %126, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = add nsw i32 %125, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %121, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %135, i64 %137
  store i32 %134, ptr %138, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %110, %98
  br label %140

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

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

144:                                              ; preds = %77
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %13, align 4, !tbaa !9
  br label %66, !llvm.loop !22

148:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %149

149:                                              ; preds = %207, %148
  %150 = load i32, ptr %17, align 4, !tbaa !9
  %151 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 2
  %152 = load i32, ptr %151, align 4, !tbaa !11
  %153 = icmp slt i32 %150, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %149
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %210

155:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %156, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !9
  store i32 %160, ptr %18, align 4, !tbaa !9
  %161 = load i32, ptr %18, align 4, !tbaa !9
  %162 = icmp ne i32 %161, -2147483648
  br i1 %162, label %163, label %173

163:                                              ; preds = %155
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %164, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = load i32, ptr %17, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i32, ptr %169, i64 %171
  store i32 %168, ptr %172, align 4, !tbaa !9
  store i32 13, ptr %14, align 4
  br label %204

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

174:                                              ; preds = %197, %173
  %175 = load i32, ptr %18, align 4, !tbaa !9
  %176 = icmp eq i32 %175, -2147483648
  br i1 %176, label %177, label %198

177:                                              ; preds = %174
  %178 = load i32, ptr %19, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  store i32 %179, 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
  %180 = load i32, ptr %17, align 4, !tbaa !9
  %181 = load i32, ptr %19, align 4, !tbaa !9
  %182 = call noundef i32 @_ZN16DensifiedWtaHash17getRandDoubleHashEii(ptr noundef nonnull align 8 dereferenceable(44) %22, i32 noundef %180, i32 noundef %181)
  store i32 %182, ptr %21, align 4, !tbaa !9
  %183 = getelementptr inbounds %class.DensifiedWtaHash, ptr %22, i32 0, i32 2
  %184 = 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) %183)
  %185 = load i32, ptr %184, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  store i32 %185, ptr %20, align 4, !tbaa !9
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = load i32, ptr %20, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i32, ptr %186, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !9
  store i32 %190, ptr %18, align 4, !tbaa !9
  %191 = load i32, ptr %19, align 4, !tbaa !9
  %192 = icmp sgt i32 %191, 100
  br i1 %192, label %193, label %194

193:                                              ; preds = %177
  store i32 15, ptr %14, align 4
  br label %195

194:                                              ; preds = %177
  store i32 0, ptr %14, align 4
  br label %195

195:                                              ; preds = %194, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  %196 = load i32, ptr %14, align 4
  switch i32 %196, label %220 [
    i32 0, label %197
    i32 15, label %198
  ]

197:                                              ; preds = %195
  br label %174, !llvm.loop !23

198:                                              ; preds = %195, %174
  %199 = load i32, ptr %18, align 4, !tbaa !9
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load i32, ptr %17, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds i32, ptr %200, i64 %202
  store i32 %199, ptr %203, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  store i32 0, ptr %14, align 4
  br label %204

204:                                              ; preds = %198, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %205 = load i32, ptr %14, align 4
  switch i32 %205, label %220 [
    i32 0, label %206
    i32 13, label %207
  ]

206:                                              ; preds = %204
  br label %207

207:                                              ; preds = %206, %204
  %208 = load i32, ptr %17, align 4, !tbaa !9
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %17, align 4, !tbaa !9
  br label %149, !llvm.loop !24

210:                                              ; preds = %154
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = icmp eq ptr %211, null
  br i1 %212, label %214, label %213

213:                                              ; preds = %210
  call void @_ZdaPv(ptr noundef %211) #9
  br label %214

214:                                              ; preds = %213, %210
  %215 = load ptr, ptr %10, align 8, !tbaa !5
  %216 = icmp eq ptr %215, null
  br i1 %216, label %218, label %217

217:                                              ; preds = %214
  call void @_ZdaPv(ptr noundef %215) #9
  br label %218

218:                                              ; preds = %217, %214
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  ret ptr %219

220:                                              ; preds = %204, %195
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"_ZTS16DensifiedWtaHash", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !10, i64 40}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 40}
!18 = !{!12, !6, i64 24}
!19 = !{!12, !10, i64 16}
!20 = !{!12, !6, i64 32}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}


; 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: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #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)) local_unnamed_addr #3

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

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

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

.lr.ph.preheader82:                               ; 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 %12, 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
  %18 = getelementptr inbounds float, ptr %13, i64 %index
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <4 x float> <float 0xC1E0000000000000, float 0xC1E0000000000000, float 0xC1E0000000000000, float 0xC1E0000000000000>, ptr %18, align 4, !tbaa !12
  store <4 x float> <float 0xC1E0000000000000, float 0xC1E0000000000000, float 0xC1E0000000000000, float 0xC1E0000000000000>, ptr %19, align 4, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !14

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

.preheader63:                                     ; preds = %.lr.ph, %middle.block, %4
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  %22 = load i32, ptr %21, align 8, !tbaa !18
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.preheader62.lr.ph, label %.preheader61

.preheader62.lr.ph:                               ; preds = %.preheader63
  %24 = icmp sgt i32 %3, 0
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = load ptr, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  %28 = load i32, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = load ptr, ptr %29, align 8
  br i1 %24, label %.preheader62.us.preheader, label %.preheader61

.preheader62.us.preheader:                        ; preds = %.preheader62.lr.ph
  %wide.trip.count75 = zext nneg i32 %3 to i64
  br label %.preheader62.us

.preheader62.us:                                  ; preds = %.preheader62.us.preheader, %._crit_edge.us
  %.05467.us = phi i32 [ %52, %._crit_edge.us ], [ 0, %.preheader62.us.preheader ]
  %31 = mul nsw i32 %28, %.05467.us
  br label %32

32:                                               ; preds = %.preheader62.us, %51
  %indvars.iv72 = phi i64 [ 0, %.preheader62.us ], [ %indvars.iv.next73, %51 ]
  %33 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv72
  %34 = load i32, ptr %33, align 4, !tbaa !11
  %35 = add nsw i32 %31, %34
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %26, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !11
  %39 = icmp slt i32 %38, %7
  br i1 %39, label %40, label %51

40:                                               ; preds = %32
  %41 = sext i32 %38 to i64
  %42 = getelementptr inbounds float, ptr %13, i64 %41
  %43 = load float, ptr %42, align 4, !tbaa !12
  %44 = getelementptr inbounds float, ptr %2, i64 %indvars.iv72
  %45 = load float, ptr %44, align 4, !tbaa !12
  %46 = fcmp olt float %43, %45
  br i1 %46, label %47, label %51

47:                                               ; preds = %40
  store float %45, ptr %42, align 4, !tbaa !12
  %48 = getelementptr inbounds i32, ptr %30, i64 %36
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = getelementptr inbounds i32, ptr %12, i64 %41
  store i32 %49, ptr %50, align 4, !tbaa !11
  br label %51

51:                                               ; preds = %47, %40, %32
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count75
  br i1 %exitcond76.not, label %._crit_edge.us, label %32, !llvm.loop !19

._crit_edge.us:                                   ; preds = %51
  %52 = add nuw nsw i32 %.05467.us, 1
  %exitcond77.not = icmp eq i32 %52, %22
  br i1 %exitcond77.not, label %.preheader61, label %.preheader62.us, !llvm.loop !20

.lr.ph:                                           ; preds = %.lr.ph.preheader82, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader82 ]
  %53 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv
  store i32 -2147483648, ptr %53, align 4, !tbaa !11
  %54 = getelementptr inbounds float, ptr %13, i64 %indvars.iv
  store float 0xC1E0000000000000, ptr %54, align 4, !tbaa !12
  %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 %.preheader63, label %.lr.ph, !llvm.loop !21

.preheader61:                                     ; preds = %._crit_edge.us, %.preheader62.lr.ph, %.preheader63
  br i1 %15, label %.lr.ph69, label %._crit_edge

.lr.ph69:                                         ; preds = %.preheader61, %72
  %55 = phi i32 [ %73, %72 ], [ %7, %.preheader61 ]
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %72 ], [ 0, %.preheader61 ]
  %56 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv79
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %.not = icmp eq i32 %57, -2147483648
  br i1 %.not, label %.preheader.preheader, label %59

.preheader.preheader:                             ; preds = %.lr.ph69
  %58 = trunc nuw nsw i64 %indvars.iv79 to i32
  br label %.preheader

59:                                               ; preds = %.lr.ph69
  %60 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv79
  store i32 %57, ptr %60, align 4, !tbaa !11
  br label %72

.preheader:                                       ; preds = %.preheader.preheader, %62
  %.052 = phi i32 [ %69, %62 ], [ -2147483648, %.preheader.preheader ]
  %.051 = phi i32 [ %63, %62 ], [ 0, %.preheader.preheader ]
  %61 = icmp eq i32 %.052, -2147483648
  br i1 %61, label %62, label %70

62:                                               ; preds = %.preheader
  %63 = add nuw nsw i32 %.051, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %64 = call noundef i32 @_ZN16DensifiedWtaHash17getRandDoubleHashEii(ptr noundef nonnull align 8 dereferenceable(44) %0, i32 noundef %58, i32 noundef %63)
  store i32 %64, ptr %5, align 4, !tbaa !11
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %66 = load i32, ptr %65, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %12, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %exitcond78 = icmp eq i32 %63, 101
  br i1 %exitcond78, label %70, label %.preheader

70:                                               ; preds = %62, %.preheader
  %.1 = phi i32 [ %69, %62 ], [ %.052, %.preheader ]
  %71 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv79
  store i32 %.1, ptr %71, align 4, !tbaa !11
  %.pre = load i32, ptr %6, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %70, %59
  %73 = phi i32 [ %.pre, %70 ], [ %55, %59 ]
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next80, %74
  br i1 %75, label %.lr.ph69, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %72, %.preheader61
  call void @_ZdaPv(ptr noundef nonnull %12) #8
  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 = { 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 #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 = { 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 = !{!"_ZTS16DensifiedWtaHash", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !10, i64 40}
!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 = !{!13, !13, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = !{!6, !10, i64 40}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15, !17, !16}
!22 = distinct !{!22, !15}


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