; LLVM IR from MRPT/mrpt :: 3rdparty/xspublic/xstypes (xssocket)

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

%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.XsSocket = type { ptr }
%struct.XsSocketPrivate = type { i32, i32, i32, %struct.sockaddr_storage, i32, i32, i32, i32, [32768 x i8] }
%struct.sockaddr_storage = type { i16, [118 x i8], i64 }
%struct.ifaddrs = type { ptr, ptr, i32, ptr, ptr, %union.anon, ptr }
%union.anon = type { ptr }

@.str = external hidden unnamed_addr constant [12 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

; Function Attrs: nounwind uwtable
declare hidden void @translateSocketError(ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @XsSocket_select(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) #2

declare i64 @sendto(i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @XsSocket_broadcast(ptr noundef %0, ptr noundef %1, i64 noundef %2, i16 noundef zeroext %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i16, align 2
  %10 = alloca %struct.sockaddr_in, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca [32 x i8], align 16
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i16 %3, ptr %9, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call i32 @XsSocket_select(ptr noundef %21, i32 noundef 0, ptr noundef null, ptr noundef %14)
  store i32 %22, ptr %15, align 4, !tbaa !13
  %23 = load i32, ptr %14, align 4, !tbaa !13
  %24 = load i32, ptr %15, align 4, !tbaa !13
  %25 = icmp sle i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %4
  %27 = load i32, ptr %15, align 4, !tbaa !13
  store i32 %27, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %113

28:                                               ; preds = %4
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.XsSocket, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds %struct.XsSocketPrivate, ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 8, !tbaa !17
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %104

35:                                               ; preds = %28
  %36 = getelementptr inbounds %struct.sockaddr_in, ptr %10, i32 0, i32 0
  store i16 2, ptr %36, align 4, !tbaa !20
  %37 = load i16, ptr %9, align 2, !tbaa !11
  %38 = call zeroext i16 @__bswap_16(i16 noundef zeroext %37)
  %39 = getelementptr inbounds %struct.sockaddr_in, ptr %10, i32 0, i32 1
  store i16 %38, ptr %39, align 2, !tbaa !23
  %40 = getelementptr inbounds %struct.sockaddr_in, ptr %10, i32 0, i32 2
  %41 = getelementptr inbounds %struct.in_addr, ptr %40, i32 0, i32 0
  store i32 -1, ptr %41, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %42 = call i32 @getifaddrs(ptr noundef %17) #5
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %103

44:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %45, ptr %18, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %97, %44
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %101

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %50 = load ptr, ptr %18, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ifaddrs, ptr %50, i32 0, i32 5
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  %53 = call i32 @SockAddrToUint32(ptr noundef %52)
  store i32 %53, ptr %19, align 4, !tbaa !13
  %54 = load i32, ptr %19, align 4, !tbaa !13
  %55 = icmp ugt i32 %54, 0
  br i1 %55, label %56, label %97

56:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  %57 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  %58 = load i32, ptr %19, align 4, !tbaa !13
  %59 = lshr i32 %58, 24
  %60 = and i32 %59, 255
  %61 = load i32, ptr %19, align 4, !tbaa !13
  %62 = lshr i32 %61, 16
  %63 = and i32 %62, 255
  %64 = load i32, ptr %19, align 4, !tbaa !13
  %65 = lshr i32 %64, 8
  %66 = and i32 %65, 255
  %67 = load i32, ptr %19, align 4, !tbaa !13
  %68 = and i32 %67, 255
  %69 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %57, ptr noundef @.str, i32 noundef %60, i32 noundef %63, i32 noundef %66, i32 noundef %68) #5
  %70 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  %71 = getelementptr inbounds %struct.sockaddr_in, ptr %10, i32 0, i32 2
  %72 = call i32 @inet_pton(i32 noundef 2, ptr noundef %70, ptr noundef %71) #5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.XsSocket, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = getelementptr inbounds %struct.XsSocketPrivate, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !26
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = call i64 @sendto(i32 noundef %77, ptr noundef %78, i64 noundef %79, i32 noundef 16384, ptr noundef %10, i32 noundef 16)
  %81 = trunc i64 %80 to i32
  store i32 %81, ptr %11, align 4, !tbaa !13
  %82 = load i32, ptr %11, align 4, !tbaa !13
  %83 = icmp slt i32 %82, 0
  br i1 %83, label %84, label %89

84:                                               ; preds = %56
  %85 = load i32, ptr %12, align 4, !tbaa !13
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %12, align 4, !tbaa !13
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !13
  call void @translateSocketError(ptr noundef %87, i32 noundef %88)
  br label %96

89:                                               ; preds = %56
  %90 = load i32, ptr %11, align 4, !tbaa !13
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %92, label %95

92:                                               ; preds = %89
  %93 = load i32, ptr %13, align 4, !tbaa !13
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %13, align 4, !tbaa !13
  br label %95

95:                                               ; preds = %92, %89
  br label %96

96:                                               ; preds = %95, %84
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  br label %97

97:                                               ; preds = %96, %49
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.ifaddrs, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !27
  store ptr %100, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %46, !llvm.loop !29

101:                                              ; preds = %46
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  call void @freeifaddrs(ptr noundef %102) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %103

103:                                              ; preds = %101, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %104

104:                                              ; preds = %103, %28
  %105 = load i32, ptr %12, align 4, !tbaa !13
  %106 = load i32, ptr %13, align 4, !tbaa !13
  %107 = icmp sge i32 %105, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %104
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %113

109:                                              ; preds = %104
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load i32, ptr %11, align 4, !tbaa !13
  call void @translateSocketError(ptr noundef %110, i32 noundef %111)
  %112 = load i32, ptr %11, align 4, !tbaa !13
  store i32 %112, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %113

113:                                              ; preds = %109, %108, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  %114 = load i32, ptr %5, align 4
  ret i32 %114
}

; Function Attrs: nounwind
declare i32 @getifaddrs(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @SockAddrToUint32(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: nounwind
declare i32 @inet_pton(i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare void @freeifaddrs(ptr noundef) #4

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

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"XsSocket", !6, i64 0}
!17 = !{!18, !14, i64 8}
!18 = !{!"XsSocketPrivate", !14, i64 0, !14, i64 4, !14, i64 8, !19, i64 16, !14, i64 144, !14, i64 148, !14, i64 152, !14, i64 156, !7, i64 160}
!19 = !{!"sockaddr_storage", !12, i64 0, !7, i64 2, !10, i64 120}
!20 = !{!21, !12, i64 0}
!21 = !{!"sockaddr_in", !12, i64 0, !12, i64 2, !22, i64 4, !7, i64 8}
!22 = !{!"in_addr", !14, i64 0}
!23 = !{!21, !12, i64 2}
!24 = !{!21, !14, i64 4}
!25 = !{!7, !7, i64 0}
!26 = !{!18, !14, i64 0}
!27 = !{!28, !6, i64 0}
!28 = !{!"ifaddrs", !6, i64 0, !6, i64 8, !14, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !6, i64 48}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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

%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }

@.str = external hidden unnamed_addr constant [12 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

; Function Attrs: nounwind uwtable
declare hidden void @translateSocketError(ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @XsSocket_select(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) local_unnamed_addr #2

declare i64 @sendto(i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local i32 @XsSocket_broadcast(ptr noundef %0, ptr noundef %1, i64 noundef %2, i16 noundef zeroext %3) local_unnamed_addr #1 {
  %5 = alloca %struct.sockaddr_in, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca [32 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %9 = call i32 @XsSocket_select(ptr noundef %0, i32 noundef 0, ptr noundef null, ptr noundef nonnull %6)
  %10 = icmp slt i32 %9, 1
  br i1 %10, label %.thread, label %11

11:                                               ; preds = %4
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !10
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %.thread

16:                                               ; preds = %11
  store i16 2, ptr %5, align 4, !tbaa !16
  %17 = call zeroext i16 @__bswap_16(i16 noundef zeroext %3)
  %18 = getelementptr inbounds i8, ptr %5, i64 2
  store i16 %17, ptr %18, align 2, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 -1, ptr %19, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %20 = call i32 @getifaddrs(ptr noundef nonnull %7) #6
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %.preheader, label %.thread49

.preheader:                                       ; preds = %16
  %.02754 = load ptr, ptr %7, align 8, !tbaa !21
  %.not55 = icmp eq ptr %.02754, null
  br i1 %.not55, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %.preheader
  call void @freeifaddrs(ptr noundef null) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %.thread

.thread49:                                        ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %.thread

.lr.ph:                                           ; preds = %.preheader, %44
  %.02759 = phi ptr [ %.027, %44 ], [ %.02754, %.preheader ]
  %.02858 = phi i32 [ %.1, %44 ], [ 0, %.preheader ]
  %.02957 = phi i32 [ %.231, %44 ], [ 0, %.preheader ]
  %.03356 = phi i32 [ %.235, %44 ], [ 0, %.preheader ]
  %22 = getelementptr inbounds i8, ptr %.02759, i64 40
  %23 = load ptr, ptr %22, align 8, !tbaa !22
  %24 = call i32 @SockAddrToUint32(ptr noundef %23)
  %.not43 = icmp eq i32 %24, 0
  br i1 %.not43, label %44, label %25

25:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %26 = lshr i32 %24, 24
  %27 = lshr i32 %24, 16
  %28 = and i32 %27, 255
  %29 = lshr i32 %24, 8
  %30 = and i32 %29, 255
  %31 = and i32 %24, 255
  %32 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %26, i32 noundef %28, i32 noundef %30, i32 noundef %31) #6
  %33 = call i32 @inet_pton(i32 noundef 2, ptr noundef nonnull %8, ptr noundef nonnull %19) #6
  %34 = load ptr, ptr %0, align 8, !tbaa !5
  %35 = load i32, ptr %34, align 8, !tbaa !23
  %36 = call i64 @sendto(i32 noundef %35, ptr noundef %1, i64 noundef %2, i32 noundef 16384, ptr noundef nonnull %5, i32 noundef 16) #6
  %37 = trunc i64 %36 to i32
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %25
  %40 = add nsw i32 %.03356, 1
  call void @translateSocketError(ptr noundef nonnull %0, i32 noundef %37)
  br label %43

41:                                               ; preds = %25
  %.not44 = icmp ne i32 %37, 0
  %42 = zext i1 %.not44 to i32
  %spec.select = add nsw i32 %.02957, %42
  br label %43

43:                                               ; preds = %41, %39
  %.134 = phi i32 [ %40, %39 ], [ %.03356, %41 ]
  %.130 = phi i32 [ %.02957, %39 ], [ %spec.select, %41 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %44

44:                                               ; preds = %43, %.lr.ph
  %.235 = phi i32 [ %.134, %43 ], [ %.03356, %.lr.ph ]
  %.231 = phi i32 [ %.130, %43 ], [ %.02957, %.lr.ph ]
  %.1 = phi i32 [ %37, %43 ], [ %.02858, %.lr.ph ]
  %.027 = load ptr, ptr %.02759, align 8, !tbaa !21
  %.not = icmp eq ptr %.027, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %44
  %.pre = load ptr, ptr %7, align 8, !tbaa !21
  call void @freeifaddrs(ptr noundef %.pre) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %.not42 = icmp slt i32 %.235, %.231
  br i1 %.not42, label %45, label %.thread

45:                                               ; preds = %._crit_edge
  call void @translateSocketError(ptr noundef nonnull %0, i32 noundef %.1)
  br label %.thread

.thread:                                          ; preds = %._crit_edge.thread, %11, %.thread49, %._crit_edge, %4, %45
  %.0 = phi i32 [ %.1, %45 ], [ %9, %4 ], [ -1, %._crit_edge ], [ -1, %.thread49 ], [ -1, %11 ], [ -1, %._crit_edge.thread ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  ret i32 %.0
}

; Function Attrs: nounwind
declare i32 @getifaddrs(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @SockAddrToUint32(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @inet_pton(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @freeifaddrs(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree 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 #6 = { 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, !7, i64 0}
!6 = !{!"XsSocket", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !12, i64 8}
!11 = !{!"XsSocketPrivate", !12, i64 0, !12, i64 4, !12, i64 8, !13, i64 16, !12, i64 144, !12, i64 148, !12, i64 152, !12, i64 156, !8, i64 160}
!12 = !{!"int", !8, i64 0}
!13 = !{!"sockaddr_storage", !14, i64 0, !8, i64 2, !15, i64 120}
!14 = !{!"short", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!17, !14, i64 0}
!17 = !{!"sockaddr_in", !14, i64 0, !14, i64 2, !18, i64 4, !8, i64 8}
!18 = !{!"in_addr", !12, i64 0}
!19 = !{!17, !14, i64 2}
!20 = !{!17, !12, i64 4}
!21 = !{!7, !7, i64 0}
!22 = !{!8, !8, i64 0}
!23 = !{!11, !12, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass