; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/zeromq/src/udp_address.ll (ZN3zmq13udp_address_t7resolveEPKcbb)

; 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"

%"union.zmq::ip_addr_t" = type { %struct.sockaddr_in6 }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon }
%union.anon = type { [4 x i32] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.zmq::ip_resolver_options_t" = type { i8, i8, i8, i8, i8 }
%"class.zmq::ip_resolver_t" = type <{ ptr, %"class.zmq::ip_resolver_options_t", [3 x i8] }>
%"class.zmq::udp_address_t" = type { ptr, %"union.zmq::ip_addr_t", i32, %"union.zmq::ip_addr_t", i8, %"class.std::__cxx11::basic_string" }

@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

declare void @_ZN3zmq9ip_addr_t3anyEi(ptr dead_on_unwind writable sret(%"union.zmq::ip_addr_t") align 4, i32 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3zmq13udp_address_t7resolveEPKcbb(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.zmq::ip_resolver_options_t", align 1
  %17 = alloca %"class.zmq::ip_resolver_t", align 8
  %18 = alloca %"class.zmq::ip_resolver_options_t", align 1
  %19 = alloca i40, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.zmq::ip_resolver_options_t", align 1
  %23 = alloca %"class.zmq::ip_resolver_t", align 8
  %24 = alloca %"class.zmq::ip_resolver_options_t", align 1
  %25 = alloca i40, align 8
  %26 = alloca i32, align 4
  %27 = alloca i16, align 2
  %28 = alloca %"union.zmq::ip_addr_t", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %29 = zext i1 %2 to i8
  store i8 %29, ptr %8, align 1, !tbaa !9
  %30 = zext i1 %3 to i8
  store i8 %30, ptr %9, align 1, !tbaa !9
  %31 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  store i8 0, ptr %10, align 1, !tbaa !9
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 5
  %34 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call noundef ptr @strrchr(ptr noundef %35, i32 noundef 59) #10
  store ptr %36, ptr %11, align 8, !tbaa !5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %115

39:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = ptrtoint ptr %41 to i64
  %44 = ptrtoint ptr %42 to i64
  %45 = sub i64 %43, %44
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %40, i64 noundef %45, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %46 unwind label %69

46:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 5, ptr %16) #9
  invoke void @_ZN3zmq21ip_resolver_options_tC1Ev(ptr noundef nonnull align 1 dereferenceable(5) %16)
          to label %47 unwind label %73

47:                                               ; preds = %46
  %48 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t8bindableEb(ptr noundef nonnull align 1 dereferenceable(5) %16, i1 noundef zeroext true)
          to label %49 unwind label %73

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t9allow_dnsEb(ptr noundef nonnull align 1 dereferenceable(5) %48, i1 noundef zeroext false)
          to label %51 unwind label %73

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t14allow_nic_nameEb(ptr noundef nonnull align 1 dereferenceable(5) %50, i1 noundef zeroext true)
          to label %53 unwind label %73

53:                                               ; preds = %51
  %54 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %55 = trunc i8 %54 to i1
  %56 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t4ipv6Eb(ptr noundef nonnull align 1 dereferenceable(5) %52, i1 noundef zeroext %55)
          to label %57 unwind label %73

57:                                               ; preds = %53
  %58 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t11expect_portEb(ptr noundef nonnull align 1 dereferenceable(5) %56, i1 noundef zeroext false)
          to label %59 unwind label %73

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %18, ptr align 1 %16, i64 5, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 1 %18, i64 5, i1 false)
  %60 = load i40, ptr %19, align 8
  invoke void @_ZN3zmq13ip_resolver_tC1ENS_21ip_resolver_options_tE(ptr noundef nonnull align 8 dereferenceable(13) %17, i40 %60)
          to label %61 unwind label %77

61:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %62 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  %63 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  %64 = invoke noundef i32 @_ZN3zmq13ip_resolver_t7resolveEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13) %17, ptr noundef %62, ptr noundef %63)
          to label %65 unwind label %81

65:                                               ; preds = %61
  store i32 %64, ptr %20, align 4, !tbaa !14
  %66 = load i32, ptr %20, align 4, !tbaa !14
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %85

68:                                               ; preds = %65
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %109

69:                                               ; preds = %39
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %14, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %15, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  br label %114

73:                                               ; preds = %57, %53, %51, %49, %47, %46
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %14, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %15, align 4
  br label %113

77:                                               ; preds = %59
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %14, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %15, align 4
  br label %112

81:                                               ; preds = %91, %85, %61
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %14, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %112

85:                                               ; preds = %65
  %86 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  %87 = invoke noundef zeroext i1 @_ZNK3zmq9ip_addr_t12is_multicastEv(ptr noundef nonnull align 4 dereferenceable(28) %86)
          to label %88 unwind label %81

88:                                               ; preds = %85
  br i1 %87, label %89, label %91

89:                                               ; preds = %88
  %90 = call ptr @__errno_location() #11
  store i32 22, ptr %90, align 4, !tbaa !14
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %109

91:                                               ; preds = %88
  %92 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str)
          to label %93 unwind label %81

93:                                               ; preds = %91
  br i1 %92, label %94, label %96

94:                                               ; preds = %93
  %95 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 2
  store i32 0, ptr %95, align 4, !tbaa !16
  br label %106

96:                                               ; preds = %93
  %97 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  %98 = call i32 @if_nametoindex(ptr noundef %97) #9
  %99 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 2
  store i32 %98, ptr %99, align 4, !tbaa !16
  %100 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 2
  %101 = load i32, ptr %100, align 4, !tbaa !16
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %105

103:                                              ; preds = %96
  %104 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 2
  store i32 -1, ptr %104, align 4, !tbaa !16
  br label %105

105:                                              ; preds = %103, %96
  br label %106

106:                                              ; preds = %105, %94
  store i8 1, ptr %10, align 1, !tbaa !9
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 1
  store ptr %108, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %21, align 4
  br label %109

109:                                              ; preds = %106, %89, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 5, ptr %16) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  %110 = load i32, ptr %21, align 4
  switch i32 %110, label %197 [
    i32 0, label %111
  ]

111:                                              ; preds = %109
  br label %115

112:                                              ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  br label %113

113:                                              ; preds = %112, %73
  call void @llvm.lifetime.end.p0(i64 5, ptr %16) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  br label %114

114:                                              ; preds = %113, %69
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  br label %199

115:                                              ; preds = %111, %4
  call void @llvm.lifetime.start.p0(i64 5, ptr %22) #9
  call void @_ZN3zmq21ip_resolver_options_tC1Ev(ptr noundef nonnull align 1 dereferenceable(5) %22)
  %116 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %117 = trunc i8 %116 to i1
  %118 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t8bindableEb(ptr noundef nonnull align 1 dereferenceable(5) %22, i1 noundef zeroext %117)
  %119 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %120 = trunc i8 %119 to i1
  %121 = xor i1 %120, true
  %122 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t9allow_dnsEb(ptr noundef nonnull align 1 dereferenceable(5) %118, i1 noundef zeroext %121)
  %123 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %124 = trunc i8 %123 to i1
  %125 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t14allow_nic_nameEb(ptr noundef nonnull align 1 dereferenceable(5) %122, i1 noundef zeroext %124)
  %126 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t11expect_portEb(ptr noundef nonnull align 1 dereferenceable(5) %125, i1 noundef zeroext true)
  %127 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %128 = trunc i8 %127 to i1
  %129 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t4ipv6Eb(ptr noundef nonnull align 1 dereferenceable(5) %126, i1 noundef zeroext %128)
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %24, ptr align 1 %22, i64 5, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 1 %24, i64 5, i1 false)
  %130 = load i40, ptr %25, align 8
  call void @_ZN3zmq13ip_resolver_tC1ENS_21ip_resolver_options_tE(ptr noundef nonnull align 8 dereferenceable(13) %23, i40 %130)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %131 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 3
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = call noundef i32 @_ZN3zmq13ip_resolver_t7resolveEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13) %23, ptr noundef %131, ptr noundef %132)
  store i32 %133, ptr %26, align 4, !tbaa !14
  %134 = load i32, ptr %26, align 4, !tbaa !14
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %115
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %196

137:                                              ; preds = %115
  %138 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 3
  %139 = call noundef zeroext i1 @_ZNK3zmq9ip_addr_t12is_multicastEv(ptr noundef nonnull align 4 dereferenceable(28) %138)
  %140 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 4
  %141 = zext i1 %139 to i8
  store i8 %141, ptr %140, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 2, ptr %27) #9
  %142 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 3
  %143 = call noundef zeroext i16 @_ZNK3zmq9ip_addr_t4portEv(ptr noundef nonnull align 4 dereferenceable(28) %142)
  store i16 %143, ptr %27, align 2, !tbaa !22
  %144 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %145 = trunc i8 %144 to i1
  br i1 %145, label %146, label %155

146:                                              ; preds = %137
  %147 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 4
  %148 = load i8, ptr %147, align 4, !tbaa !21, !range !11, !noundef !12
  %149 = trunc i8 %148 to i1
  br i1 %149, label %152, label %150

150:                                              ; preds = %146
  %151 = call ptr @__errno_location() #11
  store i32 22, ptr %151, align 4, !tbaa !14
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %195

152:                                              ; preds = %146
  %153 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  %154 = load i16, ptr %27, align 2, !tbaa !22
  call void @_ZN3zmq9ip_addr_t8set_portEt(ptr noundef nonnull align 4 dereferenceable(28) %153, i16 noundef zeroext %154)
  br label %173

155:                                              ; preds = %137
  %156 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 4
  %157 = load i8, ptr %156, align 4, !tbaa !21, !range !11, !noundef !12
  %158 = trunc i8 %157 to i1
  br i1 %158, label %162, label %159

159:                                              ; preds = %155
  %160 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %161 = trunc i8 %160 to i1
  br i1 %161, label %169, label %162

162:                                              ; preds = %159, %155
  call void @llvm.lifetime.start.p0(i64 28, ptr %28) #9
  %163 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 3
  %164 = call noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28) %163)
  call void @_ZN3zmq9ip_addr_t3anyEi(ptr dead_on_unwind writable sret(%"union.zmq::ip_addr_t") align 4 %28, i32 noundef %164)
  %165 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 4 %28, i64 28, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 28, ptr %28) #9
  %166 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  %167 = load i16, ptr %27, align 2, !tbaa !22
  call void @_ZN3zmq9ip_addr_t8set_portEt(ptr noundef nonnull align 4 dereferenceable(28) %166, i16 noundef zeroext %167)
  %168 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 2
  store i32 0, ptr %168, align 4, !tbaa !16
  br label %172

169:                                              ; preds = %159
  %170 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 3
  %171 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %171, ptr align 8 %170, i64 28, i1 false), !tbaa.struct !24
  br label %172

172:                                              ; preds = %169, %162
  br label %173

173:                                              ; preds = %172, %152
  %174 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 1
  %175 = call noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28) %174)
  %176 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 3
  %177 = call noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28) %176)
  %178 = icmp ne i32 %175, %177
  br i1 %178, label %179, label %181

179:                                              ; preds = %173
  %180 = call ptr @__errno_location() #11
  store i32 22, ptr %180, align 4, !tbaa !14
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %195

181:                                              ; preds = %173
  %182 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %183 = trunc i8 %182 to i1
  br i1 %183, label %184, label %194

184:                                              ; preds = %181
  %185 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 4
  %186 = load i8, ptr %185, align 4, !tbaa !21, !range !11, !noundef !12
  %187 = trunc i8 %186 to i1
  br i1 %187, label %188, label %194

188:                                              ; preds = %184
  %189 = getelementptr inbounds %"class.zmq::udp_address_t", ptr %31, i32 0, i32 2
  %190 = load i32, ptr %189, align 4, !tbaa !16
  %191 = icmp slt i32 %190, 0
  br i1 %191, label %192, label %194

192:                                              ; preds = %188
  %193 = call ptr @__errno_location() #11
  store i32 19, ptr %193, align 4, !tbaa !14
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %195

194:                                              ; preds = %188, %184, %181
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %195

195:                                              ; preds = %194, %192, %179, %150
  call void @llvm.lifetime.end.p0(i64 2, ptr %27) #9
  br label %196

196:                                              ; preds = %195, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 5, ptr %22) #9
  br label %197

197:                                              ; preds = %196, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  %198 = load i32, ptr %5, align 4
  ret i32 %198

199:                                              ; preds = %114
  %200 = load ptr, ptr %14, align 8
  %201 = load i32, ptr %15, align 4
  %202 = insertvalue { ptr, i32 } poison, ptr %200, 0
  %203 = insertvalue { ptr, i32 } %202, i32 %201, 1
  resume { ptr, i32 } %203
}

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

; Function Attrs: nounwind willreturn memory(read)
declare noundef ptr @strrchr(ptr noundef, i32 noundef) #5

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

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

declare void @_ZN3zmq21ip_resolver_options_tC1Ev(ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t8bindableEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t9allow_dnsEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t14allow_nic_nameEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t4ipv6Eb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t11expect_portEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) #1

declare void @_ZN3zmq13ip_resolver_tC1ENS_21ip_resolver_options_tE(ptr noundef nonnull align 8 dereferenceable(13), i40) unnamed_addr #1

declare noundef i32 @_ZN3zmq13ip_resolver_t7resolveEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13), ptr noundef, ptr noundef) #1

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

declare noundef zeroext i1 @_ZNK3zmq9ip_addr_t12is_multicastEv(ptr noundef nonnull align 4 dereferenceable(28)) #1

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

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

; Function Attrs: nounwind
declare i32 @if_nametoindex(ptr noundef) #8

declare noundef zeroext i16 @_ZNK3zmq9ip_addr_t4portEv(ptr noundef nonnull align 4 dereferenceable(28)) #1

declare void @_ZN3zmq9ip_addr_t8set_portEt(ptr noundef nonnull align 4 dereferenceable(28), i16 noundef zeroext) #1

declare noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28)) #1

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

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

!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 = !{i8 0, i8 2}
!12 = !{}
!13 = !{i64 0, i64 1, !9, i64 1, i64 1, !9, i64 2, i64 1, !9, i64 3, i64 1, !9, i64 4, i64 1, !9}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !15, i64 36}
!17 = !{!"_ZTSN3zmq13udp_address_tE", !7, i64 8, !15, i64 36, !7, i64 40, !10, i64 68, !18, i64 72}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!17, !10, i64 68}
!22 = !{!23, !23, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = !{i64 0, i64 28, !25}
!25 = !{!7, !7, 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"

%"union.zmq::ip_addr_t" = type { %struct.sockaddr_in6 }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon }
%union.anon = type { [4 x i32] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.zmq::ip_resolver_options_t" = type { i8, i8, i8, i8, i8 }
%"class.zmq::ip_resolver_t" = type <{ ptr, %"class.zmq::ip_resolver_options_t", [3 x i8] }>

@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

declare void @_ZN3zmq9ip_addr_t3anyEi(ptr dead_on_unwind writable sret(%"union.zmq::ip_addr_t") align 4, i32 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 1) i32 @_ZN3zmq13udp_address_t7resolveEPKcbb(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.zmq::ip_resolver_options_t", align 8
  %8 = alloca %"class.zmq::ip_resolver_t", align 8
  %9 = alloca %"class.zmq::ip_resolver_options_t", align 8
  %10 = alloca %"class.zmq::ip_resolver_t", align 8
  %11 = alloca %"union.zmq::ip_addr_t", align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 72
  %13 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %1)
  %14 = tail call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) %1, i32 noundef 59) #9
  %.not.not = icmp eq ptr %14, null
  br i1 %.not.not, label %61, label %15

15:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  %16 = ptrtoint ptr %14 to i64
  %17 = ptrtoint ptr %1 to i64
  %18 = sub i64 %16, %17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %1, i64 noundef %18, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %36

19:                                               ; preds = %15
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %7) #10
  invoke void @_ZN3zmq21ip_resolver_options_tC1Ev(ptr noundef nonnull align 1 dereferenceable(5) %7)
          to label %20 unwind label %38

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t8bindableEb(ptr noundef nonnull align 1 dereferenceable(5) %7, i1 noundef zeroext true)
          to label %22 unwind label %38

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t9allow_dnsEb(ptr noundef nonnull align 1 dereferenceable(5) %21, i1 noundef zeroext false)
          to label %24 unwind label %38

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t14allow_nic_nameEb(ptr noundef nonnull align 1 dereferenceable(5) %23, i1 noundef zeroext true)
          to label %26 unwind label %38

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t4ipv6Eb(ptr noundef nonnull align 1 dereferenceable(5) %25, i1 noundef zeroext %3)
          to label %28 unwind label %38

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t11expect_portEb(ptr noundef nonnull align 1 dereferenceable(5) %27, i1 noundef zeroext false)
          to label %30 unwind label %38

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  %.sroa.07.0.copyload = load i40, ptr %7, align 8
  invoke void @_ZN3zmq13ip_resolver_tC1ENS_21ip_resolver_options_tE(ptr noundef nonnull align 8 dereferenceable(13) %8, i40 %.sroa.07.0.copyload)
          to label %31 unwind label %40

31:                                               ; preds = %30
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  %34 = invoke noundef i32 @_ZN3zmq13ip_resolver_t7resolveEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13) %8, ptr noundef nonnull %32, ptr noundef %33)
          to label %35 unwind label %42

35:                                               ; preds = %31
  %.not38 = icmp eq i32 %34, 0
  br i1 %.not38, label %44, label %.thread

36:                                               ; preds = %15
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  br label %60

38:                                               ; preds = %28, %26, %24, %22, %20, %19
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %59

40:                                               ; preds = %30
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %58

42:                                               ; preds = %44, %31
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %58

44:                                               ; preds = %35
  %45 = invoke noundef zeroext i1 @_ZNK3zmq9ip_addr_t12is_multicastEv(ptr noundef nonnull align 4 dereferenceable(28) %32)
          to label %46 unwind label %42

46:                                               ; preds = %44
  br i1 %45, label %47, label %49

47:                                               ; preds = %46
  %48 = tail call ptr @__errno_location() #11
  store i32 22, ptr %48, align 4, !tbaa !5
  br label %.thread

49:                                               ; preds = %46
  %50 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str)
  br i1 %50, label %55, label %51

51:                                               ; preds = %49
  %52 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  %53 = call i32 @if_nametoindex(ptr noundef %52) #10
  %54 = icmp eq i32 %53, 0
  %spec.store.select = select i1 %54, i32 -1, i32 %53
  br label %55

.thread:                                          ; preds = %47, %35
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %100

55:                                               ; preds = %49, %51
  %spec.store.select.sink = phi i32 [ %spec.store.select, %51 ], [ 0, %49 ]
  %56 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %spec.store.select.sink, ptr %56, align 4
  %57 = getelementptr inbounds i8, ptr %14, i64 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %61

58:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  br label %59

59:                                               ; preds = %58, %38
  %.pn.pn = phi { ptr, i32 } [ %.pn, %58 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  br label %60

60:                                               ; preds = %59, %36
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %59 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  resume { ptr, i32 } %.pn.pn.pn

61:                                               ; preds = %55, %4
  %.128 = phi ptr [ %57, %55 ], [ %1, %4 ]
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %9) #10
  call void @_ZN3zmq21ip_resolver_options_tC1Ev(ptr noundef nonnull align 1 dereferenceable(5) %9)
  %62 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t8bindableEb(ptr noundef nonnull align 1 dereferenceable(5) %9, i1 noundef zeroext %2)
  %63 = xor i1 %2, true
  %64 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t9allow_dnsEb(ptr noundef nonnull align 1 dereferenceable(5) %62, i1 noundef zeroext %63)
  %65 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t14allow_nic_nameEb(ptr noundef nonnull align 1 dereferenceable(5) %64, i1 noundef zeroext %2)
  %66 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t11expect_portEb(ptr noundef nonnull align 1 dereferenceable(5) %65, i1 noundef zeroext true)
  %67 = call noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t4ipv6Eb(ptr noundef nonnull align 1 dereferenceable(5) %66, i1 noundef zeroext %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  %.sroa.0.0.copyload = load i40, ptr %9, align 8
  call void @_ZN3zmq13ip_resolver_tC1ENS_21ip_resolver_options_tE(ptr noundef nonnull align 8 dereferenceable(13) %10, i40 %.sroa.0.0.copyload)
  %68 = getelementptr inbounds i8, ptr %0, i64 40
  %69 = call noundef i32 @_ZN3zmq13ip_resolver_t7resolveEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13) %10, ptr noundef nonnull %68, ptr noundef %.128)
  %.not42 = icmp eq i32 %69, 0
  br i1 %.not42, label %70, label %99

70:                                               ; preds = %61
  %71 = call noundef zeroext i1 @_ZNK3zmq9ip_addr_t12is_multicastEv(ptr noundef nonnull align 4 dereferenceable(28) %68)
  %72 = getelementptr inbounds i8, ptr %0, i64 68
  %73 = zext i1 %71 to i8
  store i8 %73, ptr %72, align 4, !tbaa !9
  %74 = call noundef zeroext i16 @_ZNK3zmq9ip_addr_t4portEv(ptr noundef nonnull align 4 dereferenceable(28) %68)
  %75 = load i8, ptr %72, align 4, !tbaa !9, !range !16, !noundef !17
  %76 = trunc nuw i8 %75 to i1
  br i1 %.not.not, label %80, label %77

77:                                               ; preds = %70
  br i1 %76, label %78, label %.sink.split

78:                                               ; preds = %77
  %79 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZN3zmq9ip_addr_t8set_portEt(ptr noundef nonnull align 4 dereferenceable(28) %79, i16 noundef zeroext %74)
  br label %87

80:                                               ; preds = %70
  %brmerge = or i1 %63, %76
  br i1 %brmerge, label %81, label %85

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %11) #10
  %82 = call noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28) %68)
  call void @_ZN3zmq9ip_addr_t3anyEi(ptr dead_on_unwind nonnull writable sret(%"union.zmq::ip_addr_t") align 4 %11, i32 noundef %82)
  %83 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %83, ptr noundef nonnull align 4 dereferenceable(28) %11, i64 28, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %11) #10
  call void @_ZN3zmq9ip_addr_t8set_portEt(ptr noundef nonnull align 4 dereferenceable(28) %83, i16 noundef zeroext %74)
  %84 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 0, ptr %84, align 4, !tbaa !20
  br label %87

85:                                               ; preds = %80
  %86 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %86, ptr noundef nonnull align 8 dereferenceable(28) %68, i64 28, i1 false), !tbaa.struct !18
  br label %87

87:                                               ; preds = %81, %85, %78
  %88 = getelementptr inbounds i8, ptr %0, i64 8
  %89 = call noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28) %88)
  %90 = call noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28) %68)
  %.not43 = icmp eq i32 %89, %90
  br i1 %.not43, label %91, label %.sink.split

91:                                               ; preds = %87
  br i1 %3, label %92, label %99

92:                                               ; preds = %91
  %93 = load i8, ptr %72, align 4, !tbaa !9, !range !16, !noundef !17
  %94 = trunc nuw i8 %93 to i1
  %95 = getelementptr inbounds i8, ptr %0, i64 36
  %96 = load i32, ptr %95, align 4
  %97 = icmp slt i32 %96, 0
  %or.cond = select i1 %94, i1 %97, i1 false
  br i1 %or.cond, label %.sink.split, label %99

.sink.split:                                      ; preds = %92, %87, %77
  %.sink = phi i32 [ 22, %77 ], [ 22, %87 ], [ 19, %92 ]
  %98 = tail call ptr @__errno_location() #11
  store i32 %.sink, ptr %98, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %.sink.split, %92, %91, %61
  %.2 = phi i32 [ -1, %61 ], [ 0, %92 ], [ 0, %91 ], [ -1, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %9) #10
  br label %100

100:                                              ; preds = %.thread, %99
  %.3 = phi i32 [ %.2, %99 ], [ -1, %.thread ]
  ret i32 %.3
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare noundef ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

declare void @_ZN3zmq21ip_resolver_options_tC1Ev(ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t8bindableEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) local_unnamed_addr #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t9allow_dnsEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) local_unnamed_addr #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t14allow_nic_nameEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) local_unnamed_addr #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t4ipv6Eb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) local_unnamed_addr #1

declare noundef nonnull align 1 dereferenceable(5) ptr @_ZN3zmq21ip_resolver_options_t11expect_portEb(ptr noundef nonnull align 1 dereferenceable(5), i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN3zmq13ip_resolver_tC1ENS_21ip_resolver_options_tE(ptr noundef nonnull align 8 dereferenceable(13), i40) unnamed_addr #1

declare noundef i32 @_ZN3zmq13ip_resolver_t7resolveEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13), ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef zeroext i1 @_ZNK3zmq9ip_addr_t12is_multicastEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #6

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

; Function Attrs: nounwind
declare i32 @if_nametoindex(ptr noundef) local_unnamed_addr #8

declare noundef zeroext i16 @_ZNK3zmq9ip_addr_t4portEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #1

declare void @_ZN3zmq9ip_addr_t8set_portEt(ptr noundef nonnull align 4 dereferenceable(28), i16 noundef zeroext) local_unnamed_addr #1

declare noundef i32 @_ZNK3zmq9ip_addr_t6familyEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #1

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 68}
!10 = !{!"_ZTSN3zmq13udp_address_tE", !7, i64 8, !6, i64 36, !7, i64 40, !11, i64 68, !12, i64 72}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{i64 0, i64 28, !19}
!19 = !{!7, !7, i64 0}
!20 = !{!10, !6, i64 36}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass