; LLVM IR from gem5/gem5 :: ext/dsent/libutil (Calculator)

; 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.LibUtil::String" = type { %"class.std::__cxx11::basic_string" }
%"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.LibUtil::Calculator" = type { ptr, %"class.LibUtil::String", %"class.LibUtil::Map", i32, double, %"class.LibUtil::String" }
%"class.LibUtil::Map" = type { ptr, %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<LibUtil::String, std::pair<const LibUtil::String, double>, std::_Select1st<std::pair<const LibUtil::String, double>>, std::less<LibUtil::String>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<LibUtil::String, std::pair<const LibUtil::String, double>, std::_Select1st<std::pair<const LibUtil::String, double>>, std::less<LibUtil::String>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZTIN7LibUtil9ExceptionE = external constant ptr
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; 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 noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #4 align 2

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

26:                                               ; preds = %49, %2
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 1 dereferenceable(1) %6)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = getelementptr i8, ptr %30, i64 -24
  %32 = load i64, ptr %31, align 8
  %33 = getelementptr inbounds i8, ptr %29, i64 %32
  %34 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %33)
  br i1 %34, label %35, label %39

35:                                               ; preds = %26
  %36 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 4, ptr %36, align 8, !tbaa !11
  %37 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !11
  store i32 %38, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

39:                                               ; preds = %26
  br label %40

40:                                               ; preds = %39
  %41 = load i8, ptr %6, align 1, !tbaa !28
  %42 = sext i8 %41 to i32
  %43 = icmp ne i32 %42, 10
  br i1 %43, label %44, label %49

44:                                               ; preds = %40
  %45 = load i8, ptr %6, align 1, !tbaa !28
  %46 = sext i8 %45 to i32
  %47 = call i32 @isspace(i32 noundef %46) #8
  %48 = icmp ne i32 %47, 0
  br label %49

49:                                               ; preds = %44, %40
  %50 = phi i1 [ false, %40 ], [ %48, %44 ]
  br i1 %50, label %26, label %51, !llvm.loop !29

51:                                               ; preds = %49
  %52 = load i8, ptr %6, align 1, !tbaa !28
  %53 = sext i8 %52 to i32
  switch i32 %53, label %199 [
    i32 10, label %54
    i32 59, label %58
    i32 42, label %62
    i32 47, label %62
    i32 43, label %62
    i32 45, label %62
    i32 40, label %62
    i32 41, label %62
    i32 61, label %62
    i32 48, label %68
    i32 49, label %68
    i32 50, label %68
    i32 51, label %68
    i32 52, label %68
    i32 53, label %68
    i32 54, label %68
    i32 55, label %68
    i32 56, label %68
    i32 57, label %68
    i32 46, label %68
    i32 34, label %78
    i32 36, label %116
  ]

54:                                               ; preds = %51
  %55 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 4, ptr %55, align 8, !tbaa !11
  %56 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %57 = load i32, ptr %56, align 8, !tbaa !11
  store i32 %57, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

58:                                               ; preds = %51
  %59 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 59, ptr %59, align 8, !tbaa !11
  %60 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %61 = load i32, ptr %60, align 8, !tbaa !11
  store i32 %61, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

62:                                               ; preds = %51, %51, %51, %51, %51, %51, %51
  %63 = load i8, ptr %6, align 1, !tbaa !28
  %64 = sext i8 %63 to i32
  %65 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 %64, ptr %65, align 8, !tbaa !11
  %66 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %67 = load i32, ptr %66, align 8, !tbaa !11
  store i32 %67, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

68:                                               ; preds = %51, %51, %51, %51, %51, %51, %51, %51, %51, %51, %51
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load i8, ptr %6, align 1, !tbaa !28
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16) %69, i8 noundef signext %70)
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 4
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(8) %73)
  %75 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 2, ptr %75, align 8, !tbaa !11
  %76 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %77 = load i32, ptr %76, align 8, !tbaa !11
  store i32 %77, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

78:                                               ; preds = %51
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.3)
  %81 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 5
  %82 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %81, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %83 unwind label %104

83:                                               ; preds = %78
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %84

84:                                               ; preds = %101, %83
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = getelementptr i8, ptr %86, i64 -24
  %88 = load i64, ptr %87, align 8
  %89 = getelementptr inbounds i8, ptr %85, i64 %88
  %90 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %89)
  br i1 %90, label %91, label %95

91:                                               ; preds = %84
  %92 = load i8, ptr %6, align 1, !tbaa !28
  %93 = sext i8 %92 to i32
  %94 = icmp ne i32 34, %93
  br label %95

95:                                               ; preds = %91, %84
  %96 = phi i1 [ false, %84 ], [ %94, %91 ]
  br i1 %96, label %97, label %112

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %98 = load i8, ptr %6, align 1, !tbaa !28
  call void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32) %11, i64 noundef 1, i8 noundef signext %98)
  %99 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 5
  %100 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %99, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %101 unwind label %108

101:                                              ; preds = %97
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %102, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br label %84, !llvm.loop !31

104:                                              ; preds = %78
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %276

108:                                              ; preds = %97
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %276

112:                                              ; preds = %95
  %113 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 3, ptr %113, align 8, !tbaa !11
  %114 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %115 = load i32, ptr %114, align 8, !tbaa !11
  store i32 %115, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

116:                                              ; preds = %51
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %117, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br label %119

119:                                              ; preds = %116
  %120 = load i8, ptr %6, align 1, !tbaa !28
  %121 = sext i8 %120 to i32
  %122 = icmp eq i32 %121, 40
  br i1 %122, label %154, label %123

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.4)
  invoke void (ptr, ptr, ...) @_ZN7LibUtil6String6formatERKS0_z(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.5, i32 noundef 144)
          to label %124 unwind label %130

124:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.6)
          to label %125 unwind label %134

125:                                              ; preds = %124
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %126 unwind label %138

126:                                              ; preds = %125
  invoke void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %127 unwind label %142

127:                                              ; preds = %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  store ptr %13, ptr %12, align 8, !tbaa !5
  %128 = call ptr @__cxa_allocate_exception(i64 40) #7
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN7LibUtil9ExceptionC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40) %128, ptr noundef nonnull align 8 dereferenceable(32) %129) #7
  invoke void @__cxa_throw(ptr %128, ptr @_ZTIN7LibUtil9ExceptionE, ptr @_ZN7LibUtil9ExceptionD1Ev) #9
          to label %282 unwind label %149

130:                                              ; preds = %123
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  br label %148

134:                                              ; preds = %124
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %9, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %10, align 4
  br label %147

138:                                              ; preds = %125
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  br label %146

142:                                              ; preds = %126
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %9, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %146

146:                                              ; preds = %142, %138
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %147

147:                                              ; preds = %146, %134
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %148

148:                                              ; preds = %147, %130
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %153

149:                                              ; preds = %127
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %9, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %153

153:                                              ; preds = %149, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %276

154:                                              ; preds = %119
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %157, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.3)
  %159 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 5
  %160 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %159, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %161 unwind label %187

161:                                              ; preds = %156
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %162

162:                                              ; preds = %184, %161
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load ptr, ptr %163, align 8, !tbaa !9
  %165 = getelementptr i8, ptr %164, i64 -24
  %166 = load i64, ptr %165, align 8
  %167 = getelementptr inbounds i8, ptr %163, i64 %166
  %168 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %167)
  br i1 %168, label %169, label %178

169:                                              ; preds = %162
  %170 = load i8, ptr %6, align 1, !tbaa !28
  %171 = sext i8 %170 to i32
  %172 = call i32 @isspace(i32 noundef %171) #8
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %178, label %174

174:                                              ; preds = %169
  %175 = load i8, ptr %6, align 1, !tbaa !28
  %176 = sext i8 %175 to i32
  %177 = icmp ne i32 41, %176
  br label %178

178:                                              ; preds = %174, %169, %162
  %179 = phi i1 [ false, %169 ], [ false, %162 ], [ %177, %174 ]
  br i1 %179, label %180, label %195

180:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  %181 = load i8, ptr %6, align 1, !tbaa !28
  call void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32) %19, i64 noundef 1, i8 noundef signext %181)
  %182 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 5
  %183 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %182, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %184 unwind label %191

184:                                              ; preds = %180
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %185, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br label %162, !llvm.loop !32

187:                                              ; preds = %156
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %9, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %276

191:                                              ; preds = %180
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %9, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %276

195:                                              ; preds = %178
  %196 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 1, ptr %196, align 8, !tbaa !11
  %197 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %198 = load i32, ptr %197, align 8, !tbaa !11
  store i32 %198, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

199:                                              ; preds = %51
  %200 = load i8, ptr %6, align 1, !tbaa !28
  %201 = sext i8 %200 to i32
  %202 = call i32 @isalpha(i32 noundef %201) #8
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %248

204:                                              ; preds = %199
  %205 = load i8, ptr %6, align 1, !tbaa !28
  %206 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 5
  %207 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSEc(ptr noundef nonnull align 8 dereferenceable(32) %206, i8 noundef signext %205)
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %208, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br label %210

210:                                              ; preds = %234, %204
  %211 = load ptr, ptr %5, align 8, !tbaa !5
  %212 = load ptr, ptr %211, align 8, !tbaa !9
  %213 = getelementptr i8, ptr %212, i64 -24
  %214 = load i64, ptr %213, align 8
  %215 = getelementptr inbounds i8, ptr %211, i64 %214
  %216 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %215)
  br i1 %216, label %217, label %228

217:                                              ; preds = %210
  %218 = load i8, ptr %6, align 1, !tbaa !28
  %219 = sext i8 %218 to i32
  %220 = call i32 @isalnum(i32 noundef %219) #8
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %226, label %222

222:                                              ; preds = %217
  %223 = load i8, ptr %6, align 1, !tbaa !28
  %224 = sext i8 %223 to i32
  %225 = icmp eq i32 95, %224
  br label %226

226:                                              ; preds = %222, %217
  %227 = phi i1 [ true, %217 ], [ %225, %222 ]
  br label %228

228:                                              ; preds = %226, %210
  %229 = phi i1 [ false, %210 ], [ %227, %226 ]
  br i1 %229, label %230, label %241

230:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  %231 = load i8, ptr %6, align 1, !tbaa !28
  call void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32) %20, i64 noundef 1, i8 noundef signext %231)
  %232 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 5
  %233 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %232, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %234 unwind label %237

234:                                              ; preds = %230
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %235, ptr noundef nonnull align 1 dereferenceable(1) %6)
  br label %210, !llvm.loop !33

237:                                              ; preds = %230
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %9, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  br label %276

241:                                              ; preds = %228
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = load i8, ptr %6, align 1, !tbaa !28
  %244 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16) %242, i8 noundef signext %243)
  %245 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  store i32 0, ptr %245, align 8, !tbaa !11
  %246 = getelementptr inbounds %"class.LibUtil::Calculator", ptr %25, i32 0, i32 3
  %247 = load i32, ptr %246, align 8, !tbaa !11
  store i32 %247, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

248:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  %249 = load i8, ptr %6, align 1, !tbaa !28
  %250 = sext i8 %249 to i32
  call void @_ZN7LibUtil6StringC1Ei(ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef %250)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef @.str.7, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %251 unwind label %255

251:                                              ; preds = %248
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.8)
          to label %252 unwind label %259

252:                                              ; preds = %251
  invoke void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %253 unwind label %263

253:                                              ; preds = %252
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  %254 = call ptr @__cxa_allocate_exception(i64 40) #7
  call void @_ZN7LibUtil9ExceptionC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40) %254, ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  invoke void @__cxa_throw(ptr %254, ptr @_ZTIN7LibUtil9ExceptionE, ptr @_ZN7LibUtil9ExceptionD1Ev) #9
          to label %282 unwind label %269

255:                                              ; preds = %248
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %9, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %10, align 4
  br label %268

259:                                              ; preds = %251
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %9, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %10, align 4
  br label %267

263:                                              ; preds = %252
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %9, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %267

267:                                              ; preds = %263, %259
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %268

268:                                              ; preds = %267, %255
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  br label %273

269:                                              ; preds = %253
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %9, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %10, align 4
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %273

273:                                              ; preds = %269, %268
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %276

274:                                              ; preds = %241, %195, %112, %68, %62, %58, %54, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %275 = load i32, ptr %3, align 4
  ret i32 %275

276:                                              ; preds = %273, %237, %191, %187, %153, %108, %104
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %277

277:                                              ; preds = %276
  %278 = load ptr, ptr %9, align 8
  %279 = load i32, ptr %10, align 4
  %280 = insertvalue { ptr, i32 } poison, ptr %278, 0
  %281 = insertvalue { ptr, i32 } %280, i32 %279, 1
  resume { ptr, i32 } %281

282:                                              ; preds = %253, %127
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #1

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #4 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) #6

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

declare void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i8 noundef signext) unnamed_addr #1

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

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

declare void @_ZN7LibUtil6String6formatERKS0_z(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8, ptr noundef nonnull align 8 dereferenceable(32), ...) #1

declare void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: nounwind
declare void @_ZN7LibUtil9ExceptionC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7LibUtil9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #1

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

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

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !26, i64 96}
!12 = !{!"_ZTSN7LibUtil10CalculatorE", !13, i64 8, !17, i64 40, !26, i64 96, !27, i64 104, !13, i64 112}
!13 = !{!"_ZTSN7LibUtil6StringE", !14, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN7LibUtil3MapIdEE", !18, i64 8}
!18 = !{!"_ZTSSt3mapIN7LibUtil6StringEdSt4lessIS1_ESaISt4pairIKS1_dEEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeIN7LibUtil6StringESt4pairIKS1_dESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeIN7LibUtil6StringESt4pairIKS1_dESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7LibUtil6StringEEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessIN7LibUtil6StringEE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !16, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!26 = !{!"_ZTSN7LibUtil10Calculator5TokenE", !7, i64 0}
!27 = !{!"double", !7, i64 0}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}


; 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.LibUtil::String" = type { %"class.std::__cxx11::basic_string" }
%"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] }

@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZTIN7LibUtil9ExceptionE = external constant ptr
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; 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 noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -128, 128) i32 @_ZN7LibUtil10Calculator8getTokenERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(120) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i8, align 1
  %4 = alloca %"class.LibUtil::String", align 8
  %5 = alloca %"class.LibUtil::String", align 8
  %6 = alloca %"class.LibUtil::String", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.LibUtil::String", align 8
  %9 = alloca %"class.LibUtil::String", align 8
  %10 = alloca %"class.LibUtil::String", align 8
  %11 = alloca %"class.LibUtil::String", align 8
  %12 = alloca %"class.LibUtil::String", align 8
  %13 = alloca %"class.LibUtil::String", align 8
  %14 = alloca %"class.LibUtil::String", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.LibUtil::String", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  br label %18

18:                                               ; preds = %27, %2
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %1, i64 %22
  %24 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %23)
  br i1 %24, label %.critedge.thread, label %25

25:                                               ; preds = %18
  %26 = load i8, ptr %3, align 1, !tbaa !8
  %.not = icmp eq i8 %26, 10
  br i1 %.not, label %.critedge.thread, label %27

27:                                               ; preds = %25
  %28 = sext i8 %26 to i32
  %29 = call i32 @isspace(i32 noundef %28) #8
  %.not35 = icmp eq i32 %29, 0
  br i1 %.not35, label %.critedge, label %18, !llvm.loop !10

.critedge:                                        ; preds = %27
  switch i8 %26, label %116 [
    i8 36, label %65
    i8 59, label %.critedge.thread
    i8 42, label %30
    i8 47, label %30
    i8 43, label %30
    i8 45, label %30
    i8 40, label %30
    i8 41, label %30
    i8 61, label %30
    i8 48, label %32
    i8 49, label %32
    i8 50, label %32
    i8 51, label %32
    i8 52, label %32
    i8 53, label %32
    i8 54, label %32
    i8 55, label %32
    i8 56, label %32
    i8 57, label %32
    i8 46, label %32
    i8 34, label %36
  ]

30:                                               ; preds = %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge
  %31 = zext nneg i8 %26 to i32
  br label %.critedge.thread

32:                                               ; preds = %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge, %.critedge
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16) %1, i8 noundef signext %26)
  %34 = getelementptr inbounds i8, ptr %0, i64 104
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %.critedge.thread

36:                                               ; preds = %.critedge
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.3)
  %38 = getelementptr inbounds i8, ptr %0, i64 112
  %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %40 unwind label %61

40:                                               ; preds = %36
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  %41 = load ptr, ptr %1, align 8, !tbaa !5
  %42 = getelementptr i8, ptr %41, i64 -24
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds i8, ptr %1, i64 %43
  %45 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %44)
  %46 = load i8, ptr %3, align 1
  %47 = icmp ne i8 %46, 34
  %48 = select i1 %45, i1 %47, i1 false
  br i1 %48, label %.lr.ph, label %.critedge.thread

.lr.ph:                                           ; preds = %40, %51
  %49 = phi i8 [ %58, %51 ], [ %46, %40 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef 1, i8 noundef signext %49)
  %50 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %51 unwind label %63

51:                                               ; preds = %.lr.ph
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr i8, ptr %53, i64 -24
  %55 = load i64, ptr %54, align 8
  %56 = getelementptr inbounds i8, ptr %1, i64 %55
  %57 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %56)
  %58 = load i8, ptr %3, align 1
  %59 = icmp ne i8 %58, 34
  %60 = select i1 %57, i1 %59, i1 false
  br i1 %60, label %.lr.ph, label %.critedge.thread, !llvm.loop !12

61:                                               ; preds = %36
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %163

63:                                               ; preds = %.lr.ph
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %163

65:                                               ; preds = %.critedge
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %67 = load i8, ptr %3, align 1, !tbaa !8
  %68 = icmp eq i8 %67, 40
  br i1 %68, label %88, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.4)
  invoke void (ptr, ptr, ...) @_ZN7LibUtil6String6formatERKS0_z(ptr dead_on_unwind nonnull writable sret(%"class.LibUtil::String") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.5, i32 noundef 144)
          to label %70 unwind label %75

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  invoke void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.6)
          to label %71 unwind label %77

71:                                               ; preds = %70
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %72 unwind label %79

72:                                               ; preds = %71
  invoke void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %73 unwind label %81

73:                                               ; preds = %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %74 = call ptr @__cxa_allocate_exception(i64 40) #7
  call void @_ZN7LibUtil9ExceptionC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40) %74, ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  invoke void @__cxa_throw(ptr nonnull %74, ptr nonnull @_ZTIN7LibUtil9ExceptionE, ptr nonnull @_ZN7LibUtil9ExceptionD1Ev) #9
          to label %164 unwind label %86

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

77:                                               ; preds = %70
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %84

79:                                               ; preds = %71
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %83

81:                                               ; preds = %72
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %83

83:                                               ; preds = %81, %79
  %.pn = phi { ptr, i32 } [ %82, %81 ], [ %80, %79 ]
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %84

84:                                               ; preds = %83, %77
  %.pn.pn = phi { ptr, i32 } [ %.pn, %83 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %85

85:                                               ; preds = %84, %75
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %84 ], [ %76, %75 ]
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %163

86:                                               ; preds = %73
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %163

88:                                               ; preds = %65
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @_ZN7LibUtil6StringC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.3)
  %90 = getelementptr inbounds i8, ptr %0, i64 112
  %91 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %92 unwind label %112

92:                                               ; preds = %88
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  %93 = load ptr, ptr %1, align 8, !tbaa !5
  %94 = getelementptr i8, ptr %93, i64 -24
  %95 = load i64, ptr %94, align 8
  %96 = getelementptr inbounds i8, ptr %1, i64 %95
  %97 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %96)
  br i1 %97, label %.lr.ph51, label %.critedge.thread

.lr.ph51:                                         ; preds = %92, %105
  %98 = load i8, ptr %3, align 1
  %99 = sext i8 %98 to i32
  %100 = call i32 @isspace(i32 noundef %99) #8
  %101 = icmp eq i32 %100, 0
  %102 = icmp ne i8 %98, 41
  %or.cond = and i1 %102, %101
  br i1 %or.cond, label %103, label %.critedge.thread

103:                                              ; preds = %.lr.ph51
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32) %12, i64 noundef 1, i8 noundef signext %98)
  %104 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %105 unwind label %114

105:                                              ; preds = %103
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %107 = load ptr, ptr %1, align 8, !tbaa !5
  %108 = getelementptr i8, ptr %107, i64 -24
  %109 = load i64, ptr %108, align 8
  %110 = getelementptr inbounds i8, ptr %1, i64 %109
  %111 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %110)
  br i1 %111, label %.lr.ph51, label %.critedge.thread, !llvm.loop !13

112:                                              ; preds = %88
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %163

114:                                              ; preds = %103
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %163

116:                                              ; preds = %.critedge
  %117 = call i32 @isalpha(i32 noundef %28) #8
  %.not41 = icmp eq i32 %117, 0
  br i1 %.not41, label %146, label %118

118:                                              ; preds = %116
  %119 = getelementptr inbounds i8, ptr %0, i64 112
  %120 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSEc(ptr noundef nonnull align 8 dereferenceable(32) %119, i8 noundef signext %26)
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %122 = load ptr, ptr %1, align 8, !tbaa !5
  %123 = getelementptr i8, ptr %122, i64 -24
  %124 = load i64, ptr %123, align 8
  %125 = getelementptr inbounds i8, ptr %1, i64 %124
  %126 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %125)
  br i1 %126, label %.lr.ph54, label %.critedge4

.lr.ph54:                                         ; preds = %118, %135
  %127 = load i8, ptr %3, align 1
  %128 = sext i8 %127 to i32
  %129 = call i32 @isalnum(i32 noundef %128) #8
  %130 = icmp ne i32 %129, 0
  %131 = icmp eq i8 %127, 95
  %132 = or i1 %131, %130
  br i1 %132, label %133, label %.critedge4

133:                                              ; preds = %.lr.ph54
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  call void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32) %13, i64 noundef 1, i8 noundef signext %127)
  %134 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %119, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %135 unwind label %142

135:                                              ; preds = %133
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  %136 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %137 = load ptr, ptr %1, align 8, !tbaa !5
  %138 = getelementptr i8, ptr %137, i64 -24
  %139 = load i64, ptr %138, align 8
  %140 = getelementptr inbounds i8, ptr %1, i64 %139
  %141 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %140)
  br i1 %141, label %.lr.ph54, label %.critedge4, !llvm.loop !14

142:                                              ; preds = %133
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  br label %163

.critedge4:                                       ; preds = %.lr.ph54, %135, %118
  %144 = load i8, ptr %3, align 1, !tbaa !8
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16) %1, i8 noundef signext %144)
  br label %.critedge.thread

146:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #7
  call void @_ZN7LibUtil6StringC1Ei(ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef %28)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull @.str.7, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %147 unwind label %151

147:                                              ; preds = %146
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.8)
          to label %148 unwind label %153

148:                                              ; preds = %147
  invoke void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %149 unwind label %155

149:                                              ; preds = %148
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  %150 = call ptr @__cxa_allocate_exception(i64 40) #7
  call void @_ZN7LibUtil9ExceptionC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40) %150, ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  invoke void @__cxa_throw(ptr nonnull %150, ptr nonnull @_ZTIN7LibUtil9ExceptionE, ptr nonnull @_ZN7LibUtil9ExceptionD1Ev) #9
          to label %164 unwind label %159

151:                                              ; preds = %146
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %158

153:                                              ; preds = %147
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %157

155:                                              ; preds = %148
  %156 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %157

157:                                              ; preds = %155, %153
  %.pn42 = phi { ptr, i32 } [ %156, %155 ], [ %154, %153 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %158

158:                                              ; preds = %157, %151
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %157 ], [ %152, %151 ]
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  br label %161

159:                                              ; preds = %149
  %160 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7LibUtil6StringD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %161

161:                                              ; preds = %159, %158
  %.pn45 = phi { ptr, i32 } [ %160, %159 ], [ %.pn42.pn, %158 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %163

.critedge.thread:                                 ; preds = %25, %18, %51, %.lr.ph51, %105, %92, %40, %.critedge, %.critedge4, %32, %30
  %.sink = phi i32 [ 0, %.critedge4 ], [ 2, %32 ], [ %31, %30 ], [ 59, %.critedge ], [ 3, %40 ], [ 1, %92 ], [ 1, %105 ], [ 1, %.lr.ph51 ], [ 3, %51 ], [ 4, %18 ], [ 4, %25 ]
  %162 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %.sink, ptr %162, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  ret i32 %.sink

163:                                              ; preds = %85, %86, %161, %142, %114, %112, %63, %61
  %.pn47 = phi { ptr, i32 } [ %143, %142 ], [ %.pn45, %161 ], [ %115, %114 ], [ %113, %112 ], [ %64, %63 ], [ %62, %61 ], [ %87, %86 ], [ %.pn.pn.pn, %85 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn47

164:                                              ; preds = %149, %73
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #4 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7putbackEc(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) local_unnamed_addr #1

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

declare void @_ZN7LibUtil6StringC1Emc(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i8 noundef signext) unnamed_addr #1

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

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

declare void @_ZN7LibUtil6String6formatERKS0_z(ptr dead_on_unwind writable sret(%"class.LibUtil::String") align 8, ptr noundef nonnull align 8 dereferenceable(32), ...) local_unnamed_addr #1

declare void @_ZN7LibUtil6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZN7LibUtil9ExceptionC1ERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7LibUtil9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN7LibUtil6StringaSEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #1

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

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

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = !{!16, !31, i64 96}
!16 = !{!"_ZTSN7LibUtil10CalculatorE", !17, i64 8, !22, i64 40, !31, i64 96, !32, i64 104, !17, i64 112}
!17 = !{!"_ZTSN7LibUtil6StringE", !18, i64 0}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !21, i64 8, !9, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !20, i64 0}
!20 = !{!"any pointer", !9, i64 0}
!21 = !{!"long", !9, i64 0}
!22 = !{!"_ZTSN7LibUtil3MapIdEE", !23, i64 8}
!23 = !{!"_ZTSSt3mapIN7LibUtil6StringEdSt4lessIS1_ESaISt4pairIKS1_dEEE", !24, i64 0}
!24 = !{!"_ZTSSt8_Rb_treeIN7LibUtil6StringESt4pairIKS1_dESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !25, i64 0}
!25 = !{!"_ZTSNSt8_Rb_treeIN7LibUtil6StringESt4pairIKS1_dESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !26, i64 0, !28, i64 8}
!26 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7LibUtil6StringEEE", !27, i64 0}
!27 = !{!"_ZTSSt4lessIN7LibUtil6StringEE"}
!28 = !{!"_ZTSSt15_Rb_tree_header", !29, i64 0, !21, i64 32}
!29 = !{!"_ZTSSt18_Rb_tree_node_base", !30, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!30 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!31 = !{!"_ZTSN7LibUtil10Calculator5TokenE", !9, i64 0}
!32 = !{!"double", !9, i64 0}


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