; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/examples/isqrt (isqrt)

; 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_uint.37" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }
%"class.sc_dt::sc_uint" = type { %"class.sc_dt::sc_uint_base" }
%"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 }

; 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: mustprogress uwtable
declare dso_local void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3isq6isqrt5EN5sc_dt7sc_uintILi18EEE(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_uint.37") align 8 %0, ptr noundef nonnull align 8 dereferenceable(1696) %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.sc_dt::sc_uint", align 8
  %8 = alloca %"class.sc_dt::sc_uint", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.sc_dt::sc_uint", align 8
  %12 = alloca %"class.sc_dt::sc_int", align 8
  %13 = alloca %"class.sc_dt::sc_int", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #3
  call void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #3
  invoke void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %15 unwind label %77

15:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #3
  invoke void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %16 unwind label %81

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #3
  invoke void @_ZN5sc_dt6sc_intILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %17 unwind label %85

17:                                               ; preds = %16
  %18 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 0)
          to label %19 unwind label %89

19:                                               ; preds = %17
  %20 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 65536)
          to label %21 unwind label %89

21:                                               ; preds = %19
  br label %22

22:                                               ; preds = %76, %21
  %23 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %24 unwind label %89

24:                                               ; preds = %22
  %25 = icmp ne i64 %23, 0
  br i1 %25, label %26, label %102

26:                                               ; preds = %24
  %27 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %28 unwind label %89

28:                                               ; preds = %26
  %29 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %30 unwind label %89

30:                                               ; preds = %28
  %31 = or i64 %27, %29
  %32 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %31)
          to label %33 unwind label %89

33:                                               ; preds = %30
  %34 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %35 unwind label %89

35:                                               ; preds = %33
  %36 = lshr i64 %34, 1
  %37 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %36)
          to label %38 unwind label %89

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #3
  %39 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %40 unwind label %93

40:                                               ; preds = %38
  %41 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %42 unwind label %93

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

44:                                               ; preds = %42
  %45 = sub i64 %41, %43
  %46 = xor i64 %45, -1
  %47 = or i64 %39, %46
  invoke void @_ZN5sc_dt6sc_intILi18EEC2Ey(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %47)
          to label %48 unwind label %93

48:                                               ; preds = %44
  %49 = invoke noundef i64 @_ZNK5sc_dt11sc_int_basecvxEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %50 unwind label %97

50:                                               ; preds = %48
  %51 = ashr i64 %49, 16
  %52 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt6sc_intILi18EEaSEx(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %51)
          to label %53 unwind label %97

53:                                               ; preds = %50
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  %54 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %55 unwind label %89

55:                                               ; preds = %53
  %56 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %57 unwind label %89

57:                                               ; preds = %55
  %58 = invoke noundef i64 @_ZNK5sc_dt11sc_int_basecvxEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %59 unwind label %89

59:                                               ; preds = %57
  %60 = and i64 %56, %58
  %61 = sub i64 %54, %60
  %62 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %61)
          to label %63 unwind label %89

63:                                               ; preds = %59
  %64 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %65 unwind label %89

65:                                               ; preds = %63
  %66 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %67 unwind label %89

67:                                               ; preds = %65
  %68 = invoke noundef i64 @_ZNK5sc_dt11sc_int_basecvxEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %69 unwind label %89

69:                                               ; preds = %67
  %70 = and i64 %66, %68
  %71 = or i64 %64, %70
  %72 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %71)
          to label %73 unwind label %89

73:                                               ; preds = %69
  br label %74

74:                                               ; preds = %73
  %75 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EErSEy(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 2)
          to label %76 unwind label %89

76:                                               ; preds = %74
  br label %22, !llvm.loop !9

77:                                               ; preds = %3
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  br label %107

81:                                               ; preds = %15
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %9, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %10, align 4
  br label %106

85:                                               ; preds = %16
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  br label %105

89:                                               ; preds = %102, %74, %69, %67, %65, %63, %59, %57, %55, %53, %35, %33, %30, %28, %26, %22, %19, %17
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %9, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %10, align 4
  br label %104

93:                                               ; preds = %44, %42, %40, %38
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %9, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %10, align 4
  br label %101

97:                                               ; preds = %50, %48
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  br label %101

101:                                              ; preds = %97, %93
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  br label %104

102:                                              ; preds = %24
  invoke void @_ZN5sc_dt7sc_uintILi10EEC2ERKNS_12sc_uint_baseE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %103 unwind label %89

103:                                              ; preds = %102
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #3
  ret void

104:                                              ; preds = %101, %89
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  br label %105

105:                                              ; preds = %104, %85
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  br label %106

106:                                              ; preds = %105, %81
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  br label %107

107:                                              ; preds = %106, %77
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #3
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %9, align 8
  %110 = load i32, ptr %10, align 4
  %111 = insertvalue { ptr, i32 } poison, ptr %109, 0
  %112 = insertvalue { ptr, i32 } %111, i32 %110, 1
  resume { ptr, i32 } %112
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt6sc_intILi18EEC2Ey(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #1 align 2

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

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

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

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

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

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


; 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_uint.37" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }
%"class.sc_dt::sc_uint" = type { %"class.sc_dt::sc_uint_base" }
%"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 }

; 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: mustprogress uwtable
declare dso_local void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3isq6isqrt5EN5sc_dt7sc_uintILi18EEE(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_uint.37") align 8 %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(1696) %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.sc_dt::sc_uint", align 8
  %5 = alloca %"class.sc_dt::sc_uint", align 8
  %6 = alloca %"class.sc_dt::sc_uint", align 8
  %7 = alloca %"class.sc_dt::sc_int", align 8
  %8 = alloca %"class.sc_dt::sc_int", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  call void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  invoke void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %9 unwind label %52

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  invoke void @_ZN5sc_dt7sc_uintILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %10 unwind label %54

10:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #3
  invoke void @_ZN5sc_dt6sc_intILi18EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %11 unwind label %56

11:                                               ; preds = %10
  %12 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %13 unwind label %.loopexit.split-lp

13:                                               ; preds = %11
  %14 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 65536)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %13, %50
  %15 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %63, label %16

16:                                               ; preds = %.preheader
  %17 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %18 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %19 = or i64 %18, %17
  %20 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %19)
          to label %21 unwind label %.loopexit

21:                                               ; preds = %16
  %22 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %23 = lshr i64 %22, 1
  %24 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %23)
          to label %25 unwind label %.loopexit

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #3
  %26 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %27 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %28 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %29 = xor i64 %27, -1
  %30 = add i64 %28, %29
  %31 = or i64 %30, %26
  invoke void @_ZN5sc_dt6sc_intILi18EEC2Ey(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %31)
          to label %32 unwind label %58

32:                                               ; preds = %25
  %33 = call noundef i64 @_ZNK5sc_dt11sc_int_basecvxEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %34 = ashr i64 %33, 16
  %35 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt6sc_intILi18EEaSEx(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %34)
          to label %36 unwind label %60

36:                                               ; preds = %32
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #3
  %37 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %38 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %39 = call noundef i64 @_ZNK5sc_dt11sc_int_basecvxEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %40 = and i64 %39, %38
  %41 = sub i64 %37, %40
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %41)
          to label %43 unwind label %.loopexit

43:                                               ; preds = %36
  %44 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %45 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %46 = call noundef i64 @_ZNK5sc_dt11sc_int_basecvxEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %47 = and i64 %46, %45
  %48 = or i64 %47, %44
  %49 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EEaSEy(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48)
          to label %50 unwind label %.loopexit

50:                                               ; preds = %43
  %51 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi18EErSEy(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 2)
          to label %.preheader unwind label %.loopexit, !llvm.loop !5

52:                                               ; preds = %3
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %68

54:                                               ; preds = %9
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %67

56:                                               ; preds = %10
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %66

.loopexit:                                        ; preds = %16, %21, %36, %43, %50
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %65

.loopexit.split-lp:                               ; preds = %11, %13, %63
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %65

58:                                               ; preds = %25
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %32
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  br label %62

62:                                               ; preds = %60, %58
  %.pn = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #3
  br label %65

63:                                               ; preds = %.preheader
  invoke void @_ZN5sc_dt7sc_uintILi10EEC2ERKNS_12sc_uint_baseE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %64 unwind label %.loopexit.split-lp

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

65:                                               ; preds = %.loopexit, %.loopexit.split-lp, %62
  %.pn8 = phi { ptr, i32 } [ %.pn, %62 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  br label %66

66:                                               ; preds = %65, %56
  %.pn8.pn = phi { ptr, i32 } [ %.pn8, %65 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %67

67:                                               ; preds = %66, %54
  %.pn8.pn.pn = phi { ptr, i32 } [ %.pn8.pn, %66 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  br label %68

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt6sc_intILi18EEC2Ey(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #1 align 2

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

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

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

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

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

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


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass