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

; 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: mustprogress uwtable
define dso_local noundef i64 @_ZNK5sc_dt9sc_signed8to_ulongEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5 align 2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %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 i64 0, ptr %2, align 8
  br label %78

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 3, 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 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !14
  %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 %59

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 !16
  %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 !16
  %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 !17
  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 !18
  %37 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %8, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !16
  %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 %54

44:                                               ; preds = %40
  %45 = load i64, ptr %6, align 8, !tbaa !14
  %46 = shl i64 %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 = zext i32 %51 to i64
  %53 = add i64 %46, %52
  store i64 %53, ptr %6, align 8, !tbaa !14
  br label %40, !llvm.loop !19

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

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

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

59:                                               ; preds = %13
  br label %60

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

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

75:                                               ; preds = %60
  br label %76

76:                                               ; preds = %75, %58
  %77 = load i64, ptr %6, align 8, !tbaa !14
  store i64 %77, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %78

78:                                               ; preds = %76, %12
  %79 = load i64, ptr %2, align 8
  ret i64 %79
}

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

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 = { 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 = { 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 #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 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !12, i64 16}
!17 = !{!10, !6, i64 24}
!18 = !{!10, !12, i64 12}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


; 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: mustprogress uwtable
define dso_local noundef i64 @_ZNK5sc_dt9sc_signed8to_ulongEv(ptr noundef nonnull align 8 dereferenceable(32) %0) local_unnamed_addr #4 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 3, 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 %52

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 i32, ptr %22, i64 %indvars.iv25
  %33 = getelementptr i8, ptr %32, i64 -8
  %34 = load i32, ptr %33, align 4, !tbaa !12
  %35 = zext i32 %34 to i64
  %36 = shl i64 %35, 60
  %37 = getelementptr i32, ptr %22, i64 %indvars.iv25
  %38 = getelementptr i8, ptr %37, i64 -12
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = zext i32 %39 to i64
  %41 = shl nuw nsw i64 %40, 30
  %42 = add i64 %36, %41
  %43 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv.next26.3
  %44 = load i32, ptr %43, align 4, !tbaa !12
  %45 = zext i32 %44 to i64
  %46 = add i64 %42, %45
  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 i64 [ poison, %.lr.ph21.preheader ], [ %46, %._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 i64 [ 0, %.lr.ph21.preheader ], [ %46, %._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 i64 [ %51, %.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
  %47 = shl i64 %.01220.epil, 30
  %48 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv.next26.epil
  %49 = load i32, ptr %48, align 4, !tbaa !12
  %50 = zext i32 %49 to i64
  %51 = add i64 %47, %50
  %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 i64 [ 0, %16 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %51, %.lr.ph21.epil ]
  call void @_ZdaPv(ptr noundef nonnull %22) #8
  br label %.loopexit

52:                                               ; preds = %52, %.lr.ph.new
  %indvars.iv = phi i64 [ %14, %.lr.ph.new ], [ %indvars.iv.next.3, %52 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %52 ]
  %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 %52, !llvm.loop !20

.loopexit.loopexit.unr-lcssa.loopexit:            ; preds = %52
  %53 = getelementptr i32, ptr %13, i64 %indvars.iv
  %54 = getelementptr i8, ptr %53, i64 -8
  %55 = load i32, ptr %54, align 4, !tbaa !12
  %56 = zext i32 %55 to i64
  %57 = shl i64 %56, 60
  %58 = getelementptr i32, ptr %13, i64 %indvars.iv
  %59 = getelementptr i8, ptr %58, i64 -12
  %60 = load i32, ptr %59, align 4, !tbaa !12
  %61 = zext i32 %60 to i64
  %62 = shl nuw nsw i64 %61, 30
  %63 = add i64 %57, %62
  %64 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next.3
  %65 = load i32, ptr %64, align 4, !tbaa !12
  %66 = zext i32 %65 to i64
  %67 = add i64 %63, %66
  br label %.loopexit.loopexit.unr-lcssa

.loopexit.loopexit.unr-lcssa:                     ; preds = %.loopexit.loopexit.unr-lcssa.loopexit, %.lr.ph
  %.lcssa30.ph = phi i64 [ poison, %.lr.ph ], [ %67, %.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 i64 [ 0, %.lr.ph ], [ %67, %.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 i64 [ %72, %.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
  %68 = shl i64 %.118.epil, 30
  %69 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next.epil
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = zext i32 %70 to i64
  %72 = add i64 %68, %71
  %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 i64 [ 0, %1 ], [ %.012.lcssa, %._crit_edge ], [ 0, %.preheader ], [ %.lcssa30.ph, %.loopexit.loopexit.unr-lcssa ], [ %72, %.epil.preheader ]
  ret i64 %.0
}

; 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 #5

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 = { 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 = { 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 = { 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