; LLVM IR from chensoft/libsocket :: src/ip (ip_version)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4chen11ip_version49toIntegerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca [4 x i32], align 16
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  %17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %97, %2
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = icmp slt i32 %22, 4
  br i1 %23, label %24, label %31

24:                                               ; preds = %21
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %25, label %26, label %31

26:                                               ; preds = %24
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 %29, 47
  br label %31

31:                                               ; preds = %26, %24, %21
  %32 = phi i1 [ false, %24 ], [ false, %21 ], [ %30, %26 ]
  br i1 %32, label %34, label %33

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %103

34:                                               ; preds = %31
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %36 = load i8, ptr %35, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = call i32 @isdigit(i32 noundef %37) #9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %47, label %40

40:                                               ; preds = %34
  %41 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef @.str.3)
          to label %42 unwind label %43

42:                                               ; preds = %40
  call void @__cxa_throw(ptr %41, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

43:                                               ; preds = %40
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  call void @__cxa_free_exception(ptr %41) #8
  br label %102

47:                                               ; preds = %34
  br label %48

48:                                               ; preds = %72, %47
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = mul i32 %52, 10
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %54 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #8
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i32
  %59 = sub nsw i32 %58, 48
  %60 = add i32 %53, %59
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %64

64:                                               ; preds = %48
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %65, label %66, label %72

66:                                               ; preds = %64
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %68 = load i8, ptr %67, align 1, !tbaa !11
  %69 = sext i8 %68 to i32
  %70 = call i32 @isdigit(i32 noundef %69) #9
  %71 = icmp ne i32 %70, 0
  br label %72

72:                                               ; preds = %66, %64
  %73 = phi i1 [ false, %64 ], [ %71, %66 ]
  br i1 %73, label %48, label %74, !llvm.loop !12

74:                                               ; preds = %72
  %75 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %75, label %76, label %83

76:                                               ; preds = %74
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %79, 46
  br i1 %80, label %81, label %83

81:                                               ; preds = %76
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br label %83

83:                                               ; preds = %81, %76, %74
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = icmp ugt i32 %87, 255
  br i1 %88, label %89, label %96

89:                                               ; preds = %83
  %90 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %90, ptr noundef @.str.4)
          to label %91 unwind label %92

91:                                               ; preds = %89
  call void @__cxa_throw(ptr %90, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

92:                                               ; preds = %89
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %10, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %11, align 4
  call void @__cxa_free_exception(ptr %90) #8
  br label %102

96:                                               ; preds = %83
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %9, align 4, !tbaa !9
  %100 = load i32, ptr %7, align 4, !tbaa !9
  %101 = add i32 %100, 1
  store i32 %101, ptr %7, align 4, !tbaa !9
  br label %21, !llvm.loop !14

102:                                              ; preds = %92, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %191

103:                                              ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  %104 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %104, label %142 [
    i32 1, label %105
    i32 2, label %109
    i32 3, label %116
    i32 4, label %127
  ]

105:                                              ; preds = %103
  %106 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %107 = load i32, ptr %106, align 16, !tbaa !9
  %108 = shl i32 %107, 24
  store i32 %108, ptr %13, align 4, !tbaa !9
  br label %143

109:                                              ; preds = %103
  %110 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %111 = load i32, ptr %110, align 16, !tbaa !9
  %112 = shl i32 %111, 24
  %113 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 1
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = or i32 %112, %114
  store i32 %115, ptr %13, align 4, !tbaa !9
  br label %143

116:                                              ; preds = %103
  %117 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %118 = load i32, ptr %117, align 16, !tbaa !9
  %119 = shl i32 %118, 24
  %120 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 1
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = shl i32 %121, 16
  %123 = or i32 %119, %122
  %124 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 2
  %125 = load i32, ptr %124, align 8, !tbaa !9
  %126 = or i32 %123, %125
  store i32 %126, ptr %13, align 4, !tbaa !9
  br label %143

127:                                              ; preds = %103
  %128 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %129 = load i32, ptr %128, align 16, !tbaa !9
  %130 = shl i32 %129, 24
  %131 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 1
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = shl i32 %132, 16
  %134 = or i32 %130, %133
  %135 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 2
  %136 = load i32, ptr %135, align 8, !tbaa !9
  %137 = shl i32 %136, 8
  %138 = or i32 %134, %137
  %139 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 3
  %140 = load i32, ptr %139, align 4, !tbaa !9
  %141 = or i32 %138, %140
  store i32 %141, ptr %13, align 4, !tbaa !9
  br label %143

142:                                              ; preds = %103
  br label %143

143:                                              ; preds = %142, %127, %116, %109, %105
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %189

146:                                              ; preds = %143
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  store i8 32, ptr %147, align 1, !tbaa !11
  %148 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %148, label %149, label %188

149:                                              ; preds = %146
  %150 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %151 = load i8, ptr %150, align 1, !tbaa !11
  %152 = sext i8 %151 to i32
  %153 = icmp eq i32 %152, 47
  br i1 %153, label %154, label %188

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %166, %154
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %157 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %157, label %158, label %164

158:                                              ; preds = %155
  %159 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %160 = load i8, ptr %159, align 1, !tbaa !11
  %161 = sext i8 %160 to i32
  %162 = call i32 @isdigit(i32 noundef %161) #9
  %163 = icmp ne i32 %162, 0
  br label %164

164:                                              ; preds = %158, %155
  %165 = phi i1 [ false, %155 ], [ %163, %158 ]
  br i1 %165, label %166, label %174

166:                                              ; preds = %164
  %167 = load i32, ptr %14, align 4, !tbaa !9
  %168 = mul i32 %167, 10
  %169 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %170 = load i8, ptr %169, align 1, !tbaa !11
  %171 = sext i8 %170 to i32
  %172 = sub nsw i32 %171, 48
  %173 = add i32 %168, %172
  store i32 %173, ptr %14, align 4, !tbaa !9
  br label %155, !llvm.loop !15

174:                                              ; preds = %164
  %175 = load i32, ptr %14, align 4, !tbaa !9
  %176 = icmp ugt i32 %175, 32
  br i1 %176, label %177, label %184

177:                                              ; preds = %174
  %178 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %178, ptr noundef @.str)
          to label %179 unwind label %180

179:                                              ; preds = %177
  call void @__cxa_throw(ptr %178, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

180:                                              ; preds = %177
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %10, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %11, align 4
  call void @__cxa_free_exception(ptr %178) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %191

184:                                              ; preds = %174
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = trunc i32 %185 to i8
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  store i8 %186, ptr %187, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %188

188:                                              ; preds = %184, %149, %146
  br label %189

189:                                              ; preds = %188, %143
  %190 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret i32 %190

191:                                              ; preds = %180, %102
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %192

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isdigit(i32 noundef) #7

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

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

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


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4chen11ip_version49toIntegerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef writeonly %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %6 = tail call ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  store ptr %6, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %7 = tail call ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  store ptr %7, ptr %4, align 8
  %8 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %8, label %9, label %.critedge.thread

9:                                                ; preds = %2
  %10 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %11 = load i8, ptr %10, align 1, !tbaa !5
  %.not = icmp eq i8 %11, 47
  br i1 %.not, label %.critedge.thread, label %12

12:                                               ; preds = %9
  %13 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = sext i8 %14 to i32
  %isdigittmp29 = add nsw i32 %15, -48
  %isdigit30 = icmp ult i32 %isdigittmp29, 10
  br i1 %isdigit30, label %.preheader35, label %16

16:                                               ; preds = %115, %84, %53, %12
  %17 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull @.str.3)
          to label %18 unwind label %19

18:                                               ; preds = %16
  call void @__cxa_throw(ptr nonnull %17, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %185

.preheader35:                                     ; preds = %12, %30
  %21 = phi i32 [ %28, %30 ], [ 0, %12 ]
  %22 = mul i32 %21, 10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %23 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #6
  store ptr %23, ptr %5, align 8
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = sext i8 %25 to i32
  %27 = add i32 %22, -48
  %28 = add i32 %27, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %29, label %30, label %.critedge2

30:                                               ; preds = %.preheader35
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = sext i8 %32 to i32
  %isdigittmp31 = add nsw i32 %33, -48
  %isdigit32 = icmp ult i32 %isdigittmp31, 10
  br i1 %isdigit32, label %.preheader35, label %.critedge2, !llvm.loop !8

.critedge2:                                       ; preds = %.preheader35, %30
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %34, label %35, label %41

35:                                               ; preds = %.critedge2
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %37 = load i8, ptr %36, align 1, !tbaa !5
  %38 = icmp eq i8 %37, 46
  br i1 %38, label %39, label %41

39:                                               ; preds = %35
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br label %41

41:                                               ; preds = %39, %35, %.critedge2
  %42 = icmp ugt i32 %28, 255
  br i1 %42, label %43, label %48

43:                                               ; preds = %139, %108, %77, %41
  %44 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull @.str.4)
          to label %45 unwind label %46

45:                                               ; preds = %43
  call void @__cxa_throw(ptr nonnull %44, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

46:                                               ; preds = %43
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %185

48:                                               ; preds = %41
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %49, label %50, label %141

50:                                               ; preds = %48
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %.not.1 = icmp eq i8 %52, 47
  br i1 %.not.1, label %141, label %53

53:                                               ; preds = %50
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %55 = load i8, ptr %54, align 1, !tbaa !5
  %56 = sext i8 %55 to i32
  %isdigittmp29.1 = add nsw i32 %56, -48
  %isdigit30.1 = icmp ult i32 %isdigittmp29.1, 10
  br i1 %isdigit30.1, label %.preheader35.1, label %16

.preheader35.1:                                   ; preds = %53, %66
  %57 = phi i32 [ %64, %66 ], [ 0, %53 ]
  %58 = mul i32 %57, 10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %59 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #6
  store ptr %59, ptr %5, align 8
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %61 = load i8, ptr %60, align 1, !tbaa !5
  %62 = sext i8 %61 to i32
  %63 = add i32 %58, -48
  %64 = add i32 %63, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %65, label %66, label %.critedge2.1

66:                                               ; preds = %.preheader35.1
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %68 = load i8, ptr %67, align 1, !tbaa !5
  %69 = sext i8 %68 to i32
  %isdigittmp31.1 = add nsw i32 %69, -48
  %isdigit32.1 = icmp ult i32 %isdigittmp31.1, 10
  br i1 %isdigit32.1, label %.preheader35.1, label %.critedge2.1, !llvm.loop !8

.critedge2.1:                                     ; preds = %66, %.preheader35.1
  %70 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %70, label %71, label %77

71:                                               ; preds = %.critedge2.1
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %73 = load i8, ptr %72, align 1, !tbaa !5
  %74 = icmp eq i8 %73, 46
  br i1 %74, label %75, label %77

75:                                               ; preds = %71
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br label %77

77:                                               ; preds = %75, %71, %.critedge2.1
  %78 = icmp ugt i32 %64, 255
  br i1 %78, label %43, label %79

79:                                               ; preds = %77
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %80, label %81, label %143

81:                                               ; preds = %79
  %82 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %83 = load i8, ptr %82, align 1, !tbaa !5
  %.not.2 = icmp eq i8 %83, 47
  br i1 %.not.2, label %143, label %84

84:                                               ; preds = %81
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %86 = load i8, ptr %85, align 1, !tbaa !5
  %87 = sext i8 %86 to i32
  %isdigittmp29.2 = add nsw i32 %87, -48
  %isdigit30.2 = icmp ult i32 %isdigittmp29.2, 10
  br i1 %isdigit30.2, label %.preheader35.2, label %16

.preheader35.2:                                   ; preds = %84, %97
  %88 = phi i32 [ %95, %97 ], [ 0, %84 ]
  %89 = mul i32 %88, 10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %90 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #6
  store ptr %90, ptr %5, align 8
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %92 = load i8, ptr %91, align 1, !tbaa !5
  %93 = sext i8 %92 to i32
  %94 = add i32 %89, -48
  %95 = add i32 %94, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %96 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %96, label %97, label %.critedge2.2

97:                                               ; preds = %.preheader35.2
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %99 = load i8, ptr %98, align 1, !tbaa !5
  %100 = sext i8 %99 to i32
  %isdigittmp31.2 = add nsw i32 %100, -48
  %isdigit32.2 = icmp ult i32 %isdigittmp31.2, 10
  br i1 %isdigit32.2, label %.preheader35.2, label %.critedge2.2, !llvm.loop !8

.critedge2.2:                                     ; preds = %97, %.preheader35.2
  %101 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %101, label %102, label %108

102:                                              ; preds = %.critedge2.2
  %103 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %104 = load i8, ptr %103, align 1, !tbaa !5
  %105 = icmp eq i8 %104, 46
  br i1 %105, label %106, label %108

106:                                              ; preds = %102
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br label %108

108:                                              ; preds = %106, %102, %.critedge2.2
  %109 = icmp ugt i32 %95, 255
  br i1 %109, label %43, label %110

110:                                              ; preds = %108
  %111 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %111, label %112, label %146

112:                                              ; preds = %110
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %114 = load i8, ptr %113, align 1, !tbaa !5
  %.not.3 = icmp eq i8 %114, 47
  br i1 %.not.3, label %146, label %115

115:                                              ; preds = %112
  %116 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %117 = load i8, ptr %116, align 1, !tbaa !5
  %118 = sext i8 %117 to i32
  %isdigittmp29.3 = add nsw i32 %118, -48
  %isdigit30.3 = icmp ult i32 %isdigittmp29.3, 10
  br i1 %isdigit30.3, label %.preheader35.3, label %16

.preheader35.3:                                   ; preds = %115, %128
  %119 = phi i32 [ %126, %128 ], [ 0, %115 ]
  %120 = mul i32 %119, 10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %121 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #6
  store ptr %121, ptr %5, align 8
  %122 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %123 = load i8, ptr %122, align 1, !tbaa !5
  %124 = sext i8 %123 to i32
  %125 = add i32 %120, -48
  %126 = add i32 %125, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %127 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %127, label %128, label %.critedge2.3

128:                                              ; preds = %.preheader35.3
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %130 = load i8, ptr %129, align 1, !tbaa !5
  %131 = sext i8 %130 to i32
  %isdigittmp31.3 = add nsw i32 %131, -48
  %isdigit32.3 = icmp ult i32 %isdigittmp31.3, 10
  br i1 %isdigit32.3, label %.preheader35.3, label %.critedge2.3, !llvm.loop !8

.critedge2.3:                                     ; preds = %128, %.preheader35.3
  %132 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %132, label %133, label %139

133:                                              ; preds = %.critedge2.3
  %134 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %135 = load i8, ptr %134, align 1, !tbaa !5
  %136 = icmp eq i8 %135, 46
  br i1 %136, label %137, label %139

137:                                              ; preds = %133
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br label %139

139:                                              ; preds = %137, %133, %.critedge2.3
  %140 = icmp ugt i32 %126, 255
  br i1 %140, label %43, label %.critedge

141:                                              ; preds = %50, %48
  %142 = shl nuw i32 %28, 24
  br label %.critedge.thread

143:                                              ; preds = %81, %79
  %144 = shl nuw i32 %28, 24
  %145 = or disjoint i32 %144, %64
  br label %.critedge.thread

146:                                              ; preds = %112, %110
  %147 = shl nuw i32 %28, 24
  %148 = shl nuw nsw i32 %64, 16
  %149 = or disjoint i32 %148, %147
  %150 = or disjoint i32 %149, %95
  br label %.critedge.thread

.critedge:                                        ; preds = %139
  %151 = shl nuw i32 %28, 24
  %152 = shl nuw nsw i32 %64, 16
  %153 = or disjoint i32 %152, %151
  %154 = shl nuw nsw i32 %95, 8
  %155 = or disjoint i32 %153, %154
  %156 = or disjoint i32 %155, %126
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %2, %9, %.critedge, %146, %143, %141
  %.021 = phi i32 [ %156, %.critedge ], [ %150, %146 ], [ %145, %143 ], [ %142, %141 ], [ 0, %9 ], [ 0, %2 ]
  %.not28 = icmp eq ptr %1, null
  br i1 %.not28, label %184, label %157

157:                                              ; preds = %.critedge.thread
  store i8 32, ptr %1, align 1, !tbaa !5
  %158 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %158, label %159, label %184

159:                                              ; preds = %157
  %160 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %161 = load i8, ptr %160, align 1, !tbaa !5
  %162 = icmp eq i8 %161, 47
  br i1 %162, label %.preheader, label %184

.preheader:                                       ; preds = %159
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %164 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %164, label %.lr.ph, label %.critedge4.thread

.lr.ph:                                           ; preds = %.preheader, %168
  %.041 = phi i32 [ %174, %168 ], [ 0, %.preheader ]
  %165 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %166 = load i8, ptr %165, align 1, !tbaa !5
  %167 = sext i8 %166 to i32
  %isdigittmp = add nsw i32 %167, -48
  %isdigit = icmp ult i32 %isdigittmp, 10
  br i1 %isdigit, label %168, label %.critedge4

168:                                              ; preds = %.lr.ph
  %169 = mul i32 %.041, 10
  %170 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %171 = load i8, ptr %170, align 1, !tbaa !5
  %172 = sext i8 %171 to i32
  %173 = add i32 %169, -48
  %174 = add i32 %173, %172
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %176, label %.lr.ph, label %.critedge4, !llvm.loop !10

.critedge4:                                       ; preds = %.lr.ph, %168
  %.0.lcssa = phi i32 [ %.041, %.lr.ph ], [ %174, %168 ]
  %177 = icmp ugt i32 %.0.lcssa, 32
  br i1 %177, label %178, label %.critedge4.thread

178:                                              ; preds = %.critedge4
  %179 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %179, ptr noundef nonnull @.str)
          to label %180 unwind label %181

180:                                              ; preds = %178
  call void @__cxa_throw(ptr nonnull %179, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

181:                                              ; preds = %178
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %185

.critedge4.thread:                                ; preds = %.preheader, %.critedge4
  %.0.lcssa96 = phi i32 [ %.0.lcssa, %.critedge4 ], [ 0, %.preheader ]
  %183 = trunc nuw nsw i32 %.0.lcssa96 to i8
  store i8 %183, ptr %1, align 1, !tbaa !5
  br label %184

184:                                              ; preds = %157, %159, %.critedge4.thread, %.critedge.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 %.021

185:                                              ; preds = %19, %46, %181
  %.sink = phi ptr [ %17, %19 ], [ %44, %46 ], [ %179, %181 ]
  %.pn.pn = phi { ptr, i32 } [ %20, %19 ], [ %47, %46 ], [ %182, %181 ]
  call void @__cxa_free_exception(ptr %.sink) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn
}

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

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


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