; LLVM IR from microsoft/ntttcp-for-linux :: src (util)

; 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.ifaddrs = type { ptr, ptr, i32, ptr, ptr, %union.anon.0, ptr }
%union.anon.0 = type { ptr }
%struct.sockaddr = type { i16, [14 x i8] }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon }
%union.anon = type { [4 x i32] }

@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [27 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
declare i32 @asprintf(ptr noundef, ptr noundef, ...) #1

declare void @PRINT_ERR(ptr noundef) #2

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

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

; Function Attrs: nounwind
declare ptr @inet_ntop(i32 noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare void @PRINT_DBG_FREE(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @check_is_ip_addr_valid_local(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i1, align 1
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = icmp eq i32 %14, 2
  br i1 %15, label %16, label %21

16:                                               ; preds = %2
  %17 = load ptr, ptr %5, align 8, !tbaa !9
  %18 = call i32 @strcmp(ptr noundef %17, ptr noundef @.str.242) #7
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %16
  store i1 true, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %107

21:                                               ; preds = %16, %2
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 10
  br i1 %23, label %24, label %29

24:                                               ; preds = %21
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = call i32 @strcmp(ptr noundef %25, ptr noundef @.str.243) #7
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %24
  store i1 true, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %107

29:                                               ; preds = %24, %21
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 2
  %32 = zext i1 %31 to i64
  %33 = select i1 %31, i32 16, i32 46
  %34 = sext i32 %33 to i64
  store i64 %34, ptr %10, align 8, !tbaa !13
  %35 = load i64, ptr %10, align 8, !tbaa !13
  %36 = call noalias ptr @malloc(i64 noundef %35) #8
  store ptr %36, ptr %9, align 8, !tbaa !9
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %29
  call void @PRINT_ERR(ptr noundef @.str.244)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %107

39:                                               ; preds = %29
  %40 = call i32 @getifaddrs(ptr noundef %6) #6
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %41, ptr %7, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %98, %39
  %43 = load ptr, ptr %7, align 8, !tbaa !9
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %102

45:                                               ; preds = %42
  %46 = load ptr, ptr %7, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.ifaddrs, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %97

50:                                               ; preds = %45
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.ifaddrs, ptr %51, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  %54 = getelementptr inbounds %struct.sockaddr, ptr %53, i32 0, i32 0
  %55 = load i16, ptr %54, align 2, !tbaa !17
  %56 = zext i16 %55 to i32
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %59, label %97

59:                                               ; preds = %50
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %71

62:                                               ; preds = %59
  %63 = load ptr, ptr %7, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.ifaddrs, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds %struct.sockaddr_in, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %9, align 8, !tbaa !9
  %68 = load i64, ptr %10, align 8, !tbaa !13
  %69 = trunc i64 %68 to i32
  %70 = call ptr @inet_ntop(i32 noundef 2, ptr noundef %66, ptr noundef %67, i32 noundef %69) #6
  br label %80

71:                                               ; preds = %59
  %72 = load ptr, ptr %7, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.ifaddrs, ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = getelementptr inbounds %struct.sockaddr_in6, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %9, align 8, !tbaa !9
  %77 = load i64, ptr %10, align 8, !tbaa !13
  %78 = trunc i64 %77 to i32
  %79 = call ptr @inet_ntop(i32 noundef 10, ptr noundef %75, ptr noundef %76, i32 noundef %78) #6
  br label %80

80:                                               ; preds = %71, %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %81 = load ptr, ptr %7, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.ifaddrs, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  %84 = load ptr, ptr %9, align 8, !tbaa !9
  %85 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %11, ptr noundef @.str.245, ptr noundef %83, ptr noundef %84) #6
  store i32 %85, ptr %13, align 4, !tbaa !5
  %86 = load i32, ptr %13, align 4, !tbaa !5
  %87 = icmp slt i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %80
  call void @PRINT_ERR(ptr noundef @.str.1)
  br label %89

89:                                               ; preds = %88, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  call void @PRINT_DBG_FREE(ptr noundef %90)
  %91 = load ptr, ptr %5, align 8, !tbaa !9
  %92 = load ptr, ptr %9, align 8, !tbaa !9
  %93 = call i32 @strcmp(ptr noundef %91, ptr noundef %92) #7
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %96

95:                                               ; preds = %89
  store i8 1, ptr %8, align 1, !tbaa !11
  br label %96

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

97:                                               ; preds = %96, %50, %45
  br label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.ifaddrs, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !21
  store ptr %101, ptr %7, align 8, !tbaa !9
  br label %42, !llvm.loop !22

102:                                              ; preds = %42
  %103 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %103) #6
  %104 = load ptr, ptr %6, align 8, !tbaa !9
  call void @freeifaddrs(ptr noundef %104) #6
  %105 = load i8, ptr %8, align 1, !tbaa !11, !range !24, !noundef !25
  %106 = trunc i8 %105 to i1
  store i1 %106, ptr %3, align 1
  store i32 1, ptr %12, align 4
  br label %107

107:                                              ; preds = %102, %38, %28, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %108 = load i1, ptr %3, align 1
  ret i1 %108
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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

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

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

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !10, i64 24}
!16 = !{!"ifaddrs", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48}
!17 = !{!18, !19, i64 0}
!18 = !{!"sockaddr", !19, i64 0, !7, i64 2}
!19 = !{!"short", !7, i64 0}
!20 = !{!16, !10, i64 8}
!21 = !{!16, !10, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{i8 0, i8 2}
!25 = !{}


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

@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [27 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
declare i32 @asprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @PRINT_ERR(ptr noundef) local_unnamed_addr #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 willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

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

declare void @PRINT_DBG_FREE(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @check_is_ip_addr_valid_local(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %5 = icmp eq i32 %0, 2
  br i1 %5, label %6, label %9

6:                                                ; preds = %2
  %7 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.242) #8
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %58, label %.thread

9:                                                ; preds = %2
  %10 = icmp eq i32 %0, 10
  br i1 %10, label %11, label %.thread

11:                                               ; preds = %9
  %12 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.243) #8
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %58, label %.thread

.thread:                                          ; preds = %6, %11, %9
  %14 = phi i64 [ 16, %6 ], [ 46, %11 ], [ 46, %9 ]
  %15 = tail call noalias ptr @malloc(i64 noundef %14) #9
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %.thread
  tail call void @PRINT_ERR(ptr noundef nonnull @.str.244) #7
  br label %58

18:                                               ; preds = %.thread
  %19 = call i32 @getifaddrs(ptr noundef nonnull %3) #7
  %.02530 = load ptr, ptr %3, align 8, !tbaa !5
  %.not31 = icmp eq ptr %.02530, null
  br i1 %.not31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %18
  br i1 %5, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %37
  %.02533.us = phi ptr [ %.025.us, %37 ], [ %.02530, %.lr.ph ]
  %.02632.us = phi i1 [ %.1.us, %37 ], [ false, %.lr.ph ]
  %20 = getelementptr inbounds i8, ptr %.02533.us, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %.not29.us = icmp eq ptr %21, null
  br i1 %.not29.us, label %37, label %22

22:                                               ; preds = %.lr.ph.split.us
  %23 = load i16, ptr %21, align 2, !tbaa !12
  %24 = icmp eq i16 %23, 2
  br i1 %24, label %25, label %37

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %21, i64 4
  %27 = call ptr @inet_ntop(i32 noundef 2, ptr noundef nonnull %26, ptr noundef nonnull %15, i32 noundef 16) #7
  %28 = getelementptr inbounds i8, ptr %.02533.us, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.245, ptr noundef %29, ptr noundef nonnull %15) #7
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %25
  call void @PRINT_ERR(ptr noundef nonnull @.str.1) #7
  br label %33

33:                                               ; preds = %32, %25
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %34) #7
  %35 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %15) #8
  %36 = icmp eq i32 %35, 0
  %spec.select.us = select i1 %36, i1 true, i1 %.02632.us
  br label %37

37:                                               ; preds = %33, %22, %.lr.ph.split.us
  %.1.us = phi i1 [ %.02632.us, %22 ], [ %.02632.us, %.lr.ph.split.us ], [ %spec.select.us, %33 ]
  %.025.us = load ptr, ptr %.02533.us, align 8, !tbaa !5
  %.not.us = icmp eq ptr %.025.us, null
  br i1 %.not.us, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !16

.lr.ph.split:                                     ; preds = %.lr.ph, %56
  %.02533 = phi ptr [ %.025, %56 ], [ %.02530, %.lr.ph ]
  %.02632 = phi i1 [ %.1, %56 ], [ false, %.lr.ph ]
  %38 = getelementptr inbounds i8, ptr %.02533, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %.not29 = icmp eq ptr %39, null
  br i1 %.not29, label %56, label %40

40:                                               ; preds = %.lr.ph.split
  %41 = load i16, ptr %39, align 2, !tbaa !12
  %42 = zext i16 %41 to i32
  %43 = icmp eq i32 %42, %0
  br i1 %43, label %44, label %56

44:                                               ; preds = %40
  %45 = getelementptr inbounds i8, ptr %39, i64 8
  %46 = call ptr @inet_ntop(i32 noundef 10, ptr noundef nonnull %45, ptr noundef nonnull %15, i32 noundef 46) #7
  %47 = getelementptr inbounds i8, ptr %.02533, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.245, ptr noundef %48, ptr noundef nonnull %15) #7
  %50 = icmp slt i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  call void @PRINT_ERR(ptr noundef nonnull @.str.1) #7
  br label %52

52:                                               ; preds = %51, %44
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %53) #7
  %54 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %15) #8
  %55 = icmp eq i32 %54, 0
  %spec.select = select i1 %55, i1 true, i1 %.02632
  br label %56

56:                                               ; preds = %52, %.lr.ph.split, %40
  %.1 = phi i1 [ %.02632, %40 ], [ %.02632, %.lr.ph.split ], [ %spec.select, %52 ]
  %.025 = load ptr, ptr %.02533, align 8, !tbaa !5
  %.not = icmp eq ptr %.025, null
  br i1 %.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !16

._crit_edge:                                      ; preds = %56, %37, %18
  %.026.lcssa = phi i1 [ false, %18 ], [ %.1.us, %37 ], [ %.1, %56 ]
  call void @free(ptr noundef %15) #7
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  call void @freeifaddrs(ptr noundef %57) #7
  br label %58

58:                                               ; preds = %11, %6, %._crit_edge, %17
  %.0 = phi i1 [ false, %17 ], [ %.026.lcssa, %._crit_edge ], [ true, %6 ], [ true, %11 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i1 %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 #5 = { 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 #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }

!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, !6, i64 24}
!10 = !{!"ifaddrs", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !6, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"sockaddr", !14, i64 0, !7, i64 2}
!14 = !{!"short", !7, i64 0}
!15 = !{!10, !6, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass