; LLVM IR from chdb-io/chdb :: base/poco/Foundation/src (DigestEngine)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTIN4Poco19DataFormatExceptionE = external constant ptr

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

; 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
define dso_local void @_ZN4Poco12DigestEngine13digestFromHexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i1, align 1
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  %13 = urem i64 %12, 2
  %14 = icmp ne i64 %13, 0
  br i1 %14, label %15, label %22

15:                                               ; preds = %2
  %16 = call ptr @__cxa_allocate_exception(i64 56) #5
  invoke void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52) %16, i32 noundef 0)
          to label %17 unwind label %18

17:                                               ; preds = %15
  call void @__cxa_throw(ptr %16, ptr @_ZTIN4Poco19DataFormatExceptionE, ptr @_ZN4Poco19DataFormatExceptionD1Ev) #6
  unreachable

18:                                               ; preds = %15
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %5, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %6, align 4
  call void @__cxa_free_exception(ptr %16) #5
  br label %216

22:                                               ; preds = %2
  store i1 false, ptr %7, align 1
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  %25 = udiv i64 %24, 2
  invoke void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %25)
          to label %26 unwind label %33

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %203, %26
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  %31 = icmp ult i64 %28, %30
  br i1 %31, label %37, label %32

32:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %211

33:                                               ; preds = %22
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %5, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %6, align 4
  br label %215

37:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !11
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %39) #5
  %41 = load i8, ptr %40, align 1, !tbaa !13
  %42 = sext i8 %41 to i32
  %43 = icmp sge i32 %42, 48
  br i1 %43, label %44, label %58

44:                                               ; preds = %37
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load i64, ptr %8, align 8, !tbaa !9
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %45, i64 noundef %46) #5
  %48 = load i8, ptr %47, align 1, !tbaa !13
  %49 = sext i8 %48 to i32
  %50 = icmp sle i32 %49, 57
  br i1 %50, label %51, label %58

51:                                               ; preds = %44
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %52, i64 noundef %53) #5
  %55 = load i8, ptr %54, align 1, !tbaa !13
  %56 = sext i8 %55 to i32
  %57 = sub nsw i32 %56, 48
  store i32 %57, ptr %9, align 4, !tbaa !11
  br label %115

58:                                               ; preds = %44, %37
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load i64, ptr %8, align 8, !tbaa !9
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %60) #5
  %62 = load i8, ptr %61, align 1, !tbaa !13
  %63 = sext i8 %62 to i32
  %64 = icmp sge i32 %63, 97
  br i1 %64, label %65, label %80

65:                                               ; preds = %58
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load i64, ptr %8, align 8, !tbaa !9
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %66, i64 noundef %67) #5
  %69 = load i8, ptr %68, align 1, !tbaa !13
  %70 = sext i8 %69 to i32
  %71 = icmp sle i32 %70, 102
  br i1 %71, label %72, label %80

72:                                               ; preds = %65
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %73, i64 noundef %74) #5
  %76 = load i8, ptr %75, align 1, !tbaa !13
  %77 = sext i8 %76 to i32
  %78 = sub nsw i32 %77, 97
  %79 = add nsw i32 %78, 10
  store i32 %79, ptr %9, align 4, !tbaa !11
  br label %114

80:                                               ; preds = %65, %58
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = load i64, ptr %8, align 8, !tbaa !9
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %81, i64 noundef %82) #5
  %84 = load i8, ptr %83, align 1, !tbaa !13
  %85 = sext i8 %84 to i32
  %86 = icmp sge i32 %85, 65
  br i1 %86, label %87, label %102

87:                                               ; preds = %80
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load i64, ptr %8, align 8, !tbaa !9
  %90 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %88, i64 noundef %89) #5
  %91 = load i8, ptr %90, align 1, !tbaa !13
  %92 = sext i8 %91 to i32
  %93 = icmp sle i32 %92, 70
  br i1 %93, label %94, label %102

94:                                               ; preds = %87
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = load i64, ptr %8, align 8, !tbaa !9
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %95, i64 noundef %96) #5
  %98 = load i8, ptr %97, align 1, !tbaa !13
  %99 = sext i8 %98 to i32
  %100 = sub nsw i32 %99, 65
  %101 = add nsw i32 %100, 10
  store i32 %101, ptr %9, align 4, !tbaa !11
  br label %113

102:                                              ; preds = %87, %80
  %103 = call ptr @__cxa_allocate_exception(i64 56) #5
  invoke void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52) %103, i32 noundef 0)
          to label %104 unwind label %105

104:                                              ; preds = %102
  invoke void @__cxa_throw(ptr %103, ptr @_ZTIN4Poco19DataFormatExceptionE, ptr @_ZN4Poco19DataFormatExceptionD1Ev) #6
          to label %221 unwind label %109

105:                                              ; preds = %102
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %5, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %6, align 4
  call void @__cxa_free_exception(ptr %103) #5
  br label %210

109:                                              ; preds = %192, %104
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %5, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %6, align 4
  br label %210

113:                                              ; preds = %94
  br label %114

114:                                              ; preds = %113, %72
  br label %115

115:                                              ; preds = %114, %51
  %116 = load i32, ptr %9, align 4, !tbaa !11
  %117 = shl i32 %116, 4
  store i32 %117, ptr %9, align 4, !tbaa !11
  %118 = load i64, ptr %8, align 8, !tbaa !9
  %119 = add i64 %118, 1
  store i64 %119, ptr %8, align 8, !tbaa !9
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load i64, ptr %8, align 8, !tbaa !9
  %122 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %120, i64 noundef %121) #5
  %123 = load i8, ptr %122, align 1, !tbaa !13
  %124 = sext i8 %123 to i32
  %125 = icmp sge i32 %124, 48
  br i1 %125, label %126, label %142

126:                                              ; preds = %115
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = load i64, ptr %8, align 8, !tbaa !9
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %127, i64 noundef %128) #5
  %130 = load i8, ptr %129, align 1, !tbaa !13
  %131 = sext i8 %130 to i32
  %132 = icmp sle i32 %131, 57
  br i1 %132, label %133, label %142

133:                                              ; preds = %126
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = load i64, ptr %8, align 8, !tbaa !9
  %136 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %134, i64 noundef %135) #5
  %137 = load i8, ptr %136, align 1, !tbaa !13
  %138 = sext i8 %137 to i32
  %139 = sub nsw i32 %138, 48
  %140 = load i32, ptr %9, align 4, !tbaa !11
  %141 = add nsw i32 %140, %139
  store i32 %141, ptr %9, align 4, !tbaa !11
  br label %199

142:                                              ; preds = %126, %115
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load i64, ptr %8, align 8, !tbaa !9
  %145 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %143, i64 noundef %144) #5
  %146 = load i8, ptr %145, align 1, !tbaa !13
  %147 = sext i8 %146 to i32
  %148 = icmp sge i32 %147, 97
  br i1 %148, label %149, label %166

149:                                              ; preds = %142
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = load i64, ptr %8, align 8, !tbaa !9
  %152 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %150, i64 noundef %151) #5
  %153 = load i8, ptr %152, align 1, !tbaa !13
  %154 = sext i8 %153 to i32
  %155 = icmp sle i32 %154, 102
  br i1 %155, label %156, label %166

156:                                              ; preds = %149
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load i64, ptr %8, align 8, !tbaa !9
  %159 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %157, i64 noundef %158) #5
  %160 = load i8, ptr %159, align 1, !tbaa !13
  %161 = sext i8 %160 to i32
  %162 = sub nsw i32 %161, 97
  %163 = add nsw i32 %162, 10
  %164 = load i32, ptr %9, align 4, !tbaa !11
  %165 = add nsw i32 %164, %163
  store i32 %165, ptr %9, align 4, !tbaa !11
  br label %198

166:                                              ; preds = %149, %142
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load i64, ptr %8, align 8, !tbaa !9
  %169 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %167, i64 noundef %168) #5
  %170 = load i8, ptr %169, align 1, !tbaa !13
  %171 = sext i8 %170 to i32
  %172 = icmp sge i32 %171, 65
  br i1 %172, label %173, label %190

173:                                              ; preds = %166
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = load i64, ptr %8, align 8, !tbaa !9
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef %175) #5
  %177 = load i8, ptr %176, align 1, !tbaa !13
  %178 = sext i8 %177 to i32
  %179 = icmp sle i32 %178, 70
  br i1 %179, label %180, label %190

180:                                              ; preds = %173
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = load i64, ptr %8, align 8, !tbaa !9
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %181, i64 noundef %182) #5
  %184 = load i8, ptr %183, align 1, !tbaa !13
  %185 = sext i8 %184 to i32
  %186 = sub nsw i32 %185, 65
  %187 = add nsw i32 %186, 10
  %188 = load i32, ptr %9, align 4, !tbaa !11
  %189 = add nsw i32 %188, %187
  store i32 %189, ptr %9, align 4, !tbaa !11
  br label %197

190:                                              ; preds = %173, %166
  %191 = call ptr @__cxa_allocate_exception(i64 56) #5
  invoke void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52) %191, i32 noundef 0)
          to label %192 unwind label %193

192:                                              ; preds = %190
  invoke void @__cxa_throw(ptr %191, ptr @_ZTIN4Poco19DataFormatExceptionE, ptr @_ZN4Poco19DataFormatExceptionD1Ev) #6
          to label %221 unwind label %109

193:                                              ; preds = %190
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %5, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %6, align 4
  call void @__cxa_free_exception(ptr %191) #5
  br label %210

197:                                              ; preds = %180
  br label %198

198:                                              ; preds = %197, %156
  br label %199

199:                                              ; preds = %198, %133
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  %200 = load i32, ptr %9, align 4, !tbaa !11
  %201 = trunc i32 %200 to i8
  store i8 %201, ptr %10, align 1, !tbaa !13
  invoke void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %202 unwind label %206

202:                                              ; preds = %199
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %203

203:                                              ; preds = %202
  %204 = load i64, ptr %8, align 8, !tbaa !9
  %205 = add i64 %204, 1
  store i64 %205, ptr %8, align 8, !tbaa !9
  br label %27, !llvm.loop !14

206:                                              ; preds = %199
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %5, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %210

210:                                              ; preds = %206, %193, %109, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %215

211:                                              ; preds = %32
  store i1 true, ptr %7, align 1
  %212 = load i1, ptr %7, align 1
  br i1 %212, label %214, label %213

213:                                              ; preds = %211
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %214

214:                                              ; preds = %213, %211
  ret void

215:                                              ; preds = %210, %33
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %216

216:                                              ; preds = %215, %18
  %217 = load ptr, ptr %5, align 8
  %218 = load i32, ptr %6, align 4
  %219 = insertvalue { ptr, i32 } poison, ptr %217, 0
  %220 = insertvalue { ptr, i32 } %219, i32 %218, 1
  resume { ptr, i32 } %220

221:                                              ; preds = %192, %104
  unreachable
}

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZN4Poco19DataFormatExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTIN4Poco19DataFormatExceptionE = external constant ptr

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

; 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
define dso_local void @_ZN4Poco12DigestEngine13digestFromHexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i8, align 1
  %4 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %5 = and i64 %4, 1
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %2
  %7 = tail call ptr @__cxa_allocate_exception(i64 56) #5
  invoke void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52) %7, i32 noundef 0)
          to label %8 unwind label %9

8:                                                ; preds = %6
  tail call void @__cxa_throw(ptr nonnull %7, ptr nonnull @_ZTIN4Poco19DataFormatExceptionE, ptr nonnull @_ZN4Poco19DataFormatExceptionD1Ev) #6
  unreachable

9:                                                ; preds = %6
  %10 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %7) #5
  br label %91

11:                                               ; preds = %2
  tail call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %12 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %13 = lshr i64 %12, 1
  invoke void @_ZNSt6vectorIhSaIhEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %13)
          to label %.preheader unwind label %15

.preheader:                                       ; preds = %11
  %14 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %.not61 = icmp eq i64 %14, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph

15:                                               ; preds = %11
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %90

.lr.ph:                                           ; preds = %.preheader, %84
  %.04960 = phi i64 [ %85, %84 ], [ 0, %.preheader ]
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = icmp sgt i8 %18, 47
  br i1 %19, label %20, label %24

20:                                               ; preds = %.lr.ph
  %21 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %22 = load i8, ptr %21, align 1, !tbaa !5
  %23 = icmp slt i8 %22, 58
  br i1 %23, label %46, label %24

24:                                               ; preds = %20, %.lr.ph
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %26 = load i8, ptr %25, align 1, !tbaa !5
  %27 = icmp sgt i8 %26, 96
  br i1 %27, label %28, label %32

28:                                               ; preds = %24
  %29 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %30 = load i8, ptr %29, align 1, !tbaa !5
  %31 = icmp slt i8 %30, 103
  br i1 %31, label %46, label %32

32:                                               ; preds = %28, %24
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %34 = load i8, ptr %33, align 1, !tbaa !5
  %35 = icmp sgt i8 %34, 64
  br i1 %35, label %36, label %40

36:                                               ; preds = %32
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %39 = icmp slt i8 %38, 71
  br i1 %39, label %46, label %40

40:                                               ; preds = %36, %32
  %41 = call ptr @__cxa_allocate_exception(i64 56) #5
  invoke void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52) %41, i32 noundef 0)
          to label %.invoke unwind label %42

42:                                               ; preds = %40
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %41) #5
  br label %90

44:                                               ; preds = %.invoke
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %90

46:                                               ; preds = %36, %28, %20
  %.sink62 = phi i8 [ -48, %20 ], [ -87, %28 ], [ -55, %36 ]
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.04960) #5
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %49 = add i8 %48, %.sink62
  %50 = shl i8 %49, 4
  %51 = or disjoint i64 %.04960, 1
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %53 = load i8, ptr %52, align 1, !tbaa !5
  %54 = icmp sgt i8 %53, 47
  br i1 %54, label %55, label %59

55:                                               ; preds = %46
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %58 = icmp slt i8 %57, 58
  br i1 %58, label %80, label %59

59:                                               ; preds = %55, %46
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %61 = load i8, ptr %60, align 1, !tbaa !5
  %62 = icmp sgt i8 %61, 96
  br i1 %62, label %63, label %67

63:                                               ; preds = %59
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %65 = load i8, ptr %64, align 1, !tbaa !5
  %66 = icmp slt i8 %65, 103
  br i1 %66, label %80, label %67

67:                                               ; preds = %63, %59
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %69 = load i8, ptr %68, align 1, !tbaa !5
  %70 = icmp sgt i8 %69, 64
  br i1 %70, label %71, label %75

71:                                               ; preds = %67
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %73 = load i8, ptr %72, align 1, !tbaa !5
  %74 = icmp slt i8 %73, 71
  br i1 %74, label %80, label %75

75:                                               ; preds = %71, %67
  %76 = call ptr @__cxa_allocate_exception(i64 56) #5
  invoke void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52) %76, i32 noundef 0)
          to label %.invoke unwind label %78

.invoke:                                          ; preds = %40, %75
  %77 = phi ptr [ %76, %75 ], [ %41, %40 ]
  invoke void @__cxa_throw(ptr nonnull %77, ptr nonnull @_ZTIN4Poco19DataFormatExceptionE, ptr nonnull @_ZN4Poco19DataFormatExceptionD1Ev) #6
          to label %.cont unwind label %44

.cont:                                            ; preds = %.invoke
  unreachable

78:                                               ; preds = %75
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %76) #5
  br label %90

80:                                               ; preds = %71, %63, %55
  %.sink64 = phi i8 [ -48, %55 ], [ -87, %63 ], [ -55, %71 ]
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %51) #5
  %82 = load i8, ptr %81, align 1, !tbaa !5
  %83 = add i8 %82, %.sink64
  %.1 = add i8 %83, %50
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  store i8 %.1, ptr %3, align 1, !tbaa !5
  invoke void @_ZNSt6vectorIhSaIhEE9push_backEOh(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %84 unwind label %88

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %85 = add i64 %.04960, 2
  %86 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %87 = icmp ult i64 %85, %86
  br i1 %87, label %.lr.ph, label %._crit_edge, !llvm.loop !8

88:                                               ; preds = %80
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %90

._crit_edge:                                      ; preds = %84, %.preheader
  ret void

90:                                               ; preds = %42, %44, %78, %88, %15
  %.pn55.pn = phi { ptr, i32 } [ %16, %15 ], [ %89, %88 ], [ %45, %44 ], [ %79, %78 ], [ %43, %42 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %91

91:                                               ; preds = %90, %9
  %.pn58 = phi { ptr, i32 } [ %10, %9 ], [ %.pn55.pn, %90 ]
  resume { ptr, i32 } %.pn58
}

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN4Poco19DataFormatExceptionC1Ei(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZN4Poco19DataFormatExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

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

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

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


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass