; LLVM IR from dynexcoin/Dynex :: external/miniupnpc (connecthostport)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.fd_set = type { [16 x i64] }
%struct.sockaddr = type { i16, [14 x i8] }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon }
%union.anon = type { [4 x i32] }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @connecthostport(ptr noundef %0, i16 noundef zeroext %1, i32 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [65 x i8], align 16
  %11 = alloca [8 x i8], align 1
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.addrinfo, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.fd_set, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i16 %1, ptr %6, align 2, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 65, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 48, i1 false)
  %24 = getelementptr inbounds %struct.addrinfo, ptr %14, i32 0, i32 0
  store i32 1024, ptr %24, align 8, !tbaa !13
  %25 = getelementptr inbounds %struct.addrinfo, ptr %14, i32 0, i32 2
  store i32 1, ptr %25, align 8, !tbaa !15
  %26 = getelementptr inbounds %struct.addrinfo, ptr %14, i32 0, i32 1
  store i32 0, ptr %26, align 4, !tbaa !16
  %27 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %28 = load i16, ptr %6, align 2, !tbaa !9
  %29 = zext i16 %28 to i32
  %30 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %27, i64 noundef 8, ptr noundef @.str, i32 noundef %29) #7
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 0
  %33 = load i8, ptr %32, align 1, !tbaa !17
  %34 = sext i8 %33 to i32
  %35 = icmp eq i32 %34, 91
  br i1 %35, label %36, label %86

36:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %15, align 4, !tbaa !11
  store i32 1, ptr %16, align 4, !tbaa !11
  br label %37

37:                                               ; preds = %77, %36
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr %16, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !17
  %43 = sext i8 %42 to i32
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %56

45:                                               ; preds = %37
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = load i32, ptr %16, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %46, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !17
  %51 = sext i8 %50 to i32
  %52 = icmp ne i32 %51, 93
  br i1 %52, label %53, label %56

53:                                               ; preds = %45
  %54 = load i32, ptr %15, align 4, !tbaa !11
  %55 = icmp slt i32 %54, 64
  br label %56

56:                                               ; preds = %53, %45, %37
  %57 = phi i1 [ false, %45 ], [ false, %37 ], [ %55, %53 ]
  br i1 %57, label %58, label %82

58:                                               ; preds = %56
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load i32, ptr %16, align 4, !tbaa !11
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i8, ptr %59, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !17
  %64 = load i32, ptr %15, align 4, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [65 x i8], ptr %10, i64 0, i64 %65
  store i8 %63, ptr %66, align 1, !tbaa !17
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i32, ptr %16, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i8, ptr %67, i64 %69
  %71 = call i32 @strncmp(ptr noundef %70, ptr noundef @.str.1, i64 noundef 3) #8
  %72 = icmp eq i32 0, %71
  br i1 %72, label %73, label %76

73:                                               ; preds = %58
  %74 = load i32, ptr %16, align 4, !tbaa !11
  %75 = add nsw i32 %74, 2
  store i32 %75, ptr %16, align 4, !tbaa !11
  br label %76

76:                                               ; preds = %73, %58
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %15, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %15, align 4, !tbaa !11
  %80 = load i32, ptr %16, align 4, !tbaa !11
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %16, align 4, !tbaa !11
  br label %37, !llvm.loop !18

82:                                               ; preds = %56
  %83 = load i32, ptr %15, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [65 x i8], ptr %10, i64 0, i64 %84
  store i8 0, ptr %85, align 1, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %90

86:                                               ; preds = %3
  %87 = getelementptr inbounds [65 x i8], ptr %10, i64 0, i64 0
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = call ptr @strncpy(ptr noundef %87, ptr noundef %88, i64 noundef 64) #7
  br label %90

90:                                               ; preds = %86, %82
  %91 = getelementptr inbounds [65 x i8], ptr %10, i64 0, i64 64
  store i8 0, ptr %91, align 16, !tbaa !17
  %92 = getelementptr inbounds [65 x i8], ptr %10, i64 0, i64 0
  %93 = getelementptr inbounds [8 x i8], ptr %11, i64 0, i64 0
  %94 = call i32 @getaddrinfo(ptr noundef %92, ptr noundef %93, ptr noundef %14, ptr noundef %12)
  store i32 %94, ptr %9, align 4, !tbaa !11
  %95 = load i32, ptr %9, align 4, !tbaa !11
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %102

97:                                               ; preds = %90
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = load i32, ptr %9, align 4, !tbaa !11
  %100 = call ptr @gai_strerror(i32 noundef %99) #7
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.2, ptr noundef %100) #7
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %248

102:                                              ; preds = %90
  store i32 -1, ptr %8, align 4, !tbaa !11
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %103, ptr %13, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %231, %102
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %235

107:                                              ; preds = %104
  %108 = load i32, ptr %8, align 4, !tbaa !11
  %109 = icmp slt i32 %108, 0
  br i1 %109, label %113, label %110

110:                                              ; preds = %107
  %111 = load i32, ptr %8, align 4, !tbaa !11
  %112 = call i32 @close(i32 noundef %111)
  br label %113

113:                                              ; preds = %110, %107
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.addrinfo, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 4, !tbaa !16
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.addrinfo, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 8, !tbaa !15
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.addrinfo, ptr %120, i32 0, i32 3
  %122 = load i32, ptr %121, align 4, !tbaa !20
  %123 = call i32 @socket(i32 noundef %116, i32 noundef %119, i32 noundef %122) #7
  store i32 %123, ptr %8, align 4, !tbaa !11
  %124 = load i32, ptr %8, align 4, !tbaa !11
  %125 = icmp slt i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %113
  br label %231

127:                                              ; preds = %113
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.addrinfo, ptr %128, i32 0, i32 5
  %130 = load ptr, ptr %129, align 8, !tbaa !21
  %131 = getelementptr inbounds %struct.sockaddr, ptr %130, i32 0, i32 0
  %132 = load i16, ptr %131, align 2, !tbaa !22
  %133 = zext i16 %132 to i32
  %134 = icmp eq i32 %133, 10
  br i1 %134, label %135, label %145

135:                                              ; preds = %127
  %136 = load i32, ptr %7, align 4, !tbaa !11
  %137 = icmp ugt i32 %136, 0
  br i1 %137, label %138, label %145

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.addrinfo, ptr %139, i32 0, i32 5
  %141 = load ptr, ptr %140, align 8, !tbaa !21
  store ptr %141, ptr %18, align 8, !tbaa !5
  %142 = load i32, ptr %7, align 4, !tbaa !11
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.sockaddr_in6, ptr %143, i32 0, i32 4
  store i32 %142, ptr %144, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %145

145:                                              ; preds = %138, %135, %127
  %146 = load i32, ptr %8, align 4, !tbaa !11
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.addrinfo, ptr %147, i32 0, i32 5
  %149 = load ptr, ptr %148, align 8, !tbaa !21
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.addrinfo, ptr %150, i32 0, i32 4
  %152 = load i32, ptr %151, align 8, !tbaa !27
  %153 = call i32 @connect(i32 noundef %146, ptr noundef %149, i32 noundef %152)
  store i32 %153, ptr %9, align 4, !tbaa !11
  br label %154

154:                                              ; preds = %225, %223, %145
  %155 = load i32, ptr %9, align 4, !tbaa !11
  %156 = icmp slt i32 %155, 0
  br i1 %156, label %157, label %167

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

161:                                              ; preds = %157
  %162 = call ptr @__errno_location() #9
  %163 = load i32, ptr %162, align 4, !tbaa !11
  %164 = icmp eq i32 %163, 115
  br label %165

165:                                              ; preds = %161, %157
  %166 = phi i1 [ true, %157 ], [ %164, %161 ]
  br label %167

167:                                              ; preds = %165, %154
  %168 = phi i1 [ false, %154 ], [ %166, %165 ]
  br i1 %168, label %169, label %226

169:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  br label %170

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr %20, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %171

171:                                              ; preds = %181, %170
  %172 = load i32, ptr %22, align 4, !tbaa !11
  %173 = zext i32 %172 to i64
  %174 = icmp ult i64 %173, 16
  br i1 %174, label %175, label %184

175:                                              ; preds = %171
  %176 = load ptr, ptr %23, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.fd_set, ptr %176, i32 0, i32 0
  %178 = load i32, ptr %22, align 4, !tbaa !11
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds [16 x i64], ptr %177, i64 0, i64 %179
  store i64 0, ptr %180, align 8, !tbaa !28
  br label %181

181:                                              ; preds = %175
  %182 = load i32, ptr %22, align 4, !tbaa !11
  %183 = add i32 %182, 1
  store i32 %183, ptr %22, align 4, !tbaa !11
  br label %171, !llvm.loop !30

184:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %8, align 4, !tbaa !11
  %188 = srem i32 %187, 64
  %189 = zext i32 %188 to i64
  %190 = shl i64 1, %189
  %191 = getelementptr inbounds %struct.fd_set, ptr %20, i32 0, i32 0
  %192 = load i32, ptr %8, align 4, !tbaa !11
  %193 = sdiv i32 %192, 64
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [16 x i64], ptr %191, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !28
  %197 = or i64 %196, %190
  store i64 %197, ptr %195, align 8, !tbaa !28
  %198 = load i32, ptr %8, align 4, !tbaa !11
  %199 = add nsw i32 %198, 1
  %200 = call i32 @select(i32 noundef %199, ptr noundef null, ptr noundef %20, ptr noundef null, ptr noundef null)
  store i32 %200, ptr %9, align 4, !tbaa !11
  %201 = load i32, ptr %9, align 4, !tbaa !11
  %202 = icmp eq i32 %201, -1
  br i1 %202, label %203, label %208

203:                                              ; preds = %186
  %204 = call ptr @__errno_location() #9
  %205 = load i32, ptr %204, align 4, !tbaa !11
  %206 = icmp eq i32 %205, 4
  br i1 %206, label %207, label %208

207:                                              ; preds = %203
  store i32 8, ptr %17, align 4
  br label %223, !llvm.loop !31

208:                                              ; preds = %203, %186
  store i32 4, ptr %19, align 4, !tbaa !11
  %209 = load i32, ptr %8, align 4, !tbaa !11
  %210 = call i32 @getsockopt(i32 noundef %209, i32 noundef 1, i32 noundef 4, ptr noundef %21, ptr noundef %19) #7
  %211 = icmp slt i32 %210, 0
  br i1 %211, label %212, label %216

212:                                              ; preds = %208
  call void @perror(ptr noundef @.str.3)
  %213 = load i32, ptr %8, align 4, !tbaa !11
  %214 = call i32 @close(i32 noundef %213)
  %215 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %215) #7
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %223

216:                                              ; preds = %208
  %217 = load i32, ptr %21, align 4, !tbaa !11
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %219, label %222

219:                                              ; preds = %216
  %220 = load i32, ptr %21, align 4, !tbaa !11
  %221 = call ptr @__errno_location() #9
  store i32 %220, ptr %221, align 4, !tbaa !11
  store i32 -1, ptr %9, align 4, !tbaa !11
  br label %222

222:                                              ; preds = %219, %216
  store i32 0, ptr %17, align 4
  br label %223

223:                                              ; preds = %222, %212, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %224 = load i32, ptr %17, align 4
  switch i32 %224, label %248 [
    i32 0, label %225
    i32 8, label %154
  ]

225:                                              ; preds = %223
  br label %154, !llvm.loop !31

226:                                              ; preds = %167
  %227 = load i32, ptr %9, align 4, !tbaa !11
  %228 = icmp sge i32 %227, 0
  br i1 %228, label %229, label %230

229:                                              ; preds = %226
  br label %235

230:                                              ; preds = %226
  br label %231

231:                                              ; preds = %230, %126
  %232 = load ptr, ptr %13, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.addrinfo, ptr %232, i32 0, i32 7
  %234 = load ptr, ptr %233, align 8, !tbaa !32
  store ptr %234, ptr %13, align 8, !tbaa !5
  br label %104, !llvm.loop !33

235:                                              ; preds = %229, %104
  %236 = load ptr, ptr %12, align 8, !tbaa !5
  call void @freeaddrinfo(ptr noundef %236) #7
  %237 = load i32, ptr %8, align 4, !tbaa !11
  %238 = icmp slt i32 %237, 0
  br i1 %238, label %239, label %240

239:                                              ; preds = %235
  call void @perror(ptr noundef @.str.4)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %248

240:                                              ; preds = %235
  %241 = load i32, ptr %9, align 4, !tbaa !11
  %242 = icmp slt i32 %241, 0
  br i1 %242, label %243, label %246

243:                                              ; preds = %240
  call void @perror(ptr noundef @.str.5)
  %244 = load i32, ptr %8, align 4, !tbaa !11
  %245 = call i32 @close(i32 noundef %244)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %248

246:                                              ; preds = %240
  %247 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %247, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %248

248:                                              ; preds = %246, %243, %239, %223, %97
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 65, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %249 = load i32, ptr %4, align 4
  ret i32 %249
}

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #4

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

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #3

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

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

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

declare i32 @close(i32 noundef) #5

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

declare i32 @connect(i32 noundef, ptr noundef, i32 noundef) #5

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

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

declare void @perror(ptr noundef) #5

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.fd_set = type { [16 x i64] }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @connecthostport(ptr nocapture noundef readonly %0, i16 noundef zeroext %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca [65 x i8], align 16
  %5 = alloca [8 x i8], align 1
  %6 = alloca ptr, align 8
  %7 = alloca %struct.addrinfo, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.fd_set, align 8
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 65, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #9
  %11 = getelementptr inbounds i8, ptr %7, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %11, i8 0, i64 40, i1 false)
  store i32 1024, ptr %7, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 1, ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 0, ptr %13, align 4, !tbaa !12
  %14 = zext i16 %1 to i32
  %15 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 8, ptr noundef nonnull @.str, i32 noundef %14) #9
  %16 = load i8, ptr %0, align 1, !tbaa !13
  %17 = icmp eq i8 %16, 91
  br i1 %17, label %.preheader87, label %37

.preheader87:                                     ; preds = %3
  %18 = getelementptr inbounds i8, ptr %0, i64 1
  %19 = load i8, ptr %18, align 1, !tbaa !13
  %.not95 = icmp eq i8 %19, 0
  br i1 %.not95, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader87, %24
  %indvars.iv = phi i64 [ %indvars.iv.next, %24 ], [ 0, %.preheader87 ]
  %20 = phi i8 [ %33, %24 ], [ %19, %.preheader87 ]
  %21 = phi ptr [ %32, %24 ], [ %18, %.preheader87 ]
  %.06397 = phi i32 [ %30, %24 ], [ 1, %.preheader87 ]
  %.06596 = phi i32 [ %29, %24 ], [ 0, %.preheader87 ]
  %22 = icmp ne i8 %20, 93
  %23 = icmp ult i64 %indvars.iv, 64
  %or.cond7 = select i1 %22, i1 %23, i1 false
  br i1 %or.cond7, label %24, label %.critedge.loopexit.split.loop.exit

24:                                               ; preds = %.lr.ph
  %25 = getelementptr inbounds [65 x i8], ptr %4, i64 0, i64 %indvars.iv
  store i8 %20, ptr %25, align 1, !tbaa !13
  %26 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 3) #10
  %27 = icmp eq i32 %26, 0
  %28 = add nsw i32 %.06397, 2
  %spec.select = select i1 %27, i32 %28, i32 %.06397
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = add nuw nsw i32 %.06596, 1
  %30 = add nsw i32 %spec.select, 1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i8, ptr %0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !13
  %.not = icmp eq i8 %33, 0
  br i1 %.not, label %.critedge.loopexit, label %.lr.ph, !llvm.loop !14

.critedge.loopexit.split.loop.exit:               ; preds = %.lr.ph
  %34 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.critedge.loopexit

.critedge.loopexit:                               ; preds = %24, %.critedge.loopexit.split.loop.exit
  %.065.lcssa.ph = phi i32 [ %34, %.critedge.loopexit.split.loop.exit ], [ %29, %24 ]
  %35 = zext nneg i32 %.065.lcssa.ph to i64
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.preheader87
  %.065.lcssa = phi i64 [ 0, %.preheader87 ], [ %35, %.critedge.loopexit ]
  %36 = getelementptr inbounds [65 x i8], ptr %4, i64 0, i64 %.065.lcssa
  store i8 0, ptr %36, align 1, !tbaa !13
  br label %39

37:                                               ; preds = %3
  %38 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %0, i64 noundef 64) #9
  br label %39

39:                                               ; preds = %37, %.critedge
  %40 = getelementptr inbounds i8, ptr %4, i64 64
  store i8 0, ptr %40, align 16, !tbaa !13
  %41 = call i32 @getaddrinfo(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef nonnull %6) #9
  %.not81 = icmp eq i32 %41, 0
  br i1 %.not81, label %.preheader, label %44

.preheader:                                       ; preds = %39
  %.066108 = load ptr, ptr %6, align 8, !tbaa !16
  %.not82109 = icmp eq ptr %.066108, null
  br i1 %.not82109, label %.critedge3.thread.thread, label %.lr.ph113

.critedge3.thread.thread:                         ; preds = %.preheader
  %42 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %42) #9
  br label %104

.lr.ph113:                                        ; preds = %.preheader
  %43 = icmp ne i32 %2, 0
  br label %48

44:                                               ; preds = %39
  %45 = load ptr, ptr @stderr, align 8, !tbaa !16
  %46 = call ptr @gai_strerror(i32 noundef %41) #9
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.2, ptr noundef %46) #11
  br label %.thread131

48:                                               ; preds = %.lr.ph113, %.critedge3
  %.066112 = phi ptr [ %.066108, %.lr.ph113 ], [ %.066, %.critedge3 ]
  %.060111 = phi i32 [ -1, %.lr.ph113 ], [ %59, %.critedge3 ]
  %.067110 = phi i32 [ 0, %.lr.ph113 ], [ %.471, %.critedge3 ]
  %49 = icmp slt i32 %.060111, 0
  br i1 %49, label %52, label %50

50:                                               ; preds = %48
  %51 = call i32 @close(i32 noundef %.060111) #9
  br label %52

52:                                               ; preds = %50, %48
  %53 = getelementptr inbounds i8, ptr %.066112, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !12
  %55 = getelementptr inbounds i8, ptr %.066112, i64 8
  %56 = load i32, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds i8, ptr %.066112, i64 12
  %58 = load i32, ptr %57, align 4, !tbaa !17
  %59 = call i32 @socket(i32 noundef %54, i32 noundef %56, i32 noundef %58) #9
  %60 = icmp slt i32 %59, 0
  br i1 %60, label %.critedge3, label %61

61:                                               ; preds = %52
  %62 = getelementptr inbounds i8, ptr %.066112, i64 24
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = load i16, ptr %63, align 2, !tbaa !19
  %65 = icmp eq i16 %64, 10
  %or.cond = and i1 %43, %65
  br i1 %or.cond, label %66, label %68

66:                                               ; preds = %61
  %67 = getelementptr inbounds i8, ptr %63, i64 24
  store i32 %2, ptr %67, align 4, !tbaa !22
  br label %68

68:                                               ; preds = %66, %61
  %69 = getelementptr inbounds i8, ptr %.066112, i64 16
  %70 = load i32, ptr %69, align 8, !tbaa !25
  %71 = call i32 @connect(i32 noundef %59, ptr noundef nonnull %63, i32 noundef %70) #9
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %.lr.ph102, label %.critedge3.thread

.lr.ph102:                                        ; preds = %68
  %73 = tail call ptr @__errno_location() #12
  %74 = and i32 %59, 63
  %75 = zext nneg i32 %74 to i64
  %76 = shl nuw i64 1, %75
  %77 = lshr i32 %59, 6
  %78 = zext nneg i32 %77 to i64
  %79 = getelementptr inbounds [16 x i64], ptr %9, i64 0, i64 %78
  %80 = add nuw nsw i32 %59, 1
  br label %81

81:                                               ; preds = %.lr.ph102, %98
  %.168101 = phi i32 [ %71, %.lr.ph102 ], [ %.370, %98 ]
  %82 = load i32, ptr %73, align 4, !tbaa !26
  switch i32 %82, label %.critedge3 [
    i32 4, label %.critedge5
    i32 115, label %.critedge5
  ]

.critedge5:                                       ; preds = %81, %81
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %9, i8 0, i64 128, i1 false), !tbaa !27
  %83 = load i64, ptr %79, align 8, !tbaa !27
  %84 = or i64 %83, %76
  store i64 %84, ptr %79, align 8, !tbaa !27
  %85 = call i32 @select(i32 noundef %80, ptr noundef null, ptr noundef nonnull %9, ptr noundef null, ptr noundef null) #9
  %86 = icmp eq i32 %85, -1
  br i1 %86, label %87, label %90

87:                                               ; preds = %.critedge5
  %88 = load i32, ptr %73, align 4, !tbaa !26
  %89 = icmp eq i32 %88, 4
  br i1 %89, label %98, label %90, !llvm.loop !29

90:                                               ; preds = %87, %.critedge5
  store i32 4, ptr %8, align 4, !tbaa !26
  %91 = call i32 @getsockopt(i32 noundef %59, i32 noundef 1, i32 noundef 4, ptr noundef nonnull %10, ptr noundef nonnull %8) #9
  %92 = icmp slt i32 %91, 0
  br i1 %92, label %.thread, label %95

.thread:                                          ; preds = %90
  call void @perror(ptr noundef nonnull @.str.3) #13
  %93 = call i32 @close(i32 noundef %59) #9
  %94 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %94) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  br label %.thread131

95:                                               ; preds = %90
  %96 = load i32, ptr %10, align 4, !tbaa !26
  %.not83 = icmp eq i32 %96, 0
  br i1 %.not83, label %98, label %97

97:                                               ; preds = %95
  store i32 %96, ptr %73, align 4, !tbaa !26
  br label %98

98:                                               ; preds = %95, %97, %87
  %.370 = phi i32 [ -1, %87 ], [ -1, %97 ], [ %85, %95 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  %99 = icmp slt i32 %.370, 0
  br i1 %99, label %81, label %.critedge3.thread.thread126

.critedge3:                                       ; preds = %81, %52
  %.471 = phi i32 [ %.067110, %52 ], [ %.168101, %81 ]
  %100 = getelementptr inbounds i8, ptr %.066112, i64 40
  %.066 = load ptr, ptr %100, align 8, !tbaa !16
  %.not82 = icmp eq ptr %.066, null
  br i1 %.not82, label %.critedge3.thread, label %48, !llvm.loop !30

.critedge3.thread:                                ; preds = %.critedge3, %68
  %.5.ph = phi i32 [ %.471, %.critedge3 ], [ %71, %68 ]
  %101 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %101) #9
  %102 = icmp slt i32 %59, 0
  br i1 %102, label %104, label %105

.critedge3.thread.thread126:                      ; preds = %98
  %103 = load ptr, ptr %6, align 8, !tbaa !16
  call void @freeaddrinfo(ptr noundef %103) #9
  br label %.thread131

104:                                              ; preds = %.critedge3.thread.thread, %.critedge3.thread
  call void @perror(ptr noundef nonnull @.str.4) #13
  br label %.thread131

105:                                              ; preds = %.critedge3.thread
  %106 = icmp slt i32 %.5.ph, 0
  br i1 %106, label %107, label %.thread131

107:                                              ; preds = %105
  call void @perror(ptr noundef nonnull @.str.5) #13
  %108 = call i32 @close(i32 noundef %59) #9
  br label %.thread131

.thread131:                                       ; preds = %.critedge3.thread.thread126, %.thread, %105, %107, %104, %44
  %.4 = phi i32 [ -1, %44 ], [ -1, %104 ], [ -1, %107 ], [ %59, %105 ], [ -1, %.thread ], [ %59, %.critedge3.thread.thread126 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 65, ptr nonnull %4) #9
  ret i32 %.4
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #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 #3

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

declare i32 @close(i32 noundef) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #8

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

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

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

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

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

!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, !7, i64 0}
!6 = !{!"addrinfo", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !7, i64 4}
!13 = !{!8, !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!10, !10, i64 0}
!17 = !{!6, !7, i64 12}
!18 = !{!6, !10, i64 24}
!19 = !{!20, !21, i64 0}
!20 = !{!"sockaddr", !21, i64 0, !8, i64 2}
!21 = !{!"short", !8, i64 0}
!22 = !{!23, !7, i64 24}
!23 = !{!"sockaddr_in6", !21, i64 0, !21, i64 2, !7, i64 4, !24, i64 8, !7, i64 24}
!24 = !{!"in6_addr", !8, i64 0}
!25 = !{!6, !7, i64 16}
!26 = !{!7, !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"long", !8, i64 0}
!29 = distinct !{!29, !15}
!30 = distinct !{!30, !15}


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