; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed (main)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.sc_dt::sc_int" = type { %"class.sc_dt::sc_int_base" }
%"class.sc_dt::sc_int_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [124 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @sc_main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.sc_dt::sc_int", align 8
  %6 = alloca %"class.sc_dt::sc_int", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZN5sc_dt6sc_intILi48EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  invoke void @_ZN5sc_dt6sc_intILi48EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %12 unwind label %17

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %99, %12
  %14 = load i32, ptr %9, align 4, !tbaa !5
  %15 = icmp ult i32 %14, 48
  br i1 %15, label %21, label %16

16:                                               ; preds = %13
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %103

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  %19 = extractvalue { ptr, i32 } %18, 0
  store ptr %19, ptr %7, align 8
  %20 = extractvalue { ptr, i32 } %18, 1
  store i32 %20, ptr %8, align 4
  br label %104

21:                                               ; preds = %13
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %23 unwind label %33

23:                                               ; preds = %21
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef %24)
          to label %26 unwind label %33

26:                                               ; preds = %23
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %28 unwind label %33

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %29

29:                                               ; preds = %91, %28
  %30 = load i64, ptr %11, align 8, !tbaa !11
  %31 = icmp ult i64 %30, 10000
  br i1 %31, label %37, label %32

32:                                               ; preds = %29
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %98

33:                                               ; preds = %26, %23, %21
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  br label %102

37:                                               ; preds = %29
  %38 = load i64, ptr %11, align 8, !tbaa !11
  %39 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt6sc_intILi48EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %38)
          to label %40 unwind label %94

40:                                               ; preds = %37
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %41)
          to label %43 unwind label %94

43:                                               ; preds = %40
  %44 = invoke noundef i64 @_ZNK5sc_dt15sc_int_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24) %42)
          to label %45 unwind label %94

45:                                               ; preds = %43
  %46 = icmp ne i64 %44, 0
  %47 = zext i1 %46 to i32
  %48 = load i64, ptr %11, align 8, !tbaa !11
  %49 = load i32, ptr %9, align 4, !tbaa !5
  %50 = zext i32 %49 to i64
  %51 = shl i64 1, %50
  %52 = and i64 %48, %51
  %53 = icmp ne i64 %52, 0
  %54 = zext i1 %53 to i64
  %55 = select i1 %53, i32 1, i32 0
  %56 = icmp eq i32 %47, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %45
  br label %60

58:                                               ; preds = %45
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 56)
          to label %59 unwind label %94

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59, %57
  %61 = phi i32 [ 0, %57 ], [ 0, %59 ]
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %62)
          to label %64 unwind label %94

64:                                               ; preds = %60
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %65)
          to label %67 unwind label %94

67:                                               ; preds = %64
  %68 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt13sc_int_bitrefaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(24) %63)
          to label %69 unwind label %94

69:                                               ; preds = %67
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %70)
          to label %72 unwind label %94

72:                                               ; preds = %69
  %73 = invoke noundef i64 @_ZNK5sc_dt15sc_int_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24) %71)
          to label %74 unwind label %94

74:                                               ; preds = %72
  %75 = icmp ne i64 %73, 0
  %76 = zext i1 %75 to i32
  %77 = load i64, ptr %11, align 8, !tbaa !11
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = zext i32 %78 to i64
  %80 = shl i64 1, %79
  %81 = and i64 %77, %80
  %82 = icmp ne i64 %81, 0
  %83 = zext i1 %82 to i64
  %84 = select i1 %82, i32 1, i32 0
  %85 = icmp eq i32 %76, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %74
  br label %89

87:                                               ; preds = %74
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 58)
          to label %88 unwind label %94

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88, %86
  %90 = phi i32 [ 0, %86 ], [ 0, %88 ]
  br label %91

91:                                               ; preds = %89
  %92 = load i64, ptr %11, align 8, !tbaa !11
  %93 = add i64 %92, 1
  store i64 %93, ptr %11, align 8, !tbaa !11
  br label %29, !llvm.loop !13

94:                                               ; preds = %87, %72, %69, %67, %64, %60, %58, %43, %40, %37
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %102

98:                                               ; preds = %32
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = add i32 %100, 1
  store i32 %101, ptr %9, align 4, !tbaa !5
  br label %13, !llvm.loop !15

102:                                              ; preds = %94, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %104

103:                                              ; preds = %16
  store i32 1, ptr %10, align 4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  ret i32 0

104:                                              ; preds = %102, %17
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %7, align 8
  %107 = load i32, ptr %8, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt6sc_intILi48EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt6sc_intILi48EEaSEy(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5sc_dt15sc_int_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt13sc_int_bitrefaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; 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 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 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 = { "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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.sc_dt::sc_int" = type { %"class.sc_dt::sc_int_base" }
%"class.sc_dt::sc_int_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [124 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @sc_main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.sc_dt::sc_int", align 8
  %4 = alloca %"class.sc_dt::sc_int", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZN5sc_dt6sc_intILi48EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  invoke void @_ZN5sc_dt6sc_intILi48EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %.preheader21 unwind label %6

5:                                                ; preds = %15
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret i32 0

6:                                                ; preds = %2
  %7 = landingpad { ptr, i32 }
          cleanup
  br label %48

.preheader21:                                     ; preds = %2, %15
  %indvars.iv = phi i64 [ %indvars.iv.next, %15 ], [ 0, %2 ]
  %8 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %9 unwind label %16

9:                                                ; preds = %.preheader21
  %10 = trunc nuw nsw i64 %indvars.iv to i32
  %11 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %10)
          to label %12 unwind label %16

12:                                               ; preds = %9
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %16

.preheader:                                       ; preds = %12
  %14 = shl nuw nsw i64 1, %indvars.iv
  br label %18

15:                                               ; preds = %43
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond25.not = icmp eq i64 %indvars.iv.next, 48
  br i1 %exitcond25.not, label %5, label %.preheader21, !llvm.loop !5

16:                                               ; preds = %12, %9, %.preheader21
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %47

18:                                               ; preds = %.preheader, %43
  %.022 = phi i64 [ 0, %.preheader ], [ %44, %43 ]
  %19 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt6sc_intILi48EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.022)
          to label %20 unwind label %45

20:                                               ; preds = %18
  %21 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %10)
          to label %22 unwind label %45

22:                                               ; preds = %20
  %23 = invoke noundef i64 @_ZNK5sc_dt15sc_int_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %24 unwind label %45

24:                                               ; preds = %22
  %25 = and i64 %.022, %14
  %.not = icmp ne i64 %25, 0
  %26 = icmp eq i64 %23, 0
  %27 = xor i1 %.not, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 56)
          to label %29 unwind label %45

29:                                               ; preds = %28, %24
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %10)
          to label %31 unwind label %45

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %10)
          to label %33 unwind label %45

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt13sc_int_bitrefaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %35 unwind label %45

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %10)
          to label %37 unwind label %45

37:                                               ; preds = %35
  %38 = invoke noundef i64 @_ZNK5sc_dt15sc_int_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24) %36)
          to label %39 unwind label %45

39:                                               ; preds = %37
  %40 = icmp eq i64 %38, 0
  %41 = xor i1 %.not, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 58)
          to label %43 unwind label %45

43:                                               ; preds = %39, %42
  %44 = add nuw nsw i64 %.022, 1
  %exitcond.not = icmp eq i64 %44, 10000
  br i1 %exitcond.not, label %15, label %18, !llvm.loop !7

45:                                               ; preds = %42, %37, %35, %33, %31, %29, %28, %22, %20, %18
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %47

47:                                               ; preds = %45, %16
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %17, %16 ]
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %48

48:                                               ; preds = %47, %6
  %.pn.pn = phi { ptr, i32 } [ %.pn, %47 ], [ %7, %6 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt6sc_intILi48EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt6sc_intILi48EEaSEy(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt11sc_int_baseixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5sc_dt15sc_int_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt13sc_int_bitrefaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 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 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 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 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 = { "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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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