; LLVM IR from CerebusOSS/CereLink :: Central/UDPsocket.ll (ZN9UDPSocket7OpenUDPE15STARTUP_OPTIONSibPKcS2_bbbiiii)

; 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.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%class.UDPSocket = type <{ ptr, i32, %struct.sockaddr_in, i32, i32, i8, i8, [2 x i8] }>

@.str = external hidden unnamed_addr constant [52 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9UDPSocket7OpenUDPE15STARTUP_OPTIONSibPKcS2_bbbiiii(ptr noundef nonnull align 8 dereferenceable(38) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3, ptr noundef %4, ptr noundef %5, i1 noundef zeroext %6, i1 noundef zeroext %7, i1 noundef zeroext %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12) #0 align 2 {
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i8, align 1
  %33 = alloca %struct.sockaddr_in, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %struct.in_addr, align 4
  %37 = alloca %struct.in_addr, align 4
  store ptr %0, ptr %15, align 8, !tbaa !5
  store i32 %1, ptr %16, align 4, !tbaa !9
  store i32 %2, ptr %17, align 4, !tbaa !11
  %38 = zext i1 %3 to i8
  store i8 %38, ptr %18, align 1, !tbaa !13
  store ptr %4, ptr %19, align 8, !tbaa !5
  store ptr %5, ptr %20, align 8, !tbaa !5
  %39 = zext i1 %6 to i8
  store i8 %39, ptr %21, align 1, !tbaa !13
  %40 = zext i1 %7 to i8
  store i8 %40, ptr %22, align 1, !tbaa !13
  %41 = zext i1 %8 to i8
  store i8 %41, ptr %23, align 1, !tbaa !13
  store i32 %9, ptr %24, align 4, !tbaa !11
  store i32 %10, ptr %25, align 4, !tbaa !11
  store i32 %11, ptr %26, align 4, !tbaa !11
  store i32 %12, ptr %27, align 4, !tbaa !11
  %42 = load ptr, ptr %15, align 8
  %43 = load i8, ptr %18, align 1, !tbaa !13, !range !15, !noundef !16
  %44 = trunc i8 %43 to i1
  %45 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 5
  %46 = zext i1 %44 to i8
  store i8 %46, ptr %45, align 4, !tbaa !17
  %47 = load i32, ptr %27, align 4, !tbaa !11
  %48 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 4
  store i32 %47, ptr %48, align 8, !tbaa !22
  %49 = load i32, ptr %16, align 4, !tbaa !9
  %50 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 3
  store i32 %49, ptr %50, align 4, !tbaa !23
  %51 = call i32 @socket(i32 noundef 2, i32 noundef 2, i32 noundef 17) #7
  %52 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  store i32 %51, ptr %52, align 8, !tbaa !24
  %53 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !24
  %55 = icmp eq i32 %54, -1
  br i1 %55, label %56, label %57

56:                                               ; preds = %13
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 21, ptr %14, align 4
  br label %280

57:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 1, ptr %28, align 4, !tbaa !11
  %58 = load i8, ptr %21, align 1, !tbaa !13, !range !15, !noundef !16
  %59 = trunc i8 %58 to i1
  br i1 %59, label %60, label %67

60:                                               ; preds = %57
  %61 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %62 = load i32, ptr %61, align 8, !tbaa !24
  %63 = call i32 @setsockopt(i32 noundef %62, i32 noundef 1, i32 noundef 6, ptr noundef %28, i32 noundef 4) #7
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %60
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %279

66:                                               ; preds = %60
  br label %67

67:                                               ; preds = %66, %57
  %68 = load i8, ptr %22, align 1, !tbaa !13, !range !15, !noundef !16
  %69 = trunc i8 %68 to i1
  br i1 %69, label %70, label %77

70:                                               ; preds = %67
  %71 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !24
  %73 = call i32 @setsockopt(i32 noundef %72, i32 noundef 1, i32 noundef 5, ptr noundef %28, i32 noundef 4) #7
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %70
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %279

76:                                               ; preds = %70
  br label %77

77:                                               ; preds = %76, %67
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = icmp eq i32 4, %78
  br i1 %79, label %80, label %87

80:                                               ; preds = %77
  %81 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %82 = load i32, ptr %81, align 8, !tbaa !24
  %83 = call i32 @setsockopt(i32 noundef %82, i32 noundef 1, i32 noundef 2, ptr noundef %28, i32 noundef 4) #7
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %86

85:                                               ; preds = %80
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %279

86:                                               ; preds = %80
  br label %87

87:                                               ; preds = %86, %77
  %88 = load i32, ptr %24, align 4, !tbaa !11
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %90, label %115

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %91 = load i32, ptr %24, align 4, !tbaa !11
  store i32 %91, ptr %30, align 4, !tbaa !11
  %92 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %93 = load i32, ptr %92, align 8, !tbaa !24
  %94 = call i32 @setsockopt(i32 noundef %93, i32 noundef 1, i32 noundef 8, ptr noundef %30, i32 noundef 4) #7
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %90
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %112

97:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 4, ptr %31, align 4, !tbaa !11
  %98 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !24
  %100 = call i32 @getsockopt(i32 noundef %99, i32 noundef 1, i32 noundef 8, ptr noundef %30, ptr noundef %31) #7
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %97
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %111

103:                                              ; preds = %97
  %104 = load i32, ptr %30, align 4, !tbaa !11
  %105 = sdiv i32 %104, 2
  store i32 %105, ptr %30, align 4, !tbaa !11
  %106 = load i32, ptr %30, align 4, !tbaa !11
  %107 = load i32, ptr %24, align 4, !tbaa !11
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %103
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 23, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %111

110:                                              ; preds = %103
  store i32 0, ptr %29, align 4
  br label %111

111:                                              ; preds = %110, %109, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %112

112:                                              ; preds = %111, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  %113 = load i32, ptr %29, align 4
  switch i32 %113, label %279 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %87
  %116 = load i8, ptr %23, align 1, !tbaa !13, !range !15, !noundef !16
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %125

118:                                              ; preds = %115
  %119 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %120 = load i32, ptr %119, align 8, !tbaa !24
  %121 = call i32 (i32, i32, ...) @fcntl(i32 noundef %120, i32 noundef 4, i32 noundef 2048)
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %118
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %279

124:                                              ; preds = %118
  br label %125

125:                                              ; preds = %124, %115
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  store i8 0, ptr %32, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #7
  call void @llvm.memset.p0.i64(ptr align 4 %33, i8 0, i64 16, i1 false)
  %126 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 0
  store i16 2, ptr %126, align 4, !tbaa !25
  %127 = load i32, ptr %25, align 4, !tbaa !11
  %128 = trunc i32 %127 to i16
  %129 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %128)
  %130 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 1
  store i16 %129, ptr %130, align 2, !tbaa !26
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = icmp eq ptr %131, null
  br i1 %132, label %133, label %137

133:                                              ; preds = %125
  %134 = call noundef i32 @_ZL10__bswap_32j(i32 noundef 0)
  %135 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  %136 = getelementptr inbounds %struct.in_addr, ptr %135, i32 0, i32 0
  store i32 %134, ptr %136, align 4, !tbaa !27
  br label %142

137:                                              ; preds = %125
  %138 = load ptr, ptr %19, align 8, !tbaa !5
  %139 = call i32 @inet_addr(ptr noundef %138) #7
  %140 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  %141 = getelementptr inbounds %struct.in_addr, ptr %140, i32 0, i32 0
  store i32 %139, ptr %141, align 4, !tbaa !27
  br label %142

142:                                              ; preds = %137, %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  store i32 1, ptr %34, align 4, !tbaa !11
  br label %143

143:                                              ; preds = %168, %142
  %144 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %145 = load i32, ptr %144, align 8, !tbaa !24
  %146 = call i32 @bind(i32 noundef %145, ptr noundef %33, i32 noundef 16) #7
  %147 = icmp eq i32 %146, 0
  br i1 %147, label %148, label %149

148:                                              ; preds = %143
  store i8 1, ptr %32, align 1, !tbaa !13
  br label %158

149:                                              ; preds = %143
  %150 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  %151 = getelementptr inbounds %struct.in_addr, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !27
  %153 = call noundef i32 @_ZL10__bswap_32j(i32 noundef %152)
  %154 = add i32 %153, 1
  %155 = call noundef i32 @_ZL10__bswap_32j(i32 noundef %154)
  %156 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  %157 = getelementptr inbounds %struct.in_addr, ptr %156, i32 0, i32 0
  store i32 %155, ptr %157, align 4, !tbaa !27
  br label %158

158:                                              ; preds = %149, %148
  %159 = load i32, ptr %34, align 4, !tbaa !11
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %34, align 4, !tbaa !11
  br label %161

161:                                              ; preds = %158
  %162 = load i8, ptr %32, align 1, !tbaa !13, !range !15, !noundef !16
  %163 = trunc i8 %162 to i1
  br i1 %163, label %168, label %164

164:                                              ; preds = %161
  %165 = load i32, ptr %34, align 4, !tbaa !11
  %166 = load i32, ptr %17, align 4, !tbaa !11
  %167 = icmp sle i32 %165, %166
  br label %168

168:                                              ; preds = %164, %161
  %169 = phi i1 [ false, %161 ], [ %167, %164 ]
  br i1 %169, label %143, label %170, !llvm.loop !28

170:                                              ; preds = %168
  %171 = load i8, ptr %32, align 1, !tbaa !13, !range !15, !noundef !16
  %172 = trunc i8 %171 to i1
  br i1 %172, label %173, label %186

173:                                              ; preds = %170
  %174 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %175 = getelementptr inbounds %struct.sockaddr_in, ptr %174, i32 0, i32 0
  store i16 2, ptr %175, align 4, !tbaa !30
  %176 = load i32, ptr %26, align 4, !tbaa !11
  %177 = trunc i32 %176 to i16
  %178 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %177)
  %179 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %180 = getelementptr inbounds %struct.sockaddr_in, ptr %179, i32 0, i32 1
  store i16 %178, ptr %180, align 2, !tbaa !31
  %181 = load ptr, ptr %20, align 8, !tbaa !5
  %182 = call i32 @inet_addr(ptr noundef %181) #7
  %183 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %184 = getelementptr inbounds %struct.sockaddr_in, ptr %183, i32 0, i32 2
  %185 = getelementptr inbounds %struct.in_addr, ptr %184, i32 0, i32 0
  store i32 %182, ptr %185, align 4, !tbaa !32
  br label %252

186:                                              ; preds = %170
  %187 = load i32, ptr %16, align 4, !tbaa !9
  %188 = icmp eq i32 0, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %186
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 25, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %278

190:                                              ; preds = %186
  %191 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 5
  %192 = load i8, ptr %191, align 4, !tbaa !17, !range !15, !noundef !16
  %193 = trunc i8 %192 to i1
  br i1 %193, label %194, label %196

194:                                              ; preds = %190
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  br label %196

196:                                              ; preds = %194, %190
  %197 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %198 = load i32, ptr %197, align 8, !tbaa !24
  %199 = call i32 @setsockopt(i32 noundef %198, i32 noundef 1, i32 noundef 2, ptr noundef %28, i32 noundef 4) #7
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %208

201:                                              ; preds = %196
  %202 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 5
  %203 = load i8, ptr %202, align 4, !tbaa !17, !range !15, !noundef !16
  %204 = trunc i8 %203 to i1
  br i1 %204, label %205, label %207

205:                                              ; preds = %201
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %207

207:                                              ; preds = %205, %201
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 22, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %278

208:                                              ; preds = %196
  %209 = load i32, ptr %16, align 4, !tbaa !9
  %210 = icmp eq i32 2, %209
  br i1 %210, label %211, label %215

211:                                              ; preds = %208
  %212 = call i32 @inet_addr(ptr noundef @.str.2) #7
  %213 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  %214 = getelementptr inbounds %struct.in_addr, ptr %213, i32 0, i32 0
  store i32 %212, ptr %214, align 4, !tbaa !27
  br label %219

215:                                              ; preds = %208
  %216 = call noundef i32 @_ZL10__bswap_32j(i32 noundef 0)
  %217 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  %218 = getelementptr inbounds %struct.in_addr, ptr %217, i32 0, i32 0
  store i32 %216, ptr %218, align 4, !tbaa !27
  br label %219

219:                                              ; preds = %215, %211
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %220 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 1
  %221 = load i32, ptr %220, align 8, !tbaa !24
  %222 = call i32 @bind(i32 noundef %221, ptr noundef %33, i32 noundef 16) #7
  store i32 %222, ptr %35, align 4, !tbaa !11
  %223 = load i32, ptr %35, align 4, !tbaa !11
  %224 = icmp eq i32 %223, 0
  br i1 %224, label %225, label %246

225:                                              ; preds = %219
  %226 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %227 = getelementptr inbounds %struct.sockaddr_in, ptr %226, i32 0, i32 0
  store i16 2, ptr %227, align 4, !tbaa !30
  %228 = load i32, ptr %26, align 4, !tbaa !11
  %229 = trunc i32 %228 to i16
  %230 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %229)
  %231 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %232 = getelementptr inbounds %struct.sockaddr_in, ptr %231, i32 0, i32 1
  store i16 %230, ptr %232, align 2, !tbaa !31
  %233 = load i32, ptr %16, align 4, !tbaa !9
  %234 = icmp eq i32 2, %233
  br i1 %234, label %235, label %240

235:                                              ; preds = %225
  %236 = call i32 @inet_addr(ptr noundef @.str.2) #7
  %237 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %238 = getelementptr inbounds %struct.sockaddr_in, ptr %237, i32 0, i32 2
  %239 = getelementptr inbounds %struct.in_addr, ptr %238, i32 0, i32 0
  store i32 %236, ptr %239, align 4, !tbaa !32
  br label %245

240:                                              ; preds = %225
  %241 = call noundef i32 @_ZL10__bswap_32j(i32 noundef -1)
  %242 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %243 = getelementptr inbounds %struct.sockaddr_in, ptr %242, i32 0, i32 2
  %244 = getelementptr inbounds %struct.in_addr, ptr %243, i32 0, i32 0
  store i32 %241, ptr %244, align 4, !tbaa !32
  br label %245

245:                                              ; preds = %240, %235
  br label %247

246:                                              ; preds = %219
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %42)
  store i32 25, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %248

247:                                              ; preds = %245
  store i32 0, ptr %29, align 4
  br label %248

248:                                              ; preds = %247, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  %249 = load i32, ptr %29, align 4
  switch i32 %249, label %278 [
    i32 0, label %250
  ]

250:                                              ; preds = %248
  br label %251

251:                                              ; preds = %250
  br label %252

252:                                              ; preds = %251, %173
  %253 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 5
  %254 = load i8, ptr %253, align 4, !tbaa !17, !range !15, !noundef !16
  %255 = trunc i8 %254 to i1
  br i1 %255, label %256, label %277

256:                                              ; preds = %252
  %257 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %257, i64 4, i1 false), !tbaa.struct !33
  %258 = getelementptr inbounds %struct.in_addr, ptr %36, i32 0, i32 0
  %259 = load i32, ptr %258, align 4
  %260 = call ptr @inet_ntoa(i32 %259) #7
  %261 = getelementptr inbounds %struct.sockaddr_in, ptr %33, i32 0, i32 1
  %262 = load i16, ptr %261, align 2, !tbaa !26
  %263 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %262)
  %264 = zext i16 %263 to i32
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %260, i32 noundef %264)
  %266 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %267 = getelementptr inbounds %struct.sockaddr_in, ptr %266, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %267, i64 4, i1 false), !tbaa.struct !33
  %268 = getelementptr inbounds %struct.in_addr, ptr %37, i32 0, i32 0
  %269 = load i32, ptr %268, align 4
  %270 = call ptr @inet_ntoa(i32 %269) #7
  %271 = getelementptr inbounds %class.UDPSocket, ptr %42, i32 0, i32 2
  %272 = getelementptr inbounds %struct.sockaddr_in, ptr %271, i32 0, i32 1
  %273 = load i16, ptr %272, align 2, !tbaa !31
  %274 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %273)
  %275 = zext i16 %274 to i32
  %276 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %270, i32 noundef %275)
  br label %277

277:                                              ; preds = %256, %252
  store i32 0, ptr %14, align 4
  store i32 1, ptr %29, align 4
  br label %278

278:                                              ; preds = %277, %248, %207, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  br label %279

279:                                              ; preds = %278, %123, %112, %85, %75, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %280

280:                                              ; preds = %279, %56
  %281 = load i32, ptr %14, align 4
  ret i32 %281
}

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

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

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

; Function Attrs: nounwind
declare i32 @getsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

declare i32 @fcntl(i32 noundef, i32 noundef, ...) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL10__bswap_32j(i32 noundef) #5

; Function Attrs: nounwind
declare i32 @inet_addr(ptr noundef) #1

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

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

; Function Attrs: nounwind
declare ptr @inet_ntoa(i32) #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS15STARTUP_OPTIONS", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !14, i64 36}
!18 = !{!"_ZTS9UDPSocket", !12, i64 8, !19, i64 12, !10, i64 28, !12, i64 32, !14, i64 36, !14, i64 37}
!19 = !{!"_ZTS11sockaddr_in", !20, i64 0, !20, i64 2, !21, i64 4, !7, i64 8}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_ZTS7in_addr", !12, i64 0}
!22 = !{!18, !12, i64 32}
!23 = !{!18, !10, i64 28}
!24 = !{!18, !12, i64 8}
!25 = !{!19, !20, i64 0}
!26 = !{!19, !20, i64 2}
!27 = !{!19, !12, i64 4}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!18, !20, i64 12}
!31 = !{!18, !20, i64 14}
!32 = !{!18, !12, i64 16}
!33 = !{i64 0, i64 4, !11}


; 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.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }

@.str = external hidden unnamed_addr constant [52 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9UDPSocket7OpenUDPE15STARTUP_OPTIONSibPKcS2_bbbiiii(ptr noundef nonnull align 8 dereferenceable(38) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3, ptr noundef %4, ptr noundef %5, i1 noundef zeroext %6, i1 noundef zeroext %7, i1 noundef zeroext %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, i32 noundef %12) local_unnamed_addr #0 align 2 {
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.sockaddr_in, align 4
  %18 = zext i1 %3 to i8
  %19 = getelementptr inbounds i8, ptr %0, i64 36
  store i8 %18, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %12, ptr %20, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %1, ptr %21, align 4, !tbaa !16
  %22 = tail call i32 @socket(i32 noundef 2, i32 noundef 2, i32 noundef 17) #7
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %22, ptr %23, align 8, !tbaa !17
  %24 = icmp eq i32 %22, -1
  br i1 %24, label %25, label %26

25:                                               ; preds = %13
  tail call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %142

26:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 1, ptr %14, align 4, !tbaa !18
  br i1 %6, label %27, label %30

27:                                               ; preds = %26
  %28 = call i32 @setsockopt(i32 noundef %22, i32 noundef 1, i32 noundef 6, ptr noundef nonnull %14, i32 noundef 4) #7
  %.not = icmp eq i32 %28, 0
  br i1 %.not, label %30, label %29

29:                                               ; preds = %27
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %141

30:                                               ; preds = %27, %26
  br i1 %7, label %31, label %35

31:                                               ; preds = %30
  %32 = load i32, ptr %23, align 8, !tbaa !17
  %33 = call i32 @setsockopt(i32 noundef %32, i32 noundef 1, i32 noundef 5, ptr noundef nonnull %14, i32 noundef 4) #7
  %.not39 = icmp eq i32 %33, 0
  br i1 %.not39, label %35, label %34

34:                                               ; preds = %31
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %141

35:                                               ; preds = %31, %30
  %36 = icmp eq i32 %1, 4
  br i1 %36, label %37, label %41

37:                                               ; preds = %35
  %38 = load i32, ptr %23, align 8, !tbaa !17
  %39 = call i32 @setsockopt(i32 noundef %38, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %14, i32 noundef 4) #7
  %.not40 = icmp eq i32 %39, 0
  br i1 %.not40, label %41, label %40

40:                                               ; preds = %37
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %141

41:                                               ; preds = %37, %35
  %42 = icmp sgt i32 %9, 0
  br i1 %42, label %43, label %54

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  store i32 %9, ptr %15, align 4, !tbaa !18
  %44 = load i32, ptr %23, align 8, !tbaa !17
  %45 = call i32 @setsockopt(i32 noundef %44, i32 noundef 1, i32 noundef 8, ptr noundef nonnull %15, i32 noundef 4) #7
  %.not41 = icmp eq i32 %45, 0
  br i1 %.not41, label %46, label %.thread

.thread:                                          ; preds = %43
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %141

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 4, ptr %16, align 4, !tbaa !18
  %47 = load i32, ptr %23, align 8, !tbaa !17
  %48 = call i32 @getsockopt(i32 noundef %47, i32 noundef 1, i32 noundef 8, ptr noundef nonnull %15, ptr noundef nonnull %16) #7
  %.not42 = icmp eq i32 %48, 0
  br i1 %.not42, label %49, label %.thread50

49:                                               ; preds = %46
  %50 = load i32, ptr %15, align 4, !tbaa !18
  %51 = sdiv i32 %50, 2
  store i32 %51, ptr %15, align 4, !tbaa !18
  %52 = icmp slt i32 %51, %9
  br i1 %52, label %.thread50, label %53

.thread50:                                        ; preds = %49, %46
  %.0.ph = phi i32 [ 22, %46 ], [ 23, %49 ]
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %141

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %54

54:                                               ; preds = %53, %41
  br i1 %8, label %55, label %59

55:                                               ; preds = %54
  %56 = load i32, ptr %23, align 8, !tbaa !17
  %57 = call i32 (i32, i32, ...) @fcntl(i32 noundef %56, i32 noundef 4, i32 noundef 2048)
  %.not43 = icmp eq i32 %57, 0
  br i1 %.not43, label %59, label %58

58:                                               ; preds = %55
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %141

59:                                               ; preds = %55, %54
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  %60 = getelementptr inbounds i8, ptr %17, i64 8
  store i64 0, ptr %60, align 4
  store i16 2, ptr %17, align 4, !tbaa !19
  %61 = trunc i32 %10 to i16
  %62 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %61)
  %63 = getelementptr inbounds i8, ptr %17, i64 2
  store i16 %62, ptr %63, align 2, !tbaa !20
  %64 = icmp eq ptr %4, null
  br i1 %64, label %65, label %67

65:                                               ; preds = %59
  %66 = call noundef i32 @_ZL10__bswap_32j(i32 noundef 0)
  br label %69

67:                                               ; preds = %59
  %68 = call i32 @inet_addr(ptr noundef nonnull %4) #7
  br label %69

69:                                               ; preds = %67, %65
  %.sink = phi i32 [ %66, %65 ], [ %68, %67 ]
  %70 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 %.sink, ptr %70, align 4
  %smax = call i32 @llvm.smax.i32(i32 %2, i32 1)
  br label %71

71:                                               ; preds = %75, %69
  %.035 = phi i32 [ 1, %69 ], [ %80, %75 ]
  %72 = load i32, ptr %23, align 8, !tbaa !17
  %73 = call i32 @bind(i32 noundef %72, ptr noundef nonnull %17, i32 noundef 16) #7
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %.thread57, label %75

75:                                               ; preds = %71
  %76 = load i32, ptr %70, align 4, !tbaa !21
  %77 = call noundef i32 @_ZL10__bswap_32j(i32 noundef %76)
  %78 = add i32 %77, 1
  %79 = call noundef i32 @_ZL10__bswap_32j(i32 noundef %78)
  store i32 %79, ptr %70, align 4, !tbaa !21
  %80 = add nuw i32 %.035, 1
  %exitcond.not = icmp eq i32 %.035, %smax
  br i1 %exitcond.not, label %87, label %71, !llvm.loop !22

.thread57:                                        ; preds = %71
  %81 = getelementptr inbounds i8, ptr %0, i64 12
  store i16 2, ptr %81, align 4, !tbaa !24
  %82 = trunc i32 %11 to i16
  %83 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %82)
  %84 = getelementptr inbounds i8, ptr %0, i64 14
  store i16 %83, ptr %84, align 2, !tbaa !25
  %85 = call i32 @inet_addr(ptr noundef %5) #7
  %86 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %85, ptr %86, align 8, !tbaa !26
  br label %.thread59

87:                                               ; preds = %75
  %88 = icmp eq i32 %1, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %87
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %140

90:                                               ; preds = %87
  %91 = load i8, ptr %19, align 4, !tbaa !5, !range !27, !noundef !28
  %92 = trunc nuw i8 %91 to i1
  br i1 %92, label %93, label %95

93:                                               ; preds = %90
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %95

95:                                               ; preds = %93, %90
  %96 = load i32, ptr %23, align 8, !tbaa !17
  %97 = call i32 @setsockopt(i32 noundef %96, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %14, i32 noundef 4) #7
  %.not46 = icmp eq i32 %97, 0
  br i1 %.not46, label %104, label %98

98:                                               ; preds = %95
  %99 = load i8, ptr %19, align 4, !tbaa !5, !range !27, !noundef !28
  %100 = trunc nuw i8 %99 to i1
  br i1 %100, label %101, label %103

101:                                              ; preds = %98
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %103

103:                                              ; preds = %101, %98
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %140

104:                                              ; preds = %95
  %105 = icmp eq i32 %1, 2
  br i1 %105, label %106, label %108

106:                                              ; preds = %104
  %107 = call i32 @inet_addr(ptr noundef nonnull @.str.2) #7
  br label %110

108:                                              ; preds = %104
  %109 = call noundef i32 @_ZL10__bswap_32j(i32 noundef 0)
  br label %110

110:                                              ; preds = %108, %106
  %.sink62 = phi i32 [ %107, %106 ], [ %109, %108 ]
  store i32 %.sink62, ptr %70, align 4
  %111 = load i32, ptr %23, align 8, !tbaa !17
  %112 = call i32 @bind(i32 noundef %111, ptr noundef nonnull %17, i32 noundef 16) #7
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %124

114:                                              ; preds = %110
  %115 = getelementptr inbounds i8, ptr %0, i64 12
  store i16 2, ptr %115, align 4, !tbaa !24
  %116 = trunc i32 %11 to i16
  %117 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %116)
  %118 = getelementptr inbounds i8, ptr %0, i64 14
  store i16 %117, ptr %118, align 2, !tbaa !25
  %119 = getelementptr inbounds i8, ptr %0, i64 16
  br i1 %105, label %120, label %122

120:                                              ; preds = %114
  %121 = call i32 @inet_addr(ptr noundef nonnull @.str.2) #7
  store i32 %121, ptr %119, align 8, !tbaa !26
  br label %.thread59

122:                                              ; preds = %114
  %123 = call noundef i32 @_ZL10__bswap_32j(i32 noundef -1)
  store i32 %123, ptr %119, align 8, !tbaa !26
  br label %.thread59

124:                                              ; preds = %110
  call void @_ZN9UDPSocket5CloseEv(ptr noundef nonnull align 8 dereferenceable(38) %0)
  br label %140

.thread59:                                        ; preds = %120, %122, %.thread57
  %125 = load i8, ptr %19, align 4, !tbaa !5, !range !27, !noundef !28
  %126 = trunc nuw i8 %125 to i1
  br i1 %126, label %127, label %140

127:                                              ; preds = %.thread59
  %.sroa.02.0.copyload = load i32, ptr %70, align 4, !tbaa !18
  %128 = call ptr @inet_ntoa(i32 %.sroa.02.0.copyload) #7
  %129 = load i16, ptr %63, align 2, !tbaa !20
  %130 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %129)
  %131 = zext i16 %130 to i32
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef %128, i32 noundef %131)
  %133 = getelementptr inbounds i8, ptr %0, i64 16
  %.sroa.0.0.copyload = load i32, ptr %133, align 8, !tbaa !18
  %134 = call ptr @inet_ntoa(i32 %.sroa.0.0.copyload) #7
  %135 = getelementptr inbounds i8, ptr %0, i64 14
  %136 = load i16, ptr %135, align 2, !tbaa !25
  %137 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %136)
  %138 = zext i16 %137 to i32
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %134, i32 noundef %138)
  br label %140

140:                                              ; preds = %124, %.thread59, %127, %103, %89
  %.4 = phi i32 [ 25, %89 ], [ 22, %103 ], [ 25, %124 ], [ 0, %127 ], [ 0, %.thread59 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  br label %141

141:                                              ; preds = %.thread50, %.thread, %140, %58, %40, %34, %29
  %.5 = phi i32 [ 22, %29 ], [ 22, %34 ], [ 22, %40 ], [ 22, %58 ], [ %.4, %140 ], [ 22, %.thread ], [ %.0.ph, %.thread50 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  br label %142

142:                                              ; preds = %141, %25
  %.6 = phi i32 [ 21, %25 ], [ %.5, %141 ]
  ret i32 %.6
}

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

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

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

; Function Attrs: nounwind
declare i32 @getsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @fcntl(i32 noundef, i32 noundef, ...) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL10__bswap_32j(i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @inet_addr(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind
declare ptr @inet_ntoa(i32) local_unnamed_addr #1

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

attributes #0 = { mustprogress 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !14, i64 36}
!6 = !{!"_ZTS9UDPSocket", !7, i64 8, !10, i64 12, !13, i64 28, !7, i64 32, !14, i64 36, !14, i64 37}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS11sockaddr_in", !11, i64 0, !11, i64 2, !12, i64 4, !8, i64 8}
!11 = !{!"short", !8, i64 0}
!12 = !{!"_ZTS7in_addr", !7, i64 0}
!13 = !{!"_ZTS15STARTUP_OPTIONS", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!6, !7, i64 32}
!16 = !{!6, !13, i64 28}
!17 = !{!6, !7, i64 8}
!18 = !{!7, !7, i64 0}
!19 = !{!10, !11, i64 0}
!20 = !{!10, !11, i64 2}
!21 = !{!10, !7, i64 4}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !11, i64 12}
!25 = !{!6, !11, i64 14}
!26 = !{!6, !7, i64 16}
!27 = !{i8 0, i8 2}
!28 = !{}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass