; LLVM IR from dynexcoin/Dynex :: src/Rpc/HttpClient.ll (ZN7DynexCN10HttpClient7connectEv)

; 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.System::Ipv4Address" = type { i32 }
%"class.System::Ipv4Resolver" = type { ptr }
%"class.System::TcpConnection" = type { ptr, i32, ptr, ptr }
%"class.System::TcpConnector" = type { ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.DynexCN::HttpClient" = type { %"class.std::__cxx11::basic_string", i16, i8, ptr, %"class.System::TcpConnection", %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }

@_ZTISt9exception = external constant ptr
@_ZTIN7DynexCN16ConnectExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

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: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #1

declare ptr @__cxa_begin_catch(ptr)

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

declare void @__cxa_end_catch()

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN10HttpClient7connectEv(ptr noundef nonnull align 8 dereferenceable(88) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.System::Ipv4Address", align 4
  %4 = alloca %"class.System::Ipv4Resolver", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.System::TcpConnection", align 8
  %8 = alloca %"class.System::TcpConnector", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %14 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 3
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  invoke void @_ZN6System12Ipv4ResolverC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 16 dereferenceable(440) %15)
          to label %16 unwind label %36

16:                                               ; preds = %1
  %17 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 0
  %18 = invoke i32 @_ZN6System12Ipv4Resolver7resolveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %19 unwind label %40

19:                                               ; preds = %16
  %20 = getelementptr inbounds %"class.System::Ipv4Address", ptr %3, i32 0, i32 0
  store i32 %18, ptr %20, align 4
  call void @_ZN6System12Ipv4ResolverD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  %21 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 3
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  invoke void @_ZN6System12TcpConnectorC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(440) %22)
          to label %23 unwind label %45

23:                                               ; preds = %19
  %24 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 1
  %25 = load i16, ptr %24, align 8, !tbaa !24
  invoke void @_ZN6System12TcpConnector7connectERKNS_11Ipv4AddressEt(ptr dead_on_unwind writable sret(%"class.System::TcpConnection") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %3, i16 noundef zeroext %25)
          to label %26 unwind label %49

26:                                               ; preds = %23
  %27 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 4
  %28 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6System13TcpConnectionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %29 unwind label %53

29:                                               ; preds = %26
  call void @_ZN6System13TcpConnectionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZN6System12TcpConnectorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #9
  %30 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 5
  %31 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 5192) #10
          to label %32 unwind label %59

32:                                               ; preds = %29
  %33 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 4
  invoke void @_ZN6System12TcpStreambufC1ERNS_13TcpConnectionE(ptr noundef nonnull align 8 dereferenceable(5192) %31, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %34 unwind label %63

34:                                               ; preds = %32
  call void @_ZNSt10unique_ptrIN6System12TcpStreambufESt14default_deleteIS1_EE5resetEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef %31) #9
  %35 = getelementptr inbounds %"class.DynexCN::HttpClient", ptr %13, i32 0, i32 2
  store i8 1, ptr %35, align 2, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %96

36:                                               ; preds = %1
  %37 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %5, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %6, align 4
  br label %44

40:                                               ; preds = %16
  %41 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %5, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %6, align 4
  call void @_ZN6System12Ipv4ResolverD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  br label %44

44:                                               ; preds = %40, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  br label %67

45:                                               ; preds = %19
  %46 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %5, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %6, align 4
  br label %58

49:                                               ; preds = %23
  %50 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %5, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %6, align 4
  br label %57

53:                                               ; preds = %26
  %54 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %6, align 4
  call void @_ZN6System13TcpConnectionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %57

57:                                               ; preds = %53, %49
  call void @_ZN6System12TcpConnectorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  br label %58

58:                                               ; preds = %57, %45
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #9
  br label %67

59:                                               ; preds = %29
  %60 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  br label %67

63:                                               ; preds = %32
  %64 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %5, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %31, i64 noundef 5192) #11
  br label %67

67:                                               ; preds = %63, %59, %58, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %6, align 4
  %70 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #9
  %71 = icmp eq i32 %69, %70
  br i1 %71, label %72, label %97

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %73 = load ptr, ptr %5, align 8
  %74 = call ptr @__cxa_begin_catch(ptr %73) #9
  store ptr %74, ptr %9, align 8
  store i1 true, ptr %12, align 1
  %75 = call ptr @__cxa_allocate_exception(i64 16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #9
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = getelementptr inbounds ptr, ptr %77, i64 2
  %79 = load ptr, ptr %78, align 8
  %80 = call noundef ptr %79(ptr noundef nonnull align 8 dereferenceable(8) %76) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %80, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %81 unwind label %83

81:                                               ; preds = %72
  invoke void @_ZN7DynexCN16ConnectExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %75, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %82 unwind label %87

82:                                               ; preds = %81
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %75, ptr @_ZTIN7DynexCN16ConnectExceptionE, ptr @_ZNSt13runtime_errorD2Ev) #12
          to label %105 unwind label %87

83:                                               ; preds = %72
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %5, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %6, align 4
  br label %91

87:                                               ; preds = %82, %81
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %5, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  br label %91

91:                                               ; preds = %87, %83
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #9
  %92 = load i1, ptr %12, align 1
  br i1 %92, label %93, label %94

93:                                               ; preds = %91
  call void @__cxa_free_exception(ptr %75) #9
  br label %94

94:                                               ; preds = %93, %91
  invoke void @__cxa_end_catch()
          to label %95 unwind label %102

95:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %97

96:                                               ; preds = %34
  ret void

97:                                               ; preds = %95, %68
  %98 = load ptr, ptr %5, align 8
  %99 = load i32, ptr %6, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101

102:                                              ; preds = %94
  %103 = landingpad { ptr, i32 }
          catch ptr null
  %104 = extractvalue { ptr, i32 } %103, 0
  call void @__clang_call_terminate(ptr %104) #13
  unreachable

105:                                              ; preds = %82
  unreachable
}

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare void @_ZN6System12Ipv4ResolverC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(440)) unnamed_addr #6

declare i32 @_ZN6System12Ipv4Resolver7resolveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

declare void @_ZN6System12TcpConnectorC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(440)) unnamed_addr #6

declare void @_ZN6System12TcpConnector7connectERKNS_11Ipv4AddressEt(ptr dead_on_unwind writable sret(%"class.System::TcpConnection") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), i16 noundef zeroext) #6

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN6System13TcpConnectionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #7

declare void @_ZN6System12TcpStreambufC1ERNS_13TcpConnectionE(ptr noundef nonnull align 8 dereferenceable(5192), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #8

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

declare void @_ZN7DynexCN16ConnectExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr, ptr)

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

!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, !6, i64 40}
!10 = !{!"_ZTSN7DynexCN10HttpClientE", !11, i64 0, !14, i64 32, !15, i64 34, !6, i64 40, !16, i64 48, !18, i64 80}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN6System13TcpConnectionE", !6, i64 0, !17, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSSt10unique_ptrIN6System12TcpStreambufESt14default_deleteIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_dataIN6System12TcpStreambufESt14default_deleteIS1_ELb1ELb1EE", !20, i64 0}
!20 = !{!"_ZTSSt15__uniq_ptr_implIN6System12TcpStreambufESt14default_deleteIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt5tupleIJPN6System12TcpStreambufESt14default_deleteIS1_EEE", !22, i64 0}
!22 = !{!"_ZTSSt11_Tuple_implILm0EJPN6System12TcpStreambufESt14default_deleteIS1_EEE", !23, i64 0}
!23 = !{!"_ZTSSt10_Head_baseILm0EPN6System12TcpStreambufELb0EE", !6, i64 0}
!24 = !{!10, !14, i64 32}
!25 = !{!10, !15, i64 34}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !8, i64 0}


; 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.System::Ipv4Address" = type { i32 }
%"class.System::Ipv4Resolver" = type { ptr }
%"class.System::TcpConnection" = type { ptr, i32, ptr, ptr }
%"class.System::TcpConnector" = type { ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@_ZTISt9exception = external constant ptr
@_ZTIN7DynexCN16ConnectExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

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: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #1

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

declare void @__cxa_end_catch() local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN10HttpClient7connectEv(ptr noundef nonnull align 8 dereferenceable(88) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.System::Ipv4Address", align 4
  %3 = alloca %"class.System::Ipv4Resolver", align 8
  %4 = alloca %"class.System::TcpConnection", align 8
  %5 = alloca %"class.System::TcpConnector", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN6System12Ipv4ResolverC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 16 dereferenceable(440) %9)
          to label %10 unwind label %26

10:                                               ; preds = %1
  %11 = invoke i32 @_ZN6System12Ipv4Resolver7resolveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %12 unwind label %28

12:                                               ; preds = %10
  store i32 %11, ptr %2, align 4
  call void @_ZN6System12Ipv4ResolverD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN6System12TcpConnectorC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(440) %13)
          to label %14 unwind label %31

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = load i16, ptr %15, align 8, !tbaa !23
  invoke void @_ZN6System12TcpConnector7connectERKNS_11Ipv4AddressEt(ptr dead_on_unwind nonnull writable sret(%"class.System::TcpConnection") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %2, i16 noundef zeroext %16)
          to label %17 unwind label %33

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  %19 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN6System13TcpConnectionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %20 unwind label %35

20:                                               ; preds = %17
  call void @_ZN6System13TcpConnectionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @_ZN6System12TcpConnectorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  %21 = invoke noalias noundef nonnull dereferenceable(5192) ptr @_Znwm(i64 noundef 5192) #10
          to label %22 unwind label %39

22:                                               ; preds = %20
  invoke void @_ZN6System12TcpStreambufC1ERNS_13TcpConnectionE(ptr noundef nonnull align 8 dereferenceable(5192) %21, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %23 unwind label %41

23:                                               ; preds = %22
  %24 = getelementptr inbounds i8, ptr %0, i64 80
  call void @_ZNSt10unique_ptrIN6System12TcpStreambufESt14default_deleteIS1_EE5resetEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull %21) #9
  %25 = getelementptr inbounds i8, ptr %0, i64 34
  store i8 1, ptr %25, align 2, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  ret void

26:                                               ; preds = %1
  %27 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %30

28:                                               ; preds = %10
  %29 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN6System12Ipv4ResolverD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  br label %30

30:                                               ; preds = %28, %26
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %43

31:                                               ; preds = %12
  %32 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %38

33:                                               ; preds = %14
  %34 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %37

35:                                               ; preds = %17
  %36 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN6System13TcpConnectionD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  br label %37

37:                                               ; preds = %35, %33
  %.pn15 = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @_ZN6System12TcpConnectorD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  br label %38

38:                                               ; preds = %37, %31
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %37 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  br label %43

39:                                               ; preds = %20
  %40 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %43

41:                                               ; preds = %22
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZdlPvm(ptr noundef nonnull %21, i64 noundef 5192) #11
  br label %43

43:                                               ; preds = %41, %39, %38, %30
  %.pn18 = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ], [ %.pn15.pn, %38 ], [ %.pn, %30 ]
  %.311 = extractvalue { ptr, i32 } %.pn18, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %44 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #9
  %45 = icmp eq i32 %.311, %44
  br i1 %45, label %46, label %60

46:                                               ; preds = %43
  %.3 = extractvalue { ptr, i32 } %.pn18, 0
  %47 = call ptr @__cxa_begin_catch(ptr %.3) #9
  %48 = call ptr @__cxa_allocate_exception(i64 16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #9
  %49 = load ptr, ptr %47, align 8, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %51 = load ptr, ptr %50, align 8
  %52 = call noundef ptr %51(ptr noundef nonnull align 8 dereferenceable(8) %47) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %52, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %53 unwind label %.thread

53:                                               ; preds = %46
  invoke void @_ZN7DynexCN16ConnectExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %54 unwind label %56

54:                                               ; preds = %53
  invoke void @__cxa_throw(ptr %48, ptr nonnull @_ZTIN7DynexCN16ConnectExceptionE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #12
          to label %64 unwind label %56

.thread:                                          ; preds = %46
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  br label %58

56:                                               ; preds = %53, %54
  %.0 = phi i1 [ false, %54 ], [ true, %53 ]
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  br i1 %.0, label %58, label %59

58:                                               ; preds = %.thread, %56
  %.pn2025 = phi { ptr, i32 } [ %55, %.thread ], [ %57, %56 ]
  call void @__cxa_free_exception(ptr %48) #9
  br label %59

59:                                               ; preds = %58, %56
  %.pn2024 = phi { ptr, i32 } [ %.pn2025, %58 ], [ %57, %56 ]
  invoke void @__cxa_end_catch()
          to label %60 unwind label %61

60:                                               ; preds = %59, %43
  %.merged = phi { ptr, i32 } [ %.pn18, %43 ], [ %.pn2024, %59 ]
  resume { ptr, i32 } %.merged

61:                                               ; preds = %59
  %62 = landingpad { ptr, i32 }
          catch ptr null
  %63 = extractvalue { ptr, i32 } %62, 0
  call void @__clang_call_terminate(ptr %63) #13
  unreachable

64:                                               ; preds = %54
  unreachable
}

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare void @_ZN6System12Ipv4ResolverC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(440)) unnamed_addr #6

declare i32 @_ZN6System12Ipv4Resolver7resolveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

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

declare void @_ZN6System12TcpConnectorC1ERNS_10DispatcherE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(440)) unnamed_addr #6

declare void @_ZN6System12TcpConnector7connectERKNS_11Ipv4AddressEt(ptr dead_on_unwind writable sret(%"class.System::TcpConnection") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), i16 noundef zeroext) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN6System13TcpConnectionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #7

declare void @_ZN6System12TcpStreambufC1ERNS_13TcpConnectionE(ptr noundef nonnull align 8 dereferenceable(5192), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #8

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @_ZN7DynexCN16ConnectExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr, ptr) local_unnamed_addr

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

!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, !9, i64 40}
!6 = !{!"_ZTSN7DynexCN10HttpClientE", !7, i64 0, !13, i64 32, !14, i64 34, !9, i64 40, !15, i64 48, !17, i64 80}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"short", !10, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!"_ZTSN6System13TcpConnectionE", !9, i64 0, !16, i64 8, !9, i64 16, !9, i64 24}
!16 = !{!"int", !10, i64 0}
!17 = !{!"_ZTSSt10unique_ptrIN6System12TcpStreambufESt14default_deleteIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIN6System12TcpStreambufESt14default_deleteIS1_ELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIN6System12TcpStreambufESt14default_deleteIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPN6System12TcpStreambufESt14default_deleteIS1_EEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPN6System12TcpStreambufESt14default_deleteIS1_EEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPN6System12TcpStreambufELb0EE", !9, i64 0}
!23 = !{!6, !13, i64 32}
!24 = !{!6, !14, i64 34}
!25 = !{!26, !26, i64 0}
!26 = !{!"vtable pointer", !11, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass