; LLVM IR from keroro824/HashingDeepLearning :: SLIDE/srp.ll (ZN22SparseRandomProjectionC2Emmi)

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

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

37:                                               ; preds = %49, %4
  %38 = load i64, ptr %10, align 8, !tbaa !9
  %39 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 0
  %40 = load i64, ptr %39, align 8, !tbaa !13
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %52

43:                                               ; preds = %37
  %44 = load i64, ptr %10, align 8, !tbaa !9
  %45 = trunc i64 %44 to i32
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load i64, ptr %10, align 8, !tbaa !9
  %48 = getelementptr inbounds i32, ptr %46, i64 %47
  store i32 %45, ptr %48, align 4, !tbaa !11
  br label %49

49:                                               ; preds = %43
  %50 = load i64, ptr %10, align 8, !tbaa !9
  %51 = add i64 %50, 1
  store i64 %51, ptr %10, align 8, !tbaa !9
  br label %37, !llvm.loop !17

52:                                               ; preds = %42
  %53 = call i64 @time(ptr noundef null) #7
  %54 = trunc i64 %53 to i32
  call void @srand(i32 noundef %54) #7
  %55 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 1
  %56 = load i64, ptr %55, align 8, !tbaa !15
  %57 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %56, i64 8)
  %58 = extractvalue { i64, i1 } %57, 1
  %59 = extractvalue { i64, i1 } %57, 0
  %60 = select i1 %58, i64 -1, i64 %59
  %61 = call noalias noundef nonnull ptr @_Znam(i64 noundef %60) #8
  %62 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 3
  store ptr %61, ptr %62, align 8, !tbaa !19
  %63 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !15
  %65 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %64, i64 8)
  %66 = extractvalue { i64, i1 } %65, 1
  %67 = extractvalue { i64, i1 } %65, 0
  %68 = select i1 %66, i64 -1, i64 %67
  %69 = call noalias noundef nonnull ptr @_Znam(i64 noundef %68) #8
  %70 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 4
  store ptr %69, ptr %70, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %71

71:                                               ; preds = %161, %52
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 1
  %74 = load i64, ptr %73, align 8, !tbaa !15
  %75 = icmp ult i64 %72, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %71
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %164

77:                                               ; preds = %71
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 0
  %81 = load i64, ptr %80, align 8, !tbaa !13
  %82 = getelementptr inbounds i32, ptr %79, i64 %81
  call void @_ZSt14random_shuffleIPiEvT_S1_(ptr noundef %78, ptr noundef %82)
  %83 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 2
  %84 = load i64, ptr %83, align 8, !tbaa !16
  %85 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %84, i64 2)
  %86 = extractvalue { i64, i1 } %85, 1
  %87 = extractvalue { i64, i1 } %85, 0
  %88 = select i1 %86, i64 -1, i64 %87
  %89 = call noalias noundef nonnull ptr @_Znam(i64 noundef %88) #8
  %90 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 3
  %91 = load ptr, ptr %90, align 8, !tbaa !19
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %91, i64 %92
  store ptr %89, ptr %93, align 8, !tbaa !5
  %94 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 2
  %95 = load i64, ptr %94, align 8, !tbaa !16
  %96 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %95, i64 4)
  %97 = extractvalue { i64, i1 } %96, 1
  %98 = extractvalue { i64, i1 } %96, 0
  %99 = select i1 %97, i64 -1, i64 %98
  %100 = call noalias noundef nonnull ptr @_Znam(i64 noundef %99) #8
  %101 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !20
  %103 = load i64, ptr %11, align 8, !tbaa !9
  %104 = getelementptr inbounds ptr, ptr %102, i64 %103
  store ptr %100, ptr %104, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %144, %77
  %106 = load i64, ptr %13, align 8, !tbaa !9
  %107 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 2
  %108 = load i64, ptr %107, align 8, !tbaa !16
  %109 = icmp ult i64 %106, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %105
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %147

111:                                              ; preds = %105
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load i64, ptr %13, align 8, !tbaa !9
  %114 = getelementptr inbounds i32, ptr %112, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = load i64, ptr %11, align 8, !tbaa !9
  %119 = getelementptr inbounds ptr, ptr %117, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = load i64, ptr %13, align 8, !tbaa !9
  %122 = getelementptr inbounds i32, ptr %120, i64 %121
  store i32 %115, ptr %122, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %123 = call i32 @rand() #7
  store i32 %123, ptr %14, align 4, !tbaa !11
  %124 = load i32, ptr %14, align 4, !tbaa !11
  %125 = srem i32 %124, 2
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %127, label %135

127:                                              ; preds = %111
  %128 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 3
  %129 = load ptr, ptr %128, align 8, !tbaa !19
  %130 = load i64, ptr %11, align 8, !tbaa !9
  %131 = getelementptr inbounds ptr, ptr %129, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = load i64, ptr %13, align 8, !tbaa !9
  %134 = getelementptr inbounds i16, ptr %132, i64 %133
  store i16 1, ptr %134, align 2, !tbaa !21
  br label %143

135:                                              ; preds = %111
  %136 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !19
  %138 = load i64, ptr %11, align 8, !tbaa !9
  %139 = getelementptr inbounds ptr, ptr %137, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = load i64, ptr %13, align 8, !tbaa !9
  %142 = getelementptr inbounds i16, ptr %140, i64 %141
  store i16 -1, ptr %142, align 2, !tbaa !21
  br label %143

143:                                              ; preds = %135, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %144

144:                                              ; preds = %143
  %145 = load i64, ptr %13, align 8, !tbaa !9
  %146 = add i64 %145, 1
  store i64 %146, ptr %13, align 8, !tbaa !9
  br label %105, !llvm.loop !23

147:                                              ; preds = %110
  %148 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !20
  %150 = load i64, ptr %11, align 8, !tbaa !9
  %151 = getelementptr inbounds ptr, ptr %149, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !20
  %155 = load i64, ptr %11, align 8, !tbaa !9
  %156 = getelementptr inbounds ptr, ptr %154, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = getelementptr inbounds %class.SparseRandomProjection, ptr %15, i32 0, i32 2
  %159 = load i64, ptr %158, align 8, !tbaa !16
  %160 = getelementptr inbounds i32, ptr %157, i64 %159
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef %152, ptr noundef %160)
  br label %161

161:                                              ; preds = %147
  %162 = load i64, ptr %11, align 8, !tbaa !9
  %163 = add i64 %162, 1
  store i64 %163, ptr %11, align 8, !tbaa !9
  br label %71, !llvm.loop !24

164:                                              ; preds = %76
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = icmp eq ptr %165, null
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  call void @_ZdaPv(ptr noundef %165) #9
  br label %168

168:                                              ; preds = %167, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  ret void
}

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

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

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

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #4

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt14random_shuffleIPiEvT_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @rand() #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(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 speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = { 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 #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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS22SparseRandomProjection", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32}
!15 = !{!14, !10, i64 8}
!16 = !{!14, !10, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!14, !6, i64 24}
!20 = !{!14, !6, i64 32}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}


; 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 uwtable
define dso_local void @_ZN22SparseRandomProjectionC2Emmi(ptr nocapture noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %1, i64 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 {
  store i64 %1, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %2, ptr %5, align 8, !tbaa !11
  %6 = uitofp i64 %1 to double
  %7 = sitofp i32 %3 to double
  %8 = fdiv double %6, %7
  %9 = tail call double @llvm.ceil.f64(double %8)
  %10 = fptoui double %9 to i64
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %10, ptr %11, align 8, !tbaa !12
  %12 = icmp ugt i64 %1, 4611686018427387903
  %13 = shl nuw i64 %1, 2
  %14 = select i1 %12, i64 -1, i64 %13
  %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #6
  %.not = icmp eq i64 %1, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %min.iters.check = icmp ult i64 %1, 8
  br i1 %min.iters.check, label %.lr.ph.preheader47, label %vector.ph

.lr.ph.preheader47:                               ; preds = %middle.block, %.lr.ph.preheader
  %.031.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 %1, -8
  br label %vector.body

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

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %1
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader47

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %4
  %19 = tail call i64 @time(ptr noundef null) #7
  %20 = trunc i64 %19 to i32
  tail call void @srand(i32 noundef %20) #7
  %21 = load i64, ptr %5, align 8, !tbaa !11
  %22 = icmp ugt i64 %21, 2305843009213693951
  %23 = shl i64 %21, 3
  %24 = select i1 %22, i64 -1, i64 %23
  %25 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #6
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %25, ptr %26, align 8, !tbaa !19
  %27 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #6
  %28 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %27, ptr %28, align 8, !tbaa !20
  %.not40 = icmp eq i64 %21, 0
  br i1 %.not40, label %._crit_edge39, label %.lr.ph38

.lr.ph:                                           ; preds = %.lr.ph.preheader47, %.lr.ph
  %.031 = phi i64 [ %31, %.lr.ph ], [ %.031.ph, %.lr.ph.preheader47 ]
  %29 = trunc i64 %.031 to i32
  %30 = getelementptr inbounds i32, ptr %15, i64 %.031
  store i32 %29, ptr %30, align 4, !tbaa !13
  %31 = add nuw i64 %.031, 1
  %exitcond.not = icmp eq i64 %31, %1
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !21

.lr.ph38:                                         ; preds = %._crit_edge, %._crit_edge35
  %.02936 = phi i64 [ %50, %._crit_edge35 ], [ 0, %._crit_edge ]
  %32 = load i64, ptr %0, align 8, !tbaa !5
  %33 = getelementptr inbounds i32, ptr %15, i64 %32
  tail call void @_ZSt14random_shuffleIPiEvT_S1_(ptr noundef nonnull %15, ptr noundef nonnull %33)
  %34 = load i64, ptr %11, align 8, !tbaa !12
  %35 = shl i64 %34, 1
  %.inv = icmp sgt i64 %34, -1
  %36 = select i1 %.inv, i64 %35, i64 -1
  %37 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %36) #6
  %38 = load ptr, ptr %26, align 8, !tbaa !19
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.02936
  store ptr %37, ptr %39, align 8, !tbaa !22
  %40 = icmp ugt i64 %34, 4611686018427387903
  %41 = shl i64 %34, 2
  %42 = select i1 %40, i64 -1, i64 %41
  %43 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %42) #6
  %44 = load ptr, ptr %28, align 8, !tbaa !20
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.02936
  store ptr %43, ptr %45, align 8, !tbaa !22
  %.not41 = icmp eq i64 %34, 0
  br i1 %.not41, label %._crit_edge35, label %.lr.ph34

._crit_edge35:                                    ; preds = %.lr.ph34, %.lr.ph38
  %.lcssa = phi i64 [ 0, %.lr.ph38 ], [ %67, %.lr.ph34 ]
  %46 = load ptr, ptr %28, align 8, !tbaa !20
  %47 = getelementptr inbounds ptr, ptr %46, i64 %.02936
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  %49 = getelementptr inbounds i32, ptr %48, i64 %.lcssa
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef %48, ptr noundef %49)
  %50 = add nuw i64 %.02936, 1
  %51 = load i64, ptr %5, align 8, !tbaa !11
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %.lr.ph38, label %._crit_edge39, !llvm.loop !23

.lr.ph34:                                         ; preds = %.lr.ph38, %.lr.ph34
  %.02832 = phi i64 [ %66, %.lr.ph34 ], [ 0, %.lr.ph38 ]
  %53 = getelementptr inbounds i32, ptr %15, i64 %.02832
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = load ptr, ptr %28, align 8, !tbaa !20
  %56 = getelementptr inbounds ptr, ptr %55, i64 %.02936
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = getelementptr inbounds i32, ptr %57, i64 %.02832
  store i32 %54, ptr %58, align 4, !tbaa !13
  %59 = tail call i32 @rand() #7
  %60 = and i32 %59, 1
  %61 = icmp eq i32 %60, 0
  %62 = load ptr, ptr %26, align 8, !tbaa !19
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.02936
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  %65 = getelementptr inbounds i16, ptr %64, i64 %.02832
  %. = select i1 %61, i16 1, i16 -1
  store i16 %., ptr %65, align 2, !tbaa !24
  %66 = add nuw i64 %.02832, 1
  %67 = load i64, ptr %11, align 8, !tbaa !12
  %68 = icmp ult i64 %66, %67
  br i1 %68, label %.lr.ph34, label %._crit_edge35, !llvm.loop !26

._crit_edge39:                                    ; preds = %._crit_edge35, %._crit_edge
  tail call void @_ZdaPv(ptr noundef nonnull %15) #8
  ret void
}

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

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt14random_shuffleIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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 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 = { 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 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 = { 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, !7, i64 0}
!6 = !{!"_ZTS22SparseRandomProjection", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !7, i64 16}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = !{!6, !10, i64 24}
!20 = !{!6, !10, i64 32}
!21 = distinct !{!21, !16, !18, !17}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !16}
!24 = !{!25, !25, i64 0}
!25 = !{!"short", !8, i64 0}
!26 = distinct !{!26, !16}


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