; 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.epoll_event = type <{ i32, %union.epoll_data }>
%union.epoll_data = type { ptr }
%struct.sockaddr_storage = type { i16, [118 x i8], i64 }
%union.__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] }
%struct.ntttcp_test_endpoint = type { i32, ptr, i32, i32, %struct.timeval, %struct.timeval, i32, i32, i8, ptr, ptr, ptr, i8, ptr, i32, [8 x i32] }
%struct.timeval = type { i64, i64 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon }
%union.anon = type { [4 x i32] }

@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [40 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @n_recv(i32 noundef, ptr noundef, i64 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: nounwind willreturn memory(none)
declare ptr @__errno_location() #2

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

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

declare void @PRINT_ERR(ptr noundef) #4

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

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

declare void @PRINT_INFO_FREE(ptr noundef) #4

declare i32 @close(i32 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) #6

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

declare void @PRINT_DBG_FREE(ptr noundef) #4

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

declare void @PRINT_ERR_FREE(ptr noundef) #4

declare i32 @set_socket_non_blocking(i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @ntttcp_server_epoll(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.epoll_event, align 1
  %14 = alloca ptr, align 8
  %15 = alloca %struct.sockaddr_storage, align 8
  %16 = alloca %struct.sockaddr_storage, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %union.__SOCKADDR_ARG, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %union.__SOCKADDR_ARG, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 128, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %32, i32 0, i32 5
  %34 = load i64, ptr %33, align 8, !tbaa !11
  %35 = call noalias ptr @malloc(i64 noundef %34) #9
  store ptr %35, ptr %10, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %38

37:                                               ; preds = %1
  call void @PRINT_ERR(ptr noundef @.str.24)
  store i32 -1002, ptr %2, align 4
  store i32 1, ptr %23, align 4
  br label %340

38:                                               ; preds = %1
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !16
  %42 = icmp eq i32 %41, 2
  %43 = zext i1 %42 to i64
  %44 = select i1 %42, i32 16, i32 46
  store i32 %44, ptr %20, align 4, !tbaa !9
  %45 = load i32, ptr %20, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = call noalias ptr @malloc(i64 noundef %46) #9
  store ptr %47, ptr %19, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %51

49:                                               ; preds = %38
  call void @PRINT_ERR(ptr noundef @.str.25)
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %50) #8
  store i32 -1002, ptr %2, align 4
  store i32 1, ptr %23, align 4
  br label %340

51:                                               ; preds = %38
  %52 = call i32 @epoll_create1(i32 noundef 0) #8
  store i32 %52, ptr %6, align 4, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = icmp eq i32 %53, -1
  br i1 %54, label %55, label %58

55:                                               ; preds = %51
  call void @PRINT_ERR(ptr noundef @.str.26)
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %56) #8
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %57) #8
  store i32 -1107, ptr %2, align 4
  store i32 1, ptr %23, align 4
  br label %340

58:                                               ; preds = %51
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %59, i32 0, i32 11
  %61 = load i32, ptr %60, align 8, !tbaa !17
  %62 = getelementptr inbounds %struct.epoll_event, ptr %13, i32 0, i32 1
  store i32 %61, ptr %62, align 1, !tbaa !18
  %63 = getelementptr inbounds %struct.epoll_event, ptr %13, i32 0, i32 0
  store i32 1, ptr %63, align 1, !tbaa !19
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %65, i32 0, i32 11
  %67 = load i32, ptr %66, align 8, !tbaa !17
  %68 = call i32 @epoll_ctl(i32 noundef %64, i32 noundef 1, i32 noundef %67, ptr noundef %13) #8
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %75

70:                                               ; preds = %58
  call void @PRINT_ERR(ptr noundef @.str.27)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %71) #8
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %72) #8
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = call i32 @close(i32 noundef %73)
  store i32 -1107, ptr %2, align 4
  store i32 1, ptr %23, align 4
  br label %340

75:                                               ; preds = %58
  %76 = call noalias ptr @calloc(i64 noundef 512, i64 noundef 12) #10
  store ptr %76, ptr %14, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %328, %75
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = getelementptr inbounds %struct.ntttcp_test_endpoint, ptr %81, i32 0, i32 8
  %83 = load i8, ptr %82, align 8, !tbaa !22, !range !25, !noundef !26
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %93

85:                                               ; preds = %78
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = getelementptr inbounds %struct.ntttcp_test_endpoint, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !27
  %91 = icmp eq i32 %90, 13
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  br label %329

93:                                               ; preds = %85, %78
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = call i32 @epoll_wait(i32 noundef %94, ptr noundef %95, i32 noundef 512, i32 noundef -1)
  store i32 %96, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %325, %93
  %98 = load i32, ptr %21, align 4, !tbaa !9
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %328

101:                                              ; preds = %97
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = load i32, ptr %21, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %struct.epoll_event, ptr %102, i64 %104
  %106 = getelementptr inbounds %struct.epoll_event, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 1, !tbaa !18
  store i32 %107, ptr %9, align 4, !tbaa !9
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = load i32, ptr %21, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds %struct.epoll_event, ptr %108, i64 %110
  %112 = getelementptr inbounds %struct.epoll_event, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 1, !tbaa !19
  %114 = and i32 %113, 8
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %134, label %116

116:                                              ; preds = %101
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load i32, ptr %21, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds %struct.epoll_event, ptr %117, i64 %119
  %121 = getelementptr inbounds %struct.epoll_event, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 1, !tbaa !19
  %123 = and i32 %122, 16
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %134, label %125

125:                                              ; preds = %116
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = load i32, ptr %21, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds %struct.epoll_event, ptr %126, i64 %128
  %130 = getelementptr inbounds %struct.epoll_event, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 1, !tbaa !19
  %132 = and i32 %131, 1
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %137, label %134

134:                                              ; preds = %125, %116, %101
  call void @PRINT_ERR(ptr noundef @.str.28)
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = call i32 @close(i32 noundef %135)
  br label %325

137:                                              ; preds = %125
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %139, i32 0, i32 11
  %141 = load i32, ptr %140, align 8, !tbaa !17
  %142 = icmp eq i32 %138, %141
  br i1 %142, label %143, label %261

143:                                              ; preds = %137
  br label %144

144:                                              ; preds = %259, %143
  br label %145

145:                                              ; preds = %144
  store i32 128, ptr %17, align 4, !tbaa !9
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %146, i32 0, i32 11
  %148 = load i32, ptr %147, align 8, !tbaa !17
  store ptr %15, ptr %24, align 8, !tbaa !18
  %149 = getelementptr inbounds %union.__SOCKADDR_ARG, ptr %24, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8
  %151 = call i32 @accept(i32 noundef %148, ptr %150, ptr noundef %17)
  store i32 %151, ptr %8, align 4, !tbaa !9
  %152 = load i32, ptr %8, align 4, !tbaa !9
  %153 = icmp eq i32 %152, -1
  br i1 %153, label %154, label %172

154:                                              ; preds = %145
  %155 = call ptr @__errno_location() #11
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = icmp eq i32 %156, 11
  br i1 %157, label %162, label %158

158:                                              ; preds = %154
  %159 = call ptr @__errno_location() #11
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = icmp eq i32 %160, 11
  br i1 %161, label %162, label %163

162:                                              ; preds = %158, %154
  br label %260

163:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %164 = call ptr @__errno_location() #11
  %165 = load i32, ptr %164, align 4, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %5, ptr noundef @.str.29, i32 noundef %165) #8
  store i32 %166, ptr %25, align 4, !tbaa !9
  %167 = load i32, ptr %25, align 4, !tbaa !9
  %168 = icmp slt i32 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %163
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %170

170:                                              ; preds = %169, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PRINT_ERR_FREE(ptr noundef %171)
  br label %260

172:                                              ; preds = %145
  %173 = load i32, ptr %8, align 4, !tbaa !9
  %174 = call i32 @set_socket_non_blocking(i32 noundef %173)
  %175 = icmp eq i32 %174, -1
  br i1 %175, label %176, label %184

176:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %177 = load i32, ptr %8, align 4, !tbaa !9
  %178 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %5, ptr noundef @.str.30, i32 noundef %177) #8
  store i32 %178, ptr %26, align 4, !tbaa !9
  %179 = load i32, ptr %26, align 4, !tbaa !9
  %180 = icmp slt i32 %179, 0
  br i1 %180, label %181, label %182

181:                                              ; preds = %176
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %182

182:                                              ; preds = %181, %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %183)
  br label %184

184:                                              ; preds = %182, %172
  store i32 128, ptr %18, align 4, !tbaa !9
  %185 = load i32, ptr %8, align 4, !tbaa !9
  store ptr %16, ptr %27, align 8, !tbaa !18
  %186 = getelementptr inbounds %union.__SOCKADDR_ARG, ptr %27, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8
  %188 = call i32 @getsockname(i32 noundef %185, ptr %187, ptr noundef %18) #8
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %198

190:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %191 = load i32, ptr %8, align 4, !tbaa !9
  %192 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %5, ptr noundef @.str.31, i32 noundef %191) #8
  store i32 %192, ptr %28, align 4, !tbaa !9
  %193 = load i32, ptr %28, align 4, !tbaa !9
  %194 = icmp slt i32 %193, 0
  br i1 %194, label %195, label %196

195:                                              ; preds = %190
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %196

196:                                              ; preds = %195, %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %197)
  br label %244

198:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %199 = load ptr, ptr %19, align 8, !tbaa !5
  %200 = load i32, ptr %20, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = call ptr @retrive_ip_address_str(ptr noundef %15, ptr noundef %199, i64 noundef %201)
  store ptr %202, ptr %19, align 8, !tbaa !5
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %203, i32 0, i32 1
  %205 = load i32, ptr %204, align 8, !tbaa !16
  %206 = icmp eq i32 %205, 2
  br i1 %206, label %207, label %211

207:                                              ; preds = %198
  %208 = getelementptr inbounds %struct.sockaddr_in, ptr %15, i32 0, i32 1
  %209 = load i16, ptr %208, align 2, !tbaa !28
  %210 = zext i16 %209 to i32
  br label %215

211:                                              ; preds = %198
  %212 = getelementptr inbounds %struct.sockaddr_in6, ptr %15, i32 0, i32 1
  %213 = load i16, ptr %212, align 2, !tbaa !32
  %214 = zext i16 %213 to i32
  br label %215

215:                                              ; preds = %211, %207
  %216 = phi i32 [ %210, %207 ], [ %214, %211 ]
  %217 = trunc i32 %216 to i16
  %218 = call zeroext i16 @__bswap_16(i16 noundef zeroext %217)
  %219 = zext i16 %218 to i32
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %220, i32 0, i32 1
  %222 = load i32, ptr %221, align 8, !tbaa !16
  %223 = icmp eq i32 %222, 2
  br i1 %223, label %224, label %228

224:                                              ; preds = %215
  %225 = getelementptr inbounds %struct.sockaddr_in, ptr %16, i32 0, i32 1
  %226 = load i16, ptr %225, align 2, !tbaa !28
  %227 = zext i16 %226 to i32
  br label %232

228:                                              ; preds = %215
  %229 = getelementptr inbounds %struct.sockaddr_in6, ptr %16, i32 0, i32 1
  %230 = load i16, ptr %229, align 2, !tbaa !32
  %231 = zext i16 %230 to i32
  br label %232

232:                                              ; preds = %228, %224
  %233 = phi i32 [ %227, %224 ], [ %231, %228 ]
  %234 = trunc i32 %233 to i16
  %235 = call zeroext i16 @__bswap_16(i16 noundef zeroext %234)
  %236 = zext i16 %235 to i32
  %237 = load i32, ptr %8, align 4, !tbaa !9
  %238 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %5, ptr noundef @.str.32, ptr noundef %202, i32 noundef %219, i32 noundef %236, i32 noundef %237) #8
  store i32 %238, ptr %29, align 4, !tbaa !9
  %239 = load i32, ptr %29, align 4, !tbaa !9
  %240 = icmp slt i32 %239, 0
  br i1 %240, label %241, label %242

241:                                              ; preds = %232
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %242

242:                                              ; preds = %241, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %243)
  br label %244

244:                                              ; preds = %242, %196
  %245 = load i32, ptr %8, align 4, !tbaa !9
  %246 = getelementptr inbounds %struct.epoll_event, ptr %13, i32 0, i32 1
  store i32 %245, ptr %246, align 1, !tbaa !18
  %247 = getelementptr inbounds %struct.epoll_event, ptr %13, i32 0, i32 0
  store i32 1, ptr %247, align 1, !tbaa !19
  %248 = load i32, ptr %6, align 4, !tbaa !9
  %249 = load i32, ptr %8, align 4, !tbaa !9
  %250 = call i32 @epoll_ctl(i32 noundef %248, i32 noundef 1, i32 noundef %249, ptr noundef %13) #8
  %251 = icmp ne i32 %250, 0
  br i1 %251, label %252, label %253

252:                                              ; preds = %244
  call void @PRINT_ERR(ptr noundef @.str.27)
  br label %253

253:                                              ; preds = %252, %244
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %254, i32 0, i32 7
  %256 = load i8, ptr %255, align 1, !tbaa !35, !range !25, !noundef !26
  %257 = trunc i8 %256 to i1
  br i1 %257, label %258, label %259

258:                                              ; preds = %253
  call void @turn_on_light()
  br label %259

259:                                              ; preds = %258, %253
  br label %144

260:                                              ; preds = %170, %162
  br label %324

261:                                              ; preds = %137
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %262

262:                                              ; preds = %320, %261
  %263 = load i32, ptr %22, align 4, !tbaa !9
  %264 = icmp slt i32 %263, 32
  br i1 %264, label %265, label %323

265:                                              ; preds = %262
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %266, i32 0, i32 6
  %268 = load i8, ptr %267, align 8, !tbaa !36, !range !25, !noundef !26
  %269 = trunc i8 %268 to i1
  br i1 %269, label %270, label %271

270:                                              ; preds = %265
  br label %275

271:                                              ; preds = %265
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %272, i32 0, i32 5
  %274 = load i64, ptr %273, align 8, !tbaa !11
  br label %275

275:                                              ; preds = %271, %270
  %276 = phi i64 [ 1, %270 ], [ %274, %271 ]
  %277 = trunc i64 %276 to i32
  store i32 %277, ptr %12, align 4, !tbaa !9
  %278 = call ptr @__errno_location() #11
  store i32 0, ptr %278, align 4, !tbaa !9
  %279 = load i32, ptr %9, align 4, !tbaa !9
  %280 = load ptr, ptr %10, align 8, !tbaa !5
  %281 = load i32, ptr %12, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = call i32 @n_recv(i32 noundef %279, ptr noundef %280, i64 noundef %282)
  %284 = sext i32 %283 to i64
  store i64 %284, ptr %11, align 8, !tbaa !37
  %285 = load i64, ptr %11, align 8, !tbaa !37
  %286 = icmp ule i64 %285, 0
  br i1 %286, label %287, label %314

287:                                              ; preds = %275
  %288 = call ptr @__errno_location() #11
  %289 = load i32, ptr %288, align 4, !tbaa !9
  %290 = icmp ne i32 %289, 11
  br i1 %290, label %291, label %313

291:                                              ; preds = %287
  %292 = load i64, ptr %11, align 8, !tbaa !37
  %293 = icmp eq i64 %292, 0
  br i1 %293, label %294, label %302

294:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %295 = load i32, ptr %21, align 4, !tbaa !9
  %296 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %5, ptr noundef @.str.33, i32 noundef %295) #8
  store i32 %296, ptr %30, align 4, !tbaa !9
  %297 = load i32, ptr %30, align 4, !tbaa !9
  %298 = icmp slt i32 %297, 0
  br i1 %298, label %299, label %300

299:                                              ; preds = %294
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %300

300:                                              ; preds = %299, %294
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  %301 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %301)
  br label %310

302:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %303 = load i32, ptr %21, align 4, !tbaa !9
  %304 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %5, ptr noundef @.str.34, i32 noundef %303) #8
  store i32 %304, ptr %31, align 4, !tbaa !9
  %305 = load i32, ptr %31, align 4, !tbaa !9
  %306 = icmp slt i32 %305, 0
  br i1 %306, label %307, label %308

307:                                              ; preds = %302
  call void @PRINT_ERR(ptr noundef @.str.2)
  br label %308

308:                                              ; preds = %307, %302
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  %309 = load ptr, ptr %5, align 8, !tbaa !5
  call void @PRINT_INFO_FREE(ptr noundef %309)
  store i32 -1108, ptr %4, align 4, !tbaa !9
  br label %310

310:                                              ; preds = %308, %300
  %311 = load i32, ptr %9, align 4, !tbaa !9
  %312 = call i32 @close(i32 noundef %311)
  br label %313

313:                                              ; preds = %310, %287
  br label %323

314:                                              ; preds = %275
  %315 = load ptr, ptr %3, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %315, i32 0, i32 16
  %317 = load i64, ptr %11, align 8, !tbaa !37
  %318 = atomicrmw add ptr %316, i64 %317 seq_cst, align 8
  br label %319

319:                                              ; preds = %314
  br label %320

320:                                              ; preds = %319
  %321 = load i32, ptr %22, align 4, !tbaa !9
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %22, align 4, !tbaa !9
  br label %262, !llvm.loop !38

323:                                              ; preds = %313, %262
  br label %324

324:                                              ; preds = %323, %260
  br label %325

325:                                              ; preds = %324, %134
  %326 = load i32, ptr %21, align 4, !tbaa !9
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %21, align 4, !tbaa !9
  br label %97, !llvm.loop !40

328:                                              ; preds = %97
  br label %77

329:                                              ; preds = %92
  %330 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %330) #8
  %331 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %331) #8
  %332 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %332) #8
  %333 = load i32, ptr %6, align 4, !tbaa !9
  %334 = call i32 @close(i32 noundef %333)
  %335 = load ptr, ptr %3, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.ntttcp_stream_server, ptr %335, i32 0, i32 11
  %337 = load i32, ptr %336, align 8, !tbaa !17
  %338 = call i32 @close(i32 noundef %337)
  %339 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %339, ptr %2, align 4
  store i32 1, ptr %23, align 4
  br label %340

340:                                              ; preds = %329, %70, %55, %49, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  %341 = load i32, ptr %2, align 4
  ret i32 %341
}

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #7

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

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

declare void @turn_on_light() #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { inlinehint 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 allocsize(0,1) "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 allocsize(0,1) }
attributes #11 = { 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, !13, i64 32}
!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 = !{!12, !10, i64 8}
!17 = !{!12, !10, i64 48}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !10, i64 0}
!20 = !{!"epoll_event", !10, i64 0, !7, i64 4}
!21 = !{!12, !6, i64 0}
!22 = !{!23, !14, i64 64}
!23 = !{!"ntttcp_test_endpoint", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !24, i64 24, !24, i64 40, !10, i64 56, !10, i64 60, !14, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !14, i64 96, !6, i64 104, !10, i64 112, !7, i64 116}
!24 = !{!"timeval", !13, i64 0, !13, i64 8}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!23, !10, i64 16}
!28 = !{!29, !30, i64 2}
!29 = !{!"sockaddr_in", !30, i64 0, !30, i64 2, !31, i64 4, !7, i64 8}
!30 = !{!"short", !7, i64 0}
!31 = !{!"in_addr", !10, i64 0}
!32 = !{!33, !30, i64 2}
!33 = !{!"sockaddr_in6", !30, i64 0, !30, i64 2, !10, i64 4, !34, i64 8, !10, i64 24}
!34 = !{!"in6_addr", !7, i64 0}
!35 = !{!12, !14, i64 41}
!36 = !{!12, !14, i64 40}
!37 = !{!13, !13, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}


; 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.epoll_event = type <{ i32, %union.epoll_data }>
%union.epoll_data = type { ptr }
%struct.sockaddr_storage = type { i16, [118 x i8], i64 }

@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @n_recv(i32 noundef, ptr noundef, i64 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 nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #2

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

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

declare void @PRINT_ERR(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

declare i32 @close(i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) local_unnamed_addr #7

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
declare i32 @getsockname(i32 noundef, ptr, ptr noundef) local_unnamed_addr #3

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 uwtable
define dso_local range(i32 -1107, 1) i32 @ntttcp_server_epoll(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.epoll_event, align 4
  %4 = alloca %struct.sockaddr_storage, align 8
  %5 = alloca %struct.sockaddr_storage, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = tail call noalias ptr @malloc(i64 noundef %9) #10
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  tail call void @PRINT_ERR(ptr noundef nonnull @.str.24) #9
  br label %135

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !15
  %16 = icmp eq i32 %15, 2
  %17 = select i1 %16, i64 16, i64 46
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #10
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %13
  tail call void @PRINT_ERR(ptr noundef nonnull @.str.25) #9
  tail call void @free(ptr noundef nonnull %10) #9
  br label %135

21:                                               ; preds = %13
  %22 = tail call i32 @epoll_create1(i32 noundef 0) #9
  %23 = icmp eq i32 %22, -1
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  tail call void @PRINT_ERR(ptr noundef nonnull @.str.26) #9
  tail call void @free(ptr noundef nonnull %10) #9
  tail call void @free(ptr noundef nonnull %18) #9
  br label %135

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %0, i64 48
  %27 = load i32, ptr %26, align 8, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %27, ptr %28, align 4, !tbaa !17
  store i32 1, ptr %3, align 4, !tbaa !18
  %29 = call i32 @epoll_ctl(i32 noundef %22, i32 noundef 1, i32 noundef %27, ptr noundef nonnull %3) #9
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %32, label %30

30:                                               ; preds = %25
  call void @PRINT_ERR(ptr noundef nonnull @.str.27) #9
  call void @free(ptr noundef nonnull %10) #9
  call void @free(ptr noundef nonnull %18) #9
  %31 = call i32 @close(i32 noundef %22) #9
  br label %135

32:                                               ; preds = %25
  %33 = call noalias dereferenceable_or_null(6144) ptr @calloc(i64 noundef 512, i64 noundef 12) #11
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = getelementptr inbounds i8, ptr %0, i64 320
  %36 = getelementptr inbounds i8, ptr %4, i64 2
  %37 = getelementptr inbounds i8, ptr %5, i64 2
  %38 = getelementptr inbounds i8, ptr %0, i64 41
  br label %.loopexit96.outer

.loopexit96.outer:                                ; preds = %.loopexit, %32
  %.074.ph = phi ptr [ %18, %32 ], [ %.4, %.loopexit ]
  br label %.loopexit96

.loopexit96:                                      ; preds = %.loopexit96.outer, %47
  %39 = load ptr, ptr %0, align 8, !tbaa !20
  %40 = getelementptr inbounds i8, ptr %39, i64 64
  %41 = load i8, ptr %40, align 8, !tbaa !21, !range !24, !noundef !25
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %43, label %47

43:                                               ; preds = %.loopexit96
  %44 = getelementptr inbounds i8, ptr %39, i64 16
  %45 = load i32, ptr %44, align 8, !tbaa !26
  %46 = icmp eq i32 %45, 13
  br i1 %46, label %131, label %47

47:                                               ; preds = %43, %.loopexit96
  %48 = call i32 @epoll_wait(i32 noundef %22, ptr noundef %33, i32 noundef 512, i32 noundef -1) #9
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph102.preheader, label %.loopexit96

.lr.ph102.preheader:                              ; preds = %47
  %wide.trip.count = zext nneg i32 %48 to i64
  br label %.lr.ph102

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %.loopexit
  %indvars.iv = phi i64 [ 0, %.lr.ph102.preheader ], [ %indvars.iv.next, %.loopexit ]
  %.175100 = phi ptr [ %.074.ph, %.lr.ph102.preheader ], [ %.4, %.loopexit ]
  %50 = getelementptr inbounds %struct.epoll_event, ptr %33, i64 %indvars.iv
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load i32, ptr %51, align 1, !tbaa !17
  %53 = load i32, ptr %50, align 1, !tbaa !18
  %54 = and i32 %53, 25
  %or.cond94.not = icmp eq i32 %54, 1
  br i1 %or.cond94.not, label %57, label %55

55:                                               ; preds = %.lr.ph102
  call void @PRINT_ERR(ptr noundef nonnull @.str.28) #9
  %56 = call i32 @close(i32 noundef %52) #9
  br label %.loopexit

57:                                               ; preds = %.lr.ph102
  %58 = load i32, ptr %26, align 8, !tbaa !16
  %59 = icmp eq i32 %52, %58
  br i1 %59, label %.preheader, label %.preheader95

.preheader95:                                     ; preds = %57
  %60 = tail call ptr @__errno_location() #12
  br label %107

.preheader:                                       ; preds = %57
  store i32 128, ptr %6, align 4, !tbaa !27
  %61 = call i32 @accept(i32 noundef %52, ptr nonnull %4, ptr noundef nonnull %6) #9
  %62 = icmp eq i32 %61, -1
  br i1 %62, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %103, %.preheader
  %.276.lcssa = phi ptr [ %.175100, %.preheader ], [ %.377, %103 ]
  %63 = tail call ptr @__errno_location() #12
  %64 = load i32, ptr %63, align 4, !tbaa !27
  %65 = icmp eq i32 %64, 11
  br i1 %65, label %.loopexit, label %66

66:                                               ; preds = %._crit_edge
  %67 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.29, i32 noundef %64) #9
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #9
  br label %70

70:                                               ; preds = %69, %66
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  call void @PRINT_ERR_FREE(ptr noundef %71) #9
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %103
  %72 = phi i32 [ %105, %103 ], [ %61, %.preheader ]
  %.27698 = phi ptr [ %.377, %103 ], [ %.175100, %.preheader ]
  %73 = call i32 @set_socket_non_blocking(i32 noundef %72) #9
  %74 = icmp eq i32 %73, -1
  br i1 %74, label %75, label %81

75:                                               ; preds = %.lr.ph
  %76 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.30, i32 noundef %72) #9
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %75
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #9
  br label %79

79:                                               ; preds = %78, %75
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %80) #9
  br label %81

81:                                               ; preds = %79, %.lr.ph
  store i32 128, ptr %7, align 4, !tbaa !27
  %82 = call i32 @getsockname(i32 noundef %72, ptr nonnull %5, ptr noundef nonnull %7) #9
  %.not92 = icmp eq i32 %82, 0
  br i1 %.not92, label %86, label %83

83:                                               ; preds = %81
  %84 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.31, i32 noundef %72) #9
  %85 = icmp slt i32 %84, 0
  br i1 %85, label %.sink.split, label %96

86:                                               ; preds = %81
  %87 = call ptr @retrive_ip_address_str(ptr noundef nonnull %4, ptr noundef %.27698, i64 noundef %17) #9
  %88 = load i16, ptr %36, align 2
  %89 = call zeroext i16 @__bswap_16(i16 noundef zeroext %88)
  %90 = zext i16 %89 to i32
  %91 = load i16, ptr %37, align 2
  %92 = call zeroext i16 @__bswap_16(i16 noundef zeroext %91)
  %93 = zext i16 %92 to i32
  %94 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.32, ptr noundef %87, i32 noundef %90, i32 noundef %93, i32 noundef %72) #9
  %95 = icmp slt i32 %94, 0
  br i1 %95, label %.sink.split, label %96

.sink.split:                                      ; preds = %86, %83
  %.377.ph = phi ptr [ %.27698, %83 ], [ %87, %86 ]
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #9
  br label %96

96:                                               ; preds = %.sink.split, %86, %83
  %.377 = phi ptr [ %.27698, %83 ], [ %87, %86 ], [ %.377.ph, %.sink.split ]
  %.sink = load ptr, ptr %2, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %.sink) #9
  store i32 %72, ptr %28, align 4, !tbaa !17
  store i32 1, ptr %3, align 4, !tbaa !18
  %97 = call i32 @epoll_ctl(i32 noundef %22, i32 noundef 1, i32 noundef %72, ptr noundef nonnull %3) #9
  %.not93 = icmp eq i32 %97, 0
  br i1 %.not93, label %99, label %98

98:                                               ; preds = %96
  call void @PRINT_ERR(ptr noundef nonnull @.str.27) #9
  br label %99

99:                                               ; preds = %98, %96
  %100 = load i8, ptr %38, align 1, !tbaa !28, !range !24, !noundef !25
  %101 = trunc nuw i8 %100 to i1
  br i1 %101, label %102, label %103

102:                                              ; preds = %99
  call void @turn_on_light() #9
  br label %103

103:                                              ; preds = %102, %99
  store i32 128, ptr %6, align 4, !tbaa !27
  %104 = load i32, ptr %26, align 8, !tbaa !16
  %105 = call i32 @accept(i32 noundef %104, ptr nonnull %4, ptr noundef nonnull %6) #9
  %106 = icmp eq i32 %105, -1
  br i1 %106, label %._crit_edge, label %.lr.ph

107:                                              ; preds = %.preheader95, %127
  %.07897 = phi i32 [ 0, %.preheader95 ], [ %130, %127 ]
  %108 = load i8, ptr %34, align 8, !tbaa !29, !range !24, !noundef !25
  %109 = trunc nuw i8 %108 to i1
  br i1 %109, label %112, label %110

110:                                              ; preds = %107
  %111 = load i64, ptr %8, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %107, %110
  %113 = phi i64 [ %111, %110 ], [ 1, %107 ]
  store i32 0, ptr %60, align 4, !tbaa !27
  %sext = shl i64 %113, 32
  %114 = ashr exact i64 %sext, 32
  %115 = call i32 @n_recv(i32 noundef %52, ptr noundef nonnull %10, i64 noundef %114)
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %127

117:                                              ; preds = %112
  %118 = load i32, ptr %60, align 4, !tbaa !27
  %.not91 = icmp eq i32 %118, 11
  br i1 %.not91, label %.loopexit, label %119

119:                                              ; preds = %117
  %120 = trunc nuw nsw i64 %indvars.iv to i32
  %121 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %2, ptr noundef nonnull @.str.33, i32 noundef %120) #9
  %122 = icmp slt i32 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %119
  call void @PRINT_ERR(ptr noundef nonnull @.str.2) #9
  br label %124

124:                                              ; preds = %123, %119
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  call void @PRINT_DBG_FREE(ptr noundef %125) #9
  %126 = call i32 @close(i32 noundef %52) #9
  br label %.loopexit

127:                                              ; preds = %112
  %128 = sext i32 %115 to i64
  %129 = atomicrmw add ptr %35, i64 %128 seq_cst, align 8
  %130 = add nuw nsw i32 %.07897, 1
  %exitcond.not = icmp eq i32 %130, 32
  br i1 %exitcond.not, label %.loopexit, label %107, !llvm.loop !30

.loopexit:                                        ; preds = %127, %._crit_edge, %70, %117, %124, %55
  %.4 = phi ptr [ %.175100, %55 ], [ %.276.lcssa, %._crit_edge ], [ %.276.lcssa, %70 ], [ %.175100, %124 ], [ %.175100, %117 ], [ %.175100, %127 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond105.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond105.not, label %.loopexit96.outer, label %.lr.ph102, !llvm.loop !32

131:                                              ; preds = %43
  call void @free(ptr noundef %10) #9
  call void @free(ptr noundef %.074.ph) #9
  call void @free(ptr noundef %33) #9
  %132 = call i32 @close(i32 noundef %22) #9
  %133 = load i32, ptr %26, align 8, !tbaa !16
  %134 = call i32 @close(i32 noundef %133) #9
  br label %135

135:                                              ; preds = %131, %30, %24, %20, %12
  %.0 = phi i32 [ -1002, %12 ], [ -1002, %20 ], [ -1107, %24 ], [ -1107, %30 ], [ 0, %131 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret i32 %.0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #8

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

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

declare void @turn_on_light() local_unnamed_addr #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 = { 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 #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 = { inlinehint 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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind allocsize(0,1) }
attributes #12 = { 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, !12, i64 32}
!10 = !{!"ntttcp_stream_server", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !13, i64 41, !13, i64 42, !13, i64 43, !13, i64 44, !11, i64 48, !11, i64 52, !14, i64 56, !14, i64 184, !11, i64 312, !12, i64 320}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"", !7, i64 0}
!15 = !{!10, !11, i64 8}
!16 = !{!10, !11, i64 48}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"epoll_event", !11, i64 0, !7, i64 4}
!20 = !{!10, !6, i64 0}
!21 = !{!22, !13, i64 64}
!22 = !{!"ntttcp_test_endpoint", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !23, i64 24, !23, i64 40, !11, i64 56, !11, i64 60, !13, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !13, i64 96, !6, i64 104, !11, i64 112, !7, i64 116}
!23 = !{!"timeval", !12, i64 0, !12, i64 8}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!22, !11, i64 16}
!27 = !{!11, !11, i64 0}
!28 = !{!10, !13, i64 41}
!29 = !{!10, !13, i64 40}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


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