; LLVM IR from DionysiosB/CodeForces :: 0200-0299 (230B-TPrimes)

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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [1000001 x i8], align 16
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 1000000, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %14, i64 8)
  %16 = extractvalue { i64, i1 } %15, 1
  %17 = extractvalue { i64, i1 } %15, 0
  %18 = select i1 %16, i64 -1, i64 %17
  %19 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #7
  store ptr %19, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %20

20:                                               ; preds = %32, %0
  %21 = load i32, ptr %5, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %23 = load i64, ptr %3, align 8, !tbaa !5
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %35

26:                                               ; preds = %20
  %27 = load ptr, ptr %4, align 8, !tbaa !9
  %28 = load i32, ptr %5, align 4, !tbaa !11
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i64, ptr %27, i64 %29
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %30)
  br label %32

32:                                               ; preds = %26
  %33 = load i32, ptr %5, align 4, !tbaa !11
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %5, align 4, !tbaa !11
  br label %20, !llvm.loop !13

35:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1000001, ptr %6) #6
  %36 = getelementptr inbounds [1000001 x i8], ptr %6, i64 0, i64 1
  store i8 0, ptr %36, align 1, !tbaa !15
  %37 = getelementptr inbounds [1000001 x i8], ptr %6, i64 0, i64 0
  store i8 0, ptr %37, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 2, ptr %7, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %45, %35
  %39 = load i64, ptr %7, align 8, !tbaa !5
  %40 = icmp sle i64 %39, 1000000
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %48

42:                                               ; preds = %38
  %43 = load i64, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds [1000001 x i8], ptr %6, i64 0, i64 %43
  store i8 1, ptr %44, align 1, !tbaa !15
  br label %45

45:                                               ; preds = %42
  %46 = load i64, ptr %7, align 8, !tbaa !5
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %7, align 8, !tbaa !5
  br label %38, !llvm.loop !17

48:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 2, ptr %8, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %79, %48
  %50 = load i64, ptr %8, align 8, !tbaa !5
  %51 = sitofp i64 %50 to double
  %52 = call double @sqrt(double noundef 1.000000e+06) #6
  %53 = fcmp ole double %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %49
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %82

55:                                               ; preds = %49
  %56 = load i64, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds [1000001 x i8], ptr %6, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !15, !range !18, !noundef !19
  %59 = trunc i8 %58 to i1
  br i1 %59, label %60, label %78

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 2, ptr %10, align 4, !tbaa !11
  br label %61

61:                                               ; preds = %74, %60
  %62 = load i32, ptr %10, align 4, !tbaa !11
  %63 = sext i32 %62 to i64
  %64 = load i64, ptr %8, align 8, !tbaa !5
  %65 = sdiv i64 1000000, %64
  %66 = icmp sle i64 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %61
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %77

68:                                               ; preds = %61
  %69 = load i32, ptr %10, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = load i64, ptr %8, align 8, !tbaa !5
  %72 = mul nsw i64 %70, %71
  %73 = getelementptr inbounds [1000001 x i8], ptr %6, i64 0, i64 %72
  store i8 0, ptr %73, align 1, !tbaa !15
  br label %74

74:                                               ; preds = %68
  %75 = load i32, ptr %10, align 4, !tbaa !11
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %10, align 4, !tbaa !11
  br label %61, !llvm.loop !20

77:                                               ; preds = %67
  br label %78

78:                                               ; preds = %77, %55
  br label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %8, align 8, !tbaa !5
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %8, align 8, !tbaa !5
  br label %49, !llvm.loop !21

82:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %114, %82
  %84 = load i64, ptr %12, align 8, !tbaa !5
  %85 = load i64, ptr %3, align 8, !tbaa !5
  %86 = icmp slt i64 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %117

88:                                               ; preds = %83
  %89 = load ptr, ptr %4, align 8, !tbaa !9
  %90 = load i64, ptr %12, align 8, !tbaa !5
  %91 = getelementptr inbounds i64, ptr %89, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = sitofp i64 %92 to double
  %94 = call double @sqrt(double noundef %93) #6
  %95 = fptosi double %94 to i64
  store i64 %95, ptr %11, align 8, !tbaa !5
  %96 = load i64, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds [1000001 x i8], ptr %6, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !15, !range !18, !noundef !19
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %111

100:                                              ; preds = %88
  %101 = load i64, ptr %11, align 8, !tbaa !5
  %102 = load i64, ptr %11, align 8, !tbaa !5
  %103 = mul nsw i64 %101, %102
  %104 = load ptr, ptr %4, align 8, !tbaa !9
  %105 = load i64, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds i64, ptr %104, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !5
  %108 = icmp eq i64 %103, %107
  br i1 %108, label %109, label %111

109:                                              ; preds = %100
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %113

111:                                              ; preds = %100, %88
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %113

113:                                              ; preds = %111, %109
  br label %114

114:                                              ; preds = %113
  %115 = load i64, ptr %12, align 8, !tbaa !5
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %12, align 8, !tbaa !5
  br label %83, !llvm.loop !22

117:                                              ; preds = %87
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1000001, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %118 = load i32, ptr %1, align 4
  ret i32 %118
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

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

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

declare i32 @printf(ptr noundef, ...) #2

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

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

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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca [1000001 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = load i64, ptr %1, align 8, !tbaa !5
  %5 = icmp ugt i64 %4, 2305843009213693951
  %6 = shl i64 %4, 3
  %7 = select i1 %5, i64 -1, i64 %6
  %8 = call noalias noundef nonnull ptr @_Znam(i64 noundef %7) #7
  %9 = icmp sgt i64 %4, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %10 = icmp sgt i64 %15, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %11 = phi i1 [ %10, %._crit_edge.loopexit ], [ false, %0 ]
  call void @llvm.lifetime.start.p0(i64 1000001, ptr nonnull %2) #6
  %12 = getelementptr inbounds i8, ptr %2, i64 1
  store i8 0, ptr %12, align 1, !tbaa !9
  store i8 0, ptr %2, align 16, !tbaa !9
  %scevgep = getelementptr inbounds i8, ptr %2, i64 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(999999) %scevgep, i8 1, i64 999999, i1 false), !tbaa !9
  br label %.preheader31

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %13 = getelementptr inbounds i64, ptr %8, i64 %indvars.iv
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = icmp sgt i64 %15, %indvars.iv.next
  br i1 %16, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !11

.preheader:                                       ; preds = %.loopexit
  br i1 %11, label %.lr.ph39, label %._crit_edge40

.preheader31:                                     ; preds = %._crit_edge, %.loopexit
  %.02537 = phi i64 [ %34, %.loopexit ], [ 2, %._crit_edge ]
  %17 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %.02537
  %18 = load i8, ptr %17, align 1, !tbaa !9, !range !13, !noundef !14
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %.lr.ph36.preheader, label %.loopexit

.lr.ph36.preheader:                               ; preds = %.preheader31
  %20 = udiv i64 1000000, %.02537
  %21 = add nsw i64 %20, -1
  %22 = add nsw i64 %20, -2
  %xtraiter = and i64 %21, 3
  %23 = icmp ult i64 %22, 3
  br i1 %23, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph36.preheader.new

.lr.ph36.preheader.new:                           ; preds = %.lr.ph36.preheader
  %unroll_iter = and i64 %21, -4
  br label %.lr.ph36

.lr.ph36:                                         ; preds = %.lr.ph36, %.lr.ph36.preheader.new
  %indvars.iv42 = phi i64 [ 2, %.lr.ph36.preheader.new ], [ %indvars.iv.next43.3, %.lr.ph36 ]
  %niter = phi i64 [ 0, %.lr.ph36.preheader.new ], [ %niter.next.3, %.lr.ph36 ]
  %24 = mul nuw nsw i64 %indvars.iv42, %.02537
  %25 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %24
  store i8 0, ptr %25, align 2, !tbaa !9
  %indvars.iv.next43 = or disjoint i64 %indvars.iv42, 1
  %26 = mul nuw nsw i64 %indvars.iv.next43, %.02537
  %27 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %26
  store i8 0, ptr %27, align 1, !tbaa !9
  %indvars.iv.next43.1 = add nuw nsw i64 %indvars.iv42, 2
  %28 = mul nuw nsw i64 %indvars.iv.next43.1, %.02537
  %29 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %28
  store i8 0, ptr %29, align 2, !tbaa !9
  %indvars.iv.next43.2 = add nuw nsw i64 %indvars.iv42, 3
  %30 = mul nuw nsw i64 %indvars.iv.next43.2, %.02537
  %31 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %30
  store i8 0, ptr %31, align 1, !tbaa !9
  %indvars.iv.next43.3 = add nuw nsw i64 %indvars.iv42, 4
  %niter.next.3 = add nuw nsw i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph36, !llvm.loop !15

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph36, %.lr.ph36.preheader
  %indvars.iv42.unr = phi i64 [ 2, %.lr.ph36.preheader ], [ %indvars.iv.next43.3, %.lr.ph36 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph36.epil

.lr.ph36.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph36.epil
  %indvars.iv42.epil = phi i64 [ %indvars.iv.next43.epil, %.lr.ph36.epil ], [ %indvars.iv42.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph36.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %32 = mul nuw nsw i64 %indvars.iv42.epil, %.02537
  %33 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %32
  store i8 0, ptr %33, align 1, !tbaa !9
  %indvars.iv.next43.epil = add nuw nsw i64 %indvars.iv42.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph36.epil, !llvm.loop !16

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph36.epil, %.preheader31
  %34 = add nuw nsw i64 %.02537, 1
  %exitcond45.not = icmp eq i64 %34, 1001
  br i1 %exitcond45.not, label %.preheader, label %.preheader31, !llvm.loop !18

._crit_edge40:                                    ; preds = %48, %.preheader
  call void @llvm.lifetime.end.p0(i64 1000001, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

.lr.ph39:                                         ; preds = %.preheader, %48
  %.038 = phi i64 [ %50, %48 ], [ 0, %.preheader ]
  %35 = getelementptr inbounds i64, ptr %8, i64 %.038
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = sitofp i64 %36 to double
  %38 = call double @sqrt(double noundef %37) #6
  %39 = fptosi double %38 to i64
  %40 = getelementptr inbounds [1000001 x i8], ptr %2, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9, !range !13, !noundef !14
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %43, label %47

43:                                               ; preds = %.lr.ph39
  %44 = mul nsw i64 %39, %39
  %45 = load i64, ptr %35, align 8, !tbaa !5
  %46 = icmp eq i64 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43, %.lr.ph39
  br label %48

48:                                               ; preds = %43, %47
  %.str.2.sink = phi ptr [ @.str.3, %47 ], [ @.str.2, %43 ]
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
  %50 = add nuw nsw i64 %.038, 1
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %.lr.ph39, label %._crit_edge40, !llvm.loop !19
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

attributes #0 = { mustprogress norecurse 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 willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 = { 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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

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

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


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