; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/synth/combo/switch6/switch6.ll (Z6selectjjj)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i16 @_Z6selectjjj(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i16, align 2
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.sc_dt::sc_unsigned", align 8
  %9 = alloca %"class.sc_dt::sc_unsigned", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.sc_dt::sc_signed", align 8
  %13 = alloca %"class.sc_dt::sc_signed", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.sc_dt::sc_signed", align 8
  %16 = alloca %"class.sc_dt::sc_signed", align 8
  %17 = alloca %"class.sc_dt::sc_signed", align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  call void @_ZN5sc_dt11sc_unsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 7)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  invoke void @_ZN5sc_dt11sc_unsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 9)
          to label %18 unwind label %22

18:                                               ; preds = %3
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = lshr i32 %19, 2
  %21 = and i32 %20, 3
  switch i32 %21, label %124 [
    i32 0, label %26
    i32 1, label %68
    i32 2, label %74
    i32 3, label %85
  ]

22:                                               ; preds = %3
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %10, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %11, align 4
  br label %143

26:                                               ; preds = %18
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = add i32 %27, %28
  %30 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %29)
          to label %31 unwind label %38

31:                                               ; preds = %26
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = icmp ugt i32 %32, 23349212
  br i1 %33, label %34, label %51

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  invoke void @_ZN5sc_dtplERKNS_11sc_unsignedEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_signed") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 1)
          to label %35 unwind label %42

35:                                               ; preds = %34
  %36 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %37 unwind label %46

37:                                               ; preds = %35
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %124

38:                                               ; preds = %127, %111, %85, %81, %74, %68, %64, %26
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %10, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %11, align 4
  br label %142

42:                                               ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %10, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %11, align 4
  br label %50

46:                                               ; preds = %35
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %10, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %11, align 4
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %50

50:                                               ; preds = %46, %42
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %142

51:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  invoke void @_ZN5sc_dtmiERKNS_11sc_unsignedEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_signed") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 1)
          to label %52 unwind label %55

52:                                               ; preds = %51
  %53 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %54 unwind label %59

54:                                               ; preds = %52
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %64

55:                                               ; preds = %51
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  br label %63

59:                                               ; preds = %52
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %10, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %11, align 4
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %63

63:                                               ; preds = %59, %55
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %142

64:                                               ; preds = %54
  %65 = invoke noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %66 unwind label %38

66:                                               ; preds = %64
  %67 = trunc i32 %65 to i16
  store i16 %67, ptr %4, align 2
  store i32 1, ptr %14, align 4
  br label %140

68:                                               ; preds = %18
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sub i32 %69, %70
  %72 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %71)
          to label %73 unwind label %38

73:                                               ; preds = %68
  br label %124

74:                                               ; preds = %18
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = lshr i32 %75, 16
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = shl i32 %77, 16
  %79 = add i32 %76, %78
  %80 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %79)
          to label %81 unwind label %38

81:                                               ; preds = %74
  %82 = invoke noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %83 unwind label %38

83:                                               ; preds = %81
  %84 = trunc i32 %82 to i16
  store i16 %84, ptr %4, align 2
  store i32 1, ptr %14, align 4
  br label %140

85:                                               ; preds = %18
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = shl i32 %86, 16
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = lshr i32 %88, 16
  %90 = sub i32 %87, %89
  %91 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %90)
          to label %92 unwind label %38

92:                                               ; preds = %85
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = icmp ult i32 %93, 234328112
  br i1 %94, label %95, label %108

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  invoke void @_ZN5sc_dtmiERKNS_11sc_unsignedEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_signed") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 1)
          to label %96 unwind label %99

96:                                               ; preds = %95
  %97 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %98 unwind label %103

98:                                               ; preds = %96
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %124

99:                                               ; preds = %95
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %10, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %11, align 4
  br label %107

103:                                              ; preds = %96
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %10, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %11, align 4
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %107

107:                                              ; preds = %103, %99
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %142

108:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  invoke void @_ZN5sc_dtplERKNS_11sc_unsignedEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_signed") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 1)
          to label %109 unwind label %115

109:                                              ; preds = %108
  %110 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %111 unwind label %119

111:                                              ; preds = %109
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  %112 = invoke noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %113 unwind label %38

113:                                              ; preds = %111
  %114 = trunc i32 %112 to i16
  store i16 %114, ptr %4, align 2
  store i32 1, ptr %14, align 4
  br label %140

115:                                              ; preds = %108
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %10, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %11, align 4
  br label %123

119:                                              ; preds = %109
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %10, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %11, align 4
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %123

123:                                              ; preds = %119, %115
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %142

124:                                              ; preds = %98, %73, %37, %18
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  invoke void @_ZN5sc_dtmlEiRKNS_11sc_unsignedE(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_signed") align 8 %17, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %125 unwind label %131

125:                                              ; preds = %124
  %126 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %127 unwind label %135

127:                                              ; preds = %125
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  %128 = invoke noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %129 unwind label %38

129:                                              ; preds = %127
  %130 = trunc i32 %128 to i16
  store i16 %130, ptr %4, align 2
  store i32 1, ptr %14, align 4
  br label %140

131:                                              ; preds = %124
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %10, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %11, align 4
  br label %139

135:                                              ; preds = %125
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %10, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %11, align 4
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %139

139:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  br label %142

140:                                              ; preds = %129, %113, %83, %66
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  %141 = load i16, ptr %4, align 2
  ret i16 %141

142:                                              ; preds = %139, %123, %107, %63, %50, %38
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %143

143:                                              ; preds = %142, %22
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  br label %144

144:                                              ; preds = %143
  %145 = load ptr, ptr %10, align 8
  %146 = load i32, ptr %11, align 4
  %147 = insertvalue { ptr, i32 } poison, ptr %145, 0
  %148 = insertvalue { ptr, i32 } %147, i32 %146, 1
  resume { ptr, i32 } %148
}

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dtplERKNS_11sc_unsignedEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_signed") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dtmiERKNS_11sc_unsignedEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_signed") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

declare noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dtmlEiRKNS_11sc_unsignedE(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_signed") align 8, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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 = { "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 = { 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 #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"}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i16 @_Z6selectjjj(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.sc_dt::sc_unsigned", align 8
  %5 = alloca %"class.sc_dt::sc_unsigned", align 8
  %6 = alloca %"class.sc_dt::sc_signed", align 8
  %7 = alloca %"class.sc_dt::sc_signed", align 8
  %8 = alloca %"class.sc_dt::sc_signed", align 8
  %9 = alloca %"class.sc_dt::sc_signed", align 8
  %10 = alloca %"class.sc_dt::sc_signed", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN5sc_dt11sc_unsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  invoke void @_ZN5sc_dt11sc_unsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 9)
          to label %11 unwind label %14

11:                                               ; preds = %3
  %12 = lshr i32 %2, 2
  %13 = and i32 %12, 3
  switch i32 %13, label %default.unreachable33 [
    i32 0, label %16
    i32 1, label %41
    i32 2, label %44
    i32 3, label %47
  ]

14:                                               ; preds = %3
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %85

16:                                               ; preds = %11
  %17 = add i32 %1, %0
  %18 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %17)
          to label %19 unwind label %25

19:                                               ; preds = %16
  %20 = icmp ugt i32 %0, 23349212
  br i1 %20, label %21, label %32

21:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  invoke void @_ZN5sc_dtplERKNS_11sc_unsignedEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_signed") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
          to label %22 unwind label %27

22:                                               ; preds = %21
  %23 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %24 unwind label %29

24:                                               ; preds = %22
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %72

25:                                               ; preds = %.invoke, %47, %44, %41, %16
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %84

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %31

29:                                               ; preds = %22
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %31

31:                                               ; preds = %29, %27
  %.pn26 = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %84

32:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  invoke void @_ZN5sc_dtmiERKNS_11sc_unsignedEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_signed") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
          to label %33 unwind label %36

33:                                               ; preds = %32
  %34 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %35 unwind label %38

35:                                               ; preds = %33
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %.invoke

36:                                               ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %33
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %40

40:                                               ; preds = %38, %36
  %.pn24 = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %84

41:                                               ; preds = %11
  %42 = sub i32 %0, %1
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %42)
          to label %72 unwind label %25

44:                                               ; preds = %11
  %45 = call i32 @llvm.fshl.i32(i32 %1, i32 %0, i32 16)
  %46 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %45)
          to label %.invoke unwind label %25

47:                                               ; preds = %11
  %48 = shl i32 %0, 16
  %49 = lshr i32 %1, 16
  %50 = sub i32 %48, %49
  %51 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %50)
          to label %52 unwind label %25

52:                                               ; preds = %47
  %53 = icmp ult i32 %1, 234328112
  br i1 %53, label %54, label %63

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZN5sc_dtmiERKNS_11sc_unsignedEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_signed") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
          to label %55 unwind label %58

55:                                               ; preds = %54
  %56 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %57 unwind label %60

57:                                               ; preds = %55
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %72

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

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

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

63:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  invoke void @_ZN5sc_dtplERKNS_11sc_unsignedEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_signed") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
          to label %64 unwind label %67

64:                                               ; preds = %63
  %65 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %66 unwind label %69

66:                                               ; preds = %64
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %.invoke

67:                                               ; preds = %63
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %64
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %71

71:                                               ; preds = %69, %67
  %.pn = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %84

default.unreachable33:                            ; preds = %11
  unreachable

72:                                               ; preds = %41, %57, %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  invoke void @_ZN5sc_dtmlEiRKNS_11sc_unsignedE(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_signed") align 8 %10, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %73 unwind label %78

73:                                               ; preds = %72
  %74 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %75 unwind label %80

75:                                               ; preds = %73
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %.invoke

.invoke:                                          ; preds = %44, %35, %66, %75
  %76 = phi ptr [ %5, %75 ], [ %4, %66 ], [ %4, %35 ], [ %4, %44 ]
  %77 = invoke noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32) %76)
          to label %83 unwind label %25

78:                                               ; preds = %72
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %82

80:                                               ; preds = %73
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %82

82:                                               ; preds = %80, %78
  %.pn28 = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %84

83:                                               ; preds = %.invoke
  %.020 = trunc i32 %77 to i16
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  ret i16 %.020

84:                                               ; preds = %82, %71, %62, %40, %31, %25
  %.pn30 = phi { ptr, i32 } [ %26, %25 ], [ %.pn28, %82 ], [ %.pn22, %62 ], [ %.pn, %71 ], [ %.pn26, %31 ], [ %.pn24, %40 ]
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %85

85:                                               ; preds = %84, %14
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %84 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN5sc_dt11sc_unsignedD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn30.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dtplERKNS_11sc_unsignedEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_signed") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt11sc_unsignedaSERKNS_9sc_signedE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt9sc_signedD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dtmiERKNS_11sc_unsignedEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_signed") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZNK5sc_dt11sc_unsigned7to_uintEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dtmlEiRKNS_11sc_unsignedE(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_signed") align 8, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; 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 i32 @llvm.fshl.i32(i32, i32, i32) #5

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 = { "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 = { 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 #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 = { 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)"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass