; LLVM IR from jingweizhanghuai/Morn :: src/wrap (morn_socket)

; 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.HandleTCPServer = type { i32, i32, i32, i32, [32 x i8], ptr, ptr }
%struct.MList = type { i32, ptr }
%struct.ClientInfo = type { i32, i32, i32, i32, [32 x i8], ptr }

@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.m_TCPServerRead = external hidden unnamed_addr constant [16 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @IPAddress(ptr noundef, ptr noundef, ptr 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: nounwind uwtable
define dso_local ptr @m_TCPServerRead(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  %21 = zext i1 %20 to i32
  store i32 %21, ptr %8, align 4, !tbaa !9
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %18
  %25 = load i32, ptr %8, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %25, i32 noundef -1, ptr noundef @.str.2, i32 noundef 595, ptr noundef @__FUNCTION__.m_TCPServerRead, ptr noundef @.str.19)
  br label %26

26:                                               ; preds = %24, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %27

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 2147483647, ptr %9, align 4, !tbaa !9
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  store ptr %9, ptr %7, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %30, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %36

34:                                               ; preds = %31
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  call void @IPAddress(ptr noundef %35, ptr noundef %10, ptr noundef %11)
  br label %36

36:                                               ; preds = %34, %31
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = icmp eq i32 %38, 0
  %40 = zext i1 %39 to i32
  store i32 %40, ptr %12, align 4, !tbaa !9
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %37
  %44 = load i32, ptr %12, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %44, i32 noundef -1, ptr noundef @.str.2, i32 noundef 600, ptr noundef @__FUNCTION__.m_TCPServerRead, ptr noundef @.str.23)
  br label %45

45:                                               ; preds = %43, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = call ptr @TCPServerInit(i32 noundef %48)
  store ptr %49, ptr %13, align 8, !tbaa !5
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.HandleTCPServer, ptr %51, i32 0, i32 2
  store i32 %50, ptr %52, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.HandleTCPServer, ptr %53, i32 0, i32 5
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  store ptr %55, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %125, %47
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.MList, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !14
  %61 = icmp slt i32 %57, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %56
  store i32 6, ptr %16, align 4
  br label %128

63:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.MList, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = load i32, ptr %15, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  store ptr %70, ptr %17, align 8, !tbaa !5
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ClientInfo, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !17
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = icmp eq i32 %73, %74
  br i1 %75, label %79, label %76

76:                                               ; preds = %63
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %121

79:                                               ; preds = %76, %63
  %80 = load ptr, ptr %17, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ClientInfo, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 8, !tbaa !19
  %83 = icmp eq i32 %82, 1
  br i1 %83, label %84, label %113

84:                                               ; preds = %79
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ClientInfo, ptr %85, i32 0, i32 2
  store i32 0, ptr %86, align 8, !tbaa !19
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ClientInfo, ptr %89, i32 0, i32 3
  %91 = load i32, ptr %90, align 4, !tbaa !20
  %92 = icmp slt i32 %88, %91
  br i1 %92, label %93, label %96

93:                                               ; preds = %84
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !9
  br label %100

96:                                               ; preds = %84
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ClientInfo, ptr %97, i32 0, i32 3
  %99 = load i32, ptr %98, align 4, !tbaa !20
  br label %100

100:                                              ; preds = %96, %93
  %101 = phi i32 [ %95, %93 ], [ %99, %96 ]
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %101, ptr %102, align 4, !tbaa !9
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ClientInfo, ptr %104, i32 0, i32 5
  %106 = load ptr, ptr %105, align 8, !tbaa !21
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %103, ptr align 1 %106, i64 %109, i1 false)
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ClientInfo, ptr %110, i32 0, i32 4
  %112 = getelementptr inbounds [32 x i8], ptr %111, i64 0, i64 0
  store ptr %112, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %122

113:                                              ; preds = %79
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ClientInfo, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 4, !tbaa !17
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = icmp eq i32 %116, %117
  br i1 %118, label %119, label %120

119:                                              ; preds = %113
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %122

120:                                              ; preds = %113
  br label %121

121:                                              ; preds = %120, %76
  store i32 0, ptr %16, align 4
  br label %122

122:                                              ; preds = %121, %119, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %123 = load i32, ptr %16, align 4
  switch i32 %123, label %128 [
    i32 0, label %124
  ]

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %15, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %15, align 4, !tbaa !9
  br label %56, !llvm.loop !22

128:                                              ; preds = %122, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %129 = load i32, ptr %16, align 4
  switch i32 %129, label %131 [
    i32 6, label %130
  ]

130:                                              ; preds = %128
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %131

131:                                              ; preds = %130, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %132 = load ptr, ptr %4, align 8
  ret ptr %132
}

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"HandleTCPServer", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !6, i64 48, !6, i64 56}
!13 = !{!12, !6, i64 48}
!14 = !{!15, !10, i64 0}
!15 = !{!"MList", !10, i64 0, !6, i64 8}
!16 = !{!15, !6, i64 8}
!17 = !{!18, !10, i64 4}
!18 = !{!"ClientInfo", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !6, i64 48}
!19 = !{!18, !10, i64 8}
!20 = !{!18, !10, i64 12}
!21 = !{!18, !6, i64 48}
!22 = distinct !{!22, !23}
!23 = !{!"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"

@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.m_TCPServerRead = external hidden unnamed_addr constant [16 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @IPAddress(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: nounwind uwtable
define dso_local ptr @m_TCPServerRead(ptr noundef %0, ptr noundef writeonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = icmp eq ptr %1, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %3
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.2, i32 noundef 595, ptr noundef nonnull @__FUNCTION__.m_TCPServerRead, ptr noundef nonnull @.str.19) #5
  br label %8

8:                                                ; preds = %7, %3
  %9 = icmp eq ptr %2, null
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %.thread, label %10

10:                                               ; preds = %8
  call void @IPAddress(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %.pr = load i32, ptr %5, align 4, !tbaa !5
  %11 = icmp eq i32 %.pr, 0
  br i1 %11, label %.thread, label %12

.thread:                                          ; preds = %8, %10
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.2, i32 noundef 600, ptr noundef nonnull @__FUNCTION__.m_TCPServerRead, ptr noundef nonnull @.str.23) #5
  %.pre = load i32, ptr %5, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %.thread, %10
  %13 = phi i32 [ %.pre, %.thread ], [ %.pr, %10 ]
  %14 = call ptr @TCPServerInit(i32 noundef %13)
  %15 = load i32, ptr %4, align 4
  %.fr59 = freeze i32 %15
  %16 = getelementptr inbounds i8, ptr %14, i64 8
  store i32 %.fr59, ptr %16, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %14, i64 48
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %.not3853 = icmp sgt i32 %19, 0
  br i1 %.not3853, label %.lr.ph, label %.thread47

.lr.ph:                                           ; preds = %12
  %20 = getelementptr inbounds i8, ptr %18, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = icmp eq i32 %.fr59, 0
  br i1 %22, label %.lr.ph.split.us.preheader, label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %23 = zext nneg i32 %19 to i64
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %29
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %indvars.iv.next, %29 ]
  %24 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !17
  %28 = icmp eq i32 %27, 1
  br i1 %28, label %.split.us, label %29

29:                                               ; preds = %.lr.ph.split.us
  %30 = getelementptr inbounds i8, ptr %25, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !19
  %32 = icmp ne i32 %31, 0
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not38.us = icmp ult i64 %indvars.iv.next, %23
  %or.cond = select i1 %32, i1 %.not38.us, i1 false
  br i1 %or.cond, label %.lr.ph.split.us, label %.thread47, !llvm.loop !20

.lr.ph.split:                                     ; preds = %.lr.ph, %51
  %.03454 = phi i32 [ %.old, %51 ], [ 0, %.lr.ph ]
  %33 = zext nneg i32 %.03454 to i64
  %34 = getelementptr inbounds ptr, ptr %21, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !19
  %.not66 = icmp eq i32 %37, %.fr59
  br i1 %.not66, label %38, label %51

38:                                               ; preds = %.lr.ph.split
  %39 = getelementptr inbounds i8, ptr %35, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !17
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %.split.us, label %.thread47

.split.us:                                        ; preds = %.lr.ph.split.us, %38
  %.us-phi = phi ptr [ %35, %38 ], [ %25, %.lr.ph.split.us ]
  %42 = getelementptr inbounds i8, ptr %.us-phi, i64 8
  store i32 0, ptr %42, align 8, !tbaa !17
  br i1 %9, label %.then, label %.else

.then:                                            ; preds = %.split.us
  %43 = getelementptr inbounds i8, ptr %.us-phi, i64 12
  %44 = load i32, ptr %43, align 4, !tbaa !22
  br label %.cont

.else:                                            ; preds = %.split.us
  %.else.val = load i32, ptr %2, align 4, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %.us-phi, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %. = call i32 @llvm.smin.i32(i32 %.else.val, i32 %46)
  store i32 %., ptr %2, align 4, !tbaa !5
  br label %.cont

.cont:                                            ; preds = %.else, %.then
  %.45 = phi i32 [ %44, %.then ], [ %., %.else ]
  %47 = getelementptr inbounds i8, ptr %.us-phi, i64 48
  %48 = load ptr, ptr %47, align 8, !tbaa !23
  %49 = sext i32 %.45 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1, ptr align 1 %48, i64 %49, i1 false)
  %50 = getelementptr inbounds i8, ptr %.us-phi, i64 16
  br label %.thread47

51:                                               ; preds = %.lr.ph.split
  %.old = add nuw nsw i32 %.03454, 1
  %.not38.old = icmp slt i32 %.old, %19
  br i1 %.not38.old, label %.lr.ph.split, label %.thread47, !llvm.loop !20

.thread47:                                        ; preds = %51, %29, %38, %12, %.cont
  %spec.select = phi ptr [ %50, %.cont ], [ null, %12 ], [ null, %38 ], [ null, %29 ], [ null, %51 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  ret ptr %spec.select
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"HandleTCPServer", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !7, i64 16, !11, i64 48, !11, i64 56}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 48}
!13 = !{!14, !6, i64 0}
!14 = !{!"MList", !6, i64 0, !11, i64 8}
!15 = !{!14, !11, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"ClientInfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !7, i64 16, !11, i64 48}
!19 = !{!18, !6, i64 4}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!18, !6, i64 12}
!23 = !{!18, !11, i64 48}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass