; LLVM IR from brpapa/algorithms :: solutions/spoj/SARRAY.ll (Z13counting_sorti)

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

@N = external dso_local global i32, align 4
@ra = external dso_local global [100010 x i32], align 16
@sa = external dso_local global [100010 x i32], align 16
@temp_sa = external dso_local global [100010 x i32], align 16
@c = external dso_local global [100010 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13counting_sorti(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 300, ptr %6, align 4, !tbaa !5
  %8 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %9 = load i32, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  store i32 %9, ptr %5, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @c, i8 0, i64 400040, i1 false)
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %34, %1
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %14, label %37

14:                                               ; preds = %10
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = add nsw i32 %15, %16
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %20, label %27

20:                                               ; preds = %14
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %21, %22
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100010 x i32], ptr @ra, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  br label %28

27:                                               ; preds = %14
  br label %28

28:                                               ; preds = %27, %20
  %29 = phi i32 [ %26, %20 ], [ 0, %27 ]
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %3, align 4, !tbaa !5
  br label %10, !llvm.loop !9

37:                                               ; preds = %10
  store i32 0, ptr %4, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %54, %37
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %57

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %49
  store i32 %47, ptr %50, align 4, !tbaa !5
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, %51
  store i32 %53, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %54

54:                                               ; preds = %42
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %3, align 4, !tbaa !5
  br label %38, !llvm.loop !11

57:                                               ; preds = %38
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %94, %57
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = load i32, ptr @N, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %97

62:                                               ; preds = %58
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100010 x i32], ptr @sa, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100010 x i32], ptr @sa, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = add nsw i32 %70, %71
  %73 = load i32, ptr @N, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %85

75:                                               ; preds = %62
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100010 x i32], ptr @sa, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = add nsw i32 %79, %80
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100010 x i32], ptr @ra, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  br label %86

85:                                               ; preds = %62
  br label %86

86:                                               ; preds = %85, %75
  %87 = phi i32 [ %84, %75 ], [ 0, %85 ]
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %89, align 4, !tbaa !5
  %92 = sext i32 %90 to i64
  %93 = getelementptr inbounds [100010 x i32], ptr @temp_sa, i64 0, i64 %92
  store i32 %66, ptr %93, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %86
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %3, align 4, !tbaa !5
  br label %58, !llvm.loop !12

97:                                               ; preds = %58
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %110, %97
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = load i32, ptr @N, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %113

102:                                              ; preds = %98
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100010 x i32], ptr @temp_sa, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100010 x i32], ptr @sa, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %102
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %3, align 4, !tbaa !5
  br label %98, !llvm.loop !13

113:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret void
}

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

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

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

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

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 willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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

@N = external dso_local global i32, align 4
@ra = external dso_local local_unnamed_addr global [100010 x i32], align 16
@sa = external dso_local local_unnamed_addr global [100010 x i32], align 16
@temp_sa = external dso_local local_unnamed_addr global [100010 x i32], align 16
@c = external dso_local local_unnamed_addr global [100010 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z13counting_sorti(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 300, ptr %2, align 4, !tbaa !5
  %3 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %4 = load i32, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400040) @c, i8 0, i64 400040, i1 false)
  %5 = load i32, ptr @N, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph.preheader, label %.preheader31

.lr.ph.preheader:                                 ; preds = %1
  %7 = sext i32 %0 to i64
  %8 = zext nneg i32 %5 to i64
  %wide.trip.count = zext nneg i32 %5 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %9 = icmp eq i32 %5, 1
  br i1 %9, label %.preheader31.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

.preheader31.loopexit.unr-lcssa:                  ; preds = %37, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %37 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader31, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader31.loopexit.unr-lcssa
  %10 = add nsw i64 %indvars.iv.unr, %7
  %11 = icmp slt i64 %10, %8
  br i1 %11, label %12, label %.preheader31.loopexit.epilog-lcssa

12:                                               ; preds = %.lr.ph.epil
  %13 = getelementptr inbounds [100010 x i32], ptr @ra, i64 0, i64 %10
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  br label %.preheader31.loopexit.epilog-lcssa

.preheader31.loopexit.epilog-lcssa:               ; preds = %12, %.lr.ph.epil
  %16 = phi i64 [ %15, %12 ], [ 0, %.lr.ph.epil ]
  %17 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %17, align 4, !tbaa !5
  br label %.preheader31

.preheader31:                                     ; preds = %.preheader31.loopexit.epilog-lcssa, %.preheader31.loopexit.unr-lcssa, %1
  %20 = icmp sgt i32 %4, 0
  br i1 %20, label %.lr.ph35.preheader, label %.preheader30

.lr.ph35.preheader:                               ; preds = %.preheader31
  %wide.trip.count44 = zext nneg i32 %4 to i64
  %xtraiter54 = and i64 %wide.trip.count44, 3
  %21 = icmp ult i32 %4, 4
  br i1 %21, label %.preheader30.loopexit.unr-lcssa, label %.lr.ph35.preheader.new

.lr.ph35.preheader.new:                           ; preds = %.lr.ph35.preheader
  %unroll_iter56 = and i64 %wide.trip.count44, 2147483644
  br label %.lr.ph35

.lr.ph:                                           ; preds = %37, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %37 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %37 ]
  %22 = add nsw i64 %indvars.iv, %7
  %23 = icmp slt i64 %22, %8
  br i1 %23, label %24, label %.lr.ph.1

24:                                               ; preds = %.lr.ph
  %25 = getelementptr inbounds [100010 x i32], ptr @ra, i64 0, i64 %22
  %26 = load i32, ptr %25, align 4, !tbaa !5
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph, %24
  %27 = phi i32 [ %26, %24 ], [ 0, %.lr.ph ]
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %32 = add nsw i64 %indvars.iv.next, %7
  %33 = icmp slt i64 %32, %8
  br i1 %33, label %34, label %37

34:                                               ; preds = %.lr.ph.1
  %35 = getelementptr inbounds [100010 x i32], ptr @ra, i64 0, i64 %32
  %36 = load i32, ptr %35, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %34, %.lr.ph.1
  %38 = phi i32 [ %36, %34 ], [ 0, %.lr.ph.1 ]
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader31.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !9

.preheader30.loopexit.unr-lcssa:                  ; preds = %.lr.ph35, %.lr.ph35.preheader
  %indvars.iv41.unr = phi i64 [ 0, %.lr.ph35.preheader ], [ %indvars.iv.next42.3, %.lr.ph35 ]
  %.02533.unr = phi i32 [ 0, %.lr.ph35.preheader ], [ %57, %.lr.ph35 ]
  %lcmp.mod55.not = icmp eq i64 %xtraiter54, 0
  br i1 %lcmp.mod55.not, label %.preheader30, label %.lr.ph35.epil

.lr.ph35.epil:                                    ; preds = %.preheader30.loopexit.unr-lcssa, %.lr.ph35.epil
  %indvars.iv41.epil = phi i64 [ %indvars.iv.next42.epil, %.lr.ph35.epil ], [ %indvars.iv41.unr, %.preheader30.loopexit.unr-lcssa ]
  %.02533.epil = phi i32 [ %45, %.lr.ph35.epil ], [ %.02533.unr, %.preheader30.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph35.epil ], [ 0, %.preheader30.loopexit.unr-lcssa ]
  %43 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %indvars.iv41.epil
  %44 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %.02533.epil, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, %.02533.epil
  %indvars.iv.next42.epil = add nuw nsw i64 %indvars.iv41.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter54
  br i1 %epil.iter.cmp.not, label %.preheader30, label %.lr.ph35.epil, !llvm.loop !11

.preheader30:                                     ; preds = %.preheader30.loopexit.unr-lcssa, %.lr.ph35.epil, %.preheader31
  br i1 %6, label %.lr.ph37.preheader, label %._crit_edge

.lr.ph37.preheader:                               ; preds = %.preheader30
  %wide.trip.count49 = zext nneg i32 %5 to i64
  br label %.lr.ph37

.lr.ph35:                                         ; preds = %.lr.ph35, %.lr.ph35.preheader.new
  %indvars.iv41 = phi i64 [ 0, %.lr.ph35.preheader.new ], [ %indvars.iv.next42.3, %.lr.ph35 ]
  %.02533 = phi i32 [ 0, %.lr.ph35.preheader.new ], [ %57, %.lr.ph35 ]
  %niter57 = phi i64 [ 0, %.lr.ph35.preheader.new ], [ %niter57.next.3, %.lr.ph35 ]
  %46 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %indvars.iv41
  %47 = load i32, ptr %46, align 16, !tbaa !5
  store i32 %.02533, ptr %46, align 16, !tbaa !5
  %48 = add nsw i32 %47, %.02533
  %indvars.iv.next42 = or disjoint i64 %indvars.iv41, 1
  %49 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %indvars.iv.next42
  %50 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %48, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, %48
  %indvars.iv.next42.1 = or disjoint i64 %indvars.iv41, 2
  %52 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %indvars.iv.next42.1
  %53 = load i32, ptr %52, align 8, !tbaa !5
  store i32 %51, ptr %52, align 8, !tbaa !5
  %54 = add nsw i32 %53, %51
  %indvars.iv.next42.2 = or disjoint i64 %indvars.iv41, 3
  %55 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %indvars.iv.next42.2
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %54, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, %54
  %indvars.iv.next42.3 = add nuw nsw i64 %indvars.iv41, 4
  %niter57.next.3 = add i64 %niter57, 4
  %niter57.ncmp.3 = icmp eq i64 %niter57.next.3, %unroll_iter56
  br i1 %niter57.ncmp.3, label %.preheader30.loopexit.unr-lcssa, label %.lr.ph35, !llvm.loop !13

.preheader:                                       ; preds = %68
  br i1 %6, label %.lr.ph39.preheader, label %._crit_edge

.lr.ph39.preheader:                               ; preds = %.preheader
  %58 = zext nneg i32 %5 to i64
  %59 = shl nuw nsw i64 %58, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @sa, ptr nonnull align 16 @temp_sa, i64 %59, i1 false), !tbaa !5
  br label %._crit_edge

.lr.ph37:                                         ; preds = %.lr.ph37.preheader, %68
  %indvars.iv46 = phi i64 [ 0, %.lr.ph37.preheader ], [ %indvars.iv.next47, %68 ]
  %60 = getelementptr inbounds [100010 x i32], ptr @sa, i64 0, i64 %indvars.iv46
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, %0
  %63 = icmp slt i32 %62, %5
  br i1 %63, label %64, label %68

64:                                               ; preds = %.lr.ph37
  %65 = sext i32 %62 to i64
  %66 = getelementptr inbounds [100010 x i32], ptr @ra, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %.lr.ph37, %64
  %69 = phi i32 [ %67, %64 ], [ 0, %.lr.ph37 ]
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100010 x i32], ptr @c, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %71, align 4, !tbaa !5
  %74 = sext i32 %72 to i64
  %75 = getelementptr inbounds [100010 x i32], ptr @temp_sa, i64 0, i64 %74
  store i32 %61, ptr %75, align 4, !tbaa !5
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond50.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count49
  br i1 %exitcond50.not, label %.preheader, label %.lr.ph37, !llvm.loop !14

._crit_edge:                                      ; preds = %.preheader30, %.lr.ph39.preheader, %.preheader
  ret void
}

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

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

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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