; LLVM IR from holzschu/ios_system :: curl/curl/tests/http/clients (h2-download)

; 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.transfer = type { i32, ptr, [128 x i8], ptr, i64, i64, i32, i32, i32, i32 }
%struct.CURLMsg = type { i32, ptr, %union.anon }
%union.anon = type { ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@optarg = external global ptr, align 8
@transfer_count = external hidden global i64, align 8
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@optind = external global i32, align 4
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@transfers = external hidden global ptr, align 8
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  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 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 1, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  br label %22

22:                                               ; preds = %41, %2
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !9
  %25 = call i32 @getopt(i32 noundef %23, ptr noundef %24, ptr noundef @.str) #5
  store i32 %25, ptr %16, align 4, !tbaa !5
  %26 = icmp ne i32 %25, -1
  br i1 %26, label %27, label %42

27:                                               ; preds = %22
  %28 = load i32, ptr %16, align 4, !tbaa !5
  switch i32 %28, label %40 [
    i32 104, label %29
    i32 97, label %30
    i32 109, label %31
    i32 110, label %34
    i32 80, label %37
  ]

29:                                               ; preds = %27
  call void @usage(ptr noundef null)
  store i32 2, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %391

30:                                               ; preds = %27
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %41

31:                                               ; preds = %27
  %32 = load ptr, ptr @optarg, align 8, !tbaa !9
  %33 = call i64 @strtol(ptr noundef %32, ptr noundef null, i32 noundef 10) #5
  store i64 %33, ptr %11, align 8, !tbaa !11
  br label %41

34:                                               ; preds = %27
  %35 = load ptr, ptr @optarg, align 8, !tbaa !9
  %36 = call i64 @strtol(ptr noundef %35, ptr noundef null, i32 noundef 10) #5
  store i64 %36, ptr @transfer_count, align 8, !tbaa !11
  br label %41

37:                                               ; preds = %27
  %38 = load ptr, ptr @optarg, align 8, !tbaa !9
  %39 = call i64 @strtol(ptr noundef %38, ptr noundef null, i32 noundef 10) #5
  store i64 %39, ptr %13, align 8, !tbaa !11
  br label %41

40:                                               ; preds = %27
  call void @usage(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %391

41:                                               ; preds = %37, %34, %31, %30
  br label %22, !llvm.loop !13

42:                                               ; preds = %22
  %43 = load i32, ptr @optind, align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sub nsw i32 %44, %43
  store i32 %45, ptr %4, align 4, !tbaa !5
  %46 = load i32, ptr @optind, align 4, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = sext i32 %46 to i64
  %49 = getelementptr inbounds ptr, ptr %47, i64 %48
  store ptr %49, ptr %5, align 8, !tbaa !9
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = icmp ne i32 %50, 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %42
  call void @usage(ptr noundef @.str.2)
  store i32 2, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %391

53:                                               ; preds = %42
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %54, i64 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  store ptr %56, ptr %8, align 8, !tbaa !9
  %57 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %58 = call noalias ptr @calloc(i64 noundef %57, i64 noundef 184) #6
  store ptr %58, ptr @transfers, align 8, !tbaa !9
  %59 = load ptr, ptr @transfers, align 8, !tbaa !9
  %60 = icmp ne ptr %59, null
  br i1 %60, label %64, label %61

61:                                               ; preds = %53
  %62 = load ptr, ptr @stderr, align 8, !tbaa !9
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.3) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %391

64:                                               ; preds = %53
  %65 = call ptr @curl_multi_init()
  store ptr %65, ptr %6, align 8, !tbaa !9
  %66 = load ptr, ptr %6, align 8, !tbaa !9
  %67 = call i32 (ptr, i32, ...) @curl_multi_setopt(ptr noundef %66, i32 noundef 3, i64 noundef 2)
  store i64 0, ptr %12, align 8, !tbaa !11
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %68

68:                                               ; preds = %85, %64
  %69 = load i64, ptr %9, align 8, !tbaa !11
  %70 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %71 = icmp ult i64 %69, %70
  br i1 %71, label %72, label %88

72:                                               ; preds = %68
  %73 = load ptr, ptr @transfers, align 8, !tbaa !9
  %74 = load i64, ptr %9, align 8, !tbaa !11
  %75 = getelementptr inbounds %struct.transfer, ptr %73, i64 %74
  store ptr %75, ptr %15, align 8, !tbaa !9
  %76 = load i64, ptr %9, align 8, !tbaa !11
  %77 = trunc i64 %76 to i32
  %78 = load ptr, ptr %15, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.transfer, ptr %78, i32 0, i32 0
  store i32 %77, ptr %79, align 8, !tbaa !15
  %80 = load i64, ptr %13, align 8, !tbaa !11
  %81 = load i64, ptr %9, align 8, !tbaa !11
  %82 = mul i64 %80, %81
  %83 = load ptr, ptr %15, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.transfer, ptr %83, i32 0, i32 5
  store i64 %82, ptr %84, align 8, !tbaa !17
  br label %85

85:                                               ; preds = %72
  %86 = load i64, ptr %9, align 8, !tbaa !11
  %87 = add i64 %86, 1
  store i64 %87, ptr %9, align 8, !tbaa !11
  br label %68, !llvm.loop !18

88:                                               ; preds = %68
  %89 = load i64, ptr %11, align 8, !tbaa !11
  %90 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %92, label %94

92:                                               ; preds = %88
  %93 = load i64, ptr %11, align 8, !tbaa !11
  br label %96

94:                                               ; preds = %88
  %95 = load i64, ptr @transfer_count, align 8, !tbaa !11
  br label %96

96:                                               ; preds = %94, %92
  %97 = phi i64 [ %93, %92 ], [ %95, %94 ]
  store i64 %97, ptr %10, align 8, !tbaa !11
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %98

98:                                               ; preds = %141, %96
  %99 = load i64, ptr %9, align 8, !tbaa !11
  %100 = load i64, ptr %10, align 8, !tbaa !11
  %101 = icmp ult i64 %99, %100
  br i1 %101, label %102, label %144

102:                                              ; preds = %98
  %103 = load ptr, ptr @transfers, align 8, !tbaa !9
  %104 = load i64, ptr %9, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.transfer, ptr %103, i64 %104
  store ptr %105, ptr %15, align 8, !tbaa !9
  %106 = call ptr @curl_easy_init()
  %107 = load ptr, ptr %15, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.transfer, ptr %107, i32 0, i32 1
  store ptr %106, ptr %108, align 8, !tbaa !19
  %109 = load ptr, ptr %15, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.transfer, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !19
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %121

113:                                              ; preds = %102
  %114 = load ptr, ptr %15, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.transfer, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !19
  %117 = load ptr, ptr %8, align 8, !tbaa !9
  %118 = load ptr, ptr %15, align 8, !tbaa !9
  %119 = call i32 @setup(ptr noundef %116, ptr noundef %117, ptr noundef %118)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %126

121:                                              ; preds = %113, %102
  %122 = load ptr, ptr @stderr, align 8, !tbaa !9
  %123 = load i64, ptr %9, align 8, !tbaa !11
  %124 = trunc i64 %123 to i32
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.4, i32 noundef %124) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %391

126:                                              ; preds = %113
  %127 = load ptr, ptr %6, align 8, !tbaa !9
  %128 = load ptr, ptr %15, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.transfer, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !19
  %131 = call i32 @curl_multi_add_handle(ptr noundef %127, ptr noundef %130)
  %132 = load ptr, ptr %15, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.transfer, ptr %132, i32 0, i32 6
  store i32 1, ptr %133, align 8, !tbaa !20
  %134 = load i64, ptr %12, align 8, !tbaa !11
  %135 = add i64 %134, 1
  store i64 %135, ptr %12, align 8, !tbaa !11
  %136 = load ptr, ptr @stderr, align 8, !tbaa !9
  %137 = load ptr, ptr %15, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.transfer, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !15
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.5, i32 noundef %139) #5
  br label %141

141:                                              ; preds = %126
  %142 = load i64, ptr %9, align 8, !tbaa !11
  %143 = add i64 %142, 1
  store i64 %143, ptr %9, align 8, !tbaa !11
  br label %98, !llvm.loop !21

144:                                              ; preds = %98
  br label %145

145:                                              ; preds = %349, %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %146 = load ptr, ptr %6, align 8, !tbaa !9
  %147 = call i32 @curl_multi_perform(ptr noundef %146, ptr noundef %18)
  store i32 %147, ptr %19, align 4, !tbaa !5
  %148 = load i32, ptr %18, align 4, !tbaa !5
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %156

150:                                              ; preds = %145
  %151 = load ptr, ptr %6, align 8, !tbaa !9
  %152 = call i32 @curl_multi_poll(ptr noundef %151, ptr noundef null, i32 noundef 0, i32 noundef 1000, ptr noundef null)
  store i32 %152, ptr %19, align 4, !tbaa !5
  %153 = load ptr, ptr @stderr, align 8, !tbaa !9
  %154 = load i32, ptr %19, align 4, !tbaa !5
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.6, i32 noundef %154) #5
  br label %156

156:                                              ; preds = %150, %145
  %157 = load i32, ptr %19, align 4, !tbaa !5
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %160

159:                                              ; preds = %156
  store i32 11, ptr %17, align 4
  br label %346

160:                                              ; preds = %156
  br label %161

161:                                              ; preds = %342, %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !9
  %163 = call ptr @curl_multi_info_read(ptr noundef %162, ptr noundef %20)
  store ptr %163, ptr %7, align 8, !tbaa !9
  %164 = load ptr, ptr %7, align 8, !tbaa !9
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %190

166:                                              ; preds = %161
  %167 = load ptr, ptr %7, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.CURLMsg, ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 8, !tbaa !22
  %170 = icmp eq i32 %169, 1
  br i1 %170, label %171, label %190

171:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %172 = load ptr, ptr %7, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.CURLMsg, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !24
  store ptr %174, ptr %21, align 8, !tbaa !9
  %175 = load i64, ptr %12, align 8, !tbaa !11
  %176 = add i64 %175, -1
  store i64 %176, ptr %12, align 8, !tbaa !11
  %177 = load ptr, ptr %6, align 8, !tbaa !9
  %178 = load ptr, ptr %21, align 8, !tbaa !9
  %179 = call i32 @curl_multi_remove_handle(ptr noundef %177, ptr noundef %178)
  %180 = load ptr, ptr %21, align 8, !tbaa !9
  %181 = call ptr @get_transfer_for_easy(ptr noundef %180)
  store ptr %181, ptr %15, align 8, !tbaa !9
  %182 = load ptr, ptr %15, align 8, !tbaa !9
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %187

184:                                              ; preds = %171
  %185 = load ptr, ptr %15, align 8, !tbaa !9
  %186 = getelementptr inbounds %struct.transfer, ptr %185, i32 0, i32 9
  store i32 1, ptr %186, align 4, !tbaa !25
  br label %189

187:                                              ; preds = %171
  %188 = load ptr, ptr %21, align 8, !tbaa !9
  call void @curl_easy_cleanup(ptr noundef %188)
  br label %189

189:                                              ; preds = %187, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %338

190:                                              ; preds = %166, %161
  %191 = load i32, ptr %14, align 4, !tbaa !5
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %236

193:                                              ; preds = %190
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %194

194:                                              ; preds = %232, %193
  %195 = load i64, ptr %9, align 8, !tbaa !11
  %196 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %197 = icmp ult i64 %195, %196
  br i1 %197, label %198, label %235

198:                                              ; preds = %194
  %199 = load ptr, ptr @transfers, align 8, !tbaa !9
  %200 = load i64, ptr %9, align 8, !tbaa !11
  %201 = getelementptr inbounds %struct.transfer, ptr %199, i64 %200
  store ptr %201, ptr %15, align 8, !tbaa !9
  %202 = load ptr, ptr %15, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.transfer, ptr %202, i32 0, i32 9
  %204 = load i32, ptr %203, align 4, !tbaa !25
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %231, label %206

206:                                              ; preds = %198
  %207 = load ptr, ptr %15, align 8, !tbaa !9
  %208 = getelementptr inbounds %struct.transfer, ptr %207, i32 0, i32 7
  %209 = load i32, ptr %208, align 4, !tbaa !26
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %231

211:                                              ; preds = %206
  %212 = load ptr, ptr %15, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.transfer, ptr %212, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !19
  %215 = icmp ne ptr %214, null
  br i1 %215, label %216, label %231

216:                                              ; preds = %211
  %217 = load ptr, ptr %6, align 8, !tbaa !9
  %218 = load ptr, ptr %15, align 8, !tbaa !9
  %219 = getelementptr inbounds %struct.transfer, ptr %218, i32 0, i32 1
  %220 = load ptr, ptr %219, align 8, !tbaa !19
  %221 = call i32 @curl_multi_remove_handle(ptr noundef %217, ptr noundef %220)
  %222 = load ptr, ptr %15, align 8, !tbaa !9
  %223 = getelementptr inbounds %struct.transfer, ptr %222, i32 0, i32 9
  store i32 1, ptr %223, align 4, !tbaa !25
  %224 = load i64, ptr %12, align 8, !tbaa !11
  %225 = add i64 %224, -1
  store i64 %225, ptr %12, align 8, !tbaa !11
  %226 = load ptr, ptr @stderr, align 8, !tbaa !9
  %227 = load ptr, ptr %15, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct.transfer, ptr %227, i32 0, i32 0
  %229 = load i32, ptr %228, align 8, !tbaa !15
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.7, i32 noundef %229) #5
  br label %231

231:                                              ; preds = %216, %211, %206, %198
  br label %232

232:                                              ; preds = %231
  %233 = load i64, ptr %9, align 8, !tbaa !11
  %234 = add i64 %233, 1
  store i64 %234, ptr %9, align 8, !tbaa !11
  br label %194, !llvm.loop !27

235:                                              ; preds = %194
  br label %273

236:                                              ; preds = %190
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %237

237:                                              ; preds = %269, %236
  %238 = load i64, ptr %9, align 8, !tbaa !11
  %239 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %240 = icmp ult i64 %238, %239
  br i1 %240, label %241, label %272

241:                                              ; preds = %237
  %242 = load ptr, ptr @transfers, align 8, !tbaa !9
  %243 = load i64, ptr %9, align 8, !tbaa !11
  %244 = getelementptr inbounds %struct.transfer, ptr %242, i64 %243
  store ptr %244, ptr %15, align 8, !tbaa !9
  %245 = load ptr, ptr %15, align 8, !tbaa !9
  %246 = getelementptr inbounds %struct.transfer, ptr %245, i32 0, i32 9
  %247 = load i32, ptr %246, align 4, !tbaa !25
  %248 = icmp ne i32 %247, 0
  br i1 %248, label %268, label %249

249:                                              ; preds = %241
  %250 = load ptr, ptr %15, align 8, !tbaa !9
  %251 = getelementptr inbounds %struct.transfer, ptr %250, i32 0, i32 7
  %252 = load i32, ptr %251, align 4, !tbaa !26
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %268

254:                                              ; preds = %249
  %255 = load ptr, ptr %15, align 8, !tbaa !9
  %256 = getelementptr inbounds %struct.transfer, ptr %255, i32 0, i32 8
  store i32 1, ptr %256, align 8, !tbaa !28
  %257 = load ptr, ptr %15, align 8, !tbaa !9
  %258 = getelementptr inbounds %struct.transfer, ptr %257, i32 0, i32 7
  store i32 0, ptr %258, align 4, !tbaa !26
  %259 = load ptr, ptr %15, align 8, !tbaa !9
  %260 = getelementptr inbounds %struct.transfer, ptr %259, i32 0, i32 1
  %261 = load ptr, ptr %260, align 8, !tbaa !19
  %262 = call i32 @curl_easy_pause(ptr noundef %261, i32 noundef 0)
  %263 = load ptr, ptr @stderr, align 8, !tbaa !9
  %264 = load ptr, ptr %15, align 8, !tbaa !9
  %265 = getelementptr inbounds %struct.transfer, ptr %264, i32 0, i32 0
  %266 = load i32, ptr %265, align 8, !tbaa !15
  %267 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %263, ptr noundef @.str.8, i32 noundef %266) #5
  br label %272

268:                                              ; preds = %249, %241
  br label %269

269:                                              ; preds = %268
  %270 = load i64, ptr %9, align 8, !tbaa !11
  %271 = add i64 %270, 1
  store i64 %271, ptr %9, align 8, !tbaa !11
  br label %237, !llvm.loop !29

272:                                              ; preds = %254, %237
  br label %273

273:                                              ; preds = %272, %235
  br label %274

274:                                              ; preds = %336, %273
  %275 = load i64, ptr %12, align 8, !tbaa !11
  %276 = load i64, ptr %11, align 8, !tbaa !11
  %277 = icmp ult i64 %275, %276
  br i1 %277, label %278, label %337

278:                                              ; preds = %274
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %279

279:                                              ; preds = %328, %278
  %280 = load i64, ptr %9, align 8, !tbaa !11
  %281 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %282 = icmp ult i64 %280, %281
  br i1 %282, label %283, label %331

283:                                              ; preds = %279
  %284 = load ptr, ptr @transfers, align 8, !tbaa !9
  %285 = load i64, ptr %9, align 8, !tbaa !11
  %286 = getelementptr inbounds %struct.transfer, ptr %284, i64 %285
  store ptr %286, ptr %15, align 8, !tbaa !9
  %287 = load ptr, ptr %15, align 8, !tbaa !9
  %288 = getelementptr inbounds %struct.transfer, ptr %287, i32 0, i32 6
  %289 = load i32, ptr %288, align 8, !tbaa !20
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %327, label %291

291:                                              ; preds = %283
  %292 = call ptr @curl_easy_init()
  %293 = load ptr, ptr %15, align 8, !tbaa !9
  %294 = getelementptr inbounds %struct.transfer, ptr %293, i32 0, i32 1
  store ptr %292, ptr %294, align 8, !tbaa !19
  %295 = load ptr, ptr %15, align 8, !tbaa !9
  %296 = getelementptr inbounds %struct.transfer, ptr %295, i32 0, i32 1
  %297 = load ptr, ptr %296, align 8, !tbaa !19
  %298 = icmp ne ptr %297, null
  br i1 %298, label %299, label %307

299:                                              ; preds = %291
  %300 = load ptr, ptr %15, align 8, !tbaa !9
  %301 = getelementptr inbounds %struct.transfer, ptr %300, i32 0, i32 1
  %302 = load ptr, ptr %301, align 8, !tbaa !19
  %303 = load ptr, ptr %8, align 8, !tbaa !9
  %304 = load ptr, ptr %15, align 8, !tbaa !9
  %305 = call i32 @setup(ptr noundef %302, ptr noundef %303, ptr noundef %304)
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %307, label %312

307:                                              ; preds = %299, %291
  %308 = load ptr, ptr @stderr, align 8, !tbaa !9
  %309 = load i64, ptr %9, align 8, !tbaa !11
  %310 = trunc i64 %309 to i32
  %311 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %308, ptr noundef @.str.9, i32 noundef %310) #5
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %339

312:                                              ; preds = %299
  %313 = load ptr, ptr %6, align 8, !tbaa !9
  %314 = load ptr, ptr %15, align 8, !tbaa !9
  %315 = getelementptr inbounds %struct.transfer, ptr %314, i32 0, i32 1
  %316 = load ptr, ptr %315, align 8, !tbaa !19
  %317 = call i32 @curl_multi_add_handle(ptr noundef %313, ptr noundef %316)
  %318 = load ptr, ptr %15, align 8, !tbaa !9
  %319 = getelementptr inbounds %struct.transfer, ptr %318, i32 0, i32 6
  store i32 1, ptr %319, align 8, !tbaa !20
  %320 = load i64, ptr %12, align 8, !tbaa !11
  %321 = add i64 %320, 1
  store i64 %321, ptr %12, align 8, !tbaa !11
  %322 = load ptr, ptr @stderr, align 8, !tbaa !9
  %323 = load ptr, ptr %15, align 8, !tbaa !9
  %324 = getelementptr inbounds %struct.transfer, ptr %323, i32 0, i32 0
  %325 = load i32, ptr %324, align 8, !tbaa !15
  %326 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %322, ptr noundef @.str.5, i32 noundef %325) #5
  br label %331

327:                                              ; preds = %283
  br label %328

328:                                              ; preds = %327
  %329 = load i64, ptr %9, align 8, !tbaa !11
  %330 = add i64 %329, 1
  store i64 %330, ptr %9, align 8, !tbaa !11
  br label %279, !llvm.loop !30

331:                                              ; preds = %312, %279
  %332 = load i64, ptr %9, align 8, !tbaa !11
  %333 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %334 = icmp eq i64 %332, %333
  br i1 %334, label %335, label %336

335:                                              ; preds = %331
  br label %337

336:                                              ; preds = %331
  br label %274, !llvm.loop !31

337:                                              ; preds = %335, %274
  br label %338

338:                                              ; preds = %337, %189
  store i32 0, ptr %17, align 4
  br label %339

339:                                              ; preds = %338, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %340 = load i32, ptr %17, align 4
  switch i32 %340, label %346 [
    i32 0, label %341
  ]

341:                                              ; preds = %339
  br label %342

342:                                              ; preds = %341
  %343 = load ptr, ptr %7, align 8, !tbaa !9
  %344 = icmp ne ptr %343, null
  br i1 %344, label %161, label %345, !llvm.loop !32

345:                                              ; preds = %342
  store i32 0, ptr %17, align 4
  br label %346

346:                                              ; preds = %345, %339, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %347 = load i32, ptr %17, align 4
  switch i32 %347, label %391 [
    i32 0, label %348
    i32 11, label %352
  ]

348:                                              ; preds = %346
  br label %349

349:                                              ; preds = %348
  %350 = load i64, ptr %12, align 8, !tbaa !11
  %351 = icmp ne i64 %350, 0
  br i1 %351, label %145, label %352, !llvm.loop !33

352:                                              ; preds = %349, %346
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %353

353:                                              ; preds = %384, %352
  %354 = load i64, ptr %9, align 8, !tbaa !11
  %355 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %356 = icmp ult i64 %354, %355
  br i1 %356, label %357, label %387

357:                                              ; preds = %353
  %358 = load ptr, ptr @transfers, align 8, !tbaa !9
  %359 = load i64, ptr %9, align 8, !tbaa !11
  %360 = getelementptr inbounds %struct.transfer, ptr %358, i64 %359
  store ptr %360, ptr %15, align 8, !tbaa !9
  %361 = load ptr, ptr %15, align 8, !tbaa !9
  %362 = getelementptr inbounds %struct.transfer, ptr %361, i32 0, i32 3
  %363 = load ptr, ptr %362, align 8, !tbaa !34
  %364 = icmp ne ptr %363, null
  br i1 %364, label %365, label %372

365:                                              ; preds = %357
  %366 = load ptr, ptr %15, align 8, !tbaa !9
  %367 = getelementptr inbounds %struct.transfer, ptr %366, i32 0, i32 3
  %368 = load ptr, ptr %367, align 8, !tbaa !34
  %369 = call i32 @fclose(ptr noundef %368)
  %370 = load ptr, ptr %15, align 8, !tbaa !9
  %371 = getelementptr inbounds %struct.transfer, ptr %370, i32 0, i32 3
  store ptr null, ptr %371, align 8, !tbaa !34
  br label %372

372:                                              ; preds = %365, %357
  %373 = load ptr, ptr %15, align 8, !tbaa !9
  %374 = getelementptr inbounds %struct.transfer, ptr %373, i32 0, i32 1
  %375 = load ptr, ptr %374, align 8, !tbaa !19
  %376 = icmp ne ptr %375, null
  br i1 %376, label %377, label %383

377:                                              ; preds = %372
  %378 = load ptr, ptr %15, align 8, !tbaa !9
  %379 = getelementptr inbounds %struct.transfer, ptr %378, i32 0, i32 1
  %380 = load ptr, ptr %379, align 8, !tbaa !19
  call void @curl_easy_cleanup(ptr noundef %380)
  %381 = load ptr, ptr %15, align 8, !tbaa !9
  %382 = getelementptr inbounds %struct.transfer, ptr %381, i32 0, i32 1
  store ptr null, ptr %382, align 8, !tbaa !19
  br label %383

383:                                              ; preds = %377, %372
  br label %384

384:                                              ; preds = %383
  %385 = load i64, ptr %9, align 8, !tbaa !11
  %386 = add i64 %385, 1
  store i64 %386, ptr %9, align 8, !tbaa !11
  br label %353, !llvm.loop !35

387:                                              ; preds = %353
  %388 = load ptr, ptr @transfers, align 8, !tbaa !9
  call void @free(ptr noundef %388) #5
  %389 = load ptr, ptr %6, align 8, !tbaa !9
  %390 = call i32 @curl_multi_cleanup(ptr noundef %389)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %391

391:                                              ; preds = %387, %346, %121, %61, %52, %40, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %392 = load i32, ptr %3, align 4
  ret i32 %392
}

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) #0

; Function Attrs: nounwind
declare i64 @strtol(ptr noundef, ptr noundef, i32 noundef) #2

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

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

declare ptr @curl_multi_init() #4

declare i32 @curl_multi_setopt(ptr noundef, i32 noundef, ...) #4

declare ptr @curl_easy_init() #4

; Function Attrs: nounwind uwtable
declare hidden i32 @setup(ptr noundef, ptr noundef, ptr noundef) #0

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

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

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

declare ptr @curl_multi_info_read(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare hidden ptr @get_transfer_for_easy(ptr noundef) #0

declare void @curl_easy_cleanup(ptr noundef) #4

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

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

declare i32 @fclose(ptr noundef) #4

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

declare i32 @curl_multi_cleanup(ptr noundef) #4

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

!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"transfer", !6, i64 0, !10, i64 8, !7, i64 16, !10, i64 144, !12, i64 152, !12, i64 160, !6, i64 168, !6, i64 172, !6, i64 176, !6, i64 180}
!17 = !{!16, !12, i64 160}
!18 = distinct !{!18, !14}
!19 = !{!16, !10, i64 8}
!20 = !{!16, !6, i64 168}
!21 = distinct !{!21, !14}
!22 = !{!23, !6, i64 0}
!23 = !{!"CURLMsg", !6, i64 0, !10, i64 8, !7, i64 16}
!24 = !{!23, !10, i64 8}
!25 = !{!16, !6, i64 180}
!26 = !{!16, !6, i64 172}
!27 = distinct !{!27, !14}
!28 = !{!16, !6, i64 176}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}
!33 = distinct !{!33, !14}
!34 = !{!16, !10, i64 144}
!35 = distinct !{!35, !14}


; 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.transfer = type { i32, ptr, [128 x i8], ptr, i64, i64, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@transfer_count = external hidden local_unnamed_addr global i64, align 8
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@transfers = external hidden local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  br label %.outer

.outer:                                           ; preds = %8, %2
  %.0113.ph = phi i64 [ %10, %8 ], [ 1, %2 ]
  %.0106.ph = phi i64 [ %.0106.ph281, %8 ], [ 0, %2 ]
  %.0104.ph = phi i32 [ %.0104.ph284, %8 ], [ 0, %2 ]
  br label %.outer280

.outer280:                                        ; preds = %.outer, %14
  %.0106.ph281 = phi i64 [ %.0106.ph, %.outer ], [ %16, %14 ]
  %.0104.ph282 = phi i32 [ %.0104.ph, %.outer ], [ %.0104.ph284, %14 ]
  br label %.outer283

.outer283:                                        ; preds = %5, %.outer280
  %.0104.ph284 = phi i32 [ %.0104.ph282, %.outer280 ], [ 1, %5 ]
  br label %5

5:                                                ; preds = %.outer283, %11
  %6 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #9
  switch i32 %6, label %17 [
    i32 -1, label %18
    i32 104, label %7
    i32 97, label %.outer283
    i32 109, label %8
    i32 110, label %11
    i32 80, label %14
  ], !llvm.loop !5

7:                                                ; preds = %5
  tail call void @usage(ptr noundef null)
  br label %170

8:                                                ; preds = %5
  %9 = load ptr, ptr @optarg, align 8, !tbaa !7
  %10 = tail call i64 @strtol(ptr nocapture noundef %9, ptr noundef null, i32 noundef 10) #9
  br label %.outer, !llvm.loop !5

11:                                               ; preds = %5
  %12 = load ptr, ptr @optarg, align 8, !tbaa !7
  %13 = tail call i64 @strtol(ptr nocapture noundef %12, ptr noundef null, i32 noundef 10) #9
  store i64 %13, ptr @transfer_count, align 8, !tbaa !11
  br label %5, !llvm.loop !5

14:                                               ; preds = %5
  %15 = load ptr, ptr @optarg, align 8, !tbaa !7
  %16 = tail call i64 @strtol(ptr nocapture noundef %15, ptr noundef null, i32 noundef 10) #9
  br label %.outer280, !llvm.loop !5

17:                                               ; preds = %5
  tail call void @usage(ptr noundef nonnull @.str.1)
  br label %170

18:                                               ; preds = %5
  %19 = load i32, ptr @optind, align 4, !tbaa !13
  %20 = sub nsw i32 %0, %19
  %.not130 = icmp eq i32 %20, 1
  br i1 %.not130, label %22, label %21

21:                                               ; preds = %18
  tail call void @usage(ptr noundef nonnull @.str.2)
  br label %170

22:                                               ; preds = %18
  %23 = sext i32 %19 to i64
  %24 = getelementptr inbounds ptr, ptr %1, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !7
  %26 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %27 = tail call noalias ptr @calloc(i64 noundef %26, i64 noundef 184) #10
  store ptr %27, ptr @transfers, align 8, !tbaa !7
  %.not131 = icmp eq ptr %27, null
  br i1 %.not131, label %28, label %31

28:                                               ; preds = %22
  %29 = load ptr, ptr @stderr, align 8, !tbaa !7
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.3) #11
  br label %170

31:                                               ; preds = %22
  %32 = tail call ptr @curl_multi_init() #9
  %33 = tail call i32 (ptr, i32, ...) @curl_multi_setopt(ptr noundef %32, i32 noundef 3, i64 noundef 2) #9
  %34 = load i64, ptr @transfer_count, align 8
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %31
  %35 = load ptr, ptr @transfers, align 8, !tbaa !7
  br label %36

36:                                               ; preds = %.lr.ph, %36
  %.0115186 = phi i64 [ 0, %.lr.ph ], [ %41, %36 ]
  %37 = getelementptr inbounds %struct.transfer, ptr %35, i64 %.0115186
  %38 = trunc i64 %.0115186 to i32
  store i32 %38, ptr %37, align 8, !tbaa !15
  %39 = mul i64 %.0115186, %.0106.ph281
  %40 = getelementptr inbounds i8, ptr %37, i64 160
  store i64 %39, ptr %40, align 8, !tbaa !17
  %41 = add nuw i64 %.0115186, 1
  %42 = load i64, ptr @transfer_count, align 8
  %43 = icmp ult i64 %41, %42
  br i1 %43, label %36, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %36, %31
  %.lcssa179 = phi i64 [ 0, %31 ], [ %42, %36 ]
  %44 = tail call i64 @llvm.umin.i64(i64 %.0113.ph, i64 %.lcssa179)
  %.not207 = icmp eq i64 %44, 0
  br i1 %.not207, label %.preheader170, label %.lr.ph190

.preheader170:                                    ; preds = %55, %._crit_edge
  %.not135 = icmp eq i32 %.0104.ph284, 0
  br label %63

.lr.ph190:                                        ; preds = %._crit_edge, %55
  %.0108188 = phi i64 [ %59, %55 ], [ 0, %._crit_edge ]
  %45 = load ptr, ptr @transfers, align 8, !tbaa !7
  %46 = getelementptr inbounds %struct.transfer, ptr %45, i64 %.0108188
  %47 = tail call ptr @curl_easy_init() #9
  %48 = getelementptr inbounds i8, ptr %46, i64 8
  store ptr %47, ptr %48, align 8, !tbaa !19
  %.not148 = icmp eq ptr %47, null
  br i1 %.not148, label %51, label %49

49:                                               ; preds = %.lr.ph190
  %50 = tail call i32 @setup(ptr noundef nonnull %47, ptr noundef %25, ptr noundef nonnull %46)
  %.not149 = icmp eq i32 %50, 0
  br i1 %.not149, label %55, label %51

51:                                               ; preds = %49, %.lr.ph190
  %52 = load ptr, ptr @stderr, align 8, !tbaa !7
  %53 = trunc i64 %.0108188 to i32
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.4, i32 noundef %53) #11
  br label %170

55:                                               ; preds = %49
  %56 = load ptr, ptr %48, align 8, !tbaa !19
  %57 = tail call i32 @curl_multi_add_handle(ptr noundef %32, ptr noundef %56) #9
  %58 = getelementptr inbounds i8, ptr %46, i64 168
  store i32 1, ptr %58, align 8, !tbaa !20
  %59 = add nuw i64 %.0108188, 1
  %60 = load ptr, ptr @stderr, align 8, !tbaa !7
  %61 = load i32, ptr %46, align 8, !tbaa !15
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.5, i32 noundef %61) #11
  %exitcond.not = icmp eq i64 %59, %44
  br i1 %exitcond.not, label %.preheader170, label %.lr.ph190, !llvm.loop !21

63:                                               ; preds = %.preheader170, %152
  %.1109 = phi i64 [ %.9, %152 ], [ %44, %.preheader170 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %64 = call i32 @curl_multi_perform(ptr noundef %32, ptr noundef nonnull %3) #9
  %65 = load i32, ptr %3, align 4, !tbaa !13
  %.not132 = icmp eq i32 %65, 0
  br i1 %.not132, label %70, label %66

66:                                               ; preds = %63
  %67 = call i32 @curl_multi_poll(ptr noundef %32, ptr noundef null, i32 noundef 0, i32 noundef 1000, ptr noundef null) #9
  %68 = load ptr, ptr @stderr, align 8, !tbaa !7
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str.6, i32 noundef %67) #11
  br label %70

70:                                               ; preds = %66, %63
  %.0101 = phi i32 [ %67, %66 ], [ %64, %63 ]
  %.not133 = icmp eq i32 %.0101, 0
  br i1 %.not133, label %.preheader169, label %.thread160

.thread160:                                       ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %.loopexit171

.preheader169:                                    ; preds = %70, %.loopexit164
  %.2110 = phi i64 [ %.9, %.loopexit164 ], [ %.1109, %70 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 0, ptr %4, align 4, !tbaa !13
  %71 = call ptr @curl_multi_info_read(ptr noundef %32, ptr noundef nonnull %4) #9
  %.not134 = icmp eq ptr %71, null
  br i1 %.not134, label %84, label %72

72:                                               ; preds = %.preheader169
  %73 = load i32, ptr %71, align 8, !tbaa !22
  %74 = icmp eq i32 %73, 1
  br i1 %74, label %75, label %84

75:                                               ; preds = %72
  %76 = getelementptr inbounds i8, ptr %71, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !24
  %78 = add i64 %.2110, -1
  %79 = call i32 @curl_multi_remove_handle(ptr noundef %32, ptr noundef %77) #9
  %80 = call ptr @get_transfer_for_easy(ptr noundef %77)
  %.not144 = icmp eq ptr %80, null
  br i1 %.not144, label %83, label %81

81:                                               ; preds = %75
  %82 = getelementptr inbounds i8, ptr %80, i64 180
  store i32 1, ptr %82, align 4, !tbaa !25
  br label %.loopexit164

83:                                               ; preds = %75
  call void @curl_easy_cleanup(ptr noundef %77) #9
  br label %.loopexit164

84:                                               ; preds = %72, %.preheader169
  %85 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %.not209 = icmp eq i64 %85, 0
  br i1 %.not135, label %.preheader165, label %.preheader167

.preheader167:                                    ; preds = %84
  br i1 %.not209, label %.loopexit166.preheader, label %.lr.ph194.preheader

.lr.ph194.preheader:                              ; preds = %.preheader167
  %.pre229 = load ptr, ptr @transfers, align 8, !tbaa !7
  br label %.lr.ph194

.preheader165:                                    ; preds = %84
  br i1 %.not209, label %.loopexit166.preheader, label %.lr.ph198

.lr.ph198:                                        ; preds = %.preheader165
  %86 = load ptr, ptr @transfers, align 8, !tbaa !7
  br label %109

.lr.ph194:                                        ; preds = %.lr.ph194.preheader, %104
  %87 = phi i64 [ %105, %104 ], [ %85, %.lr.ph194.preheader ]
  %88 = phi ptr [ %106, %104 ], [ %.pre229, %.lr.ph194.preheader ]
  %.3111193 = phi i64 [ %.4112, %104 ], [ %.2110, %.lr.ph194.preheader ]
  %.2117192 = phi i64 [ %107, %104 ], [ 0, %.lr.ph194.preheader ]
  %89 = getelementptr inbounds %struct.transfer, ptr %88, i64 %.2117192
  %90 = getelementptr inbounds i8, ptr %89, i64 180
  %91 = load i32, ptr %90, align 4, !tbaa !25
  %.not141 = icmp eq i32 %91, 0
  br i1 %.not141, label %92, label %104

92:                                               ; preds = %.lr.ph194
  %93 = getelementptr inbounds i8, ptr %89, i64 172
  %94 = load i32, ptr %93, align 4, !tbaa !26
  %.not142 = icmp eq i32 %94, 0
  br i1 %.not142, label %104, label %95

95:                                               ; preds = %92
  %96 = getelementptr inbounds i8, ptr %89, i64 8
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  %.not143 = icmp eq ptr %97, null
  br i1 %.not143, label %104, label %98

98:                                               ; preds = %95
  %99 = call i32 @curl_multi_remove_handle(ptr noundef %32, ptr noundef nonnull %97) #9
  store i32 1, ptr %90, align 4, !tbaa !25
  %100 = add i64 %.3111193, -1
  %101 = load ptr, ptr @stderr, align 8, !tbaa !7
  %102 = load i32, ptr %89, align 8, !tbaa !15
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef nonnull @.str.7, i32 noundef %102) #11
  %.pre = load ptr, ptr @transfers, align 8, !tbaa !7
  %.pre230 = load i64, ptr @transfer_count, align 8, !tbaa !11
  br label %104

104:                                              ; preds = %.lr.ph194, %92, %95, %98
  %105 = phi i64 [ %87, %.lr.ph194 ], [ %.pre230, %98 ], [ %87, %95 ], [ %87, %92 ]
  %106 = phi ptr [ %88, %.lr.ph194 ], [ %.pre, %98 ], [ %88, %95 ], [ %88, %92 ]
  %.4112 = phi i64 [ %.3111193, %.lr.ph194 ], [ %100, %98 ], [ %.3111193, %95 ], [ %.3111193, %92 ]
  %107 = add nuw i64 %.2117192, 1
  %108 = icmp ult i64 %107, %105
  br i1 %108, label %.lr.ph194, label %.loopexit166.preheader, !llvm.loop !27

109:                                              ; preds = %.lr.ph198, %125
  %.3118197 = phi i64 [ 0, %.lr.ph198 ], [ %126, %125 ]
  %110 = getelementptr inbounds %struct.transfer, ptr %86, i64 %.3118197
  %111 = getelementptr inbounds i8, ptr %110, i64 180
  %112 = load i32, ptr %111, align 4, !tbaa !25
  %.not136 = icmp eq i32 %112, 0
  br i1 %.not136, label %113, label %125

113:                                              ; preds = %109
  %114 = getelementptr inbounds i8, ptr %110, i64 172
  %115 = load i32, ptr %114, align 4, !tbaa !26
  %.not137 = icmp eq i32 %115, 0
  br i1 %.not137, label %125, label %116

116:                                              ; preds = %113
  %117 = getelementptr inbounds i8, ptr %110, i64 172
  %118 = getelementptr inbounds i8, ptr %110, i64 176
  store i32 1, ptr %118, align 8, !tbaa !28
  store i32 0, ptr %117, align 4, !tbaa !26
  %119 = getelementptr inbounds i8, ptr %110, i64 8
  %120 = load ptr, ptr %119, align 8, !tbaa !19
  %121 = call i32 @curl_easy_pause(ptr noundef %120, i32 noundef 0) #9
  %122 = load ptr, ptr @stderr, align 8, !tbaa !7
  %123 = load i32, ptr %110, align 8, !tbaa !15
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.8, i32 noundef %123) #11
  br label %.loopexit166.preheader

125:                                              ; preds = %109, %113
  %126 = add nuw i64 %.3118197, 1
  %exitcond227.not = icmp eq i64 %126, %85
  br i1 %exitcond227.not, label %.loopexit166.preheader, label %109, !llvm.loop !29

.loopexit166.preheader:                           ; preds = %104, %125, %.preheader167, %.preheader165, %116
  %.6.ph = phi i64 [ %.2110, %.preheader167 ], [ %.2110, %.preheader165 ], [ %.2110, %116 ], [ %.2110, %125 ], [ %.4112, %104 ]
  br label %.loopexit166

.loopexit166:                                     ; preds = %.loopexit166.preheader, %.loopexit
  %.6 = phi i64 [ %147, %.loopexit ], [ %.6.ph, %.loopexit166.preheader ]
  %127 = icmp ult i64 %.6, %.0113.ph
  br i1 %127, label %.preheader, label %.loopexit164

.preheader:                                       ; preds = %.loopexit166
  %128 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %.not210 = icmp eq i64 %128, 0
  br i1 %.not210, label %.loopexit164, label %.lr.ph201

.lr.ph201:                                        ; preds = %.preheader
  %129 = load ptr, ptr @transfers, align 8, !tbaa !7
  br label %130

130:                                              ; preds = %.lr.ph201, %143
  %.4119200 = phi i64 [ 0, %.lr.ph201 ], [ %144, %143 ]
  %131 = getelementptr inbounds %struct.transfer, ptr %129, i64 %.4119200
  %132 = getelementptr inbounds i8, ptr %131, i64 168
  %133 = load i32, ptr %132, align 8, !tbaa !20
  %.not138 = icmp eq i32 %133, 0
  br i1 %.not138, label %134, label %143

134:                                              ; preds = %130
  %135 = getelementptr inbounds i8, ptr %131, i64 168
  %136 = call ptr @curl_easy_init() #9
  %137 = getelementptr inbounds i8, ptr %131, i64 8
  store ptr %136, ptr %137, align 8, !tbaa !19
  %.not139 = icmp eq ptr %136, null
  br i1 %.not139, label %.thread156, label %138

138:                                              ; preds = %134
  %139 = call i32 @setup(ptr noundef nonnull %136, ptr noundef %25, ptr noundef nonnull %131)
  %.not140 = icmp eq i32 %139, 0
  br i1 %.not140, label %.loopexit, label %.thread156

.thread156:                                       ; preds = %138, %134
  %140 = load ptr, ptr @stderr, align 8, !tbaa !7
  %141 = trunc i64 %.4119200 to i32
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef nonnull @.str.9, i32 noundef %141) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %170

143:                                              ; preds = %130
  %144 = add nuw i64 %.4119200, 1
  %exitcond228.not = icmp eq i64 %144, %128
  br i1 %exitcond228.not, label %.loopexit164, label %130, !llvm.loop !30

.loopexit:                                        ; preds = %138
  %145 = load ptr, ptr %137, align 8, !tbaa !19
  %146 = call i32 @curl_multi_add_handle(ptr noundef %32, ptr noundef %145) #9
  store i32 1, ptr %135, align 8, !tbaa !20
  %147 = add nuw i64 %.6, 1
  %148 = load ptr, ptr @stderr, align 8, !tbaa !7
  %149 = load i32, ptr %131, align 8, !tbaa !15
  %150 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.5, i32 noundef %149) #11
  %.pre231 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %151 = icmp eq i64 %.4119200, %.pre231
  br i1 %151, label %.loopexit164, label %.loopexit166, !llvm.loop !31

.loopexit164:                                     ; preds = %.preheader, %.loopexit, %.loopexit166, %143, %83, %81
  %.9 = phi i64 [ %78, %83 ], [ %78, %81 ], [ %.6, %143 ], [ %.6, %.preheader ], [ %.6, %.loopexit166 ], [ %147, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br i1 %.not134, label %152, label %.preheader169

152:                                              ; preds = %.loopexit164
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  %.not145 = icmp eq i64 %.9, 0
  br i1 %.not145, label %.loopexit171, label %63, !llvm.loop !32

.loopexit171:                                     ; preds = %152, %.thread160
  %153 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %.not211 = icmp eq i64 %153, 0
  br i1 %.not211, label %._crit_edge206, label %.lr.ph205

.lr.ph205:                                        ; preds = %.loopexit171, %164
  %.5120203 = phi i64 [ %165, %164 ], [ 0, %.loopexit171 ]
  %154 = load ptr, ptr @transfers, align 8, !tbaa !7
  %155 = getelementptr inbounds %struct.transfer, ptr %154, i64 %.5120203
  %156 = getelementptr inbounds i8, ptr %155, i64 144
  %157 = load ptr, ptr %156, align 8, !tbaa !33
  %.not146 = icmp eq ptr %157, null
  br i1 %.not146, label %160, label %158

158:                                              ; preds = %.lr.ph205
  %159 = call i32 @fclose(ptr noundef nonnull %157)
  store ptr null, ptr %156, align 8, !tbaa !33
  br label %160

160:                                              ; preds = %158, %.lr.ph205
  %161 = getelementptr inbounds i8, ptr %155, i64 8
  %162 = load ptr, ptr %161, align 8, !tbaa !19
  %.not147 = icmp eq ptr %162, null
  br i1 %.not147, label %164, label %163

163:                                              ; preds = %160
  call void @curl_easy_cleanup(ptr noundef nonnull %162) #9
  store ptr null, ptr %161, align 8, !tbaa !19
  br label %164

164:                                              ; preds = %160, %163
  %165 = add nuw i64 %.5120203, 1
  %166 = load i64, ptr @transfer_count, align 8, !tbaa !11
  %167 = icmp ult i64 %165, %166
  br i1 %167, label %.lr.ph205, label %._crit_edge206, !llvm.loop !34

._crit_edge206:                                   ; preds = %164, %.loopexit171
  %168 = load ptr, ptr @transfers, align 8, !tbaa !7
  call void @free(ptr noundef %168) #9
  %169 = call i32 @curl_multi_cleanup(ptr noundef %32) #9
  br label %170

170:                                              ; preds = %.thread156, %._crit_edge206, %51, %28, %21, %17, %7
  %.4 = phi i32 [ 1, %17 ], [ 2, %7 ], [ 2, %21 ], [ 1, %51 ], [ 0, %._crit_edge206 ], [ 1, %28 ], [ 1, %.thread156 ]
  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: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #3

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

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

declare ptr @curl_multi_init() local_unnamed_addr #6

declare i32 @curl_multi_setopt(ptr noundef, i32 noundef, ...) local_unnamed_addr #6

declare ptr @curl_easy_init() local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare hidden i32 @setup(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

declare ptr @curl_multi_info_read(ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: nounwind uwtable
declare hidden ptr @get_transfer_for_easy(ptr noundef) local_unnamed_addr #0

declare void @curl_easy_cleanup(ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #5

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

declare i32 @curl_multi_cleanup(ptr noundef) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #8

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 = { 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 = { mustprogress nofree nounwind willreturn "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,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0,1) }
attributes #11 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !9, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!16, !14, i64 0}
!16 = !{!"transfer", !14, i64 0, !8, i64 8, !9, i64 16, !8, i64 144, !12, i64 152, !12, i64 160, !14, i64 168, !14, i64 172, !14, i64 176, !14, i64 180}
!17 = !{!16, !12, i64 160}
!18 = distinct !{!18, !6}
!19 = !{!16, !8, i64 8}
!20 = !{!16, !14, i64 168}
!21 = distinct !{!21, !6}
!22 = !{!23, !14, i64 0}
!23 = !{!"CURLMsg", !14, i64 0, !8, i64 8, !9, i64 16}
!24 = !{!23, !8, i64 8}
!25 = !{!16, !14, i64 180}
!26 = !{!16, !14, i64 172}
!27 = distinct !{!27, !6}
!28 = !{!16, !14, i64 176}
!29 = distinct !{!29, !6}
!30 = distinct !{!30, !6}
!31 = distinct !{!31, !6}
!32 = distinct !{!32, !6}
!33 = !{!16, !8, i64 144}
!34 = distinct !{!34, !6}


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