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

; 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 }
%union.__CONST_SOCKADDR_ARG = type { ptr }
%struct.ntttcp_stream_server = type { ptr, i32, i32, ptr, i32, i64, i8, i8, i8, i8, i8, i32, i32, %struct.fd_set, %struct.fd_set, i32, i64 }
%struct.fd_set = type { [16 x i64] }

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [36 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 willreturn memory(none)
declare ptr @__errno_location() #1

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

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

; Function Attrs: nounwind
declare i32 @asprintf(ptr noundef, ptr noundef, ...) #3

declare void @PRINT_ERR(ptr noundef) #4

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

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

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

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

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

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

declare i32 @close(i32 noundef) #4

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

declare ptr @retrive_ip_address_str(ptr noundef, ptr noundef, i64 noundef) #4

declare void @PRINT_DBG_FREE(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @ntttcp_server_listen(ptr noundef %0) #6 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %struct.addrinfo, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %union.__CONST_SOCKADDR_ARG, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 48, i1 false)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.addrinfo, ptr %11, i32 0, i32 1
  store i32 %30, ptr %31, align 4, !tbaa !16
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !18
  %35 = getelementptr inbounds %struct.addrinfo, ptr %11, i32 0, i32 2
  store i32 %34, ptr %35, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %36, i32 0, i32 4
  %38 = load i32, ptr %37, align 8, !tbaa !20
  %39 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %10, ptr noundef @.str.1, i32 noundef %38) #7
  store i32 %39, ptr %14, align 4, !tbaa !9
  %40 = load i32, ptr %14, align 4, !tbaa !9
  %41 = icmp slt i32 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %1
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %43

43:                                               ; preds = %42, %1
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = call i32 @getaddrinfo(ptr noundef %46, ptr noundef %47, ptr noundef %11, ptr noundef %12)
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %43
  call void @PRINT_ERR(ptr noundef @.str.3)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

51:                                               ; preds = %43
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %52) #7
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !11
  %56 = icmp eq i32 %55, 2
  %57 = zext i1 %56 to i64
  %58 = select i1 %56, i32 16, i32 46
  store i32 %58, ptr %9, align 4, !tbaa !9
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noalias ptr @malloc(i64 noundef %60) #8
  store ptr %61, ptr %8, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %65

63:                                               ; preds = %51
  call void @PRINT_ERR(ptr noundef @.str.4)
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %64) #7
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

65:                                               ; preds = %51
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %66, ptr %13, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %158, %65
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %162

70:                                               ; preds = %67
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.addrinfo, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !16
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.addrinfo, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 8, !tbaa !19
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.addrinfo, ptr %77, i32 0, i32 3
  %79 = load i32, ptr %78, align 4, !tbaa !22
  %80 = call i32 @socket(i32 noundef %73, i32 noundef %76, i32 noundef %79) #7
  store i32 %80, ptr %7, align 4, !tbaa !9
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %70
  call void @PRINT_ERR(ptr noundef @.str.16)
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %83) #7
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %84) #7
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

85:                                               ; preds = %70
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = call i32 @setsockopt(i32 noundef %86, i32 noundef 1, i32 noundef 2, ptr noundef %6, i32 noundef 4) #7
  %88 = icmp slt i32 %87, 0
  br i1 %88, label %89, label %101

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.17, i32 noundef %90) #7
  store i32 %91, ptr %16, align 4, !tbaa !9
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = icmp slt i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %89
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %95

95:                                               ; preds = %94, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_ERR_FREE(ptr noundef %96)
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %97) #7
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %98) #7
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = call i32 @close(i32 noundef %99)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

101:                                              ; preds = %85
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = call i32 @set_socket_non_blocking(i32 noundef %102)
  %104 = icmp eq i32 %103, -1
  br i1 %104, label %105, label %117

105:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.18, i32 noundef %106) #7
  store i32 %107, ptr %17, align 4, !tbaa !9
  %108 = load i32, ptr %17, align 4, !tbaa !9
  %109 = icmp slt i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %111

111:                                              ; preds = %110, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_ERR_FREE(ptr noundef %112)
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %113) #7
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %114) #7
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = call i32 @close(i32 noundef %115)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

117:                                              ; preds = %101
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.addrinfo, ptr %119, i32 0, i32 5
  %121 = load ptr, ptr %120, align 8, !tbaa !23
  store ptr %121, ptr %18, align 8, !tbaa !24
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.addrinfo, ptr %122, i32 0, i32 4
  %124 = load i32, ptr %123, align 8, !tbaa !25
  %125 = getelementptr inbounds %union.__CONST_SOCKADDR_ARG, ptr %18, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8
  %127 = call i32 @bind(i32 noundef %118, ptr %126, i32 noundef %124) #7
  store i32 %127, ptr %5, align 4, !tbaa !9
  %128 = icmp slt i32 %127, 0
  br i1 %128, label %129, label %157

129:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.addrinfo, ptr %130, i32 0, i32 5
  %132 = load ptr, ptr %131, align 8, !tbaa !23
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = call ptr @retrive_ip_address_str(ptr noundef %132, ptr noundef %133, i64 noundef %135)
  store ptr %136, ptr %8, align 8, !tbaa !5
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = load i32, ptr %5, align 4, !tbaa !9
  %139 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.19, ptr noundef %136, i32 noundef %137, i32 noundef %138) #7
  store i32 %139, ptr %19, align 4, !tbaa !9
  %140 = load i32, ptr %19, align 4, !tbaa !9
  %141 = icmp slt i32 %140, 0
  br i1 %141, label %142, label %143

142:                                              ; preds = %129
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %143

143:                                              ; preds = %142, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %144 = load i32, ptr %5, align 4, !tbaa !9
  %145 = icmp eq i32 %144, -1
  br i1 %145, label %146, label %155

146:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = call ptr @__errno_location() #9
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.20, ptr noundef %147, i32 noundef %149) #7
  store i32 %150, ptr %20, align 4, !tbaa !9
  %151 = load i32, ptr %20, align 4, !tbaa !9
  %152 = icmp slt i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %146
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %154

154:                                              ; preds = %153, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %155

155:                                              ; preds = %154, %143
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %156)
  br label %158

157:                                              ; preds = %117
  br label %162

158:                                              ; preds = %155
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.addrinfo, ptr %159, i32 0, i32 7
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  store ptr %161, ptr %13, align 8, !tbaa !5
  br label %67, !llvm.loop !27

162:                                              ; preds = %157, %67
  %163 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %163) #7
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %164) #7
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  %166 = icmp eq ptr %165, null
  br i1 %166, label %167, label %179

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %168, i32 0, i32 3
  %170 = load ptr, ptr %169, align 8, !tbaa !21
  %171 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.21, ptr noundef %170) #7
  store i32 %171, ptr %21, align 4, !tbaa !9
  %172 = load i32, ptr %21, align 4, !tbaa !9
  %173 = icmp slt i32 %172, 0
  br i1 %173, label %174, label %175

174:                                              ; preds = %167
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %175

175:                                              ; preds = %174, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_ERR_FREE(ptr noundef %176)
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = call i32 @close(i32 noundef %177)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

179:                                              ; preds = %162
  %180 = load i32, ptr %7, align 4, !tbaa !9
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %181, i32 0, i32 11
  store i32 %180, ptr %182, align 8, !tbaa !29
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %183, i32 0, i32 11
  %185 = load i32, ptr %184, align 8, !tbaa !29
  %186 = call i32 @listen(i32 noundef %185, i32 noundef 25600) #7
  %187 = icmp slt i32 %186, 0
  br i1 %187, label %188, label %205

188:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %189, i32 0, i32 3
  %191 = load ptr, ptr %190, align 8, !tbaa !21
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %192, i32 0, i32 4
  %194 = load i32, ptr %193, align 8, !tbaa !20
  %195 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.22, ptr noundef %191, i32 noundef %194) #7
  store i32 %195, ptr %22, align 4, !tbaa !9
  %196 = load i32, ptr %22, align 4, !tbaa !9
  %197 = icmp slt i32 %196, 0
  br i1 %197, label %198, label %199

198:                                              ; preds = %188
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %199

199:                                              ; preds = %198, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_ERR_FREE(ptr noundef %200)
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %201, i32 0, i32 11
  %203 = load i32, ptr %202, align 8, !tbaa !29
  %204 = call i32 @close(i32 noundef %203)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

205:                                              ; preds = %179
  br label %206

206:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %207, i32 0, i32 13
  store ptr %208, ptr %24, align 8, !tbaa !5
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %209

209:                                              ; preds = %219, %206
  %210 = load i32, ptr %23, align 4, !tbaa !9
  %211 = zext i32 %210 to i64
  %212 = icmp ult i64 %211, 16
  br i1 %212, label %213, label %222

213:                                              ; preds = %209
  %214 = load ptr, ptr %24, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.fd_set, ptr %214, i32 0, i32 0
  %216 = load i32, ptr %23, align 4, !tbaa !9
  %217 = zext i32 %216 to i64
  %218 = getelementptr inbounds [16 x i64], ptr %215, i64 0, i64 %217
  store i64 0, ptr %218, align 8, !tbaa !30
  br label %219

219:                                              ; preds = %213
  %220 = load i32, ptr %23, align 4, !tbaa !9
  %221 = add i32 %220, 1
  store i32 %221, ptr %23, align 4, !tbaa !9
  br label %209, !llvm.loop !31

222:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %223

223:                                              ; preds = %222
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %226, i32 0, i32 14
  store ptr %227, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %238, %225
  %229 = load i32, ptr %25, align 4, !tbaa !9
  %230 = zext i32 %229 to i64
  %231 = icmp ult i64 %230, 16
  br i1 %231, label %232, label %241

232:                                              ; preds = %228
  %233 = load ptr, ptr %26, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.fd_set, ptr %233, i32 0, i32 0
  %235 = load i32, ptr %25, align 4, !tbaa !9
  %236 = zext i32 %235 to i64
  %237 = getelementptr inbounds [16 x i64], ptr %234, i64 0, i64 %236
  store i64 0, ptr %237, align 8, !tbaa !30
  br label %238

238:                                              ; preds = %232
  %239 = load i32, ptr %25, align 4, !tbaa !9
  %240 = add i32 %239, 1
  store i32 %240, ptr %25, align 4, !tbaa !9
  br label %228, !llvm.loop !32

241:                                              ; preds = %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %242

242:                                              ; preds = %241
  br label %243

243:                                              ; preds = %242
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %244, i32 0, i32 11
  %246 = load i32, ptr %245, align 8, !tbaa !29
  %247 = srem i32 %246, 64
  %248 = zext i32 %247 to i64
  %249 = shl i64 1, %248
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %250, i32 0, i32 13
  %252 = getelementptr inbounds %struct.fd_set, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %253, i32 0, i32 11
  %255 = load i32, ptr %254, align 8, !tbaa !29
  %256 = sdiv i32 %255, 64
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [16 x i64], ptr %252, i64 0, i64 %257
  %259 = load i64, ptr %258, align 8, !tbaa !30
  %260 = or i64 %259, %249
  store i64 %260, ptr %258, align 8, !tbaa !30
  %261 = load ptr, ptr %3, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %261, i32 0, i32 11
  %263 = load i32, ptr %262, align 8, !tbaa !29
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %264, i32 0, i32 12
  %266 = load i32, ptr %265, align 4, !tbaa !33
  %267 = icmp sgt i32 %263, %266
  br i1 %267, label %268, label %274

268:                                              ; preds = %243
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %269, i32 0, i32 11
  %271 = load i32, ptr %270, align 8, !tbaa !29
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %272, i32 0, i32 12
  store i32 %271, ptr %273, align 4, !tbaa !33
  br label %274

274:                                              ; preds = %268, %243
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %275, i32 0, i32 3
  %277 = load ptr, ptr %276, align 8, !tbaa !21
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %278, i32 0, i32 4
  %280 = load i32, ptr %279, align 8, !tbaa !20
  %281 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %4, ptr noundef @.str.23, ptr noundef %277, i32 noundef %280) #7
  store i32 %281, ptr %27, align 4, !tbaa !9
  %282 = load i32, ptr %27, align 4, !tbaa !9
  %283 = icmp slt i32 %282, 0
  br i1 %283, label %284, label %285

284:                                              ; preds = %274
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %285

285:                                              ; preds = %284, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %286)
  %287 = load ptr, ptr %3, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %287, i32 0, i32 11
  %289 = load i32, ptr %288, align 8, !tbaa !29
  store i32 %289, ptr %2, align 4
  store i32 1, ptr %15, align 4
  br label %290

290:                                              ; preds = %285, %199, %175, %111, %95, %82, %63, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %291 = load i32, ptr %2, align 4
  ret i32 %291
}

declare void @PRINT_ERR_FREE(ptr noundef) #4

declare i32 @set_socket_non_blocking(i32 noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(none) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { "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 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind willreturn memory(none) }

!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 = !{!"ntttcp_stream_server", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !14, i64 41, !14, i64 42, !14, i64 43, !14, i64 44, !10, i64 48, !10, i64 52, !15, i64 56, !15, i64 184, !10, i64 312, !13, i64 320}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!"", !7, i64 0}
!16 = !{!17, !10, i64 4}
!17 = !{!"addrinfo", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!12, !10, i64 12}
!19 = !{!17, !10, i64 8}
!20 = !{!12, !10, i64 24}
!21 = !{!12, !6, i64 16}
!22 = !{!17, !10, i64 12}
!23 = !{!17, !6, i64 24}
!24 = !{!7, !7, i64 0}
!25 = !{!17, !10, i64 16}
!26 = !{!17, !6, i64 40}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!12, !10, i64 48}
!30 = !{!13, !13, i64 0}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = !{!12, !10, i64 52}


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

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [36 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: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #1

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

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

; Function Attrs: nounwind
declare i32 @asprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

declare void @PRINT_ERR(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; 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 void @freeaddrinfo(ptr noundef) local_unnamed_addr #3

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

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

declare i32 @close(i32 noundef) local_unnamed_addr #4

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

declare ptr @retrive_ip_address_str(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

declare void @PRINT_DBG_FREE(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local i32 @ntttcp_server_listen(ptr nocapture noundef %0) local_unnamed_addr #7 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %struct.addrinfo, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %5, i8 0, i64 48, i1 false)
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = getelementptr inbounds i8, ptr %5, i64 4
  %9 = load <2 x i32>, ptr %7, align 8, !tbaa !5
  store <2 x i32> %9, ptr %8, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.1, i32 noundef %11) #8
  %13 = icmp slt i32 %12, 0
  br i1 %13, label %14, label %15

14:                                               ; preds = %1
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %15

15:                                               ; preds = %14, %1
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = load ptr, ptr %4, align 8, !tbaa !16
  %19 = call i32 @getaddrinfo(ptr noundef %17, ptr noundef %18, ptr noundef nonnull %5, ptr noundef nonnull %6) #8
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %21, label %20

20:                                               ; preds = %15
  call void @PRINT_ERR(ptr noundef nonnull @.str.3) #8
  br label %134

21:                                               ; preds = %15
  %22 = load ptr, ptr %4, align 8, !tbaa !16
  call void @free(ptr noundef %22) #8
  %23 = load i32, ptr %7, align 8, !tbaa !17
  %24 = icmp eq i32 %23, 2
  %25 = select i1 %24, i64 16, i64 46
  %26 = call noalias ptr @malloc(i64 noundef %25) #9
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %.preheader

.preheader:                                       ; preds = %21
  %.07187 = load ptr, ptr %6, align 8, !tbaa !16
  %.not7888 = icmp eq ptr %.07187, null
  br i1 %.not7888, label %._crit_edge, label %.lr.ph

28:                                               ; preds = %21
  call void @PRINT_ERR(ptr noundef nonnull @.str.4) #8
  %29 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %29) #8
  br label %134

.lr.ph:                                           ; preds = %.preheader, %84
  %.07190 = phi ptr [ %.071, %84 ], [ %.07187, %.preheader ]
  %.07089 = phi ptr [ %71, %84 ], [ %26, %.preheader ]
  %30 = getelementptr inbounds i8, ptr %.07190, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %.07190, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %.07190, i64 12
  %35 = load i32, ptr %34, align 4, !tbaa !21
  %36 = call i32 @socket(i32 noundef %31, i32 noundef %33, i32 noundef %35) #8
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %.lr.ph
  call void @PRINT_ERR(ptr noundef nonnull @.str.16) #8
  %39 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %39) #8
  call void @free(ptr noundef %.07089) #8
  br label %134

40:                                               ; preds = %.lr.ph
  %41 = call i32 @setsockopt(i32 noundef %36, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %3, i32 noundef 4) #8
  %42 = icmp slt i32 %41, 0
  br i1 %42, label %43, label %51

43:                                               ; preds = %40
  %44 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.17, i32 noundef %36) #8
  %45 = icmp slt i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %47

47:                                               ; preds = %46, %43
  %48 = load ptr, ptr %2, align 8, !tbaa !16
  call void @PRINT_ERR_FREE(ptr noundef %48) #8
  %49 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %49) #8
  call void @free(ptr noundef %.07089) #8
  %50 = call i32 @close(i32 noundef %36) #8
  br label %134

51:                                               ; preds = %40
  %52 = call i32 @set_socket_non_blocking(i32 noundef %36) #8
  %53 = icmp eq i32 %52, -1
  br i1 %53, label %54, label %62

54:                                               ; preds = %51
  %55 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.18, i32 noundef %36) #8
  %56 = icmp slt i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %58

58:                                               ; preds = %57, %54
  %59 = load ptr, ptr %2, align 8, !tbaa !16
  call void @PRINT_ERR_FREE(ptr noundef %59) #8
  %60 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %60) #8
  call void @free(ptr noundef %.07089) #8
  %61 = call i32 @close(i32 noundef %36) #8
  br label %134

62:                                               ; preds = %51
  %63 = getelementptr inbounds i8, ptr %.07190, i64 24
  %64 = load ptr, ptr %63, align 8, !tbaa !22
  %65 = getelementptr inbounds i8, ptr %.07190, i64 16
  %66 = load i32, ptr %65, align 8, !tbaa !23
  %67 = call i32 @bind(i32 noundef %36, ptr %64, i32 noundef %66) #8
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %69, label %._crit_edge.loopexit

69:                                               ; preds = %62
  %70 = load ptr, ptr %63, align 8, !tbaa !22
  %71 = call ptr @retrive_ip_address_str(ptr noundef %70, ptr noundef %.07089, i64 noundef %25) #8
  %72 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.19, ptr noundef %71, i32 noundef %36, i32 noundef %67) #8
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %69
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %75

75:                                               ; preds = %74, %69
  %76 = icmp eq i32 %67, -1
  br i1 %76, label %77, label %84

77:                                               ; preds = %75
  %78 = load ptr, ptr %2, align 8, !tbaa !16
  %79 = tail call ptr @__errno_location() #10
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.20, ptr noundef %78, i32 noundef %80) #8
  %82 = icmp slt i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %77
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %84

84:                                               ; preds = %77, %83, %75
  %85 = load ptr, ptr %2, align 8, !tbaa !16
  call void @PRINT_DBG_FREE(ptr noundef %85) #8
  %86 = getelementptr inbounds i8, ptr %.07190, i64 40
  %.071 = load ptr, ptr %86, align 8, !tbaa !16
  %.not78 = icmp eq ptr %.071, null
  br i1 %.not78, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !24

._crit_edge.loopexit:                             ; preds = %62, %84
  %.070.lcssa.ph = phi ptr [ %71, %84 ], [ %.07089, %62 ]
  %.pre = load ptr, ptr %6, align 8, !tbaa !16
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %87 = phi ptr [ null, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %.070.lcssa = phi ptr [ %26, %.preheader ], [ %.070.lcssa.ph, %._crit_edge.loopexit ]
  %.not78.lcssa = phi i1 [ true, %.preheader ], [ %68, %._crit_edge.loopexit ]
  %.1 = phi i32 [ 0, %.preheader ], [ %36, %._crit_edge.loopexit ]
  call void @freeaddrinfo(ptr noundef %87) #8
  call void @free(ptr noundef %.070.lcssa) #8
  br i1 %.not78.lcssa, label %88, label %96

88:                                               ; preds = %._crit_edge
  %89 = load ptr, ptr %16, align 8, !tbaa !15
  %90 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.21, ptr noundef %89) #8
  %91 = icmp slt i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %88
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %93

93:                                               ; preds = %92, %88
  %94 = load ptr, ptr %2, align 8, !tbaa !16
  call void @PRINT_ERR_FREE(ptr noundef %94) #8
  %95 = call i32 @close(i32 noundef %.1) #8
  br label %134

96:                                               ; preds = %._crit_edge
  %97 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %.1, ptr %97, align 8, !tbaa !26
  %98 = call i32 @listen(i32 noundef %.1, i32 noundef 25600) #8
  %99 = icmp slt i32 %98, 0
  br i1 %99, label %100, label %110

100:                                              ; preds = %96
  %101 = load ptr, ptr %16, align 8, !tbaa !15
  %102 = load i32, ptr %10, align 8, !tbaa !9
  %103 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.22, ptr noundef %101, i32 noundef %102) #8
  %104 = icmp slt i32 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %100
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %106

106:                                              ; preds = %105, %100
  %107 = load ptr, ptr %2, align 8, !tbaa !16
  call void @PRINT_ERR_FREE(ptr noundef %107) #8
  %108 = load i32, ptr %97, align 8, !tbaa !26
  %109 = call i32 @close(i32 noundef %108) #8
  br label %134

110:                                              ; preds = %96
  %111 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(256) %111, i8 0, i64 256, i1 false)
  %112 = load i32, ptr %97, align 8, !tbaa !26
  %113 = srem i32 %112, 64
  %114 = zext nneg i32 %113 to i64
  %115 = shl nuw i64 1, %114
  %116 = sdiv i32 %112, 64
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [16 x i64], ptr %111, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !27
  %120 = or i64 %115, %119
  store i64 %120, ptr %118, align 8, !tbaa !27
  %121 = getelementptr inbounds i8, ptr %0, i64 52
  %122 = load i32, ptr %121, align 4, !tbaa !28
  %123 = icmp sgt i32 %112, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %110
  store i32 %112, ptr %121, align 4, !tbaa !28
  br label %125

125:                                              ; preds = %124, %110
  %126 = load ptr, ptr %16, align 8, !tbaa !15
  %127 = load i32, ptr %10, align 8, !tbaa !9
  %128 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.23, ptr noundef %126, i32 noundef %127) #8
  %129 = icmp slt i32 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %125
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #8
  br label %131

131:                                              ; preds = %130, %125
  %132 = load ptr, ptr %2, align 8, !tbaa !16
  call void @PRINT_DBG_FREE(ptr noundef %132) #8
  %133 = load i32, ptr %97, align 8, !tbaa !26
  br label %134

134:                                              ; preds = %131, %106, %93, %58, %47, %38, %28, %20
  %.0 = phi i32 [ -1, %20 ], [ -1, %28 ], [ -1, %38 ], [ -1, %47 ], [ -1, %58 ], [ -1, %93 ], [ -1, %106 ], [ %133, %131 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret i32 %.0
}

declare void @PRINT_ERR_FREE(ptr noundef) local_unnamed_addr #4

declare i32 @set_socket_non_blocking(i32 noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { "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 = { 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 #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 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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(none) }

!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 24}
!10 = !{!"ntttcp_stream_server", !11, i64 0, !6, i64 8, !6, i64 12, !11, i64 16, !6, i64 24, !12, i64 32, !13, i64 40, !13, i64 41, !13, i64 42, !13, i64 43, !13, i64 44, !6, i64 48, !6, i64 52, !14, i64 56, !14, i64 184, !6, i64 312, !12, i64 320}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"", !7, i64 0}
!15 = !{!10, !11, i64 16}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !6, i64 8}
!18 = !{!19, !6, i64 4}
!19 = !{!"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}
!20 = !{!19, !6, i64 8}
!21 = !{!19, !6, i64 12}
!22 = !{!19, !11, i64 24}
!23 = !{!19, !6, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!10, !6, i64 48}
!27 = !{!12, !12, i64 0}
!28 = !{!10, !6, i64 52}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass