; LLVM IR from Try/Tempest :: Engine/thirdparty/libpng (pngtest)

; 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"

@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@status_dots_requested = external hidden global i32, align 4
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@verbose = external hidden global i32, align 4
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@inname = external hidden global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@strict = external hidden global i32, align 4
@relaxed = external hidden global i32, align 4
@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@xfail = external hidden global i32, align 4
@outname = external hidden global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@zero_samples = external hidden global i32, align 4
@tIME_chunk_present = external hidden global i32, align 4
@.str.23 = external hidden unnamed_addr constant [12 x i8], align 1
@tIME_string = external hidden global [29 x i8], align 16
@.str.24 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %13 = load ptr, ptr @stdout, align 8, !tbaa !9
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef @.str, ptr noundef @.str.1) #6
  %15 = load ptr, ptr @stdout, align 8, !tbaa !9
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str.2, ptr noundef @.str.3) #6
  %17 = load ptr, ptr @stdout, align 8, !tbaa !9
  %18 = call ptr @png_get_copyright(ptr noundef null)
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.4, ptr noundef %18) #6
  %20 = load ptr, ptr @stdout, align 8, !tbaa !9
  %21 = call i32 @png_access_version_number()
  %22 = zext i32 %21 to i64
  %23 = call ptr @png_get_header_version(ptr noundef null)
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.5, i64 noundef %22, ptr noundef %23) #6
  %25 = load ptr, ptr @stdout, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.6, i64 noundef 10637, ptr noundef @.str.7) #6
  %27 = call ptr @png_get_header_ver(ptr noundef null)
  %28 = call i32 @strcmp(ptr noundef %27, ptr noundef @.str.1) #7
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %40

30:                                               ; preds = %2
  %31 = load ptr, ptr @stdout, align 8, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.8) #6
  %33 = load ptr, ptr @stdout, align 8, !tbaa !9
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.9, ptr noundef @.str.1) #6
  %35 = load ptr, ptr @stdout, align 8, !tbaa !9
  %36 = call ptr @png_get_header_ver(ptr noundef null)
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.10, ptr noundef %36) #6
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %7, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %30, %2
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 1
  br i1 %42, label %43, label %121

43:                                               ; preds = %40
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 1
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = call i32 @strcmp(ptr noundef %46, ptr noundef @.str.11) #7
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  store i32 1, ptr %6, align 4, !tbaa !5
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !5
  br label %120

50:                                               ; preds = %43
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = getelementptr inbounds ptr, ptr %51, i64 1
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = call i32 @strcmp(ptr noundef %53, ptr noundef @.str.12) #7
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %62, label %56

56:                                               ; preds = %50
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  %58 = getelementptr inbounds ptr, ptr %57, i64 1
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = call i32 @strcmp(ptr noundef %59, ptr noundef @.str.13) #7
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %56, %50
  store i32 1, ptr %6, align 4, !tbaa !5
  store i32 1, ptr @verbose, align 4, !tbaa !5
  store i32 1, ptr @status_dots_requested, align 4, !tbaa !5
  br label %119

63:                                               ; preds = %56
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = getelementptr inbounds ptr, ptr %64, i64 1
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = call i32 @strcmp(ptr noundef %66, ptr noundef @.str.14) #7
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %73

69:                                               ; preds = %63
  store i32 1, ptr @verbose, align 4, !tbaa !5
  store i32 1, ptr @status_dots_requested, align 4, !tbaa !5
  %70 = load ptr, ptr %5, align 8, !tbaa !9
  %71 = getelementptr inbounds ptr, ptr %70, i64 2
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  store ptr %72, ptr @inname, align 8, !tbaa !9
  br label %118

73:                                               ; preds = %63
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %74, i64 1
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = call i32 @strcmp(ptr noundef %76, ptr noundef @.str.15) #7
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %85

79:                                               ; preds = %73
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !5
  store i32 1, ptr @verbose, align 4, !tbaa !5
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = getelementptr inbounds ptr, ptr %80, i64 2
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  store ptr %82, ptr @inname, align 8, !tbaa !9
  %83 = load i32, ptr @strict, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr @strict, align 4, !tbaa !5
  store i32 0, ptr @relaxed, align 4, !tbaa !5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %117

85:                                               ; preds = %73
  %86 = load ptr, ptr %5, align 8, !tbaa !9
  %87 = getelementptr inbounds ptr, ptr %86, i64 1
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = call i32 @strcmp(ptr noundef %88, ptr noundef @.str.16) #7
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %97

91:                                               ; preds = %85
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !5
  store i32 1, ptr @verbose, align 4, !tbaa !5
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %92, i64 2
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  store ptr %94, ptr @inname, align 8, !tbaa !9
  store i32 0, ptr @strict, align 4, !tbaa !5
  %95 = load i32, ptr @relaxed, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr @relaxed, align 4, !tbaa !5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %116

97:                                               ; preds = %85
  %98 = load ptr, ptr %5, align 8, !tbaa !9
  %99 = getelementptr inbounds ptr, ptr %98, i64 1
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = call i32 @strcmp(ptr noundef %100, ptr noundef @.str.17) #7
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %111

103:                                              ; preds = %97
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !5
  store i32 1, ptr @verbose, align 4, !tbaa !5
  %104 = load ptr, ptr %5, align 8, !tbaa !9
  %105 = getelementptr inbounds ptr, ptr %104, i64 2
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  store ptr %106, ptr @inname, align 8, !tbaa !9
  store i32 0, ptr @strict, align 4, !tbaa !5
  %107 = load i32, ptr @xfail, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr @xfail, align 4, !tbaa !5
  %109 = load i32, ptr @relaxed, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr @relaxed, align 4, !tbaa !5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %115

111:                                              ; preds = %97
  %112 = load ptr, ptr %5, align 8, !tbaa !9
  %113 = getelementptr inbounds ptr, ptr %112, i64 1
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  store ptr %114, ptr @inname, align 8, !tbaa !9
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %111, %103
  br label %116

116:                                              ; preds = %115, %91
  br label %117

117:                                              ; preds = %116, %79
  br label %118

118:                                              ; preds = %117, %69
  br label %119

119:                                              ; preds = %118, %62
  br label %120

120:                                              ; preds = %119, %49
  br label %121

121:                                              ; preds = %120, %40
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %136

124:                                              ; preds = %121
  %125 = load i32, ptr %4, align 4, !tbaa !5
  %126 = load i32, ptr @verbose, align 4, !tbaa !5
  %127 = add nsw i32 3, %126
  %128 = icmp eq i32 %125, %127
  br i1 %128, label %129, label %136

129:                                              ; preds = %124
  %130 = load ptr, ptr %5, align 8, !tbaa !9
  %131 = load i32, ptr @verbose, align 4, !tbaa !5
  %132 = add nsw i32 2, %131
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds ptr, ptr %130, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  store ptr %135, ptr @outname, align 8, !tbaa !9
  br label %136

136:                                              ; preds = %129, %124, %121
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %144

139:                                              ; preds = %136
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = load i32, ptr @verbose, align 4, !tbaa !5
  %142 = add nsw i32 3, %141
  %143 = icmp sgt i32 %140, %142
  br i1 %143, label %150, label %144

144:                                              ; preds = %139, %136
  %145 = load i32, ptr %6, align 4, !tbaa !5
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %164

147:                                              ; preds = %144
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = icmp slt i32 %148, 2
  br i1 %149, label %150, label %164

150:                                              ; preds = %147, %139
  %151 = load ptr, ptr @stdout, align 8, !tbaa !9
  %152 = load ptr, ptr %5, align 8, !tbaa !9
  %153 = getelementptr inbounds ptr, ptr %152, i64 0
  %154 = load ptr, ptr %153, align 8, !tbaa !9
  %155 = load ptr, ptr %5, align 8, !tbaa !9
  %156 = getelementptr inbounds ptr, ptr %155, i64 0
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef @.str.18, ptr noundef %154, ptr noundef %157) #6
  %159 = load ptr, ptr @stdout, align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.19) #6
  %161 = load ptr, ptr @stdout, align 8, !tbaa !9
  %162 = load ptr, ptr @outname, align 8, !tbaa !9
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.20, ptr noundef %162) #6
  call void @exit(i32 noundef 1) #8
  unreachable

164:                                              ; preds = %147, %144
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %218

167:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 2, ptr %9, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %214, %167
  %169 = load i32, ptr %9, align 4, !tbaa !5
  %170 = load i32, ptr %4, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %172, label %217

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %173 = load ptr, ptr @stdout, align 8, !tbaa !9
  %174 = load ptr, ptr %5, align 8, !tbaa !9
  %175 = load i32, ptr %9, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds ptr, ptr %174, i64 %176
  %178 = load ptr, ptr %177, align 8, !tbaa !9
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef @.str.21, ptr noundef %178) #6
  %180 = load ptr, ptr %5, align 8, !tbaa !9
  %181 = load i32, ptr %9, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds ptr, ptr %180, i64 %182
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = load ptr, ptr @outname, align 8, !tbaa !9
  %186 = call i32 @test_one_file(ptr noundef %184, ptr noundef %185)
  store i32 %186, ptr %10, align 4, !tbaa !5
  %187 = load i32, ptr %10, align 4, !tbaa !5
  %188 = icmp eq i32 %187, 0
  br i1 %188, label %189, label %200

189:                                              ; preds = %172
  %190 = load ptr, ptr @stdout, align 8, !tbaa !9
  %191 = load i32, ptr @zero_samples, align 4, !tbaa !5
  %192 = zext i32 %191 to i64
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.22, i64 noundef %192) #6
  %194 = load i32, ptr @tIME_chunk_present, align 4, !tbaa !5
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %199

196:                                              ; preds = %189
  %197 = load ptr, ptr @stdout, align 8, !tbaa !9
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %197, ptr noundef @.str.23, ptr noundef @tIME_string) #6
  br label %199

199:                                              ; preds = %196, %189
  store i32 0, ptr @tIME_chunk_present, align 4, !tbaa !5
  br label %213

200:                                              ; preds = %172
  %201 = load i32, ptr @xfail, align 4, !tbaa !5
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %203, label %206

203:                                              ; preds = %200
  %204 = load ptr, ptr @stdout, align 8, !tbaa !9
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef @.str.24) #6
  br label %212

206:                                              ; preds = %200
  %207 = load ptr, ptr @stdout, align 8, !tbaa !9
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef @.str.25) #6
  %209 = load i32, ptr %10, align 4, !tbaa !5
  %210 = load i32, ptr %7, align 4, !tbaa !5
  %211 = add nsw i32 %210, %209
  store i32 %211, ptr %7, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %206, %203
  br label %213

213:                                              ; preds = %212, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %9, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %9, align 4, !tbaa !5
  br label %168, !llvm.loop !11

217:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %296

218:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %292, %218
  %220 = load i32, ptr %11, align 4, !tbaa !5
  %221 = icmp slt i32 %220, 3
  br i1 %221, label %222, label %295

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %223 = load i32, ptr %11, align 4, !tbaa !5
  %224 = icmp eq i32 %223, 1
  br i1 %224, label %225, label %226

225:                                              ; preds = %222
  store i32 1, ptr @status_dots_requested, align 4, !tbaa !5
  br label %231

226:                                              ; preds = %222
  %227 = load i32, ptr @verbose, align 4, !tbaa !5
  %228 = icmp eq i32 %227, 0
  br i1 %228, label %229, label %230

229:                                              ; preds = %226
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !5
  br label %230

230:                                              ; preds = %229, %226
  br label %231

231:                                              ; preds = %230, %225
  %232 = load i32, ptr %11, align 4, !tbaa !5
  %233 = icmp eq i32 %232, 0
  br i1 %233, label %240, label %234

234:                                              ; preds = %231
  %235 = load i32, ptr @verbose, align 4, !tbaa !5
  %236 = icmp eq i32 %235, 1
  br i1 %236, label %240, label %237

237:                                              ; preds = %234
  %238 = load i32, ptr %7, align 4, !tbaa !5
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %244

240:                                              ; preds = %237, %234, %231
  %241 = load ptr, ptr @stdout, align 8, !tbaa !9
  %242 = load ptr, ptr @inname, align 8, !tbaa !9
  %243 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef @.str.21, ptr noundef %242) #6
  br label %244

244:                                              ; preds = %240, %237
  %245 = load ptr, ptr @inname, align 8, !tbaa !9
  %246 = load ptr, ptr @outname, align 8, !tbaa !9
  %247 = call i32 @test_one_file(ptr noundef %245, ptr noundef %246)
  store i32 %247, ptr %12, align 4, !tbaa !5
  %248 = load i32, ptr %12, align 4, !tbaa !5
  %249 = icmp eq i32 %248, 0
  br i1 %249, label %250, label %268

250:                                              ; preds = %244
  %251 = load i32, ptr @verbose, align 4, !tbaa !5
  %252 = icmp eq i32 %251, 1
  br i1 %252, label %256, label %253

253:                                              ; preds = %250
  %254 = load i32, ptr %11, align 4, !tbaa !5
  %255 = icmp eq i32 %254, 2
  br i1 %255, label %256, label %267

256:                                              ; preds = %253, %250
  %257 = load ptr, ptr @stdout, align 8, !tbaa !9
  %258 = load i32, ptr @zero_samples, align 4, !tbaa !5
  %259 = zext i32 %258 to i64
  %260 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %257, ptr noundef @.str.22, i64 noundef %259) #6
  %261 = load i32, ptr @tIME_chunk_present, align 4, !tbaa !5
  %262 = icmp ne i32 %261, 0
  br i1 %262, label %263, label %266

263:                                              ; preds = %256
  %264 = load ptr, ptr @stdout, align 8, !tbaa !9
  %265 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %264, ptr noundef @.str.23, ptr noundef @tIME_string) #6
  br label %266

266:                                              ; preds = %263, %256
  br label %267

267:                                              ; preds = %266, %253
  br label %291

268:                                              ; preds = %244
  %269 = load i32, ptr @verbose, align 4, !tbaa !5
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %278

271:                                              ; preds = %268
  %272 = load i32, ptr %11, align 4, !tbaa !5
  %273 = icmp ne i32 %272, 2
  br i1 %273, label %274, label %278

274:                                              ; preds = %271
  %275 = load ptr, ptr @stdout, align 8, !tbaa !9
  %276 = load ptr, ptr @inname, align 8, !tbaa !9
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %275, ptr noundef @.str.21, ptr noundef %276) #6
  br label %278

278:                                              ; preds = %274, %271, %268
  %279 = load i32, ptr @xfail, align 4, !tbaa !5
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %281, label %284

281:                                              ; preds = %278
  %282 = load ptr, ptr @stdout, align 8, !tbaa !9
  %283 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %282, ptr noundef @.str.24) #6
  br label %290

284:                                              ; preds = %278
  %285 = load ptr, ptr @stdout, align 8, !tbaa !9
  %286 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %285, ptr noundef @.str.25) #6
  %287 = load i32, ptr %12, align 4, !tbaa !5
  %288 = load i32, ptr %7, align 4, !tbaa !5
  %289 = add nsw i32 %288, %287
  store i32 %289, ptr %7, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %284, %281
  br label %291

291:                                              ; preds = %290, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr %11, align 4, !tbaa !5
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %11, align 4, !tbaa !5
  br label %219, !llvm.loop !13

295:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %296

296:                                              ; preds = %295, %217
  %297 = load i32, ptr %7, align 4, !tbaa !5
  %298 = icmp eq i32 %297, 0
  br i1 %298, label %299, label %302

299:                                              ; preds = %296
  %300 = load ptr, ptr @stdout, align 8, !tbaa !9
  %301 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %300, ptr noundef @.str.26) #6
  br label %305

302:                                              ; preds = %296
  %303 = load ptr, ptr @stdout, align 8, !tbaa !9
  %304 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %303, ptr noundef @.str.27) #6
  br label %305

305:                                              ; preds = %302, %299
  %306 = call noalias ptr @png_create_read_struct(ptr noundef @.str.1, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %306, ptr %8, align 8, !tbaa !9
  %307 = load ptr, ptr @stdout, align 8, !tbaa !9
  %308 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %307, ptr noundef @.str.28) #6
  %309 = load ptr, ptr @stdout, align 8, !tbaa !9
  %310 = load ptr, ptr %8, align 8, !tbaa !9
  %311 = call i32 @png_get_user_width_max(ptr noundef %310)
  %312 = zext i32 %311 to i64
  %313 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %309, ptr noundef @.str.29, i64 noundef %312) #6
  %314 = load ptr, ptr @stdout, align 8, !tbaa !9
  %315 = load ptr, ptr %8, align 8, !tbaa !9
  %316 = call i32 @png_get_user_height_max(ptr noundef %315)
  %317 = zext i32 %316 to i64
  %318 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %314, ptr noundef @.str.30, i64 noundef %317) #6
  %319 = load ptr, ptr %8, align 8, !tbaa !9
  %320 = call i32 @png_get_chunk_cache_max(ptr noundef %319)
  %321 = icmp eq i32 %320, 0
  br i1 %321, label %322, label %325

322:                                              ; preds = %305
  %323 = load ptr, ptr @stdout, align 8, !tbaa !9
  %324 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %323, ptr noundef @.str.31) #6
  br label %331

325:                                              ; preds = %305
  %326 = load ptr, ptr @stdout, align 8, !tbaa !9
  %327 = load ptr, ptr %8, align 8, !tbaa !9
  %328 = call i32 @png_get_chunk_cache_max(ptr noundef %327)
  %329 = zext i32 %328 to i64
  %330 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %326, ptr noundef @.str.32, i64 noundef %329) #6
  br label %331

331:                                              ; preds = %325, %322
  %332 = load ptr, ptr %8, align 8, !tbaa !9
  %333 = call i64 @png_get_chunk_malloc_max(ptr noundef %332)
  %334 = icmp eq i64 %333, 0
  br i1 %334, label %335, label %338

335:                                              ; preds = %331
  %336 = load ptr, ptr @stdout, align 8, !tbaa !9
  %337 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %336, ptr noundef @.str.33) #6
  br label %343

338:                                              ; preds = %331
  %339 = load ptr, ptr @stdout, align 8, !tbaa !9
  %340 = load ptr, ptr %8, align 8, !tbaa !9
  %341 = call i64 @png_get_chunk_malloc_max(ptr noundef %340)
  %342 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %339, ptr noundef @.str.34, i64 noundef %341) #6
  br label %343

343:                                              ; preds = %338, %335
  call void @png_destroy_read_struct(ptr noundef %8, ptr noundef null, ptr noundef null)
  %344 = load i32, ptr %7, align 4, !tbaa !5
  %345 = icmp ne i32 %344, 0
  %346 = zext i1 %345 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  ret i32 %346
}

; 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 @fprintf(ptr noundef, ptr noundef, ...) #2

declare ptr @png_get_copyright(ptr noundef) #3

declare i32 @png_access_version_number() #3

declare ptr @png_get_header_version(ptr noundef) #3

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

declare ptr @png_get_header_ver(ptr noundef) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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

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

declare noalias ptr @png_create_read_struct(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @png_get_user_width_max(ptr noundef) #3

declare i32 @png_get_user_height_max(ptr noundef) #3

declare i32 @png_get_chunk_cache_max(ptr noundef) #3

declare i64 @png_get_chunk_malloc_max(ptr noundef) #3

declare void @png_destroy_read_struct(ptr noundef, ptr noundef, 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 = { 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 = { "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 = { noreturn 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 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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"

@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@status_dots_requested = external hidden local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@verbose = external hidden local_unnamed_addr global i32, align 4
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@inname = external hidden local_unnamed_addr global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@strict = external hidden local_unnamed_addr global i32, align 4
@relaxed = external hidden local_unnamed_addr global i32, align 4
@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@xfail = external hidden local_unnamed_addr global i32, align 4
@outname = external hidden local_unnamed_addr global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@zero_samples = external hidden local_unnamed_addr global i32, align 4
@tIME_chunk_present = external hidden local_unnamed_addr global i32, align 4
@.str.23 = external hidden unnamed_addr constant [12 x i8], align 1
@tIME_string = external hidden global [29 x i8], align 16
@.str.24 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %4 = load ptr, ptr @stdout, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1) #6
  %6 = load ptr, ptr @stdout, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3) #6
  %8 = load ptr, ptr @stdout, align 8, !tbaa !5
  %9 = tail call ptr @png_get_copyright(ptr noundef null) #6
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.4, ptr noundef %9) #6
  %11 = load ptr, ptr @stdout, align 8, !tbaa !5
  %12 = tail call i32 @png_access_version_number() #6
  %13 = zext i32 %12 to i64
  %14 = tail call ptr @png_get_header_version(ptr noundef null) #6
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.5, i64 noundef %13, ptr noundef %14) #6
  %16 = load ptr, ptr @stdout, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.6, i64 noundef 10637, ptr noundef nonnull @.str.7) #6
  %18 = tail call ptr @png_get_header_ver(ptr noundef null) #6
  %19 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %18, ptr noundef nonnull dereferenceable(1) @.str.1) #7
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %28, label %20

20:                                               ; preds = %2
  %21 = load ptr, ptr @stdout, align 8, !tbaa !5
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.8) #6
  %23 = load ptr, ptr @stdout, align 8, !tbaa !5
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1) #6
  %25 = load ptr, ptr @stdout, align 8, !tbaa !5
  %26 = tail call ptr @png_get_header_ver(ptr noundef null) #6
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.10, ptr noundef %26) #6
  br label %28

28:                                               ; preds = %20, %2
  %.055 = phi i32 [ 1, %20 ], [ 0, %2 ]
  %29 = icmp sgt i32 %0, 1
  br i1 %29, label %30, label %thread-pre-split

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %1, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.11) #7
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  br label %.critedge

36:                                               ; preds = %30
  %37 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.12) #7
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %42, label %39

39:                                               ; preds = %36
  %40 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.13) #7
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %39, %36
  store i32 1, ptr @verbose, align 4, !tbaa !9
  store i32 1, ptr @status_dots_requested, align 4, !tbaa !9
  br label %.critedge

43:                                               ; preds = %39
  %44 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.14) #7
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %49

46:                                               ; preds = %43
  store i32 1, ptr @verbose, align 4, !tbaa !9
  store i32 1, ptr @status_dots_requested, align 4, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %1, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  store ptr %48, ptr @inname, align 8, !tbaa !5
  br label %76

49:                                               ; preds = %43
  %50 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.15) #7
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %57

52:                                               ; preds = %49
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  store i32 1, ptr @verbose, align 4, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %1, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  store ptr %54, ptr @inname, align 8, !tbaa !5
  %55 = load i32, ptr @strict, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr @strict, align 4, !tbaa !9
  store i32 0, ptr @relaxed, align 4, !tbaa !9
  br label %.critedge

57:                                               ; preds = %49
  %58 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.16) #7
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %65

60:                                               ; preds = %57
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  store i32 1, ptr @verbose, align 4, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %1, i64 16
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  store ptr %62, ptr @inname, align 8, !tbaa !5
  store i32 0, ptr @strict, align 4, !tbaa !9
  %63 = load i32, ptr @relaxed, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr @relaxed, align 4, !tbaa !9
  br label %.critedge

65:                                               ; preds = %57
  %66 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.17) #7
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %75

68:                                               ; preds = %65
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  store i32 1, ptr @verbose, align 4, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %1, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  store ptr %70, ptr @inname, align 8, !tbaa !5
  store i32 0, ptr @strict, align 4, !tbaa !9
  %71 = load i32, ptr @xfail, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr @xfail, align 4, !tbaa !9
  %73 = load i32, ptr @relaxed, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr @relaxed, align 4, !tbaa !9
  br label %.critedge

75:                                               ; preds = %65
  store ptr %32, ptr @inname, align 8, !tbaa !5
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %75, %28
  %.pr = load i32, ptr @verbose, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %thread-pre-split, %46
  %77 = phi i32 [ %.pr, %thread-pre-split ], [ 1, %46 ]
  %78 = add nsw i32 %77, 3
  %79 = icmp eq i32 %78, %0
  br i1 %79, label %80, label %85

80:                                               ; preds = %76
  %81 = sext i32 %77 to i64
  %82 = getelementptr ptr, ptr %1, i64 %81
  %83 = getelementptr i8, ptr %82, i64 16
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  store ptr %84, ptr @outname, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %76, %80
  %86 = icmp slt i32 %78, %0
  br i1 %86, label %87, label %.preheader.preheader

.critedge:                                        ; preds = %35, %42, %52, %60, %68
  %.not69 = icmp eq i32 %0, 2
  br i1 %.not69, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.critedge
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

87:                                               ; preds = %85
  %88 = load ptr, ptr @stdout, align 8, !tbaa !5
  %89 = load ptr, ptr %1, align 8, !tbaa !5
  %90 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.18, ptr noundef %89, ptr noundef %89) #6
  %91 = load ptr, ptr @stdout, align 8, !tbaa !5
  %92 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.19) #6
  %93 = load ptr, ptr @stdout, align 8, !tbaa !5
  %94 = load ptr, ptr @outname, align 8, !tbaa !5
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.20, ptr noundef %94) #6
  tail call void @exit(i32 noundef 1) #8
  unreachable

.lr.ph:                                           ; preds = %.lr.ph.preheader, %122
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %122 ]
  %.168 = phi i32 [ %.055, %.lr.ph.preheader ], [ %.2, %122 ]
  %96 = load ptr, ptr @stdout, align 8, !tbaa !5
  %97 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef nonnull @.str.21, ptr noundef %98) #6
  %100 = load ptr, ptr %97, align 8, !tbaa !5
  %101 = load ptr, ptr @outname, align 8, !tbaa !5
  %102 = tail call i32 @test_one_file(ptr noundef %100, ptr noundef %101)
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %114

104:                                              ; preds = %.lr.ph
  %105 = load ptr, ptr @stdout, align 8, !tbaa !5
  %106 = load i32, ptr @zero_samples, align 4, !tbaa !9
  %107 = zext i32 %106 to i64
  %108 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef nonnull @.str.22, i64 noundef %107) #6
  %109 = load i32, ptr @tIME_chunk_present, align 4, !tbaa !9
  %.not62 = icmp eq i32 %109, 0
  br i1 %.not62, label %113, label %110

110:                                              ; preds = %104
  %111 = load ptr, ptr @stdout, align 8, !tbaa !5
  %112 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef nonnull @.str.23, ptr noundef nonnull @tIME_string) #6
  br label %113

113:                                              ; preds = %110, %104
  store i32 0, ptr @tIME_chunk_present, align 4, !tbaa !9
  br label %122

114:                                              ; preds = %.lr.ph
  %115 = load i32, ptr @xfail, align 4, !tbaa !9
  %.not61 = icmp eq i32 %115, 0
  %116 = load ptr, ptr @stdout, align 8, !tbaa !5
  br i1 %.not61, label %119, label %117

117:                                              ; preds = %114
  %118 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef nonnull @.str.24) #6
  br label %122

119:                                              ; preds = %114
  %120 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef nonnull @.str.25) #6
  %121 = add nsw i32 %102, %.168
  br label %122

122:                                              ; preds = %117, %119, %113
  %.2 = phi i32 [ %.168, %113 ], [ %.168, %117 ], [ %121, %119 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !11

.preheader.preheader:                             ; preds = %85
  %123 = icmp eq i32 %77, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %.preheader.preheader
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %.preheader.preheader, %124
  %126 = load ptr, ptr @stdout, align 8, !tbaa !5
  %127 = load ptr, ptr @inname, align 8, !tbaa !5
  %128 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef nonnull @.str.21, ptr noundef %127) #6
  %129 = load ptr, ptr @inname, align 8, !tbaa !5
  %130 = load ptr, ptr @outname, align 8, !tbaa !5
  %131 = tail call i32 @test_one_file(ptr noundef %129, ptr noundef %130)
  %132 = icmp eq i32 %131, 0
  %133 = load i32, ptr @verbose, align 4
  br i1 %132, label %134, label %145

134:                                              ; preds = %125
  %135 = icmp eq i32 %133, 1
  br i1 %135, label %136, label %159

136:                                              ; preds = %134
  %137 = load ptr, ptr @stdout, align 8, !tbaa !5
  %138 = load i32, ptr @zero_samples, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef nonnull @.str.22, i64 noundef %139) #6
  %141 = load i32, ptr @tIME_chunk_present, align 4, !tbaa !9
  %.not60 = icmp eq i32 %141, 0
  br i1 %.not60, label %159, label %142

142:                                              ; preds = %136
  %143 = load ptr, ptr @stdout, align 8, !tbaa !5
  %144 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef nonnull @.str.23, ptr noundef nonnull @tIME_string) #6
  br label %159

145:                                              ; preds = %125
  %146 = icmp eq i32 %133, 0
  br i1 %146, label %147, label %151

147:                                              ; preds = %145
  %148 = load ptr, ptr @stdout, align 8, !tbaa !5
  %149 = load ptr, ptr @inname, align 8, !tbaa !5
  %150 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.21, ptr noundef %149) #6
  br label %151

151:                                              ; preds = %147, %145
  %152 = load i32, ptr @xfail, align 4, !tbaa !9
  %.not59 = icmp eq i32 %152, 0
  %153 = load ptr, ptr @stdout, align 8, !tbaa !5
  br i1 %.not59, label %156, label %154

154:                                              ; preds = %151
  %155 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef nonnull @.str.24) #6
  br label %159

156:                                              ; preds = %151
  %157 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef nonnull @.str.25) #6
  %158 = add nsw i32 %131, %.055
  br label %159

159:                                              ; preds = %154, %156, %134, %142, %136
  %.4 = phi i32 [ %.055, %142 ], [ %.055, %136 ], [ %.055, %134 ], [ %.055, %154 ], [ %158, %156 ]
  store i32 1, ptr @status_dots_requested, align 4, !tbaa !9
  %.pre = load i32, ptr @verbose, align 4
  %160 = icmp eq i32 %.pre, 1
  %161 = icmp ne i32 %.4, 0
  %or.cond5.1 = select i1 %160, i1 true, i1 %161
  br i1 %or.cond5.1, label %162, label %166

162:                                              ; preds = %159
  %163 = load ptr, ptr @stdout, align 8, !tbaa !5
  %164 = load ptr, ptr @inname, align 8, !tbaa !5
  %165 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef nonnull @.str.21, ptr noundef %164) #6
  br label %166

166:                                              ; preds = %162, %159
  %167 = load ptr, ptr @inname, align 8, !tbaa !5
  %168 = load ptr, ptr @outname, align 8, !tbaa !5
  %169 = tail call i32 @test_one_file(ptr noundef %167, ptr noundef %168)
  %170 = icmp eq i32 %169, 0
  %171 = load i32, ptr @verbose, align 4
  br i1 %170, label %186, label %172

172:                                              ; preds = %166
  %173 = icmp eq i32 %171, 0
  br i1 %173, label %174, label %178

174:                                              ; preds = %172
  %175 = load ptr, ptr @stdout, align 8, !tbaa !5
  %176 = load ptr, ptr @inname, align 8, !tbaa !5
  %177 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef nonnull @.str.21, ptr noundef %176) #6
  br label %178

178:                                              ; preds = %174, %172
  %179 = load i32, ptr @xfail, align 4, !tbaa !9
  %.not59.1 = icmp eq i32 %179, 0
  %180 = load ptr, ptr @stdout, align 8, !tbaa !5
  br i1 %.not59.1, label %183, label %181

181:                                              ; preds = %178
  %182 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef nonnull @.str.24) #6
  br label %.preheader.2thread-pre-split

183:                                              ; preds = %178
  %184 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef nonnull @.str.25) #6
  %185 = add nsw i32 %169, %.4
  br label %.preheader.2thread-pre-split

186:                                              ; preds = %166
  %187 = icmp eq i32 %171, 1
  br i1 %187, label %188, label %.preheader.2

188:                                              ; preds = %186
  %189 = load ptr, ptr @stdout, align 8, !tbaa !5
  %190 = load i32, ptr @zero_samples, align 4, !tbaa !9
  %191 = zext i32 %190 to i64
  %192 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef nonnull @.str.22, i64 noundef %191) #6
  %193 = load i32, ptr @tIME_chunk_present, align 4, !tbaa !9
  %.not60.1 = icmp eq i32 %193, 0
  br i1 %.not60.1, label %.preheader.2thread-pre-split, label %194

194:                                              ; preds = %188
  %195 = load ptr, ptr @stdout, align 8, !tbaa !5
  %196 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef nonnull @.str.23, ptr noundef nonnull @tIME_string) #6
  br label %.preheader.2thread-pre-split

.preheader.2thread-pre-split:                     ; preds = %194, %188, %183, %181
  %.4.1.ph = phi i32 [ %185, %183 ], [ %.4, %181 ], [ %.4, %188 ], [ %.4, %194 ]
  %.pr76 = load i32, ptr @verbose, align 4
  br label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.2thread-pre-split, %186
  %197 = phi i32 [ %.pr76, %.preheader.2thread-pre-split ], [ %171, %186 ]
  %.4.1 = phi i32 [ %.4.1.ph, %.preheader.2thread-pre-split ], [ %.4, %186 ]
  %198 = icmp eq i32 %197, 0
  br i1 %198, label %199, label %200

199:                                              ; preds = %.preheader.2
  store i32 0, ptr @status_dots_requested, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %199, %.preheader.2
  %201 = icmp eq i32 %197, 1
  %202 = icmp ne i32 %.4.1, 0
  %or.cond5.2 = select i1 %201, i1 true, i1 %202
  br i1 %or.cond5.2, label %203, label %207

203:                                              ; preds = %200
  %204 = load ptr, ptr @stdout, align 8, !tbaa !5
  %205 = load ptr, ptr @inname, align 8, !tbaa !5
  %206 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef nonnull @.str.21, ptr noundef %205) #6
  br label %207

207:                                              ; preds = %203, %200
  %208 = load ptr, ptr @inname, align 8, !tbaa !5
  %209 = load ptr, ptr @outname, align 8, !tbaa !5
  %210 = tail call i32 @test_one_file(ptr noundef %208, ptr noundef %209)
  %211 = icmp eq i32 %210, 0
  br i1 %211, label %218, label %._crit_edge74

._crit_edge74:                                    ; preds = %207
  %.pre75 = load i32, ptr @xfail, align 4, !tbaa !9
  %.not59.2 = icmp eq i32 %.pre75, 0
  %212 = load ptr, ptr @stdout, align 8, !tbaa !5
  br i1 %.not59.2, label %215, label %213

213:                                              ; preds = %._crit_edge74
  %214 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef nonnull @.str.24) #6
  br label %.loopexit

215:                                              ; preds = %._crit_edge74
  %216 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef nonnull @.str.25) #6
  %217 = add nsw i32 %210, %.4.1
  br label %.loopexit

218:                                              ; preds = %207
  %219 = load ptr, ptr @stdout, align 8, !tbaa !5
  %220 = load i32, ptr @zero_samples, align 4, !tbaa !9
  %221 = zext i32 %220 to i64
  %222 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %219, ptr noundef nonnull @.str.22, i64 noundef %221) #6
  %223 = load i32, ptr @tIME_chunk_present, align 4, !tbaa !9
  %.not60.2 = icmp eq i32 %223, 0
  br i1 %.not60.2, label %.loopexit, label %224

224:                                              ; preds = %218
  %225 = load ptr, ptr @stdout, align 8, !tbaa !5
  %226 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %225, ptr noundef nonnull @.str.23, ptr noundef nonnull @tIME_string) #6
  br label %.loopexit

.loopexit:                                        ; preds = %122, %213, %215, %218, %224, %.critedge
  %.5 = phi i32 [ %.055, %.critedge ], [ %.4.1, %224 ], [ %.4.1, %218 ], [ %.4.1, %213 ], [ %217, %215 ], [ %.2, %122 ]
  %227 = icmp eq i32 %.5, 0
  %228 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.str.26..str.27 = select i1 %227, ptr @.str.26, ptr @.str.27
  %229 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef nonnull %.str.26..str.27) #6
  %230 = tail call noalias ptr @png_create_read_struct(ptr noundef nonnull @.str.1, ptr noundef null, ptr noundef null, ptr noundef null) #6
  store ptr %230, ptr %3, align 8, !tbaa !5
  %231 = load ptr, ptr @stdout, align 8, !tbaa !5
  %232 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %231, ptr noundef nonnull @.str.28) #6
  %233 = load ptr, ptr @stdout, align 8, !tbaa !5
  %234 = tail call i32 @png_get_user_width_max(ptr noundef %230) #6
  %235 = zext i32 %234 to i64
  %236 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef nonnull @.str.29, i64 noundef %235) #6
  %237 = load ptr, ptr @stdout, align 8, !tbaa !5
  %238 = tail call i32 @png_get_user_height_max(ptr noundef %230) #6
  %239 = zext i32 %238 to i64
  %240 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %237, ptr noundef nonnull @.str.30, i64 noundef %239) #6
  %241 = tail call i32 @png_get_chunk_cache_max(ptr noundef %230) #6
  %242 = icmp eq i32 %241, 0
  %243 = load ptr, ptr @stdout, align 8, !tbaa !5
  br i1 %242, label %244, label %246

244:                                              ; preds = %.loopexit
  %245 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %243, ptr noundef nonnull @.str.31) #6
  br label %250

246:                                              ; preds = %.loopexit
  %247 = tail call i32 @png_get_chunk_cache_max(ptr noundef %230) #6
  %248 = zext i32 %247 to i64
  %249 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %243, ptr noundef nonnull @.str.32, i64 noundef %248) #6
  br label %250

250:                                              ; preds = %246, %244
  %251 = tail call i64 @png_get_chunk_malloc_max(ptr noundef %230) #6
  %252 = icmp eq i64 %251, 0
  %253 = load ptr, ptr @stdout, align 8, !tbaa !5
  br i1 %252, label %254, label %256

254:                                              ; preds = %250
  %255 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef nonnull @.str.33) #6
  br label %259

256:                                              ; preds = %250
  %257 = tail call i64 @png_get_chunk_malloc_max(ptr noundef %230) #6
  %258 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef nonnull @.str.34, i64 noundef %257) #6
  br label %259

259:                                              ; preds = %256, %254
  call void @png_destroy_read_struct(ptr noundef nonnull %3, ptr noundef null, ptr noundef null) #6
  %260 = icmp ne i32 %.5, 0
  %261 = zext i1 %260 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 %261
}

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

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

declare ptr @png_get_copyright(ptr noundef) local_unnamed_addr #3

declare i32 @png_access_version_number() local_unnamed_addr #3

declare ptr @png_get_header_version(ptr noundef) local_unnamed_addr #3

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

declare ptr @png_get_header_ver(ptr noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

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

declare noalias ptr @png_create_read_struct(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @png_get_user_width_max(ptr noundef) local_unnamed_addr #3

declare i32 @png_get_user_height_max(ptr noundef) local_unnamed_addr #3

declare i32 @png_get_chunk_cache_max(ptr noundef) local_unnamed_addr #3

declare i64 @png_get_chunk_malloc_max(ptr noundef) local_unnamed_addr #3

declare void @png_destroy_read_struct(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { noreturn 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 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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