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

; 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_unsigned" = type { %"class.sc_dt::sc_value_base", i32, i32, i32, ptr }
%"class.sc_dt::sc_value_base" = type { ptr }
%"class.sc_dt::sc_signed" = type { %"class.sc_dt::sc_value_base", i32, i32, i32, ptr }
%"class.sc_dt::sc_signed_subref_r" = type <{ %"class.sc_dt::sc_value_base", i32, [4 x i8], ptr, i32, [4 x i8] }>

@_ZTVN5sc_dt9sc_signedE = external dso_local unnamed_addr constant { [13 x ptr] }, align 8
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN7sc_core18SC_ID_INIT_FAILED_E = external constant [0 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #1

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt9sc_signedaSERKNS_11sc_unsignedE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt9sc_signed12default_signEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt9sc_signed8num_bitsEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt9sc_signed8makezeroEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt13sc_value_baseC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt9sc_signedC2ERKNS_18sc_signed_subref_rE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(28) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [8192 x i8], align 16
  %9 = alloca %"class.sc_dt::sc_unsigned", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN5sc_dt13sc_value_baseC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  store ptr getelementptr inbounds inrange(-16, 88) ({ [13 x ptr] }, ptr @_ZTVN5sc_dt9sc_signedE, i32 0, i32 0, i32 2), ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 1
  store i32 0, ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 2
  store i32 0, ptr %13, align 4, !tbaa !15
  %14 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 3
  store i32 0, ptr %14, align 8, !tbaa !16
  %15 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 4
  store ptr null, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = invoke noundef i32 @_ZNK5sc_dt18sc_signed_subref_r6lengthEv(ptr noundef nonnull align 8 dereferenceable(28) %16)
          to label %18 unwind label %29

18:                                               ; preds = %2
  store i32 %17, ptr %5, align 4, !tbaa !18
  %19 = invoke noundef i32 @_ZNK5sc_dt9sc_signed12default_signEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %20 unwind label %29

20:                                               ; preds = %18
  %21 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 1
  store i32 %19, ptr %21, align 8, !tbaa !11
  %22 = load i32, ptr %5, align 4, !tbaa !18
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %24, label %33

24:                                               ; preds = %20
  %25 = load i32, ptr %5, align 4, !tbaa !18
  %26 = invoke noundef i32 @_ZNK5sc_dt9sc_signed8num_bitsEi(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef %25)
          to label %27 unwind label %29

27:                                               ; preds = %24
  %28 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 2
  store i32 %26, ptr %28, align 4, !tbaa !15
  br label %43

29:                                               ; preds = %58, %43, %24, %18, %2
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  br label %82

33:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8192, ptr %8) #8
  %34 = getelementptr inbounds [8192 x i8], ptr %8, i64 0, i64 0
  %35 = load i32, ptr %5, align 4, !tbaa !18
  %36 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %34, ptr noundef @.str.15, ptr noundef @.str.9, ptr noundef @.str.9, i32 noundef %35) #8
  %37 = getelementptr inbounds [8192 x i8], ptr %8, i64 0, i64 0
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core18SC_ID_INIT_FAILED_E, ptr noundef %37, ptr noundef @.str.10, i32 noundef 206)
          to label %38 unwind label %39

38:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8192, ptr %8) #8
  br label %43

39:                                               ; preds = %33
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8192, ptr %8) #8
  br label %82

43:                                               ; preds = %38, %27
  %44 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !15
  %46 = sub nsw i32 %45, 1
  %47 = sdiv i32 %46, 30
  %48 = add nsw i32 %47, 1
  %49 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 3
  store i32 %48, ptr %49, align 8, !tbaa !16
  %50 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 3
  %51 = load i32, ptr %50, align 8, !tbaa !16
  %52 = sext i32 %51 to i64
  %53 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %52, i64 4)
  %54 = extractvalue { i64, i1 } %53, 1
  %55 = extractvalue { i64, i1 } %53, 0
  %56 = select i1 %54, i64 -1, i64 %55
  %57 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %56) #9
          to label %58 unwind label %29

58:                                               ; preds = %43
  %59 = getelementptr inbounds %"class.sc_dt::sc_signed", ptr %10, i32 0, i32 4
  store ptr %57, ptr %59, align 8, !tbaa !17
  invoke void @_ZN5sc_dt9sc_signed8makezeroEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %60 unwind label %29

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.sc_dt::sc_signed_subref_r", ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !19
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.sc_dt::sc_signed_subref_r", ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !21
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.sc_dt::sc_signed_subref_r", ptr %67, i32 0, i32 4
  %69 = load i32, ptr %68, align 8, !tbaa !22
  invoke void @_ZN5sc_dt11sc_unsignedC1EPKNS_9sc_signedEii(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %63, i32 noundef %66, i32 noundef %69)
          to label %70 unwind label %73

70:                                               ; preds = %60
  %71 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt9sc_signedaSERKNS_11sc_unsignedE(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %72 unwind label %77

72:                                               ; preds = %70
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void

73:                                               ; preds = %60
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  br label %81

77:                                               ; preds = %70
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %81

81:                                               ; preds = %77, %73
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %82

82:                                               ; preds = %81, %39, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %6, align 8
  %85 = load i32, ptr %7, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt18sc_signed_subref_r6lengthEv(ptr noundef nonnull align 8 dereferenceable(28)) #4 align 2

declare void @_ZN5sc_dt11sc_unsignedC1EPKNS_9sc_signedEii(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 8}
!12 = !{!"_ZTSN5sc_dt9sc_signedE", !13, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !6, i64 24}
!13 = !{!"_ZTSN5sc_dt13sc_value_baseE"}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !14, i64 12}
!16 = !{!12, !14, i64 16}
!17 = !{!12, !6, i64 24}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !6, i64 16}
!20 = !{!"_ZTSN5sc_dt18sc_signed_subref_rE", !13, i64 0, !14, i64 8, !6, i64 16, !14, i64 24}
!21 = !{!20, !14, i64 8}
!22 = !{!20, !14, i64 24}


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

%"class.sc_dt::sc_unsigned" = type { %"class.sc_dt::sc_value_base", i32, i32, i32, ptr }
%"class.sc_dt::sc_value_base" = type { ptr }

@_ZTVN5sc_dt9sc_signedE = external dso_local unnamed_addr constant { [13 x ptr] }, align 8
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN7sc_core18SC_ID_INIT_FAILED_E = external constant [0 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) 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) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt9sc_signedaSERKNS_11sc_unsignedE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt9sc_signed12default_signEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt9sc_signed8num_bitsEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt9sc_signed8makezeroEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt13sc_value_baseC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt9sc_signedC2ERKNS_18sc_signed_subref_rE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(28) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [8192 x i8], align 16
  %4 = alloca %"class.sc_dt::sc_unsigned", align 8
  tail call void @_ZN5sc_dt13sc_value_baseC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  store ptr getelementptr inbounds inrange(-16, 88) (i8, ptr @_ZTVN5sc_dt9sc_signedE, i64 16), ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %5, align 8, !tbaa !8
  %6 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %6, align 4, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 0, ptr %7, align 8, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr null, ptr %8, align 8, !tbaa !16
  %9 = tail call noundef i32 @_ZNK5sc_dt18sc_signed_subref_r6lengthEv(ptr noundef nonnull align 8 dereferenceable(28) %1)
  %10 = tail call noundef i32 @_ZNK5sc_dt9sc_signed12default_signEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  store i32 %10, ptr %5, align 8, !tbaa !8
  %11 = icmp sgt i32 %9, 0
  br i1 %11, label %12, label %16

12:                                               ; preds = %2
  %13 = tail call noundef i32 @_ZNK5sc_dt9sc_signed8num_bitsEi(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %9)
  store i32 %13, ptr %6, align 4, !tbaa !14
  br label %21

14:                                               ; preds = %31, %21
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %47

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %3) #7
  %17 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.9, i32 noundef %9) #7
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core18SC_ID_INIT_FAILED_E, ptr noundef nonnull %3, ptr noundef nonnull @.str.10, i32 noundef 206)
          to label %18 unwind label %19

18:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %3) #7
  %.pre = load i32, ptr %6, align 4, !tbaa !14
  br label %21

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %3) #7
  br label %47

21:                                               ; preds = %18, %12
  %22 = phi i32 [ %.pre, %18 ], [ %13, %12 ]
  %23 = add nsw i32 %22, -1
  %24 = sdiv i32 %23, 30
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %7, align 8, !tbaa !15
  %26 = sext i32 %25 to i64
  %27 = icmp slt i32 %22, -58
  %28 = shl nsw i64 %26, 2
  %29 = select i1 %27, i64 -1, i64 %28
  %30 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %29) #8
          to label %31 unwind label %14

31:                                               ; preds = %21
  store ptr %30, ptr %8, align 8, !tbaa !16
  invoke void @_ZN5sc_dt9sc_signed8makezeroEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %32 unwind label %14

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %1, i64 8
  %36 = load i32, ptr %35, align 8, !tbaa !19
  %37 = getelementptr inbounds i8, ptr %1, i64 24
  %38 = load i32, ptr %37, align 8, !tbaa !20
  invoke void @_ZN5sc_dt11sc_unsignedC1EPKNS_9sc_signedEii(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %34, i32 noundef %36, i32 noundef %38)
          to label %39 unwind label %42

39:                                               ; preds = %32
  %40 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt9sc_signedaSERKNS_11sc_unsignedE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %41 unwind label %44

41:                                               ; preds = %39
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  ret void

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %39
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %46

46:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %47

47:                                               ; preds = %46, %19, %14
  %.pn.pn = phi { ptr, i32 } [ %.pn, %46 ], [ %15, %14 ], [ %20, %19 ]
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5sc_dt18sc_signed_subref_r6lengthEv(ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #4 align 2

declare void @_ZN5sc_dt11sc_unsignedC1EPKNS_9sc_signedEii(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 8}
!9 = !{!"_ZTSN5sc_dt9sc_signedE", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !13, i64 24}
!10 = !{!"_ZTSN5sc_dt13sc_value_baseE"}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"any pointer", !12, i64 0}
!14 = !{!9, !11, i64 12}
!15 = !{!9, !11, i64 16}
!16 = !{!9, !13, i64 24}
!17 = !{!18, !13, i64 16}
!18 = !{!"_ZTSN5sc_dt18sc_signed_subref_rE", !10, i64 0, !11, i64 8, !13, i64 16, !11, i64 24}
!19 = !{!18, !11, i64 8}
!20 = !{!18, !11, i64 24}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass