; LLVM IR from dynexcoin/Dynex :: src/HTTP (HttpParser)

; 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::error_code" = type { i32, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZTISt12system_error = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef) #1

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_114throwIfNotGoodERSi(ptr noundef nonnull align 8 dereferenceable(16)) #5

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

25:                                               ; preds = %91, %72, %4
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %26, i64 %29
  %31 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %30)
  br i1 %31, label %32, label %36

32:                                               ; preds = %25
  %33 = load i8, ptr %10, align 1, !tbaa !13
  %34 = sext i8 %33 to i32
  %35 = icmp ne i32 %34, 13
  br label %36

36:                                               ; preds = %32, %25
  %37 = phi i1 [ false, %25 ], [ %35, %32 ]
  br i1 %37, label %38, label %92

38:                                               ; preds = %36
  %39 = load i8, ptr %10, align 1, !tbaa !13
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 58
  br i1 %41, label %42, label %76

42:                                               ; preds = %38
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %43)
  %45 = icmp eq i32 %44, 32
  br i1 %45, label %46, label %49

46:                                               ; preds = %42
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 1 dereferenceable(1) %10)
  br label %49

49:                                               ; preds = %46, %42
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br i1 %51, label %52, label %69

52:                                               ; preds = %49
  %53 = call ptr @__cxa_allocate_exception(i64 32) #7
  %54 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef 4)
          to label %55 unwind label %65

55:                                               ; preds = %52
  %56 = getelementptr inbounds { i32, ptr }, ptr %12, i32 0, i32 0
  %57 = extractvalue { i32, ptr } %54, 0
  store i32 %57, ptr %56, align 8
  %58 = getelementptr inbounds { i32, ptr }, ptr %12, i32 0, i32 1
  %59 = extractvalue { i32, ptr } %54, 1
  store ptr %59, ptr %58, align 8
  %60 = getelementptr inbounds { i32, ptr }, ptr %12, i32 0, i32 0
  %61 = load i32, ptr %60, align 8
  %62 = getelementptr inbounds { i32, ptr }, ptr %12, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %53, i32 %61, ptr %63)
          to label %64 unwind label %65

64:                                               ; preds = %55
  call void @__cxa_throw(ptr %53, ptr @_ZTISt12system_error, ptr @_ZNSt12system_errorD1Ev) #8
  unreachable

65:                                               ; preds = %55, %52
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %13, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %14, align 4
  call void @__cxa_free_exception(ptr %53) #7
  br label %168

69:                                               ; preds = %49
  %70 = load i8, ptr %11, align 1, !tbaa !9, !range !14, !noundef !15
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %75

72:                                               ; preds = %69
  store i8 0, ptr %11, align 1, !tbaa !9
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 1 dereferenceable(1) %10)
  br label %25, !llvm.loop !16

75:                                               ; preds = %69
  br label %76

76:                                               ; preds = %75, %38
  %77 = load i8, ptr %11, align 1, !tbaa !9, !range !14, !noundef !15
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %85

79:                                               ; preds = %76
  %80 = load i8, ptr %10, align 1, !tbaa !13
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %81, i8 noundef signext %80)
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 1 dereferenceable(1) %10)
  br label %91

85:                                               ; preds = %76
  %86 = load i8, ptr %10, align 1, !tbaa !13
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %87, i8 noundef signext %86)
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %89, ptr noundef nonnull align 1 dereferenceable(1) %10)
  br label %91

91:                                               ; preds = %85, %79
  br label %25, !llvm.loop !16

92:                                               ; preds = %36
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_114throwIfNotGoodERSi(ptr noundef nonnull align 8 dereferenceable(16) %93)
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %94, ptr noundef nonnull align 1 dereferenceable(1) %10)
  %96 = load i8, ptr %10, align 1, !tbaa !13
  %97 = sext i8 %96 to i32
  %98 = icmp ne i32 %97, 10
  br i1 %98, label %99, label %116

99:                                               ; preds = %92
  %100 = call ptr @__cxa_allocate_exception(i64 32) #7
  %101 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef 3)
          to label %102 unwind label %112

102:                                              ; preds = %99
  %103 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 0
  %104 = extractvalue { i32, ptr } %101, 0
  store i32 %104, ptr %103, align 8
  %105 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 1
  %106 = extractvalue { i32, ptr } %101, 1
  store ptr %106, ptr %105, align 8
  %107 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 0
  %108 = load i32, ptr %107, align 8
  %109 = getelementptr inbounds { i32, ptr }, ptr %15, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %100, i32 %108, ptr %110)
          to label %111 unwind label %112

111:                                              ; preds = %102
  call void @__cxa_throw(ptr %100, ptr @_ZTISt12system_error, ptr @_ZNSt12system_errorD1Ev) #8
  unreachable

112:                                              ; preds = %102, %99
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %13, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %14, align 4
  call void @__cxa_free_exception(ptr %100) #7
  br label %168

116:                                              ; preds = %92
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %117) #7
  %119 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %118, ptr %119, align 8
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %120) #7
  %122 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %121, ptr %122, align 8
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %123) #7
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %124, ptr %125, align 8
  %126 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8
  %128 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8
  %132 = call ptr @_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_(ptr %127, ptr %129, ptr %131, ptr noundef @tolower)
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %134)
  %136 = trunc i32 %135 to i8
  store i8 %136, ptr %10, align 1, !tbaa !13
  %137 = load i8, ptr %10, align 1, !tbaa !13
  %138 = sext i8 %137 to i32
  %139 = icmp eq i32 %138, 13
  br i1 %139, label %140, label %165

140:                                              ; preds = %116
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef nonnull align 1 dereferenceable(1) %10)
  %143 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %142, ptr noundef nonnull align 1 dereferenceable(1) %10)
  %144 = load i8, ptr %10, align 1, !tbaa !13
  %145 = sext i8 %144 to i32
  %146 = icmp ne i32 %145, 10
  br i1 %146, label %147, label %164

147:                                              ; preds = %140
  %148 = call ptr @__cxa_allocate_exception(i64 32) #7
  %149 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef 3)
          to label %150 unwind label %160

150:                                              ; preds = %147
  %151 = getelementptr inbounds { i32, ptr }, ptr %20, i32 0, i32 0
  %152 = extractvalue { i32, ptr } %149, 0
  store i32 %152, ptr %151, align 8
  %153 = getelementptr inbounds { i32, ptr }, ptr %20, i32 0, i32 1
  %154 = extractvalue { i32, ptr } %149, 1
  store ptr %154, ptr %153, align 8
  %155 = getelementptr inbounds { i32, ptr }, ptr %20, i32 0, i32 0
  %156 = load i32, ptr %155, align 8
  %157 = getelementptr inbounds { i32, ptr }, ptr %20, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %148, i32 %156, ptr %158)
          to label %159 unwind label %160

159:                                              ; preds = %150
  call void @__cxa_throw(ptr %148, ptr @_ZTISt12system_error, ptr @_ZNSt12system_errorD1Ev) #8
  unreachable

160:                                              ; preds = %150, %147
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %13, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %14, align 4
  call void @__cxa_free_exception(ptr %148) #7
  br label %168

164:                                              ; preds = %140
  store i1 false, ptr %5, align 1
  store i32 1, ptr %21, align 4
  br label %166

165:                                              ; preds = %116
  store i1 true, ptr %5, align 1
  store i32 1, ptr %21, align 4
  br label %166

166:                                              ; preds = %165, %164
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  %167 = load i1, ptr %5, align 1
  ret i1 %167

168:                                              ; preds = %160, %112, %65
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %13, align 8
  %171 = load i32, ptr %14, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32), i32, ptr) unnamed_addr #5 align 2

declare noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

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

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

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

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

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

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

@_ZTISt12system_error = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef) local_unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_114throwIfNotGoodERSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7DynexCN10HttpParser10readHeaderERSiRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_(ptr nocapture noundef nonnull readnone align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %1, i64 %9
  %11 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %10)
  %12 = load i8, ptr %5, align 1
  %13 = icmp ne i8 %12, 13
  %14 = select i1 %11, i1 %13, i1 false
  br i1 %14, label %.lr.ph.split.us, label %.outer._crit_edge

.lr.ph.split.us:                                  ; preds = %4, %24
  %15 = phi i8 [ %32, %24 ], [ %12, %4 ]
  %16 = icmp eq i8 %15, 58
  br i1 %16, label %17, label %24

17:                                               ; preds = %.lr.ph.split.us
  %18 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %19 = icmp eq i32 %18, 32
  br i1 %19, label %20, label %22

20:                                               ; preds = %17
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  br label %22

22:                                               ; preds = %20, %17
  %23 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br i1 %23, label %.split.us, label %.outer

24:                                               ; preds = %.lr.ph.split.us
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext %15)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %1, i64 %29
  %31 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %30)
  %32 = load i8, ptr %5, align 1
  %33 = icmp ne i8 %32, 13
  %34 = select i1 %31, i1 %33, i1 false
  br i1 %34, label %.lr.ph.split.us, label %.outer._crit_edge, !llvm.loop !8

.lr.ph.split:                                     ; preds = %.outer, %60
  %35 = phi i8 [ %69, %60 ], [ %57, %.outer ]
  %36 = icmp eq i8 %35, 58
  br i1 %36, label %37, label %60

37:                                               ; preds = %.lr.ph.split
  %38 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %39 = icmp eq i32 %38, 32
  br i1 %39, label %40, label %42

40:                                               ; preds = %37
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  br label %42

42:                                               ; preds = %40, %37
  %43 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br i1 %43, label %.split.us, label %._crit_edge

.split.us:                                        ; preds = %22, %42
  %44 = call ptr @__cxa_allocate_exception(i64 32) #7
  %45 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef 4)
  %46 = extractvalue { i32, ptr } %45, 0
  %47 = extractvalue { i32, ptr } %45, 1
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %44, i32 %46, ptr %47)
          to label %48 unwind label %49

48:                                               ; preds = %.split.us
  call void @__cxa_throw(ptr nonnull %44, ptr nonnull @_ZTISt12system_error, ptr nonnull @_ZNSt12system_errorD1Ev) #8
  unreachable

49:                                               ; preds = %.split.us
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %103

._crit_edge:                                      ; preds = %42
  %.pre = load i8, ptr %5, align 1, !tbaa !10
  br label %60

.outer:                                           ; preds = %22
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %52 = load ptr, ptr %1, align 8, !tbaa !5
  %53 = getelementptr i8, ptr %52, i64 -24
  %54 = load i64, ptr %53, align 8
  %55 = getelementptr inbounds i8, ptr %1, i64 %54
  %56 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %55)
  %57 = load i8, ptr %5, align 1
  %58 = icmp ne i8 %57, 13
  %59 = select i1 %56, i1 %58, i1 false
  br i1 %59, label %.lr.ph.split, label %.outer._crit_edge, !llvm.loop !8

60:                                               ; preds = %._crit_edge, %.lr.ph.split
  %61 = phi i8 [ %.pre, %._crit_edge ], [ %35, %.lr.ph.split ]
  %62 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %3, i8 noundef signext %61)
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %64 = load ptr, ptr %1, align 8, !tbaa !5
  %65 = getelementptr i8, ptr %64, i64 -24
  %66 = load i64, ptr %65, align 8
  %67 = getelementptr inbounds i8, ptr %1, i64 %66
  %68 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %67)
  %69 = load i8, ptr %5, align 1
  %70 = icmp ne i8 %69, 13
  %71 = select i1 %68, i1 %70, i1 false
  br i1 %71, label %.lr.ph.split, label %.outer._crit_edge, !llvm.loop !8

.outer._crit_edge:                                ; preds = %.outer, %24, %60, %4
  call void @_ZN12_GLOBAL__N_114throwIfNotGoodERSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %73 = load i8, ptr %5, align 1, !tbaa !10
  %.not = icmp eq i8 %73, 10
  br i1 %.not, label %82, label %74

74:                                               ; preds = %.outer._crit_edge
  %75 = call ptr @__cxa_allocate_exception(i64 32) #7
  %76 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef 3)
  %77 = extractvalue { i32, ptr } %76, 0
  %78 = extractvalue { i32, ptr } %76, 1
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %75, i32 %77, ptr %78)
          to label %79 unwind label %80

79:                                               ; preds = %74
  call void @__cxa_throw(ptr nonnull %75, ptr nonnull @_ZTISt12system_error, ptr nonnull @_ZNSt12system_errorD1Ev) #8
  unreachable

80:                                               ; preds = %74
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %103

82:                                               ; preds = %.outer._crit_edge
  %83 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %84 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %85 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %86 = call ptr @_ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_(ptr %83, ptr %84, ptr %85, ptr noundef nonnull @tolower)
  %87 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %88 = trunc i32 %87 to i8
  store i8 %88, ptr %5, align 1, !tbaa !10
  %sext.mask = and i32 %87, 255
  %89 = icmp ne i32 %sext.mask, 13
  br i1 %89, label %102, label %90

90:                                               ; preds = %82
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi3getERc(ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %93 = load i8, ptr %5, align 1, !tbaa !10
  %.not34 = icmp eq i8 %93, 10
  br i1 %.not34, label %102, label %94

94:                                               ; preds = %90
  %95 = call ptr @__cxa_allocate_exception(i64 32) #7
  %96 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error20HttpParserErrorCodesE(i32 noundef 3)
  %97 = extractvalue { i32, ptr } %96, 0
  %98 = extractvalue { i32, ptr } %96, 1
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %95, i32 %97, ptr %98)
          to label %99 unwind label %100

99:                                               ; preds = %94
  call void @__cxa_throw(ptr nonnull %95, ptr nonnull @_ZTISt12system_error, ptr nonnull @_ZNSt12system_errorD1Ev) #8
  unreachable

100:                                              ; preds = %94
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %103

102:                                              ; preds = %82, %90
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  ret i1 %89

103:                                              ; preds = %100, %80, %49
  %.sink = phi ptr [ %95, %100 ], [ %75, %80 ], [ %44, %49 ]
  %.pn = phi { ptr, i32 } [ %101, %100 ], [ %81, %80 ], [ %50, %49 ]
  call void @__cxa_free_exception(ptr %.sink) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32), i32, ptr) unnamed_addr #5 align 2

declare noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass