; LLVM IR from tangjz/acm-icpc :: 51nod/1038.ll (Z4bsgsiii)

; 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"

%struct.Hash = type { i32, i32, i32 }

@cnt = external dso_local global i32, align 4
@pre = external dso_local global [66601 x i32], align 16
@e = external dso_local global [32000 x %struct.Hash], align 16

; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3invii(i32 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4bsgsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca %struct.Hash, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = sitofp i32 %19 to double
  %21 = fadd double %20, 1.000000e-02
  %22 = call double @sqrt(double noundef %21) #7
  %23 = call double @llvm.ceil.f64(double %22)
  %24 = fptosi double %23 to i32
  store i32 %24, ptr %8, align 4, !tbaa !5
  store i32 0, ptr @cnt, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @pre, i8 -1, i64 266404, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %90, %3
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %93

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  store i8 0, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %31 = load i32, ptr %10, align 4, !tbaa !5
  %32 = srem i32 %31, 66601
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [66601 x i32], ptr @pre, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  store i32 %35, ptr %13, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %50, %30
  %37 = load i32, ptr %13, align 4, !tbaa !5
  %38 = icmp ne i32 %37, -1
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 5, ptr %11, align 4
  br label %56

40:                                               ; preds = %36
  %41 = load i32, ptr %13, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %42
  %44 = getelementptr inbounds %struct.Hash, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = icmp eq i32 %45, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  store i8 1, ptr %12, align 1, !tbaa !9
  store i32 5, ptr %11, align 4
  br label %56

49:                                               ; preds = %40
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %13, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %52
  %54 = getelementptr inbounds %struct.Hash, ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 4, !tbaa !13
  store i32 %55, ptr %13, align 4, !tbaa !5
  br label %36, !llvm.loop !14

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

57:                                               ; preds = %56
  %58 = load i8, ptr %12, align 1, !tbaa !9, !range !16, !noundef !17
  %59 = trunc i8 %58 to i1
  br i1 %59, label %80, label %60

60:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  %61 = getelementptr inbounds %struct.Hash, ptr %14, i32 0, i32 0
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = srem i32 %62, 66601
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [66601 x i32], ptr @pre, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %61, align 4, !tbaa !13
  %67 = getelementptr inbounds %struct.Hash, ptr %14, i32 0, i32 1
  %68 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %68, ptr %67, align 4, !tbaa !11
  %69 = getelementptr inbounds %struct.Hash, ptr %14, i32 0, i32 2
  %70 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %70, ptr %69, align 4, !tbaa !18
  %71 = load i32, ptr @cnt, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %72
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %14, i64 12, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  %74 = load i32, ptr @cnt, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr @cnt, align 4, !tbaa !5
  %76 = load i32, ptr %10, align 4, !tbaa !5
  %77 = srem i32 %76, 66601
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [66601 x i32], ptr @pre, i64 0, i64 %78
  store i32 %74, ptr %79, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %60, %57
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = mul nsw i64 %82, %84
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = srem i64 %85, %87
  %89 = trunc i64 %88 to i32
  store i32 %89, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %90

90:                                               ; preds = %80
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %9, align 4, !tbaa !5
  br label %25, !llvm.loop !20

93:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = call noundef i32 @_Z7mod_powiii(i32 noundef %94, i32 noundef %95, i32 noundef %96)
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = call noundef i32 @_Z3invii(i32 noundef %97, i32 noundef %98)
  store i32 %99, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %100 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %100, ptr %17, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %153, %93
  %102 = load i32, ptr %16, align 4, !tbaa !5
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 8, ptr %11, align 4
  br label %156

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %107 = load i32, ptr %17, align 4, !tbaa !5
  %108 = srem i32 %107, 66601
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [66601 x i32], ptr @pre, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  store i32 %111, ptr %18, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %135, %106
  %113 = load i32, ptr %18, align 4, !tbaa !5
  %114 = icmp ne i32 %113, -1
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i32 11, ptr %11, align 4
  br label %141

116:                                              ; preds = %112
  %117 = load i32, ptr %18, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %118
  %120 = getelementptr inbounds %struct.Hash, ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !11
  %122 = load i32, ptr %17, align 4, !tbaa !5
  %123 = icmp eq i32 %121, %122
  br i1 %123, label %124, label %134

124:                                              ; preds = %116
  %125 = load i32, ptr %16, align 4, !tbaa !5
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = mul nsw i32 %125, %126
  %128 = load i32, ptr %18, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.Hash, ptr %130, i32 0, i32 2
  %132 = load i32, ptr %131, align 4, !tbaa !18
  %133 = add nsw i32 %127, %132
  store i32 %133, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %141

134:                                              ; preds = %116
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %18, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %137
  %139 = getelementptr inbounds %struct.Hash, ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !13
  store i32 %140, ptr %18, align 4, !tbaa !5
  br label %112, !llvm.loop !21

141:                                              ; preds = %124, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %142 = load i32, ptr %11, align 4
  switch i32 %142, label %156 [
    i32 11, label %143
  ]

143:                                              ; preds = %141
  %144 = load i32, ptr %17, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = load i32, ptr %15, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = mul nsw i64 %145, %147
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = srem i64 %148, %150
  %152 = trunc i64 %151 to i32
  store i32 %152, ptr %17, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %143
  %154 = load i32, ptr %16, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %16, align 4, !tbaa !5
  br label %101, !llvm.loop !22

156:                                              ; preds = %141, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %157 = load i32, ptr %11, align 4
  switch i32 %157, label %159 [
    i32 8, label %158
  ]

158:                                              ; preds = %156
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %159

159:                                              ; preds = %158, %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %160 = load i32, ptr %4, align 4
  ret i32 %160
}

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTS4Hash", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{!12, !6, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!12, !6, i64 8}
!19 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


; 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"

%struct.Hash = type { i32, i32, i32 }

@cnt = external dso_local local_unnamed_addr global i32, align 4
@pre = external dso_local local_unnamed_addr global [66601 x i32], align 16
@e = external dso_local local_unnamed_addr global [32000 x %struct.Hash], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3invii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_powiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4bsgsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = sitofp i32 %1 to double
  %5 = fadd double %4, 1.000000e-02
  %6 = tail call double @sqrt(double noundef %5) #5
  %7 = tail call double @llvm.ceil.f64(double %6)
  %8 = fptosi double %7 to i32
  store i32 0, ptr @cnt, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(266404) @pre, i8 -1, i64 266404, i1 false)
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %10 = sext i32 %0 to i64
  %11 = sext i32 %1 to i64
  br label %16

._crit_edge:                                      ; preds = %.loopexit54, %3
  %12 = tail call noundef i32 @_Z7mod_powiii(i32 noundef %0, i32 noundef %8, i32 noundef %1)
  %13 = tail call noundef i32 @_Z3invii(i32 noundef %12, i32 noundef %1)
  br i1 %9, label %.lr.ph62, label %.loopexit

.lr.ph62:                                         ; preds = %._crit_edge
  %14 = sext i32 %13 to i64
  %15 = sext i32 %1 to i64
  br label %38

16:                                               ; preds = %.lr.ph, %.loopexit54
  %.04357 = phi i32 [ 0, %.lr.ph ], [ %37, %.loopexit54 ]
  %.04456 = phi i32 [ 1, %.lr.ph ], [ %36, %.loopexit54 ]
  %17 = phi i32 [ 0, %.lr.ph ], [ %32, %.loopexit54 ]
  %18 = srem i32 %.04456, 66601
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [66601 x i32], ptr @pre, i64 0, i64 %19
  br label %21

21:                                               ; preds = %22, %16
  %.047.in = phi ptr [ %20, %16 ], [ %24, %22 ]
  %.047 = load i32, ptr %.047.in, align 4, !tbaa !5
  %.not51.not = icmp eq i32 %.047, -1
  br i1 %.not51.not, label %.critedge, label %22

22:                                               ; preds = %21
  %23 = sext i32 %.047 to i64
  %24 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %23
  %25 = getelementptr inbounds i8, ptr %24, i64 4
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = icmp eq i32 %26, %.04456
  br i1 %27, label %.loopexit54, label %21, !llvm.loop !11

.critedge:                                        ; preds = %21
  %28 = load i32, ptr %20, align 4, !tbaa !5
  %29 = sext i32 %17 to i64
  %30 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %29
  store i32 %28, ptr %30, align 4, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 4
  store i32 %.04456, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 8
  store i32 %.04357, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %31 = add nsw i32 %17, 1
  store i32 %31, ptr @cnt, align 4, !tbaa !5
  store i32 %17, ptr %20, align 4, !tbaa !5
  br label %.loopexit54

.loopexit54:                                      ; preds = %22, %.critedge
  %32 = phi i32 [ %31, %.critedge ], [ %17, %22 ]
  %33 = sext i32 %.04456 to i64
  %34 = mul nsw i64 %33, %10
  %35 = srem i64 %34, %11
  %36 = trunc nsw i64 %35 to i32
  %37 = add nuw nsw i32 %.04357, 1
  %exitcond.not = icmp eq i32 %37, %8
  br i1 %exitcond.not, label %._crit_edge, label %16, !llvm.loop !13

38:                                               ; preds = %.lr.ph62, %54
  %.04060 = phi i32 [ %2, %.lr.ph62 ], [ %58, %54 ]
  %.04159 = phi i32 [ 0, %.lr.ph62 ], [ %59, %54 ]
  %39 = srem i32 %.04060, 66601
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [66601 x i32], ptr @pre, i64 0, i64 %40
  br label %42

42:                                               ; preds = %43, %38
  %.0.in = phi ptr [ %41, %38 ], [ %45, %43 ]
  %.0 = load i32, ptr %.0.in, align 4, !tbaa !5
  %.not = icmp eq i32 %.0, -1
  br i1 %.not, label %54, label %43

43:                                               ; preds = %42
  %44 = sext i32 %.0 to i64
  %45 = getelementptr inbounds [32000 x %struct.Hash], ptr @e, i64 0, i64 %44
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = icmp eq i32 %47, %.04060
  br i1 %48, label %49, label %42, !llvm.loop !14

49:                                               ; preds = %43
  %50 = mul nuw nsw i32 %.04159, %8
  %51 = getelementptr inbounds i8, ptr %45, i64 8
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = add nsw i32 %52, %50
  br label %.loopexit

54:                                               ; preds = %42
  %55 = sext i32 %.04060 to i64
  %56 = mul nsw i64 %55, %14
  %57 = srem i64 %56, %15
  %58 = trunc nsw i64 %57 to i32
  %59 = add nuw nsw i32 %.04159, 1
  %exitcond64.not = icmp eq i32 %59, %8
  br i1 %exitcond64.not, label %.loopexit, label %38, !llvm.loop !16

.loopexit:                                        ; preds = %54, %._crit_edge, %49
  %spec.select = phi i32 [ %53, %49 ], [ -1, %._crit_edge ], [ -1, %54 ]
  ret i32 %spec.select
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 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 #2 = { mustprogress nofree nounwind willreturn memory(write) "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 4}
!10 = !{!"_ZTS4Hash", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!10, !6, i64 8}
!16 = distinct !{!16, !12}


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