; LLVM IR from goldsborough/ipc-bench :: source/tcp/other (client-model)

; 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.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_in_addr(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [100 x i8], align 16
  %9 = alloca %struct.addrinfo, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca [46 x i8], align 16
  %14 = alloca i32, align 4
  store i32 0, ptr %3, 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 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 100, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 48, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 46, ptr %13) #6
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = icmp ne i32 %15, 2
  br i1 %16, label %17, label %20

17:                                               ; preds = %2
  %18 = load ptr, ptr @stderr, align 8, !tbaa !9
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str) #6
  call void @exit(i32 noundef 1) #7
  unreachable

20:                                               ; preds = %2
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 48, i1 false)
  %21 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 1
  store i32 0, ptr %21, align 4, !tbaa !11
  %22 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 2
  store i32 1, ptr %22, align 8, !tbaa !13
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = getelementptr inbounds ptr, ptr %23, i64 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = call i32 @getaddrinfo(ptr noundef %25, ptr noundef @.str.1, ptr noundef %9, ptr noundef %10)
  store i32 %26, ptr %12, align 4, !tbaa !5
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %20
  %29 = load ptr, ptr @stderr, align 8, !tbaa !9
  %30 = load i32, ptr %12, align 4, !tbaa !5
  %31 = call ptr @gai_strerror(i32 noundef %30) #6
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef @.str.2, ptr noundef %31) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %102

33:                                               ; preds = %20
  %34 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %34, ptr %11, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %65, %33
  %36 = load ptr, ptr %11, align 8, !tbaa !9
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %69

38:                                               ; preds = %35
  %39 = load ptr, ptr %11, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.addrinfo, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !11
  %42 = load ptr, ptr %11, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.addrinfo, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !13
  %45 = load ptr, ptr %11, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.addrinfo, ptr %45, i32 0, i32 3
  %47 = load i32, ptr %46, align 4, !tbaa !14
  %48 = call i32 @socket(i32 noundef %41, i32 noundef %44, i32 noundef %47) #6
  store i32 %48, ptr %6, align 4, !tbaa !5
  %49 = icmp eq i32 %48, -1
  br i1 %49, label %50, label %51

50:                                               ; preds = %38
  call void @perror(ptr noundef @.str.3)
  br label %65

51:                                               ; preds = %38
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = load ptr, ptr %11, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.addrinfo, ptr %53, i32 0, i32 5
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = load ptr, ptr %11, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.addrinfo, ptr %56, i32 0, i32 4
  %58 = load i32, ptr %57, align 8, !tbaa !16
  %59 = call i32 @connect(i32 noundef %52, ptr noundef %55, i32 noundef %58)
  %60 = icmp eq i32 %59, -1
  br i1 %60, label %61, label %64

61:                                               ; preds = %51
  call void @perror(ptr noundef @.str.4)
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = call i32 @close(i32 noundef %62)
  br label %65

64:                                               ; preds = %51
  br label %69

65:                                               ; preds = %61, %50
  %66 = load ptr, ptr %11, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.addrinfo, ptr %66, i32 0, i32 7
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  store ptr %68, ptr %11, align 8, !tbaa !9
  br label %35, !llvm.loop !18

69:                                               ; preds = %64, %35
  %70 = load ptr, ptr %11, align 8, !tbaa !9
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %75

72:                                               ; preds = %69
  %73 = load ptr, ptr @stderr, align 8, !tbaa !9
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.5) #6
  store i32 2, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %102

75:                                               ; preds = %69
  %76 = load ptr, ptr %11, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.addrinfo, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = load ptr, ptr %11, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.addrinfo, ptr %79, i32 0, i32 5
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = call ptr @get_in_addr(ptr noundef %81)
  %83 = getelementptr inbounds [46 x i8], ptr %13, i64 0, i64 0
  %84 = call ptr @inet_ntop(i32 noundef %78, ptr noundef %82, ptr noundef %83, i32 noundef 46) #6
  %85 = getelementptr inbounds [46 x i8], ptr %13, i64 0, i64 0
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %85)
  %87 = load ptr, ptr %10, align 8, !tbaa !9
  call void @freeaddrinfo(ptr noundef %87) #6
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = getelementptr inbounds [100 x i8], ptr %8, i64 0, i64 0
  %90 = call i64 @recv(i32 noundef %88, ptr noundef %89, i64 noundef 99, i32 noundef 0)
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %7, align 4, !tbaa !5
  %92 = icmp eq i32 %91, -1
  br i1 %92, label %93, label %94

93:                                               ; preds = %75
  call void @perror(ptr noundef @.str.7)
  call void @exit(i32 noundef 1) #7
  unreachable

94:                                               ; preds = %75
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100 x i8], ptr %8, i64 0, i64 %96
  store i8 0, ptr %97, align 1, !tbaa !20
  %98 = getelementptr inbounds [100 x i8], ptr %8, i64 0, i64 0
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %98)
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = call i32 @close(i32 noundef %100)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %102

102:                                              ; preds = %94, %72, %28
  call void @llvm.lifetime.end.p0(i64 46, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  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 48, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 100, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %103 = load i32, ptr %3, align 4
  ret i32 %103
}

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare i32 @getaddrinfo(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

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

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

declare void @perror(ptr noundef) #5

declare i32 @connect(i32 noundef, ptr noundef, i32 noundef) #5

declare i32 @close(i32 noundef) #5

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

declare i32 @printf(ptr noundef, ...) #5

; Function Attrs: nounwind
declare void @freeaddrinfo(ptr noundef) #2

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #5

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { "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 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 = !{!"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, !6, i64 4}
!12 = !{!"addrinfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 12}
!15 = !{!12, !10, i64 24}
!16 = !{!12, !6, i64 16}
!17 = !{!12, !10, i64 40}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!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"

%struct.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_in_addr(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [100 x i8], align 16
  %4 = alloca %struct.addrinfo, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [46 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 46, ptr nonnull %6) #7
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %10, label %7

7:                                                ; preds = %2
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %4, i8 0, i64 48, i1 false)
  store i32 1, ptr %11, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = call i32 @getaddrinfo(ptr noundef %13, ptr noundef nonnull @.str.1, ptr noundef nonnull %4, ptr noundef nonnull %5) #7
  %.not23 = icmp eq i32 %14, 0
  br i1 %.not23, label %.preheader, label %15

.preheader:                                       ; preds = %10
  %.01827 = load ptr, ptr %5, align 8, !tbaa !5
  %.not2428 = icmp eq ptr %.01827, null
  br i1 %.not2428, label %._crit_edge, label %.lr.ph

15:                                               ; preds = %10
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = call ptr @gai_strerror(i32 noundef %14) #7
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.2, ptr noundef %17) #8
  br label %59

.lr.ph:                                           ; preds = %.preheader, %37
  %.01829 = phi ptr [ %.018, %37 ], [ %.01827, %.preheader ]
  %19 = getelementptr inbounds i8, ptr %.01829, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %.01829, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %.01829, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = call i32 @socket(i32 noundef %20, i32 noundef %22, i32 noundef %24) #7
  %26 = icmp eq i32 %25, -1
  br i1 %26, label %27, label %28

27:                                               ; preds = %.lr.ph
  call void @perror(ptr noundef nonnull @.str.3) #10
  br label %37

28:                                               ; preds = %.lr.ph
  %29 = getelementptr inbounds i8, ptr %.01829, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %.01829, i64 16
  %32 = load i32, ptr %31, align 8, !tbaa !15
  %33 = call i32 @connect(i32 noundef %25, ptr noundef %30, i32 noundef %32) #7
  %34 = icmp eq i32 %33, -1
  br i1 %34, label %35, label %41

35:                                               ; preds = %28
  call void @perror(ptr noundef nonnull @.str.4) #10
  %36 = call i32 @close(i32 noundef %25) #7
  br label %37

37:                                               ; preds = %35, %27
  %38 = getelementptr inbounds i8, ptr %.01829, i64 40
  %.018 = load ptr, ptr %38, align 8, !tbaa !5
  %.not24 = icmp eq ptr %.018, null
  br i1 %.not24, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %37, %.preheader
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.5) #8
  br label %59

41:                                               ; preds = %28
  %42 = getelementptr inbounds i8, ptr %.01829, i64 4
  %43 = getelementptr inbounds i8, ptr %.01829, i64 24
  %44 = load i32, ptr %42, align 4, !tbaa !12
  %45 = load ptr, ptr %43, align 8, !tbaa !14
  %46 = call ptr @get_in_addr(ptr noundef %45)
  %47 = call ptr @inet_ntop(i32 noundef %44, ptr noundef %46, ptr noundef nonnull %6, i32 noundef 46) #7
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull %6)
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %49) #7
  %50 = call i64 @recv(i32 noundef %25, ptr noundef nonnull %3, i64 noundef 99, i32 noundef 0) #7
  %51 = and i64 %50, 4294967295
  %52 = icmp eq i64 %51, 4294967295
  br i1 %52, label %53, label %54

53:                                               ; preds = %41
  call void @perror(ptr noundef nonnull @.str.7) #10
  call void @exit(i32 noundef 1) #9
  unreachable

54:                                               ; preds = %41
  %sext = shl i64 %50, 32
  %55 = ashr exact i64 %sext, 32
  %56 = getelementptr inbounds [100 x i8], ptr %3, i64 0, i64 %55
  store i8 0, ptr %56, align 1, !tbaa !18
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %3)
  %58 = call i32 @close(i32 noundef %25) #7
  br label %59

59:                                               ; preds = %54, %._crit_edge, %15
  %.0 = phi i32 [ 1, %15 ], [ 2, %._crit_edge ], [ 0, %54 ]
  call void @llvm.lifetime.end.p0(i64 46, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %3) #7
  ret i32 %.0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare i32 @getaddrinfo(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare ptr @gai_strerror(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #2

declare i32 @connect(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i32 @close(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @freeaddrinfo(ptr noundef) local_unnamed_addr #6

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #5

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

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

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


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