; LLVM IR from rigtorp/ipc-bench :: src (udp_lat)

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %struct.timespec, align 8
  %12 = alloca %struct.timespec, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.addrinfo, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = icmp ne i32 %22, 3
  br i1 %23, label %24, label %26

24:                                               ; preds = %2
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

26:                                               ; preds = %2
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 1
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call i32 @atoi(ptr noundef %29) #8
  store i32 %30, ptr %6, align 4, !tbaa !5
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 2
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = call i64 @atol(ptr noundef %33) #8
  store i64 %34, ptr %8, align 8, !tbaa !11
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = call noalias ptr @malloc(i64 noundef %36) #9
  store ptr %37, ptr %7, align 8, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !9
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %26
  call void @perror(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

41:                                               ; preds = %26
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 48, i1 false)
  %42 = getelementptr inbounds %struct.addrinfo, ptr %17, i32 0, i32 1
  store i32 0, ptr %42, align 4, !tbaa !13
  %43 = getelementptr inbounds %struct.addrinfo, ptr %17, i32 0, i32 2
  store i32 2, ptr %43, align 8, !tbaa !15
  %44 = getelementptr inbounds %struct.addrinfo, ptr %17, i32 0, i32 0
  store i32 1, ptr %44, align 8, !tbaa !16
  %45 = call i32 @getaddrinfo(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %17, ptr noundef %19)
  store i32 %45, ptr %16, align 4, !tbaa !5
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %52

47:                                               ; preds = %41
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = load i32, ptr %16, align 4, !tbaa !5
  %50 = call ptr @gai_strerror(i32 noundef %49) #7
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.4, ptr noundef %50) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

52:                                               ; preds = %41
  %53 = call i32 @getaddrinfo(ptr noundef @.str.2, ptr noundef @.str.5, ptr noundef %17, ptr noundef %18)
  store i32 %53, ptr %16, align 4, !tbaa !5
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load ptr, ptr @stderr, align 8, !tbaa !9
  %57 = load i32, ptr %16, align 4, !tbaa !5
  %58 = call ptr @gai_strerror(i32 noundef %57) #7
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.4, ptr noundef %58) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

60:                                               ; preds = %52
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %61)
  %63 = load i64, ptr %8, align 8, !tbaa !11
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i64 noundef %63)
  %65 = call i32 @fork() #7
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %148, label %67

67:                                               ; preds = %60
  %68 = load ptr, ptr %18, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.addrinfo, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = load ptr, ptr %18, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.addrinfo, ptr %71, i32 0, i32 2
  %73 = load i32, ptr %72, align 8, !tbaa !15
  %74 = load ptr, ptr %18, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.addrinfo, ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 4, !tbaa !17
  %77 = call i32 @socket(i32 noundef %70, i32 noundef %73, i32 noundef %76) #7
  store i32 %77, ptr %20, align 4, !tbaa !5
  %78 = icmp eq i32 %77, -1
  br i1 %78, label %79, label %80

79:                                               ; preds = %67
  call void @perror(ptr noundef @.str.8)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

80:                                               ; preds = %67
  %81 = load i32, ptr %20, align 4, !tbaa !5
  %82 = call i32 @setsockopt(i32 noundef %81, i32 noundef 1, i32 noundef 2, ptr noundef %15, i32 noundef 4) #7
  %83 = icmp eq i32 %82, -1
  br i1 %83, label %84, label %85

84:                                               ; preds = %80
  call void @perror(ptr noundef @.str.9)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

85:                                               ; preds = %80
  %86 = load i32, ptr %20, align 4, !tbaa !5
  %87 = load ptr, ptr %18, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.addrinfo, ptr %87, i32 0, i32 5
  %89 = load ptr, ptr %88, align 8, !tbaa !18
  %90 = load ptr, ptr %18, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.addrinfo, ptr %90, i32 0, i32 4
  %92 = load i32, ptr %91, align 8, !tbaa !19
  %93 = call i32 @bind(i32 noundef %86, ptr noundef %89, i32 noundef %92) #7
  %94 = icmp eq i32 %93, -1
  br i1 %94, label %95, label %96

95:                                               ; preds = %85
  call void @perror(ptr noundef @.str.10)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

96:                                               ; preds = %85
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %97

97:                                               ; preds = %144, %96
  %98 = load i64, ptr %9, align 8, !tbaa !11
  %99 = load i64, ptr %8, align 8, !tbaa !11
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %101, label %147

101:                                              ; preds = %97
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %102

102:                                              ; preds = %123, %101
  %103 = load i64, ptr %14, align 8, !tbaa !11
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = icmp ult i64 %103, %105
  br i1 %106, label %107, label %127

107:                                              ; preds = %102
  %108 = load i32, ptr %20, align 4, !tbaa !5
  %109 = load ptr, ptr %7, align 8, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = load i64, ptr %14, align 8, !tbaa !11
  %113 = sub i64 %111, %112
  %114 = load ptr, ptr %19, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.addrinfo, ptr %114, i32 0, i32 5
  %116 = load ptr, ptr %115, align 8, !tbaa !18
  %117 = load ptr, ptr %19, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.addrinfo, ptr %117, i32 0, i32 4
  %119 = call i64 @recvfrom(i32 noundef %108, ptr noundef %109, i64 noundef %113, i32 noundef 0, ptr noundef %116, ptr noundef %118)
  store i64 %119, ptr %13, align 8, !tbaa !11
  %120 = load i64, ptr %13, align 8, !tbaa !11
  %121 = icmp eq i64 %120, -1
  br i1 %121, label %122, label %123

122:                                              ; preds = %107
  call void @perror(ptr noundef @.str.11)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

123:                                              ; preds = %107
  %124 = load i64, ptr %13, align 8, !tbaa !11
  %125 = load i64, ptr %14, align 8, !tbaa !11
  %126 = add i64 %125, %124
  store i64 %126, ptr %14, align 8, !tbaa !11
  br label %102, !llvm.loop !20

127:                                              ; preds = %102
  %128 = load i32, ptr %20, align 4, !tbaa !5
  %129 = load ptr, ptr %7, align 8, !tbaa !9
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = load ptr, ptr %19, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.addrinfo, ptr %132, i32 0, i32 5
  %134 = load ptr, ptr %133, align 8, !tbaa !18
  %135 = load ptr, ptr %19, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.addrinfo, ptr %135, i32 0, i32 4
  %137 = load i32, ptr %136, align 8, !tbaa !19
  %138 = call i64 @sendto(i32 noundef %128, ptr noundef %129, i64 noundef %131, i32 noundef 0, ptr noundef %134, i32 noundef %137)
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = icmp ne i64 %138, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %127
  call void @perror(ptr noundef @.str.12)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

143:                                              ; preds = %127
  br label %144

144:                                              ; preds = %143
  %145 = load i64, ptr %9, align 8, !tbaa !11
  %146 = add nsw i64 %145, 1
  store i64 %146, ptr %9, align 8, !tbaa !11
  br label %97, !llvm.loop !22

147:                                              ; preds = %97
  br label %255

148:                                              ; preds = %60
  %149 = call i32 @sleep(i32 noundef 1)
  %150 = load ptr, ptr %19, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct.addrinfo, ptr %150, i32 0, i32 1
  %152 = load i32, ptr %151, align 4, !tbaa !13
  %153 = load ptr, ptr %19, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.addrinfo, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %154, align 8, !tbaa !15
  %156 = load ptr, ptr %19, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.addrinfo, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 4, !tbaa !17
  %159 = call i32 @socket(i32 noundef %152, i32 noundef %155, i32 noundef %158) #7
  store i32 %159, ptr %20, align 4, !tbaa !5
  %160 = icmp eq i32 %159, -1
  br i1 %160, label %161, label %162

161:                                              ; preds = %148
  call void @perror(ptr noundef @.str.8)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

162:                                              ; preds = %148
  %163 = load i32, ptr %20, align 4, !tbaa !5
  %164 = call i32 @setsockopt(i32 noundef %163, i32 noundef 1, i32 noundef 2, ptr noundef %15, i32 noundef 4) #7
  %165 = icmp eq i32 %164, -1
  br i1 %165, label %166, label %167

166:                                              ; preds = %162
  call void @perror(ptr noundef @.str.9)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

167:                                              ; preds = %162
  %168 = load i32, ptr %20, align 4, !tbaa !5
  %169 = load ptr, ptr %19, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.addrinfo, ptr %169, i32 0, i32 5
  %171 = load ptr, ptr %170, align 8, !tbaa !18
  %172 = load ptr, ptr %19, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.addrinfo, ptr %172, i32 0, i32 4
  %174 = load i32, ptr %173, align 8, !tbaa !19
  %175 = call i32 @bind(i32 noundef %168, ptr noundef %171, i32 noundef %174) #7
  %176 = icmp eq i32 %175, -1
  br i1 %176, label %177, label %178

177:                                              ; preds = %167
  call void @perror(ptr noundef @.str.10)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

178:                                              ; preds = %167
  %179 = call i32 @clock_gettime(i32 noundef 1, ptr noundef %11) #7
  %180 = icmp eq i32 %179, -1
  br i1 %180, label %181, label %182

181:                                              ; preds = %178
  call void @perror(ptr noundef @.str.13)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

182:                                              ; preds = %178
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %183

183:                                              ; preds = %230, %182
  %184 = load i64, ptr %9, align 8, !tbaa !11
  %185 = load i64, ptr %8, align 8, !tbaa !11
  %186 = icmp slt i64 %184, %185
  br i1 %186, label %187, label %233

187:                                              ; preds = %183
  %188 = load i32, ptr %20, align 4, !tbaa !5
  %189 = load ptr, ptr %7, align 8, !tbaa !9
  %190 = load i32, ptr %6, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = load ptr, ptr %18, align 8, !tbaa !9
  %193 = getelementptr inbounds %struct.addrinfo, ptr %192, i32 0, i32 5
  %194 = load ptr, ptr %193, align 8, !tbaa !18
  %195 = load ptr, ptr %18, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct.addrinfo, ptr %195, i32 0, i32 4
  %197 = load i32, ptr %196, align 8, !tbaa !19
  %198 = call i64 @sendto(i32 noundef %188, ptr noundef %189, i64 noundef %191, i32 noundef 0, ptr noundef %194, i32 noundef %197)
  %199 = load i32, ptr %6, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = icmp ne i64 %198, %200
  br i1 %201, label %202, label %203

202:                                              ; preds = %187
  call void @perror(ptr noundef @.str.12)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

203:                                              ; preds = %187
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %204

204:                                              ; preds = %225, %203
  %205 = load i64, ptr %14, align 8, !tbaa !11
  %206 = load i32, ptr %6, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = icmp ult i64 %205, %207
  br i1 %208, label %209, label %229

209:                                              ; preds = %204
  %210 = load i32, ptr %20, align 4, !tbaa !5
  %211 = load ptr, ptr %7, align 8, !tbaa !9
  %212 = load i32, ptr %6, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = load i64, ptr %14, align 8, !tbaa !11
  %215 = sub i64 %213, %214
  %216 = load ptr, ptr %18, align 8, !tbaa !9
  %217 = getelementptr inbounds %struct.addrinfo, ptr %216, i32 0, i32 5
  %218 = load ptr, ptr %217, align 8, !tbaa !18
  %219 = load ptr, ptr %18, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.addrinfo, ptr %219, i32 0, i32 4
  %221 = call i64 @recvfrom(i32 noundef %210, ptr noundef %211, i64 noundef %215, i32 noundef 0, ptr noundef %218, ptr noundef %220)
  store i64 %221, ptr %13, align 8, !tbaa !11
  %222 = load i64, ptr %13, align 8, !tbaa !11
  %223 = icmp eq i64 %222, -1
  br i1 %223, label %224, label %225

224:                                              ; preds = %209
  call void @perror(ptr noundef @.str.14)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

225:                                              ; preds = %209
  %226 = load i64, ptr %13, align 8, !tbaa !11
  %227 = load i64, ptr %14, align 8, !tbaa !11
  %228 = add i64 %227, %226
  store i64 %228, ptr %14, align 8, !tbaa !11
  br label %204, !llvm.loop !23

229:                                              ; preds = %204
  br label %230

230:                                              ; preds = %229
  %231 = load i64, ptr %9, align 8, !tbaa !11
  %232 = add nsw i64 %231, 1
  store i64 %232, ptr %9, align 8, !tbaa !11
  br label %183, !llvm.loop !24

233:                                              ; preds = %183
  %234 = call i32 @clock_gettime(i32 noundef 1, ptr noundef %12) #7
  %235 = icmp eq i32 %234, -1
  br i1 %235, label %236, label %237

236:                                              ; preds = %233
  call void @perror(ptr noundef @.str.13)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

237:                                              ; preds = %233
  %238 = getelementptr inbounds %struct.timespec, ptr %12, i32 0, i32 0
  %239 = load i64, ptr %238, align 8, !tbaa !25
  %240 = getelementptr inbounds %struct.timespec, ptr %11, i32 0, i32 0
  %241 = load i64, ptr %240, align 8, !tbaa !25
  %242 = sub nsw i64 %239, %241
  %243 = mul nsw i64 %242, 1000000000
  %244 = getelementptr inbounds %struct.timespec, ptr %12, i32 0, i32 1
  %245 = load i64, ptr %244, align 8, !tbaa !27
  %246 = getelementptr inbounds %struct.timespec, ptr %11, i32 0, i32 1
  %247 = load i64, ptr %246, align 8, !tbaa !27
  %248 = sub nsw i64 %245, %247
  %249 = add nsw i64 %243, %248
  store i64 %249, ptr %10, align 8, !tbaa !11
  %250 = load i64, ptr %10, align 8, !tbaa !11
  %251 = load i64, ptr %8, align 8, !tbaa !11
  %252 = mul nsw i64 %251, 2
  %253 = sdiv i64 %250, %252
  %254 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i64 noundef %253)
  br label %255

255:                                              ; preds = %237, %147
  store i32 0, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %256

256:                                              ; preds = %255, %236, %224, %202, %181, %177, %166, %161, %142, %122, %95, %84, %79, %55, %47, %40, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %257 = load i32, ptr %3, align 4
  ret i32 %257
}

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr noundef nonnull) #3

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

declare void @perror(ptr noundef) #2

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

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

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

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

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

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

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

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

declare i64 @recvfrom(i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i64 @sendto(i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare i32 @sleep(i32 noundef) #2

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint nounwind willreturn memory(read) 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 #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 4}
!14 = !{!"addrinfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !6, i64 0}
!17 = !{!14, !6, i64 12}
!18 = !{!14, !10, i64 24}
!19 = !{!14, !6, i64 16}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!26, !12, i64 0}
!26 = !{!"timespec", !12, i64 0, !12, i64 8}
!27 = !{!26, !12, i64 8}


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

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

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

9:                                                ; preds = %2
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %.loopexit

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = tail call i32 @atoi(ptr nocapture noundef %13) #9
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = tail call i64 @atol(ptr nocapture noundef %16) #9
  %18 = sext i32 %14 to i64
  %19 = tail call noalias ptr @malloc(i64 noundef %18) #10
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %11
  tail call void @perror(ptr noundef nonnull @.str.1) #11
  br label %.loopexit

22:                                               ; preds = %11
  %23 = getelementptr inbounds i8, ptr %6, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %6, i8 0, i64 48, i1 false)
  store i32 2, ptr %23, align 8, !tbaa !11
  store i32 1, ptr %6, align 8, !tbaa !13
  %24 = call i32 @getaddrinfo(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef nonnull %6, ptr noundef nonnull %8) #8
  %.not59 = icmp eq i32 %24, 0
  br i1 %.not59, label %29, label %25

25:                                               ; preds = %22
  %26 = load ptr, ptr @stderr, align 8, !tbaa !9
  %27 = call ptr @gai_strerror(i32 noundef %24) #8
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.4, ptr noundef %27) #12
  br label %.loopexit

29:                                               ; preds = %22
  %30 = call i32 @getaddrinfo(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.5, ptr noundef nonnull %6, ptr noundef nonnull %7) #8
  %.not60 = icmp eq i32 %30, 0
  br i1 %.not60, label %35, label %31

31:                                               ; preds = %29
  %32 = load ptr, ptr @stderr, align 8, !tbaa !9
  %33 = call ptr @gai_strerror(i32 noundef %30) #8
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.4, ptr noundef %33) #12
  br label %.loopexit

35:                                               ; preds = %29
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %14)
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i64 noundef %17)
  %38 = call i32 @fork() #8
  %.not61 = icmp eq i32 %38, 0
  br i1 %.not61, label %39, label %91

39:                                               ; preds = %35
  %40 = load ptr, ptr %7, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %40, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %40, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %40, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !15
  %47 = call i32 @socket(i32 noundef %42, i32 noundef %44, i32 noundef %46) #8
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %49, label %50

49:                                               ; preds = %39
  call void @perror(ptr noundef nonnull @.str.8) #11
  br label %.loopexit

50:                                               ; preds = %39
  %51 = call i32 @setsockopt(i32 noundef %47, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %5, i32 noundef 4) #8
  %52 = icmp eq i32 %51, -1
  br i1 %52, label %53, label %54

53:                                               ; preds = %50
  call void @perror(ptr noundef nonnull @.str.9) #11
  br label %.loopexit

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %55, i64 24
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = getelementptr inbounds i8, ptr %55, i64 16
  %59 = load i32, ptr %58, align 8, !tbaa !17
  %60 = call i32 @bind(i32 noundef %47, ptr noundef %57, i32 noundef %59) #8
  %61 = icmp eq i32 %60, -1
  br i1 %61, label %82, label %.preheader64

.preheader64:                                     ; preds = %54
  %62 = icmp sgt i64 %17, 0
  br i1 %62, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader64
  %.not81 = icmp eq i32 %14, 0
  br i1 %.not81, label %.preheader, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.lr.ph, %74
  %.04874.us = phi i64 [ %75, %74 ], [ 0, %.preheader.lr.ph ]
  br label %66

63:                                               ; preds = %66
  %64 = add i64 %72, %.073.us
  %65 = icmp ult i64 %64, %18
  br i1 %65, label %66, label %._crit_edge.us75, !llvm.loop !18

66:                                               ; preds = %.preheader.us, %63
  %.073.us = phi i64 [ 0, %.preheader.us ], [ %64, %63 ]
  %67 = sub i64 %18, %.073.us
  %68 = load ptr, ptr %8, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %68, i64 24
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = getelementptr inbounds i8, ptr %68, i64 16
  %72 = call i64 @recvfrom(i32 noundef %47, ptr noundef nonnull %19, i64 noundef %67, i32 noundef 0, ptr noundef %70, ptr noundef nonnull %71) #8
  %73 = icmp eq i64 %72, -1
  br i1 %73, label %.split79.us, label %63

74:                                               ; preds = %._crit_edge.us75
  %75 = add nuw nsw i64 %.04874.us, 1
  %exitcond87.not = icmp eq i64 %75, %17
  br i1 %exitcond87.not, label %.loopexit, label %.preheader.us, !llvm.loop !20

._crit_edge.us75:                                 ; preds = %63
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %76, i64 24
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  %79 = getelementptr inbounds i8, ptr %76, i64 16
  %80 = load i32, ptr %79, align 8, !tbaa !17
  %81 = call i64 @sendto(i32 noundef %47, ptr noundef nonnull %19, i64 noundef %18, i32 noundef 0, ptr noundef %78, i32 noundef %80) #8
  %.not62.us = icmp eq i64 %81, %18
  br i1 %.not62.us, label %74, label %.split77.us

82:                                               ; preds = %54
  call void @perror(ptr noundef nonnull @.str.10) #11
  br label %.loopexit

83:                                               ; preds = %.preheader
  %84 = add nuw nsw i64 %.04874, 1
  %exitcond88.not = icmp eq i64 %84, %17
  br i1 %exitcond88.not, label %.loopexit, label %.preheader, !llvm.loop !20

.preheader:                                       ; preds = %.preheader.lr.ph, %83
  %.04874 = phi i64 [ %84, %83 ], [ 0, %.preheader.lr.ph ]
  %85 = load ptr, ptr %8, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %85, i64 24
  %87 = load ptr, ptr %86, align 8, !tbaa !16
  %88 = getelementptr inbounds i8, ptr %85, i64 16
  %89 = load i32, ptr %88, align 8, !tbaa !17
  %90 = call i64 @sendto(i32 noundef %47, ptr noundef nonnull %19, i64 noundef %18, i32 noundef 0, ptr noundef %87, i32 noundef %89) #8
  %.not62 = icmp eq i64 %90, %18
  br i1 %.not62, label %83, label %.split77.us

.split79.us:                                      ; preds = %66
  call void @perror(ptr noundef nonnull @.str.11) #11
  br label %.loopexit

.split77.us:                                      ; preds = %._crit_edge.us75, %.preheader
  call void @perror(ptr noundef nonnull @.str.12) #11
  br label %.loopexit

91:                                               ; preds = %35
  %92 = call i32 @sleep(i32 noundef 1) #8
  %93 = load ptr, ptr %8, align 8, !tbaa !9
  %94 = getelementptr inbounds i8, ptr %93, i64 4
  %95 = load i32, ptr %94, align 4, !tbaa !14
  %96 = getelementptr inbounds i8, ptr %93, i64 8
  %97 = load i32, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds i8, ptr %93, i64 12
  %99 = load i32, ptr %98, align 4, !tbaa !15
  %100 = call i32 @socket(i32 noundef %95, i32 noundef %97, i32 noundef %99) #8
  %101 = icmp eq i32 %100, -1
  br i1 %101, label %102, label %103

102:                                              ; preds = %91
  call void @perror(ptr noundef nonnull @.str.8) #11
  br label %.loopexit

103:                                              ; preds = %91
  %104 = call i32 @setsockopt(i32 noundef %100, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %5, i32 noundef 4) #8
  %105 = icmp eq i32 %104, -1
  br i1 %105, label %106, label %107

106:                                              ; preds = %103
  call void @perror(ptr noundef nonnull @.str.9) #11
  br label %.loopexit

107:                                              ; preds = %103
  %108 = load ptr, ptr %8, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %108, i64 24
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  %111 = getelementptr inbounds i8, ptr %108, i64 16
  %112 = load i32, ptr %111, align 8, !tbaa !17
  %113 = call i32 @bind(i32 noundef %100, ptr noundef %110, i32 noundef %112) #8
  %114 = icmp eq i32 %113, -1
  br i1 %114, label %115, label %116

115:                                              ; preds = %107
  call void @perror(ptr noundef nonnull @.str.10) #11
  br label %.loopexit

116:                                              ; preds = %107
  %117 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %3) #8
  %118 = icmp eq i32 %117, -1
  br i1 %118, label %137, label %.preheader66

.preheader66:                                     ; preds = %116
  %119 = icmp sgt i64 %17, 0
  br i1 %119, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %.preheader66
  %.not80 = icmp eq i32 %14, 0
  br i1 %.not80, label %.lr.ph69.split, label %.lr.ph69.split.us

.lr.ph69.split.us:                                ; preds = %.lr.ph69, %._crit_edge.us
  %.14968.us = phi i64 [ %136, %._crit_edge.us ], [ 0, %.lr.ph69 ]
  %120 = load ptr, ptr %7, align 8, !tbaa !9
  %121 = getelementptr inbounds i8, ptr %120, i64 24
  %122 = load ptr, ptr %121, align 8, !tbaa !16
  %123 = getelementptr inbounds i8, ptr %120, i64 16
  %124 = load i32, ptr %123, align 8, !tbaa !17
  %125 = call i64 @sendto(i32 noundef %100, ptr noundef nonnull %19, i64 noundef %18, i32 noundef 0, ptr noundef %122, i32 noundef %124) #8
  %.not63.us = icmp eq i64 %125, %18
  br i1 %.not63.us, label %.preheader65.us, label %.split.us

126:                                              ; preds = %.preheader65.us
  %127 = add i64 %134, %.167.us
  %128 = icmp ult i64 %127, %18
  br i1 %128, label %.preheader65.us, label %._crit_edge.us, !llvm.loop !21

.preheader65.us:                                  ; preds = %.lr.ph69.split.us, %126
  %.167.us = phi i64 [ %127, %126 ], [ 0, %.lr.ph69.split.us ]
  %129 = sub i64 %18, %.167.us
  %130 = load ptr, ptr %7, align 8, !tbaa !9
  %131 = getelementptr inbounds i8, ptr %130, i64 24
  %132 = load ptr, ptr %131, align 8, !tbaa !16
  %133 = getelementptr inbounds i8, ptr %130, i64 16
  %134 = call i64 @recvfrom(i32 noundef %100, ptr noundef nonnull %19, i64 noundef %129, i32 noundef 0, ptr noundef %132, ptr noundef nonnull %133) #8
  %135 = icmp eq i64 %134, -1
  br i1 %135, label %.split72.us, label %126

._crit_edge.us:                                   ; preds = %126
  %136 = add nuw nsw i64 %.14968.us, 1
  %exitcond.not = icmp eq i64 %136, %17
  br i1 %exitcond.not, label %._crit_edge70, label %.lr.ph69.split.us, !llvm.loop !22

137:                                              ; preds = %116
  call void @perror(ptr noundef nonnull @.str.13) #11
  br label %.loopexit

.lr.ph69.split:                                   ; preds = %.lr.ph69, %.preheader65
  %.14968 = phi i64 [ %144, %.preheader65 ], [ 0, %.lr.ph69 ]
  %138 = load ptr, ptr %7, align 8, !tbaa !9
  %139 = getelementptr inbounds i8, ptr %138, i64 24
  %140 = load ptr, ptr %139, align 8, !tbaa !16
  %141 = getelementptr inbounds i8, ptr %138, i64 16
  %142 = load i32, ptr %141, align 8, !tbaa !17
  %143 = call i64 @sendto(i32 noundef %100, ptr noundef nonnull %19, i64 noundef %18, i32 noundef 0, ptr noundef %140, i32 noundef %142) #8
  %.not63 = icmp eq i64 %143, %18
  br i1 %.not63, label %.preheader65, label %.split.us

.preheader65:                                     ; preds = %.lr.ph69.split
  %144 = add nuw nsw i64 %.14968, 1
  %exitcond86.not = icmp eq i64 %144, %17
  br i1 %exitcond86.not, label %._crit_edge70, label %.lr.ph69.split, !llvm.loop !22

.split.us:                                        ; preds = %.lr.ph69.split.us, %.lr.ph69.split
  call void @perror(ptr noundef nonnull @.str.12) #11
  br label %.loopexit

.split72.us:                                      ; preds = %.preheader65.us
  call void @perror(ptr noundef nonnull @.str.14) #11
  br label %.loopexit

._crit_edge70:                                    ; preds = %._crit_edge.us, %.preheader65, %.preheader66
  %145 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %4) #8
  %146 = icmp eq i32 %145, -1
  br i1 %146, label %147, label %148

147:                                              ; preds = %._crit_edge70
  call void @perror(ptr noundef nonnull @.str.13) #11
  br label %.loopexit

148:                                              ; preds = %._crit_edge70
  %149 = load i64, ptr %4, align 8, !tbaa !23
  %150 = load i64, ptr %3, align 8, !tbaa !23
  %151 = sub nsw i64 %149, %150
  %152 = mul nsw i64 %151, 1000000000
  %153 = getelementptr inbounds i8, ptr %4, i64 8
  %154 = load i64, ptr %153, align 8, !tbaa !26
  %155 = getelementptr inbounds i8, ptr %3, i64 8
  %156 = load i64, ptr %155, align 8, !tbaa !26
  %157 = sub i64 %154, %156
  %158 = add nsw i64 %157, %152
  %159 = shl nsw i64 %17, 1
  %160 = sdiv i64 %158, %159
  %161 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i64 noundef %160)
  br label %.loopexit

.loopexit:                                        ; preds = %74, %83, %.preheader64, %148, %147, %.split72.us, %.split.us, %137, %115, %106, %102, %.split77.us, %.split79.us, %82, %53, %49, %31, %25, %21, %9
  %.047 = phi i32 [ 1, %9 ], [ 1, %21 ], [ 1, %25 ], [ 1, %31 ], [ 1, %102 ], [ 1, %106 ], [ 1, %115 ], [ 1, %137 ], [ 1, %.split.us ], [ 1, %.split72.us ], [ 1, %147 ], [ 1, %49 ], [ 1, %53 ], [ 1, %82 ], [ 1, %.split79.us ], [ 1, %.split77.us ], [ 0, %148 ], [ 0, %.preheader64 ], [ 0, %83 ], [ 0, %74 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  ret i32 %.047
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

declare i64 @recvfrom(i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i64 @sendto(i32 noundef, ptr noundef, i64 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

declare i32 @sleep(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) local_unnamed_addr #7

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"addrinfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!13 = !{!12, !6, i64 0}
!14 = !{!12, !6, i64 4}
!15 = !{!12, !6, i64 12}
!16 = !{!12, !10, i64 24}
!17 = !{!12, !6, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = !{!24, !25, i64 0}
!24 = !{!"timespec", !25, i64 0, !25, i64 8}
!25 = !{!"long", !7, i64 0}
!26 = !{!24, !25, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass