; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/datatypes/int/sc_signed.ll (ZNK5sc_dt9sc_signed7to_uintEv)

; 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.sc_dt::sc_signed" = type { %"class.sc_dt::sc_value_base", i32, i32, i32, ptr }
%"class.sc_dt::sc_value_base" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5sc_dt6sc_minIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt8vec_copyEiPjPKj(i32 noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK5sc_dt9sc_signed7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #6 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  %9 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 1
  %10 = load i32, ptr %9, align 8, !tbaa !9
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  store i32 0, ptr %2, align 4
  br label %76

13:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 2, ptr %5, align 4, !tbaa !13
  %14 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 3
  %15 = call noundef i32 @_ZN5sc_dt6sc_minIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  store i32 %15, ptr %4, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !13
  %16 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 1
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = icmp eq i32 %17, -1
  br i1 %18, label %19, label %58

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %20 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !14
  %22 = sext i32 %21 to i64
  %23 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %22, i64 4)
  %24 = extractvalue { i64, i1 } %23, 1
  %25 = extractvalue { i64, i1 } %23, 0
  %26 = select i1 %24, i64 -1, i64 %25
  %27 = call noalias noundef nonnull ptr @_Znam(i64 noundef %26) #8
  store ptr %27, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 3
  %29 = load i32, ptr %28, align 8, !tbaa !14
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  call void @_ZN5sc_dt8vec_copyEiPjPKj(i32 noundef %29, ptr noundef %30, ptr noundef %32)
  %33 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 2
  %36 = load i32, ptr %35, align 4, !tbaa !16
  %37 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !14
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN5sc_dt24convert_SM_to_2C_trimmedEiiiiPj(i32 noundef 1, i32 noundef %34, i32 noundef %36, i32 noundef %38, ptr noundef %39)
  br label %40

40:                                               ; preds = %44, %19
  %41 = load i32, ptr %4, align 4, !tbaa !13
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %4, align 4, !tbaa !13
  %43 = icmp sge i32 %42, 0
  br i1 %43, label %44, label %53

44:                                               ; preds = %40
  %45 = load i32, ptr %6, align 4, !tbaa !13
  %46 = shl i32 %45, 30
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load i32, ptr %4, align 4, !tbaa !13
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = add i32 %46, %51
  store i32 %52, ptr %6, align 4, !tbaa !13
  br label %40, !llvm.loop !17

53:                                               ; preds = %40
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = icmp eq ptr %54, null
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  call void @_ZdaPv(ptr noundef %54) #9
  br label %57

57:                                               ; preds = %56, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %74

58:                                               ; preds = %13
  br label %59

59:                                               ; preds = %63, %58
  %60 = load i32, ptr %4, align 4, !tbaa !13
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %4, align 4, !tbaa !13
  %62 = icmp sge i32 %61, 0
  br i1 %62, label %63, label %73

63:                                               ; preds = %59
  %64 = load i32, ptr %6, align 4, !tbaa !13
  %65 = shl i32 %64, 30
  %66 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  %68 = load i32, ptr %4, align 4, !tbaa !13
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %67, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = add i32 %65, %71
  store i32 %72, ptr %6, align 4, !tbaa !13
  br label %59, !llvm.loop !19

73:                                               ; preds = %59
  br label %74

74:                                               ; preds = %73, %57
  %75 = load i32, ptr %6, align 4, !tbaa !13
  store i32 %75, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %76

76:                                               ; preds = %74, %12
  %77 = load i32, ptr %2, align 4
  ret i32 %77
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN5sc_dt9sc_signedE", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24}
!11 = !{!"_ZTSN5sc_dt13sc_value_baseE"}
!12 = !{!"int", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!10, !12, i64 16}
!15 = !{!10, !6, i64 24}
!16 = !{!10, !12, i64 12}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt8vec_copyEiPjPKj(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK5sc_dt9sc_signed7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %0) local_unnamed_addr #5 align 2 {
  %2 = alloca i32, align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %.loopexit, label %6

6:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 2, ptr %2, align 4, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = call noundef i32 @_ZN5sc_dt6sc_minIiEEKT_RS2_S3_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %9 = load i32, ptr %3, align 8, !tbaa !5
  %10 = icmp eq i32 %9, -1
  br i1 %10, label %16, label %.preheader

.preheader:                                       ; preds = %6
  %11 = icmp sgt i32 %8, 0
  br i1 %11, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = zext nneg i32 %8 to i64
  %xtraiter = and i64 %14, 3
  %15 = icmp ult i32 %8, 4
  br i1 %15, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, 2147483644
  br label %43

16:                                               ; preds = %6
  %17 = load i32, ptr %7, align 8, !tbaa !14
  %18 = sext i32 %17 to i64
  %19 = icmp slt i32 %17, 0
  %20 = shl nsw i64 %18, 2
  %21 = select i1 %19, i64 -1, i64 %20
  %22 = call noalias noundef nonnull ptr @_Znam(i64 noundef %21) #7
  %23 = getelementptr inbounds i8, ptr %0, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  call void @_ZN5sc_dt8vec_copyEiPjPKj(i32 noundef %17, ptr noundef nonnull %22, ptr noundef %24)
  %25 = load i32, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %0, i64 12
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %28 = load i32, ptr %7, align 8, !tbaa !14
  call void @_ZN5sc_dt24convert_SM_to_2C_trimmedEiiiiPj(i32 noundef 1, i32 noundef %25, i32 noundef %27, i32 noundef %28, ptr noundef nonnull %22)
  %29 = icmp sgt i32 %8, 0
  br i1 %29, label %.lr.ph21.preheader, label %._crit_edge

.lr.ph21.preheader:                               ; preds = %16
  %30 = zext nneg i32 %8 to i64
  %xtraiter32 = and i64 %30, 3
  %31 = icmp ult i32 %8, 4
  br i1 %31, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph21.preheader.new

.lr.ph21.preheader.new:                           ; preds = %.lr.ph21.preheader
  %unroll_iter36 = and i64 %30, 2147483644
  br label %.lr.ph21

.lr.ph21:                                         ; preds = %.lr.ph21, %.lr.ph21.preheader.new
  %indvars.iv25 = phi i64 [ %30, %.lr.ph21.preheader.new ], [ %indvars.iv.next26.3, %.lr.ph21 ]
  %niter37 = phi i64 [ 0, %.lr.ph21.preheader.new ], [ %niter37.next.3, %.lr.ph21 ]
  %indvars.iv.next26.3 = add nsw i64 %indvars.iv25, -4
  %niter37.next.3 = add i64 %niter37, 4
  %niter37.ncmp.3.not = icmp eq i64 %niter37.next.3, %unroll_iter36
  br i1 %niter37.ncmp.3.not, label %._crit_edge.loopexit.unr-lcssa.loopexit, label %.lr.ph21, !llvm.loop !16

._crit_edge.loopexit.unr-lcssa.loopexit:          ; preds = %.lr.ph21
  %32 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv.next26.3
  %33 = load i32, ptr %32, align 4, !tbaa !12
  %34 = getelementptr i32, ptr %22, i64 %indvars.iv25
  %35 = getelementptr i8, ptr %34, i64 -12
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = shl i32 %36, 30
  %38 = add i32 %33, %37
  br label %._crit_edge.loopexit.unr-lcssa

._crit_edge.loopexit.unr-lcssa:                   ; preds = %._crit_edge.loopexit.unr-lcssa.loopexit, %.lr.ph21.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph21.preheader ], [ %38, %._crit_edge.loopexit.unr-lcssa.loopexit ]
  %indvars.iv25.unr = phi i64 [ %30, %.lr.ph21.preheader ], [ %indvars.iv.next26.3, %._crit_edge.loopexit.unr-lcssa.loopexit ]
  %.01220.unr = phi i32 [ 0, %.lr.ph21.preheader ], [ %38, %._crit_edge.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod34.not = icmp eq i64 %xtraiter32, 0
  br i1 %lcmp.mod34.not, label %._crit_edge, label %.lr.ph21.epil

.lr.ph21.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph21.epil
  %indvars.iv25.epil = phi i64 [ %indvars.iv.next26.epil, %.lr.ph21.epil ], [ %indvars.iv25.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.01220.epil = phi i32 [ %42, %.lr.ph21.epil ], [ %.01220.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter33 = phi i64 [ %epil.iter33.next, %.lr.ph21.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %indvars.iv.next26.epil = add nsw i64 %indvars.iv25.epil, -1
  %39 = shl i32 %.01220.epil, 30
  %40 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv.next26.epil
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = add i32 %41, %39
  %epil.iter33.next = add i64 %epil.iter33, 1
  %epil.iter33.cmp.not = icmp eq i64 %epil.iter33.next, %xtraiter32
  br i1 %epil.iter33.cmp.not, label %._crit_edge, label %.lr.ph21.epil, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph21.epil, %16
  %.012.lcssa = phi i32 [ 0, %16 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %42, %.lr.ph21.epil ]
  call void @_ZdaPv(ptr noundef nonnull %22) #8
  br label %.loopexit

43:                                               ; preds = %43, %.lr.ph.new
  %indvars.iv = phi i64 [ %14, %.lr.ph.new ], [ %indvars.iv.next.3, %43 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %43 ]
  %indvars.iv.next.3 = add nsw i64 %indvars.iv, -4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3.not = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3.not, label %.loopexit.loopexit.unr-lcssa.loopexit, label %43, !llvm.loop !20

.loopexit.loopexit.unr-lcssa.loopexit:            ; preds = %43
  %44 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next.3
  %45 = load i32, ptr %44, align 4, !tbaa !12
  %46 = getelementptr i32, ptr %13, i64 %indvars.iv
  %47 = getelementptr i8, ptr %46, i64 -12
  %48 = load i32, ptr %47, align 4, !tbaa !12
  %49 = shl i32 %48, 30
  %50 = add i32 %45, %49
  br label %.loopexit.loopexit.unr-lcssa

.loopexit.loopexit.unr-lcssa:                     ; preds = %.loopexit.loopexit.unr-lcssa.loopexit, %.lr.ph
  %.lcssa30.ph = phi i32 [ poison, %.lr.ph ], [ %50, %.loopexit.loopexit.unr-lcssa.loopexit ]
  %indvars.iv.unr = phi i64 [ %14, %.lr.ph ], [ %indvars.iv.next.3, %.loopexit.loopexit.unr-lcssa.loopexit ]
  %.118.unr = phi i32 [ 0, %.lr.ph ], [ %50, %.loopexit.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit.loopexit.unr-lcssa ]
  %.118.epil = phi i32 [ %54, %.epil.preheader ], [ %.118.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %indvars.iv.next.epil = add nsw i64 %indvars.iv.epil, -1
  %51 = shl i32 %.118.epil, 30
  %52 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next.epil
  %53 = load i32, ptr %52, align 4, !tbaa !12
  %54 = add i32 %53, %51
  %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 %.epil.preheader, !llvm.loop !21

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %.preheader, %._crit_edge, %1
  %.0 = phi i32 [ 0, %1 ], [ %.012.lcssa, %._crit_edge ], [ 0, %.preheader ], [ %.lcssa30.ph, %.loopexit.loopexit.unr-lcssa ], [ %54, %.epil.preheader ]
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
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, !8, i64 8}
!6 = !{!"_ZTSN5sc_dt9sc_signedE", !7, i64 0, !8, i64 8, !8, i64 12, !8, i64 16, !11, i64 24}
!7 = !{!"_ZTSN5sc_dt13sc_value_baseE"}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!8, !8, i64 0}
!13 = !{!6, !11, i64 24}
!14 = !{!6, !8, i64 16}
!15 = !{!6, !8, i64 12}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !19}


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