; LLVM IR from gem5/gem5 :: src/systemc/dt/int/sc_nbutils.ll (ZN5sc_dt12vec_from_strEiiPjPKcNS_9sc_numrepE)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str.13 = external hidden unnamed_addr constant [76 x i8], align 1
@_ZN7sc_core24SC_ID_CONVERSION_FAILED_E = external constant [0 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [15 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5sc_dt17get_base_and_signEPKcRiS2_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5sc_dt12vec_from_strEiiPjPKcNS_9sc_numrepE(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 %0, ptr %7, align 4, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !11
  %25 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZN5sc_dtL13is_valid_baseENS_9sc_numrepE(i32 noundef %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %26 = load ptr, ptr %10, align 8, !tbaa !9
  %27 = call noundef ptr @_ZN5sc_dt17get_base_and_signEPKcRiS2_(ptr noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store ptr %27, ptr %10, align 8, !tbaa !9
  %28 = load i32, ptr %11, align 4, !tbaa !11
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %64

30:                                               ; preds = %5
  %31 = load i32, ptr %12, align 4, !tbaa !5
  %32 = icmp eq i32 %31, 10
  br i1 %32, label %33, label %35

33:                                               ; preds = %30
  %34 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %34, ptr %12, align 4, !tbaa !5
  br label %63

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 392, ptr %14) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14)
  %36 = getelementptr inbounds i8, ptr %14, i64 16
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.19)
          to label %38 unwind label %49

38:                                               ; preds = %35
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.20)
          to label %40 unwind label %49

40:                                               ; preds = %38
  %41 = load i32, ptr %11, align 4, !tbaa !11
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5sc_dtlsERSoNS_9sc_numrepE(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %41)
          to label %43 unwind label %49

43:                                               ; preds = %40
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @.str.21)
          to label %45 unwind label %49

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(128) %14)
          to label %46 unwind label %53

46:                                               ; preds = %45
  %47 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %47, ptr noundef @.str.13, i32 noundef 567)
          to label %48 unwind label %57

48:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #6
  br label %189

49:                                               ; preds = %43, %40, %38, %35
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %15, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %16, align 4
  br label %62

53:                                               ; preds = %45
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %15, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %16, align 4
  br label %61

57:                                               ; preds = %46
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %15, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %61

61:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  br label %62

62:                                               ; preds = %61, %49
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #6
  br label %191

63:                                               ; preds = %33
  br label %64

64:                                               ; preds = %63, %5
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !9
  call void @_ZN5sc_dt8vec_zeroEiPj(i32 noundef %65, ptr noundef %66)
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  br label %67

67:                                               ; preds = %178, %64
  %68 = load ptr, ptr %10, align 8, !tbaa !9
  %69 = load i8, ptr %68, align 1, !tbaa !13
  store i8 %69, ptr %19, align 1, !tbaa !13
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %181

71:                                               ; preds = %67
  %72 = load i8, ptr %19, align 1, !tbaa !13
  %73 = sext i8 %72 to i32
  %74 = call i32 @isalnum(i32 noundef %73) #7
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %143

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %77 = load i8, ptr %19, align 1, !tbaa !13
  %78 = sext i8 %77 to i32
  %79 = call i32 @isalpha(i32 noundef %78) #7
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %87

81:                                               ; preds = %76
  %82 = load i8, ptr %19, align 1, !tbaa !13
  %83 = sext i8 %82 to i32
  %84 = call i32 @toupper(i32 noundef %83) #7
  %85 = sub nsw i32 %84, 65
  %86 = add nsw i32 %85, 10
  store i32 %86, ptr %20, align 4, !tbaa !5
  br label %91

87:                                               ; preds = %76
  %88 = load i8, ptr %19, align 1, !tbaa !13
  %89 = sext i8 %88 to i32
  %90 = sub nsw i32 %89, 48
  store i32 %90, ptr %20, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %87, %81
  %92 = load i32, ptr %20, align 4, !tbaa !5
  %93 = load i32, ptr %12, align 4, !tbaa !5
  %94 = icmp sge i32 %92, %93
  br i1 %94, label %95, label %129

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 392, ptr %21) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21)
  %96 = getelementptr inbounds i8, ptr %21, i64 16
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @.str.19)
          to label %98 unwind label %115

98:                                               ; preds = %95
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef @.str.22)
          to label %100 unwind label %115

100:                                              ; preds = %98
  %101 = load ptr, ptr %10, align 8, !tbaa !9
  %102 = load i8, ptr %101, align 1, !tbaa !13
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %99, i8 noundef signext %102)
          to label %104 unwind label %115

104:                                              ; preds = %100
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef @.str.23)
          to label %106 unwind label %115

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @.str.24)
          to label %108 unwind label %115

108:                                              ; preds = %106
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %107, i32 noundef %109)
          to label %111 unwind label %115

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(128) %21)
          to label %112 unwind label %119

112:                                              ; preds = %111
  %113 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %113, ptr noundef @.str.13, i32 noundef 590)
          to label %114 unwind label %123

114:                                              ; preds = %112
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #6
  br label %140

115:                                              ; preds = %108, %106, %104, %100, %98, %95
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %15, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %16, align 4
  br label %128

119:                                              ; preds = %111
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %15, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %16, align 4
  br label %127

123:                                              ; preds = %112
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %15, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  br label %128

128:                                              ; preds = %127, %115
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %188

129:                                              ; preds = %91
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = load ptr, ptr %9, align 8, !tbaa !9
  %132 = load i32, ptr %12, align 4, !tbaa !5
  call void @_ZN5sc_dt16vec_mul_small_onEiPjj(i32 noundef %130, ptr noundef %131, i32 noundef %132)
  %133 = load i32, ptr %20, align 4, !tbaa !5
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %139

135:                                              ; preds = %129
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = load ptr, ptr %9, align 8, !tbaa !9
  %138 = load i32, ptr %20, align 4, !tbaa !5
  call void @_ZN5sc_dt16vec_add_small_onEiPjj(i32 noundef %136, ptr noundef %137, i32 noundef %138)
  br label %139

139:                                              ; preds = %135, %129
  store i32 0, ptr %18, align 4
  br label %140

140:                                              ; preds = %139, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %141 = load i32, ptr %18, align 4
  switch i32 %141, label %187 [
    i32 0, label %142
  ]

142:                                              ; preds = %140
  br label %177

143:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 392, ptr %23) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %23)
  %144 = getelementptr inbounds i8, ptr %23, i64 16
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef @.str.19)
          to label %146 unwind label %163

146:                                              ; preds = %143
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef @.str.22)
          to label %148 unwind label %163

148:                                              ; preds = %146
  %149 = load ptr, ptr %10, align 8, !tbaa !9
  %150 = load i8, ptr %149, align 1, !tbaa !13
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %147, i8 noundef signext %150)
          to label %152 unwind label %163

152:                                              ; preds = %148
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef @.str.23)
          to label %154 unwind label %163

154:                                              ; preds = %152
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @.str.24)
          to label %156 unwind label %163

156:                                              ; preds = %154
  %157 = load i32, ptr %12, align 4, !tbaa !5
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %155, i32 noundef %157)
          to label %159 unwind label %163

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 8 dereferenceable(128) %23)
          to label %160 unwind label %167

160:                                              ; preds = %159
  %161 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %161, ptr noundef @.str.13, i32 noundef 605)
          to label %162 unwind label %171

162:                                              ; preds = %160
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %23) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %23) #6
  br label %187

163:                                              ; preds = %156, %154, %152, %148, %146, %143
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %15, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %16, align 4
  br label %176

167:                                              ; preds = %159
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %15, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %16, align 4
  br label %175

171:                                              ; preds = %160
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %15, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %175

175:                                              ; preds = %171, %167
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  br label %176

176:                                              ; preds = %175, %163
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %23) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %23) #6
  br label %188

177:                                              ; preds = %142
  br label %178

178:                                              ; preds = %177
  %179 = load ptr, ptr %10, align 8, !tbaa !9
  %180 = getelementptr inbounds i8, ptr %179, i32 1
  store ptr %180, ptr %10, align 8, !tbaa !9
  br label %67, !llvm.loop !14

181:                                              ; preds = %67
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = load i32, ptr %7, align 4, !tbaa !5
  %184 = load i32, ptr %8, align 4, !tbaa !5
  %185 = load ptr, ptr %9, align 8, !tbaa !9
  %186 = call noundef i32 @_ZN5sc_dt29convert_signed_SM_to_2C_to_SMEiiiPj(i32 noundef %182, i32 noundef %183, i32 noundef %184, ptr noundef %185)
  store i32 %186, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %187

187:                                              ; preds = %181, %162, %140
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %189

188:                                              ; preds = %176, %128
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %191

189:                                              ; preds = %187, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %190 = load i32, ptr %6, align 4
  ret i32 %190

191:                                              ; preds = %188, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %192

192:                                              ; preds = %191
  %193 = load ptr, ptr %15, align 8
  %194 = load i32, ptr %16, align 4
  %195 = insertvalue { ptr, i32 } poison, ptr %193, 0
  %196 = insertvalue { ptr, i32 } %195, i32 %194, 1
  resume { ptr, i32 } %196
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN5sc_dtL13is_valid_baseENS_9sc_numrepE(i32 noundef) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8vec_zeroEiPj(i32 noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isalnum(i32 noundef) #5

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isalpha(i32 noundef) #5

; Function Attrs: nounwind willreturn memory(read)
declare i32 @toupper(i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt16vec_mul_small_onEiPjj(i32 noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt16vec_add_small_onEiPjj(i32 noundef, ptr noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN5sc_dt29convert_signed_SM_to_2C_to_SMEiiiPj(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #3

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

!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 = !{!"_ZTSN5sc_dt9sc_numrepE", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str.13 = external hidden unnamed_addr constant [76 x i8], align 1
@_ZN7sc_core24SC_ID_CONVERSION_FAILED_E = external constant [0 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [15 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5sc_dt17get_base_and_signEPKcRiS2_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5sc_dt12vec_from_strEiiPjPKcNS_9sc_numrepE(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN5sc_dtL13is_valid_baseENS_9sc_numrepE(i32 noundef %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %14 = call noundef ptr @_ZN5sc_dt17get_base_and_signEPKcRiS2_(ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %40, label %15

15:                                               ; preds = %5
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 10
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  store i32 %4, ptr %6, align 4, !tbaa !5
  br label %40

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8)
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.19)
          to label %22 unwind label %32

22:                                               ; preds = %19
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.20)
          to label %24 unwind label %32

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5sc_dtlsERSoNS_9sc_numrepE(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef %4)
          to label %26 unwind label %32

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.21)
          to label %28 unwind label %32

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(128) %8)
          to label %29 unwind label %34

29:                                               ; preds = %28
  %30 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %30, ptr noundef nonnull @.str.13, i32 noundef 567)
          to label %31 unwind label %36

31:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #6
  br label %115

32:                                               ; preds = %26, %24, %22, %19
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %39

34:                                               ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %29
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %38

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

39:                                               ; preds = %38, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %38 ], [ %33, %32 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #6
  br label %116

40:                                               ; preds = %18, %5
  call void @_ZN5sc_dt8vec_zeroEiPj(i32 noundef %1, ptr noundef %2)
  %41 = load i8, ptr %14, align 1, !tbaa !9
  %.not4863 = icmp eq i8 %41, 0
  br i1 %.not4863, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %40, %110
  %42 = phi i8 [ %112, %110 ], [ %41, %40 ]
  %.04264 = phi ptr [ %111, %110 ], [ %14, %40 ]
  %43 = sext i8 %42 to i32
  %44 = call i32 @isalnum(i32 noundef %43) #7
  %.not49 = icmp eq i32 %44, 0
  br i1 %.not49, label %83, label %45

45:                                               ; preds = %.lr.ph
  %46 = call i32 @isalpha(i32 noundef %43) #7
  %.not53 = icmp eq i32 %46, 0
  br i1 %.not53, label %50, label %47

47:                                               ; preds = %45
  %48 = call i32 @toupper(i32 noundef %43) #7
  %49 = add nsw i32 %48, -55
  br label %52

50:                                               ; preds = %45
  %51 = add nsw i32 %43, -48
  br label %52

52:                                               ; preds = %50, %47
  %.0 = phi i32 [ %49, %47 ], [ %51, %50 ]
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %.not54 = icmp slt i32 %.0, %53
  br i1 %.not54, label %80, label %54

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10)
  %55 = getelementptr inbounds i8, ptr %10, i64 16
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @.str.19)
          to label %57 unwind label %72

57:                                               ; preds = %54
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @.str.22)
          to label %59 unwind label %72

59:                                               ; preds = %57
  %60 = load i8, ptr %.04264, align 1, !tbaa !9
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %58, i8 noundef signext %60)
          to label %62 unwind label %72

62:                                               ; preds = %59
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.23)
          to label %64 unwind label %72

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull @.str.24)
          to label %66 unwind label %72

66:                                               ; preds = %64
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %65, i32 noundef %67)
          to label %69 unwind label %72

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(128) %10)
          to label %70 unwind label %74

70:                                               ; preds = %69
  %71 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %71, ptr noundef nonnull @.str.13, i32 noundef 590)
          to label %82 unwind label %76

72:                                               ; preds = %66, %64, %62, %59, %57, %54
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %79

74:                                               ; preds = %69
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %70
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %78

78:                                               ; preds = %76, %74
  %.pn56 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  br label %79

79:                                               ; preds = %78, %72
  %.pn56.pn = phi { ptr, i32 } [ %.pn56, %78 ], [ %73, %72 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %10) #6
  br label %116

80:                                               ; preds = %52
  call void @_ZN5sc_dt16vec_mul_small_onEiPjj(i32 noundef %1, ptr noundef %2, i32 noundef %53)
  %.not55 = icmp eq i32 %.0, 0
  br i1 %.not55, label %110, label %81

81:                                               ; preds = %80
  call void @_ZN5sc_dt16vec_add_small_onEiPjj(i32 noundef %1, ptr noundef %2, i32 noundef %.0)
  br label %110

82:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %10) #6
  br label %115

83:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %12) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %12)
  %84 = getelementptr inbounds i8, ptr %12, i64 16
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @.str.19)
          to label %86 unwind label %102

86:                                               ; preds = %83
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull @.str.22)
          to label %88 unwind label %102

88:                                               ; preds = %86
  %89 = load i8, ptr %.04264, align 1, !tbaa !9
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %87, i8 noundef signext %89)
          to label %91 unwind label %102

91:                                               ; preds = %88
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str.23)
          to label %93 unwind label %102

93:                                               ; preds = %91
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @.str.24)
          to label %95 unwind label %102

95:                                               ; preds = %93
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef %96)
          to label %98 unwind label %102

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(128) %12)
          to label %99 unwind label %104

99:                                               ; preds = %98
  %100 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core24SC_ID_CONVERSION_FAILED_E, ptr noundef %100, ptr noundef nonnull @.str.13, i32 noundef 605)
          to label %101 unwind label %106

101:                                              ; preds = %99
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %12) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %12) #6
  br label %115

102:                                              ; preds = %95, %93, %91, %88, %86, %83
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %109

104:                                              ; preds = %98
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %108

106:                                              ; preds = %99
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %108

108:                                              ; preds = %106, %104
  %.pn50 = phi { ptr, i32 } [ %107, %106 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  br label %109

109:                                              ; preds = %108, %102
  %.pn50.pn = phi { ptr, i32 } [ %.pn50, %108 ], [ %103, %102 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %12) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %12) #6
  br label %116

110:                                              ; preds = %80, %81
  %111 = getelementptr inbounds i8, ptr %.04264, i64 1
  %112 = load i8, ptr %111, align 1, !tbaa !9
  %.not48 = icmp eq i8 %112, 0
  br i1 %.not48, label %._crit_edge, label %.lr.ph, !llvm.loop !10

._crit_edge:                                      ; preds = %110, %40
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = call noundef i32 @_ZN5sc_dt29convert_signed_SM_to_2C_to_SMEiiiPj(i32 noundef %113, i32 noundef %0, i32 noundef %1, ptr noundef %2)
  br label %115

115:                                              ; preds = %82, %101, %._crit_edge, %31
  %.3 = phi i32 [ 0, %31 ], [ 0, %82 ], [ 0, %101 ], [ %114, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  ret i32 %.3

116:                                              ; preds = %79, %109, %39
  %.pn56.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %39 ], [ %.pn56.pn, %79 ], [ %.pn50.pn, %109 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn56.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN5sc_dtL13is_valid_baseENS_9sc_numrepE(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5sc_dt8vec_zeroEiPj(i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isalnum(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isalpha(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @toupper(i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt16vec_mul_small_onEiPjj(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt16vec_add_small_onEiPjj(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN5sc_dt29convert_signed_SM_to_2C_to_SMEiiiPj(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass