; LLVM IR from goldsborough/ipc-bench :: source/tcp/other (server-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 }
%struct.sockaddr_storage = type { i16, [118 x i8], i64 }
%struct.sigaction = type { %union.anon.0, %struct.__sigset_t, i32, ptr }
%union.anon.0 = type { ptr }
%struct.__sigset_t = type { [16 x i64] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @sigchld_handler(i32 noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.addrinfo, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.sockaddr_storage, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.sigaction, align 8
  %10 = alloca i32, align 4
  %11 = alloca [46 x i8], align 16
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 152, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 46, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 48, i1 false)
  %13 = getelementptr inbounds %struct.addrinfo, ptr %4, i32 0, i32 1
  store i32 0, ptr %13, align 4, !tbaa !9
  %14 = getelementptr inbounds %struct.addrinfo, ptr %4, i32 0, i32 2
  store i32 1, ptr %14, align 8, !tbaa !12
  %15 = getelementptr inbounds %struct.addrinfo, ptr %4, i32 0, i32 0
  store i32 1, ptr %15, align 8, !tbaa !13
  %16 = call i32 @getaddrinfo(ptr noundef null, ptr noundef @.str, ptr noundef %4, ptr noundef %5)
  store i32 %16, ptr %12, align 4, !tbaa !5
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %23

18:                                               ; preds = %0
  %19 = load ptr, ptr @stderr, align 8, !tbaa !14
  %20 = load i32, ptr %12, align 4, !tbaa !5
  %21 = call ptr @gai_strerror(i32 noundef %20) #6
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.1, ptr noundef %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 46, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 152, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 1

23:                                               ; preds = %0
  %24 = load ptr, ptr %5, align 8, !tbaa !14
  store ptr %24, ptr %6, align 8, !tbaa !14
  br label %25

25:                                               ; preds = %60, %23
  %26 = load ptr, ptr %6, align 8, !tbaa !14
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %64

28:                                               ; preds = %25
  %29 = load ptr, ptr %6, align 8, !tbaa !14
  %30 = getelementptr inbounds %struct.addrinfo, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !14
  %33 = getelementptr inbounds %struct.addrinfo, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 8, !tbaa !12
  %35 = load ptr, ptr %6, align 8, !tbaa !14
  %36 = getelementptr inbounds %struct.addrinfo, ptr %35, i32 0, i32 3
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = call i32 @socket(i32 noundef %31, i32 noundef %34, i32 noundef %37) #6
  store i32 %38, ptr %2, align 4, !tbaa !5
  %39 = icmp eq i32 %38, -1
  br i1 %39, label %40, label %41

40:                                               ; preds = %28
  call void @perror(ptr noundef @.str.2)
  br label %60

41:                                               ; preds = %28
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = call i32 @setsockopt(i32 noundef %42, i32 noundef 1, i32 noundef 2, ptr noundef %10, i32 noundef 4) #6
  %44 = icmp eq i32 %43, -1
  br i1 %44, label %45, label %46

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

46:                                               ; preds = %41
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = load ptr, ptr %6, align 8, !tbaa !14
  %49 = getelementptr inbounds %struct.addrinfo, ptr %48, i32 0, i32 5
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %51 = load ptr, ptr %6, align 8, !tbaa !14
  %52 = getelementptr inbounds %struct.addrinfo, ptr %51, i32 0, i32 4
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %54 = call i32 @bind(i32 noundef %47, ptr noundef %50, i32 noundef %53) #6
  %55 = icmp eq i32 %54, -1
  br i1 %55, label %56, label %59

56:                                               ; preds = %46
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = call i32 @close(i32 noundef %57)
  call void @perror(ptr noundef @.str.4)
  br label %60

59:                                               ; preds = %46
  br label %64

60:                                               ; preds = %56, %40
  %61 = load ptr, ptr %6, align 8, !tbaa !14
  %62 = getelementptr inbounds %struct.addrinfo, ptr %61, i32 0, i32 7
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  store ptr %63, ptr %6, align 8, !tbaa !14
  br label %25, !llvm.loop !19

64:                                               ; preds = %59, %25
  %65 = load ptr, ptr %5, align 8, !tbaa !14
  call void @freeaddrinfo(ptr noundef %65) #6
  %66 = load ptr, ptr %6, align 8, !tbaa !14
  %67 = icmp eq ptr %66, null
  br i1 %67, label %68, label %71

68:                                               ; preds = %64
  %69 = load ptr, ptr @stderr, align 8, !tbaa !14
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.5) #6
  call void @exit(i32 noundef 1) #7
  unreachable

71:                                               ; preds = %64
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = call i32 @listen(i32 noundef %72, i32 noundef 10) #6
  %74 = icmp eq i32 %73, -1
  br i1 %74, label %75, label %76

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

76:                                               ; preds = %71
  %77 = getelementptr inbounds %struct.sigaction, ptr %9, i32 0, i32 0
  store ptr @sigchld_handler, ptr %77, align 8, !tbaa !21
  %78 = getelementptr inbounds %struct.sigaction, ptr %9, i32 0, i32 1
  %79 = call i32 @sigemptyset(ptr noundef %78) #6
  %80 = getelementptr inbounds %struct.sigaction, ptr %9, i32 0, i32 2
  store i32 268435456, ptr %80, align 8, !tbaa !22
  %81 = call i32 @sigaction(i32 noundef 17, ptr noundef %9, ptr noundef null) #6
  %82 = icmp eq i32 %81, -1
  br i1 %82, label %83, label %84

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

84:                                               ; preds = %76
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %86

86:                                               ; preds = %114, %92, %84
  br label %87

87:                                               ; preds = %86
  store i32 128, ptr %8, align 4, !tbaa !5
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = call i32 @accept(i32 noundef %88, ptr noundef %7, ptr noundef %8)
  store i32 %89, ptr %3, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = icmp eq i32 %90, -1
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  call void @perror(ptr noundef @.str.9)
  br label %86

93:                                               ; preds = %87
  %94 = getelementptr inbounds %struct.sockaddr_storage, ptr %7, i32 0, i32 0
  %95 = load i16, ptr %94, align 8, !tbaa !25
  %96 = zext i16 %95 to i32
  %97 = call ptr @get_in_addr(ptr noundef %7)
  %98 = getelementptr inbounds [46 x i8], ptr %11, i64 0, i64 0
  %99 = call ptr @inet_ntop(i32 noundef %96, ptr noundef %97, ptr noundef %98, i32 noundef 46) #6
  %100 = getelementptr inbounds [46 x i8], ptr %11, i64 0, i64 0
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, ptr noundef %100)
  %102 = call i32 @fork() #6
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %114, label %104

104:                                              ; preds = %93
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = call i32 @close(i32 noundef %105)
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = call i64 @send(i32 noundef %107, ptr noundef @.str.11, i64 noundef 13, i32 noundef 0)
  %109 = icmp eq i64 %108, -1
  br i1 %109, label %110, label %111

110:                                              ; preds = %104
  call void @perror(ptr noundef @.str.12)
  br label %111

111:                                              ; preds = %110, %104
  %112 = load i32, ptr %3, align 4, !tbaa !5
  %113 = call i32 @close(i32 noundef %112)
  call void @exit(i32 noundef 0) #7
  unreachable

114:                                              ; preds = %93
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = call i32 @close(i32 noundef %115)
  br label %86
}

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

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

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

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

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

declare void @perror(ptr noundef) #3

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

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

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

declare i32 @close(i32 noundef) #3

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

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

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

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

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

declare i32 @accept(i32 noundef, ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare i32 @fork() #4

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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, !6, i64 4}
!10 = !{!"addrinfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !6, i64 12}
!16 = !{!10, !11, i64 24}
!17 = !{!10, !6, i64 16}
!18 = !{!10, !11, i64 40}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 136}
!23 = !{!"sigaction", !7, i64 0, !24, i64 8, !6, i64 136, !11, i64 144}
!24 = !{!"", !7, i64 0}
!25 = !{!26, !27, i64 0}
!26 = !{!"sockaddr_storage", !27, i64 0, !7, i64 2, !28, i64 120}
!27 = !{!"short", !7, i64 0}
!28 = !{!"long", !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 }
%struct.sockaddr_storage = type { i16, [118 x i8], i64 }
%struct.sigaction = type { %union.anon.0, %struct.__sigset_t, i32, ptr }
%union.anon.0 = type { ptr }
%struct.__sigset_t = type { [16 x i64] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @sigchld_handler(i32 noundef) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.addrinfo, align 8
  %2 = alloca ptr, align 8
  %3 = alloca %struct.sockaddr_storage, align 8
  %4 = alloca i32, align 4
  %5 = alloca %struct.sigaction, align 8
  %6 = alloca i32, align 4
  %7 = alloca [46 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 152, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 46, ptr nonnull %7) #7
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %1, i8 0, i64 48, i1 false)
  store i32 1, ptr %8, align 8, !tbaa !9
  store i32 1, ptr %1, align 8, !tbaa !12
  %9 = call i32 @getaddrinfo(ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2) #7
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %.preheader, label %10

.preheader:                                       ; preds = %0
  %.01827 = load ptr, ptr %2, align 8, !tbaa !13
  %.not2228 = icmp eq ptr %.01827, null
  br i1 %.not2228, label %._crit_edge, label %.lr.ph

10:                                               ; preds = %0
  %11 = load ptr, ptr @stderr, align 8, !tbaa !13
  %12 = call ptr @gai_strerror(i32 noundef %9) #7
  %13 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.1, ptr noundef %12) #8
  call void @llvm.lifetime.end.p0(i64 46, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  ret i32 1

.lr.ph:                                           ; preds = %.preheader, %35
  %.01829 = phi ptr [ %.018, %35 ], [ %.01827, %.preheader ]
  %14 = getelementptr inbounds i8, ptr %.01829, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %.01829, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %.01829, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !15
  %20 = call i32 @socket(i32 noundef %15, i32 noundef %17, i32 noundef %19) #7
  %21 = icmp eq i32 %20, -1
  br i1 %21, label %35, label %22

22:                                               ; preds = %.lr.ph
  %23 = call i32 @setsockopt(i32 noundef %20, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %6, i32 noundef 4) #7
  %24 = icmp eq i32 %23, -1
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  call void @perror(ptr noundef nonnull @.str.3) #9
  call void @exit(i32 noundef 1) #10
  unreachable

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %.01829, i64 24
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %.01829, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !17
  %31 = call i32 @bind(i32 noundef %20, ptr noundef %28, i32 noundef %30) #7
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %33, label %40

33:                                               ; preds = %26
  %34 = call i32 @close(i32 noundef %20) #7
  br label %35

35:                                               ; preds = %.lr.ph, %33
  %.str.4.sink = phi ptr [ @.str.4, %33 ], [ @.str.2, %.lr.ph ]
  call void @perror(ptr noundef nonnull %.str.4.sink) #9
  %36 = getelementptr inbounds i8, ptr %.01829, i64 40
  %.018 = load ptr, ptr %36, align 8, !tbaa !13
  %.not22 = icmp eq ptr %.018, null
  br i1 %.not22, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !18

._crit_edge.loopexit:                             ; preds = %35
  %.pre = load ptr, ptr %2, align 8, !tbaa !13
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %37 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ null, %.preheader ]
  call void @freeaddrinfo(ptr noundef %37) #7
  %38 = load ptr, ptr @stderr, align 8, !tbaa !13
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.5) #8
  call void @exit(i32 noundef 1) #10
  unreachable

40:                                               ; preds = %26
  %41 = load ptr, ptr %2, align 8, !tbaa !13
  call void @freeaddrinfo(ptr noundef %41) #7
  %42 = call i32 @listen(i32 noundef %20, i32 noundef 10) #7
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %44, label %45

44:                                               ; preds = %40
  call void @perror(ptr noundef nonnull @.str.6) #9
  call void @exit(i32 noundef 1) #10
  unreachable

45:                                               ; preds = %40
  store ptr @sigchld_handler, ptr %5, align 8, !tbaa !20
  %46 = getelementptr inbounds i8, ptr %5, i64 8
  %47 = call i32 @sigemptyset(ptr noundef nonnull %46) #7
  %48 = getelementptr inbounds i8, ptr %5, i64 136
  store i32 268435456, ptr %48, align 8, !tbaa !21
  %49 = call i32 @sigaction(i32 noundef 17, ptr noundef nonnull %5, ptr noundef null) #7
  %50 = icmp eq i32 %49, -1
  br i1 %50, label %51, label %52

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

52:                                               ; preds = %45
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %52
  store i32 128, ptr %4, align 4, !tbaa !5
  %54 = call i32 @accept(i32 noundef %20, ptr noundef nonnull %3, ptr noundef nonnull %4) #7
  %55 = icmp eq i32 %54, -1
  br i1 %55, label %56, label %57

56:                                               ; preds = %.backedge
  call void @perror(ptr noundef nonnull @.str.9) #9
  br label %.backedge.backedge

.backedge.backedge:                               ; preds = %56, %71
  br label %.backedge

57:                                               ; preds = %.backedge
  %58 = load i16, ptr %3, align 8, !tbaa !24
  %59 = zext i16 %58 to i32
  %60 = call ptr @get_in_addr(ptr noundef nonnull %3)
  %61 = call ptr @inet_ntop(i32 noundef %59, ptr noundef %60, ptr noundef nonnull %7, i32 noundef 46) #7
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef nonnull %7)
  %63 = call i32 @fork() #7
  %.not23 = icmp eq i32 %63, 0
  br i1 %.not23, label %64, label %71

64:                                               ; preds = %57
  %65 = call i32 @close(i32 noundef %20) #7
  %66 = call i64 @send(i32 noundef %54, ptr noundef nonnull @.str.11, i64 noundef 13, i32 noundef 0) #7
  %67 = icmp eq i64 %66, -1
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  call void @perror(ptr noundef nonnull @.str.12) #9
  br label %69

69:                                               ; preds = %68, %64
  %70 = call i32 @close(i32 noundef %54) #7
  call void @exit(i32 noundef 0) #10
  unreachable

71:                                               ; preds = %57
  %72 = call i32 @close(i32 noundef %54) #7
  br label %.backedge.backedge
}

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

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

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

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

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

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

; Function Attrs: nounwind
declare i32 @setsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

declare i32 @close(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind
declare i32 @listen(i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @sigemptyset(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @sigaction(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

declare i32 @accept(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare i32 @fork() local_unnamed_addr #4

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { 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 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { cold }
attributes #10 = { 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, !6, i64 8}
!10 = !{!"addrinfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !6, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 4}
!15 = !{!10, !6, i64 12}
!16 = !{!10, !11, i64 24}
!17 = !{!10, !6, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !6, i64 136}
!22 = !{!"sigaction", !7, i64 0, !23, i64 8, !6, i64 136, !11, i64 144}
!23 = !{!"", !7, i64 0}
!24 = !{!25, !26, i64 0}
!25 = !{!"sockaddr_storage", !26, i64 0, !7, i64 2, !27, i64 120}
!26 = !{!"short", !7, i64 0}
!27 = !{!"long", !7, i64 0}


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