; LLVM IR from ICOMP-UNC/cppSocketLib :: src/cppSocket.ll (ZN13UDPConnection4bindEv)

; 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::__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.UDPConnection = type { %class.IConnection, i8, i8, %struct.sockaddr_in6, %struct.sockaddr_in, %"class.std::unique_ptr" }
%class.IConnection = type { ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i32 }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon.3 }
%union.anon.3 = type { [4 x i32] }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%"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.1" }
%"struct.std::_Head_base.1" = type { ptr }
%struct.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }

@_ZTISt13runtime_error = external constant ptr
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext) #4

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

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

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind
declare i32 @getsockname(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13UDPConnection4bindEv(ptr noundef nonnull align 8 dereferenceable(136) %0) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  %11 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 2
  %12 = load i8, ptr %11, align 1, !tbaa !9, !range !28, !noundef !29
  %13 = trunc i8 %12 to i1
  br i1 %13, label %35, label %14

14:                                               ; preds = %1
  %15 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 4
  %16 = load i32, ptr %15, align 4, !tbaa !30
  %17 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 5
  %18 = call noundef ptr @_ZNKSt10unique_ptrI8addrinfoSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  %19 = getelementptr inbounds %struct.addrinfo, ptr %18, i32 0, i32 5
  %20 = load ptr, ptr %19, align 8, !tbaa !31
  %21 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 5
  %22 = call noundef ptr @_ZNKSt10unique_ptrI8addrinfoSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  %23 = getelementptr inbounds %struct.addrinfo, ptr %22, i32 0, i32 4
  %24 = load i32, ptr %23, align 8, !tbaa !33
  %25 = call i32 @bind(i32 noundef %16, ptr noundef %20, i32 noundef %24) #6
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %34

27:                                               ; preds = %14
  %28 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef @.str.13)
          to label %29 unwind label %30

29:                                               ; preds = %27
  call void @__cxa_throw(ptr %28, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
  unreachable

30:                                               ; preds = %27
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  call void @__cxa_free_exception(ptr %28) #6
  br label %93

34:                                               ; preds = %14
  store i1 true, ptr %2, align 1
  br label %91

35:                                               ; preds = %1
  %36 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 1
  %37 = load i8, ptr %36, align 8, !tbaa !34, !range !28, !noundef !29
  %38 = trunc i8 %37 to i1
  br i1 %38, label %39, label %65

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 28, ptr %6, align 4, !tbaa !35
  %40 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 4
  %41 = load i32, ptr %40, align 4, !tbaa !30
  %42 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 3
  %43 = load i32, ptr %6, align 4, !tbaa !35
  %44 = call i32 @bind(i32 noundef %41, ptr noundef %42, i32 noundef %43) #6
  %45 = icmp slt i32 %44, 0
  br i1 %45, label %46, label %53

46:                                               ; preds = %39
  %47 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef @.str.13)
          to label %48 unwind label %49

48:                                               ; preds = %46
  call void @__cxa_throw(ptr %47, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
  unreachable

49:                                               ; preds = %46
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %4, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %5, align 4
  call void @__cxa_free_exception(ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %93

53:                                               ; preds = %39
  %54 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 4
  %55 = load i32, ptr %54, align 4, !tbaa !30
  %56 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 3
  %57 = call i32 @getsockname(i32 noundef %55, ptr noundef %56, ptr noundef %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  %58 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 3
  %59 = getelementptr inbounds %struct.sockaddr_in6, ptr %58, i32 0, i32 1
  %60 = load i16, ptr %59, align 2, !tbaa !36
  %61 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %60)
  %62 = zext i16 %61 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i32 noundef %62) #6
  %63 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 2
  %64 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %63, ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  store i1 true, ptr %2, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %91

65:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 16, ptr %8, align 4, !tbaa !35
  %66 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 4
  %67 = load i32, ptr %66, align 4, !tbaa !30
  %68 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 4
  %69 = load i32, ptr %8, align 4, !tbaa !35
  %70 = call i32 @bind(i32 noundef %67, ptr noundef %68, i32 noundef %69) #6
  %71 = icmp slt i32 %70, 0
  br i1 %71, label %72, label %79

72:                                               ; preds = %65
  %73 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef @.str.13)
          to label %74 unwind label %75

74:                                               ; preds = %72
  call void @__cxa_throw(ptr %73, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
  unreachable

75:                                               ; preds = %72
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %4, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %5, align 4
  call void @__cxa_free_exception(ptr %73) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %93

79:                                               ; preds = %65
  %80 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 4
  %81 = load i32, ptr %80, align 4, !tbaa !30
  %82 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 4
  %83 = call i32 @getsockname(i32 noundef %81, ptr noundef %82, ptr noundef %8) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %84 = getelementptr inbounds %class.UDPConnection, ptr %10, i32 0, i32 4
  %85 = getelementptr inbounds %struct.sockaddr_in, ptr %84, i32 0, i32 1
  %86 = load i16, ptr %85, align 2, !tbaa !37
  %87 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %86)
  %88 = zext i16 %87 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, i32 noundef %88) #6
  %89 = getelementptr inbounds %class.IConnection, ptr %10, i32 0, i32 2
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %89, ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  store i1 true, ptr %2, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %91

91:                                               ; preds = %79, %53, %34
  %92 = load i1, ptr %2, align 1
  ret i1 %92

93:                                               ; preds = %75, %49, %30
  %94 = load ptr, ptr %4, align 8
  %95 = load i32, ptr %5, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !15, i64 81}
!10 = !{!"_ZTS13UDPConnection", !11, i64 0, !15, i64 80, !15, i64 81, !17, i64 84, !20, i64 112, !22, i64 128}
!11 = !{!"_ZTS11IConnection", !12, i64 8, !12, i64 40, !15, i64 72, !16, i64 76}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTS12sockaddr_in6", !18, i64 0, !18, i64 2, !16, i64 4, !19, i64 8, !16, i64 24}
!18 = !{!"short", !7, i64 0}
!19 = !{!"_ZTS8in6_addr", !7, i64 0}
!20 = !{!"_ZTS11sockaddr_in", !18, i64 0, !18, i64 2, !21, i64 4, !7, i64 8}
!21 = !{!"_ZTS7in_addr", !16, i64 0}
!22 = !{!"_ZTSSt10unique_ptrI8addrinfoSt14default_deleteIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt15__uniq_ptr_dataI8addrinfoSt14default_deleteIS0_ELb1ELb1EE", !24, i64 0}
!24 = !{!"_ZTSSt15__uniq_ptr_implI8addrinfoSt14default_deleteIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt5tupleIJP8addrinfoSt14default_deleteIS0_EEE", !26, i64 0}
!26 = !{!"_ZTSSt11_Tuple_implILm0EJP8addrinfoSt14default_deleteIS0_EEE", !27, i64 0}
!27 = !{!"_ZTSSt10_Head_baseILm0EP8addrinfoLb0EE", !6, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!11, !16, i64 76}
!31 = !{!32, !6, i64 24}
!32 = !{!"_ZTS8addrinfo", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!33 = !{!32, !16, i64 16}
!34 = !{!10, !15, i64 80}
!35 = !{!16, !16, i64 0}
!36 = !{!10, !18, i64 86}
!37 = !{!10, !18, i64 114}


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

%"class.std::__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] }

@_ZTISt13runtime_error = external constant ptr
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext) local_unnamed_addr #4

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

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

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare i32 @getsockname(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN13UDPConnection4bindEv(ptr noundef nonnull align 8 dereferenceable(136) %0) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 81
  %7 = load i8, ptr %6, align 1, !tbaa !5, !range !27, !noundef !28
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %26, label %9

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 76
  %11 = load i32, ptr %10, align 4, !tbaa !29
  %12 = getelementptr inbounds i8, ptr %0, i64 128
  %13 = tail call noundef ptr @_ZNKSt10unique_ptrI8addrinfoSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %14 = getelementptr inbounds i8, ptr %13, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !30
  %16 = tail call noundef ptr @_ZNKSt10unique_ptrI8addrinfoSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %18 = load i32, ptr %17, align 8, !tbaa !32
  %19 = tail call i32 @bind(i32 noundef %11, ptr noundef %15, i32 noundef %18) #6
  %20 = icmp slt i32 %19, 0
  br i1 %20, label %21, label %69

21:                                               ; preds = %9
  %22 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull @.str.13)
          to label %23 unwind label %24

23:                                               ; preds = %21
  tail call void @__cxa_throw(ptr nonnull %22, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %22) #6
  br label %70

26:                                               ; preds = %1
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  %28 = load i8, ptr %27, align 8, !tbaa !33, !range !27, !noundef !28
  %29 = trunc nuw i8 %28 to i1
  %30 = getelementptr inbounds i8, ptr %0, i64 76
  br i1 %29, label %31, label %50

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 28, ptr %2, align 4, !tbaa !34
  %32 = load i32, ptr %30, align 4, !tbaa !29
  %33 = getelementptr inbounds i8, ptr %0, i64 84
  %34 = tail call i32 @bind(i32 noundef %32, ptr noundef nonnull %33, i32 noundef 28) #6
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %36, label %41

36:                                               ; preds = %31
  %37 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull @.str.13)
          to label %38 unwind label %39

38:                                               ; preds = %36
  tail call void @__cxa_throw(ptr nonnull %37, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

39:                                               ; preds = %36
  %40 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %70

41:                                               ; preds = %31
  %42 = load i32, ptr %30, align 4, !tbaa !29
  %43 = call i32 @getsockname(i32 noundef %42, ptr noundef nonnull %33, ptr noundef nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  %44 = getelementptr inbounds i8, ptr %0, i64 86
  %45 = load i16, ptr %44, align 2, !tbaa !35
  %46 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %45)
  %47 = zext i16 %46 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, i32 noundef %47) #6
  %48 = getelementptr inbounds i8, ptr %0, i64 40
  %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %69

50:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 16, ptr %4, align 4, !tbaa !34
  %51 = load i32, ptr %30, align 4, !tbaa !29
  %52 = getelementptr inbounds i8, ptr %0, i64 112
  %53 = tail call i32 @bind(i32 noundef %51, ptr noundef nonnull %52, i32 noundef 16) #6
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %50
  %56 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull @.str.13)
          to label %57 unwind label %58

57:                                               ; preds = %55
  tail call void @__cxa_throw(ptr nonnull %56, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

58:                                               ; preds = %55
  %59 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %56) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %70

60:                                               ; preds = %50
  %61 = load i32, ptr %30, align 4, !tbaa !29
  %62 = call i32 @getsockname(i32 noundef %61, ptr noundef nonnull %52, ptr noundef nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %63 = getelementptr inbounds i8, ptr %0, i64 114
  %64 = load i16, ptr %63, align 2, !tbaa !36
  %65 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %64)
  %66 = zext i16 %65 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i32 noundef %66) #6
  %67 = getelementptr inbounds i8, ptr %0, i64 40
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %67, ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %69

69:                                               ; preds = %9, %60, %41
  ret i1 true

70:                                               ; preds = %58, %39, %24
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %59, %58 ], [ %25, %24 ]
  resume { ptr, i32 } %.pn
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !14, i64 81}
!6 = !{!"_ZTS13UDPConnection", !7, i64 0, !14, i64 80, !14, i64 81, !16, i64 84, !19, i64 112, !21, i64 128}
!7 = !{!"_ZTS11IConnection", !8, i64 8, !8, i64 40, !14, i64 72, !15, i64 76}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"bool", !11, i64 0}
!15 = !{!"int", !11, i64 0}
!16 = !{!"_ZTS12sockaddr_in6", !17, i64 0, !17, i64 2, !15, i64 4, !18, i64 8, !15, i64 24}
!17 = !{!"short", !11, i64 0}
!18 = !{!"_ZTS8in6_addr", !11, i64 0}
!19 = !{!"_ZTS11sockaddr_in", !17, i64 0, !17, i64 2, !20, i64 4, !11, i64 8}
!20 = !{!"_ZTS7in_addr", !15, i64 0}
!21 = !{!"_ZTSSt10unique_ptrI8addrinfoSt14default_deleteIS0_EE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_dataI8addrinfoSt14default_deleteIS0_ELb1ELb1EE", !23, i64 0}
!23 = !{!"_ZTSSt15__uniq_ptr_implI8addrinfoSt14default_deleteIS0_EE", !24, i64 0}
!24 = !{!"_ZTSSt5tupleIJP8addrinfoSt14default_deleteIS0_EEE", !25, i64 0}
!25 = !{!"_ZTSSt11_Tuple_implILm0EJP8addrinfoSt14default_deleteIS0_EEE", !26, i64 0}
!26 = !{!"_ZTSSt10_Head_baseILm0EP8addrinfoLb0EE", !10, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!7, !15, i64 76}
!30 = !{!31, !10, i64 24}
!31 = !{!"_ZTS8addrinfo", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!32 = !{!31, !15, i64 16}
!33 = !{!6, !14, i64 80}
!34 = !{!15, !15, i64 0}
!35 = !{!6, !17, i64 86}
!36 = !{!6, !17, i64 114}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass