; LLVM IR from pixpark/gpupixel :: third_party/libyuv/util (psnr_main)

; 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.metric = type { double, double, double, double, double, double, double, double, double, double, double, double, i32 }

@verbose = external dso_local global i8, align 1
@quiet = external dso_local global i8, align 1
@show_name = external dso_local global i8, align 1
@do_psnr = external dso_local global i8, align 1
@do_ssim = external dso_local global i8, align 1
@do_mse = external dso_local global i8, align 1
@image_width = external dso_local global i32, align 4
@image_height = external dso_local global i32, align 4
@fileindex_org = external dso_local global i32, align 4
@fileindex_rec = external dso_local global i32, align 4
@num_rec = external dso_local global i32, align 4
@num_skip_org = external dso_local global i32, align 4
@num_skip_rec = external dso_local global i32, align 4
@num_frames = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef 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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca %struct.metric, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i8, align 1
  %29 = alloca %struct.metric, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i8, align 1
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca double, align 8
  %44 = 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
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  call void @_ZL12ParseOptionsiPPKc(i32 noundef %45, ptr noundef %46)
  %47 = load i8, ptr @do_psnr, align 1, !tbaa !11, !range !13, !noundef !14
  %48 = trunc i8 %47 to i1
  br i1 %48, label %53, label %49

49:                                               ; preds = %2
  %50 = load i8, ptr @do_ssim, align 1, !tbaa !11, !range !13, !noundef !14
  %51 = trunc i8 %50 to i1
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i8 1, ptr @do_psnr, align 1, !tbaa !11
  br label %53

53:                                               ; preds = %52, %49, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #12
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = load i32, ptr @fileindex_org, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = call noalias ptr @fopen(ptr noundef %58, ptr noundef @.str)
  store ptr %59, ptr %6, align 8, !tbaa !9
  %60 = load ptr, ptr %6, align 8, !tbaa !9
  %61 = icmp eq ptr %60, null
  br i1 %61, label %62, label %70

62:                                               ; preds = %53
  %63 = load ptr, ptr @stderr, align 8, !tbaa !9
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = load i32, ptr @fileindex_org, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds ptr, ptr %64, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.1, ptr noundef %68) #12
  call void @exit(i32 noundef 1) #13
  unreachable

70:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  %71 = load i32, ptr @num_rec, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %72, i64 8)
  %74 = extractvalue { i64, i1 } %73, 1
  %75 = extractvalue { i64, i1 } %73, 0
  %76 = select i1 %74, i64 -1, i64 %75
  %77 = call noalias noundef nonnull ptr @_Znam(i64 noundef %76) #14
  store ptr %77, ptr %7, align 8, !tbaa !9
  %78 = load ptr, ptr %7, align 8, !tbaa !9
  %79 = load i32, ptr @num_rec, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = mul i64 %80, 8
  call void @llvm.memset.p0.i64(ptr align 8 %78, i8 0, i64 %81, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #12
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %139, %70
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = load i32, ptr @num_rec, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #12
  br label %142

87:                                               ; preds = %82
  %88 = load ptr, ptr %5, align 8, !tbaa !9
  %89 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = add nsw i32 %89, %90
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %88, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = call noalias ptr @fopen(ptr noundef %94, ptr noundef @.str)
  %96 = load ptr, ptr %7, align 8, !tbaa !9
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds ptr, ptr %96, i64 %98
  store ptr %95, ptr %99, align 8, !tbaa !9
  %100 = load ptr, ptr %7, align 8, !tbaa !9
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %138

106:                                              ; preds = %87
  %107 = load ptr, ptr @stderr, align 8, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = add nsw i32 %109, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds ptr, ptr %108, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.1, ptr noundef %114) #12
  %116 = load ptr, ptr %6, align 8, !tbaa !9
  %117 = call i32 @fclose(ptr noundef %116)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #12
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %130, %106
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  br label %133

123:                                              ; preds = %118
  %124 = load ptr, ptr %7, align 8, !tbaa !9
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %124, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = call i32 @fclose(ptr noundef %128)
  br label %130

130:                                              ; preds = %123
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %10, align 4, !tbaa !5
  br label %118, !llvm.loop !15

133:                                              ; preds = %122
  %134 = load ptr, ptr %7, align 8, !tbaa !9
  %135 = icmp eq ptr %134, null
  br i1 %135, label %137, label %136

136:                                              ; preds = %133
  call void @_ZdaPv(ptr noundef %134) #15
  br label %137

137:                                              ; preds = %136, %133
  call void @exit(i32 noundef 1) #13
  unreachable

138:                                              ; preds = %87
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %8, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %8, align 4, !tbaa !5
  br label %82, !llvm.loop !17

142:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #12
  %143 = load i32, ptr @image_width, align 4, !tbaa !5
  %144 = load i32, ptr @image_height, align 4, !tbaa !5
  %145 = mul nsw i32 %143, %144
  store i32 %145, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #12
  %146 = load i32, ptr @image_width, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  %148 = sdiv i32 %147, 2
  %149 = load i32, ptr @image_height, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  %151 = sdiv i32 %150, 2
  %152 = mul nsw i32 %148, %151
  store i32 %152, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #12
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = load i32, ptr %12, align 4, !tbaa !5
  %155 = mul nsw i32 2, %154
  %156 = add nsw i32 %153, %155
  %157 = sext i32 %156 to i64
  store i64 %157, ptr %13, align 8, !tbaa !18
  %158 = load ptr, ptr %6, align 8, !tbaa !9
  %159 = load i32, ptr @num_skip_org, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = load i64, ptr %13, align 8, !tbaa !18
  %162 = mul i64 %160, %161
  %163 = call i32 @fseek(ptr noundef %158, i64 noundef %162, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #12
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %180, %142
  %165 = load i32, ptr %14, align 4, !tbaa !5
  %166 = load i32, ptr @num_rec, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #12
  br label %183

169:                                              ; preds = %164
  %170 = load ptr, ptr %7, align 8, !tbaa !9
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds ptr, ptr %170, i64 %172
  %174 = load ptr, ptr %173, align 8, !tbaa !9
  %175 = load i32, ptr @num_skip_rec, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = load i64, ptr %13, align 8, !tbaa !18
  %178 = mul i64 %176, %177
  %179 = call i32 @fseek(ptr noundef %174, i64 noundef %178, i32 noundef 0)
  br label %180

180:                                              ; preds = %169
  %181 = load i32, ptr %14, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %14, align 4, !tbaa !5
  br label %164, !llvm.loop !20

183:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #12
  %184 = load i64, ptr %13, align 8, !tbaa !18
  %185 = call noalias noundef nonnull ptr @_Znam(i64 noundef %184) #14
  store ptr %185, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #12
  %186 = load i64, ptr %13, align 8, !tbaa !18
  %187 = call noalias noundef nonnull ptr @_Znam(i64 noundef %186) #14
  store ptr %187, ptr %16, align 8, !tbaa !9
  %188 = load ptr, ptr %15, align 8, !tbaa !9
  %189 = icmp eq ptr %188, null
  br i1 %189, label %193, label %190

190:                                              ; preds = %183
  %191 = load ptr, ptr %16, align 8, !tbaa !9
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %226

193:                                              ; preds = %190, %183
  %194 = load ptr, ptr @stderr, align 8, !tbaa !9
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.2) #12
  %196 = load ptr, ptr %6, align 8, !tbaa !9
  %197 = call i32 @fclose(ptr noundef %196)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #12
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %210, %193
  %199 = load i32, ptr %17, align 4, !tbaa !5
  %200 = load i32, ptr @num_rec, align 4, !tbaa !5
  %201 = icmp slt i32 %199, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %198
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #12
  br label %213

203:                                              ; preds = %198
  %204 = load ptr, ptr %7, align 8, !tbaa !9
  %205 = load i32, ptr %17, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds ptr, ptr %204, i64 %206
  %208 = load ptr, ptr %207, align 8, !tbaa !9
  %209 = call i32 @fclose(ptr noundef %208)
  br label %210

210:                                              ; preds = %203
  %211 = load i32, ptr %17, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %17, align 4, !tbaa !5
  br label %198, !llvm.loop !21

213:                                              ; preds = %202
  %214 = load ptr, ptr %15, align 8, !tbaa !9
  %215 = icmp eq ptr %214, null
  br i1 %215, label %217, label %216

216:                                              ; preds = %213
  call void @_ZdaPv(ptr noundef %214) #15
  br label %217

217:                                              ; preds = %216, %213
  %218 = load ptr, ptr %16, align 8, !tbaa !9
  %219 = icmp eq ptr %218, null
  br i1 %219, label %221, label %220

220:                                              ; preds = %217
  call void @_ZdaPv(ptr noundef %218) #15
  br label %221

221:                                              ; preds = %220, %217
  %222 = load ptr, ptr %7, align 8, !tbaa !9
  %223 = icmp eq ptr %222, null
  br i1 %223, label %225, label %224

224:                                              ; preds = %221
  call void @_ZdaPv(ptr noundef %222) #15
  br label %225

225:                                              ; preds = %224, %221
  call void @exit(i32 noundef 1) #13
  unreachable

226:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #12
  %227 = load i32, ptr @num_rec, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %228, i64 104)
  %230 = extractvalue { i64, i1 } %229, 1
  %231 = extractvalue { i64, i1 } %229, 0
  %232 = select i1 %230, i64 -1, i64 %231
  %233 = call noalias noundef nonnull ptr @_Znam(i64 noundef %232) #14
  store ptr %233, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #12
  %234 = load i32, ptr @num_rec, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %235, i64 104)
  %237 = extractvalue { i64, i1 } %236, 1
  %238 = extractvalue { i64, i1 } %236, 0
  %239 = select i1 %237, i64 -1, i64 %238
  %240 = call noalias noundef nonnull ptr @_Znam(i64 noundef %239) #14
  store ptr %240, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #12
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %285, %226
  %242 = load i32, ptr %20, align 4, !tbaa !5
  %243 = load i32, ptr @num_rec, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #12
  br label %288

246:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #12
  %247 = load ptr, ptr %18, align 8, !tbaa !9
  %248 = load i32, ptr %20, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds %struct.metric, ptr %247, i64 %249
  store ptr %250, ptr %21, align 8, !tbaa !9
  %251 = load ptr, ptr %21, align 8, !tbaa !9
  %252 = getelementptr inbounds %struct.metric, ptr %251, i32 0, i32 0
  store double 0.000000e+00, ptr %252, align 8, !tbaa !22
  %253 = load ptr, ptr %21, align 8, !tbaa !9
  %254 = getelementptr inbounds %struct.metric, ptr %253, i32 0, i32 1
  store double 0.000000e+00, ptr %254, align 8, !tbaa !25
  %255 = load ptr, ptr %21, align 8, !tbaa !9
  %256 = getelementptr inbounds %struct.metric, ptr %255, i32 0, i32 2
  store double 0.000000e+00, ptr %256, align 8, !tbaa !26
  %257 = load ptr, ptr %21, align 8, !tbaa !9
  %258 = getelementptr inbounds %struct.metric, ptr %257, i32 0, i32 3
  store double 0.000000e+00, ptr %258, align 8, !tbaa !27
  %259 = load ptr, ptr %21, align 8, !tbaa !9
  %260 = getelementptr inbounds %struct.metric, ptr %259, i32 0, i32 4
  store double 1.280000e+02, ptr %260, align 8, !tbaa !28
  %261 = load ptr, ptr %21, align 8, !tbaa !9
  %262 = getelementptr inbounds %struct.metric, ptr %261, i32 0, i32 5
  store double 1.280000e+02, ptr %262, align 8, !tbaa !29
  %263 = load ptr, ptr %21, align 8, !tbaa !9
  %264 = getelementptr inbounds %struct.metric, ptr %263, i32 0, i32 6
  store double 1.280000e+02, ptr %264, align 8, !tbaa !30
  %265 = load ptr, ptr %21, align 8, !tbaa !9
  %266 = getelementptr inbounds %struct.metric, ptr %265, i32 0, i32 7
  store double 1.280000e+02, ptr %266, align 8, !tbaa !31
  %267 = load ptr, ptr %21, align 8, !tbaa !9
  %268 = getelementptr inbounds %struct.metric, ptr %267, i32 0, i32 12
  store i32 0, ptr %268, align 8, !tbaa !32
  %269 = load ptr, ptr %21, align 8, !tbaa !9
  %270 = getelementptr inbounds %struct.metric, ptr %269, i32 0, i32 8
  store double 0.000000e+00, ptr %270, align 8, !tbaa !33
  %271 = load ptr, ptr %21, align 8, !tbaa !9
  %272 = getelementptr inbounds %struct.metric, ptr %271, i32 0, i32 9
  store double 0.000000e+00, ptr %272, align 8, !tbaa !34
  %273 = load ptr, ptr %21, align 8, !tbaa !9
  %274 = getelementptr inbounds %struct.metric, ptr %273, i32 0, i32 10
  store double 0.000000e+00, ptr %274, align 8, !tbaa !35
  %275 = load ptr, ptr %21, align 8, !tbaa !9
  %276 = getelementptr inbounds %struct.metric, ptr %275, i32 0, i32 11
  store double 0.000000e+00, ptr %276, align 8, !tbaa !36
  %277 = load ptr, ptr %21, align 8, !tbaa !9
  %278 = load i32, ptr %20, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds %struct.metric, ptr %277, i64 %279
  %281 = load ptr, ptr %19, align 8, !tbaa !9
  %282 = load i32, ptr %20, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds %struct.metric, ptr %281, i64 %283
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %284, ptr align 8 %280, i64 104, i1 false), !tbaa.struct !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #12
  br label %285

285:                                              ; preds = %246
  %286 = load i32, ptr %20, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %20, align 4, !tbaa !5
  br label %241, !llvm.loop !39

288:                                              ; preds = %245
  %289 = load i8, ptr @verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %290 = trunc i8 %289 to i1
  br i1 %290, label %291, label %295

291:                                              ; preds = %288
  %292 = load i32, ptr @image_width, align 4, !tbaa !5
  %293 = load i32, ptr @image_height, align 4, !tbaa !5
  %294 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %292, i32 noundef %293)
  br label %295

295:                                              ; preds = %291, %288
  %296 = load i8, ptr @quiet, align 1, !tbaa !11, !range !13, !noundef !14
  %297 = trunc i8 %296 to i1
  br i1 %297, label %317, label %298

298:                                              ; preds = %295
  %299 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %300 = load i8, ptr @do_psnr, align 1, !tbaa !11, !range !13, !noundef !14
  %301 = trunc i8 %300 to i1
  br i1 %301, label %302, label %304

302:                                              ; preds = %298
  %303 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %304

304:                                              ; preds = %302, %298
  %305 = load i8, ptr @do_ssim, align 1, !tbaa !11, !range !13, !noundef !14
  %306 = trunc i8 %305 to i1
  br i1 %306, label %307, label %309

307:                                              ; preds = %304
  %308 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %309

309:                                              ; preds = %307, %304
  %310 = load i8, ptr @show_name, align 1, !tbaa !11, !range !13, !noundef !14
  %311 = trunc i8 %310 to i1
  br i1 %311, label %312, label %314

312:                                              ; preds = %309
  %313 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %316

314:                                              ; preds = %309
  %315 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %316

316:                                              ; preds = %314, %312
  br label %317

317:                                              ; preds = %316, %295
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #12
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %318

318:                                              ; preds = %465, %317
  %319 = load i32, ptr @num_frames, align 4, !tbaa !5
  %320 = icmp ne i32 %319, 0
  br i1 %320, label %321, label %326

321:                                              ; preds = %318
  %322 = load i32, ptr %22, align 4, !tbaa !5
  %323 = load i32, ptr @num_frames, align 4, !tbaa !5
  %324 = icmp sge i32 %322, %323
  br i1 %324, label %325, label %326

325:                                              ; preds = %321
  br label %468

326:                                              ; preds = %321, %318
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #12
  %327 = load ptr, ptr %15, align 8, !tbaa !9
  %328 = load i64, ptr %13, align 8, !tbaa !18
  %329 = load ptr, ptr %6, align 8, !tbaa !9
  %330 = call i64 @fread(ptr noundef %327, i64 noundef 1, i64 noundef %328, ptr noundef %329)
  store i64 %330, ptr %23, align 8, !tbaa !18
  %331 = load i64, ptr %23, align 8, !tbaa !18
  %332 = load i64, ptr %13, align 8, !tbaa !18
  %333 = icmp ult i64 %331, %332
  br i1 %333, label %334, label %335

334:                                              ; preds = %326
  store i32 17, ptr %9, align 4
  br label %462

335:                                              ; preds = %326
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #12
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %457, %335
  %337 = load i32, ptr %24, align 4, !tbaa !5
  %338 = load i32, ptr @num_rec, align 4, !tbaa !5
  %339 = icmp slt i32 %337, %338
  br i1 %339, label %341, label %340

340:                                              ; preds = %336
  store i32 20, ptr %9, align 4
  br label %460

341:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #12
  %342 = load ptr, ptr %16, align 8, !tbaa !9
  %343 = load i64, ptr %13, align 8, !tbaa !18
  %344 = load ptr, ptr %7, align 8, !tbaa !9
  %345 = load i32, ptr %24, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds ptr, ptr %344, i64 %346
  %348 = load ptr, ptr %347, align 8, !tbaa !9
  %349 = call i64 @fread(ptr noundef %342, i64 noundef 1, i64 noundef %343, ptr noundef %348)
  store i64 %349, ptr %25, align 8, !tbaa !18
  %350 = load i64, ptr %25, align 8, !tbaa !18
  %351 = load i64, ptr %13, align 8, !tbaa !18
  %352 = icmp ult i64 %350, %351
  br i1 %352, label %353, label %354

353:                                              ; preds = %341
  store i32 20, ptr %9, align 4
  br label %454

354:                                              ; preds = %341
  %355 = load i8, ptr @verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %356 = trunc i8 %355 to i1
  br i1 %356, label %357, label %360

357:                                              ; preds = %354
  %358 = load i32, ptr %22, align 4, !tbaa !5
  %359 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %358)
  br label %360

360:                                              ; preds = %357, %354
  %361 = load i8, ptr @do_psnr, align 1, !tbaa !11, !range !13, !noundef !14
  %362 = trunc i8 %361 to i1
  br i1 %362, label %363, label %398

363:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 104, ptr %26) #12
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #12
  %364 = load ptr, ptr %18, align 8, !tbaa !9
  %365 = load i32, ptr %24, align 4, !tbaa !5
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds %struct.metric, ptr %364, i64 %366
  store ptr %367, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #12
  %368 = load ptr, ptr %15, align 8, !tbaa !9
  %369 = load ptr, ptr %16, align 8, !tbaa !9
  %370 = load i32, ptr %11, align 4, !tbaa !5
  %371 = load i32, ptr %12, align 4, !tbaa !5
  %372 = load i64, ptr %13, align 8, !tbaa !18
  %373 = load i32, ptr %22, align 4, !tbaa !5
  %374 = load ptr, ptr %27, align 8, !tbaa !9
  %375 = call noundef zeroext i1 @_ZL13UpdateMetricsPhS_iimiP6metricS1_b(ptr noundef %368, ptr noundef %369, i32 noundef %370, i32 noundef %371, i64 noundef %372, i32 noundef %373, ptr noundef %374, ptr noundef %26, i1 noundef zeroext true)
  %376 = zext i1 %375 to i8
  store i8 %376, ptr %28, align 1, !tbaa !11
  %377 = load i8, ptr @verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %378 = trunc i8 %377 to i1
  br i1 %378, label %379, label %397

379:                                              ; preds = %363
  %380 = getelementptr inbounds %struct.metric, ptr %26, i32 0, i32 0
  %381 = load double, ptr %380, align 8, !tbaa !22
  %382 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %381)
  %383 = getelementptr inbounds %struct.metric, ptr %26, i32 0, i32 1
  %384 = load double, ptr %383, align 8, !tbaa !25
  %385 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %384)
  %386 = getelementptr inbounds %struct.metric, ptr %26, i32 0, i32 2
  %387 = load double, ptr %386, align 8, !tbaa !26
  %388 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %387)
  %389 = getelementptr inbounds %struct.metric, ptr %26, i32 0, i32 3
  %390 = load double, ptr %389, align 8, !tbaa !27
  %391 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %390)
  %392 = load i8, ptr %28, align 1, !tbaa !11, !range !13, !noundef !14
  %393 = trunc i8 %392 to i1
  %394 = zext i1 %393 to i64
  %395 = select i1 %393, ptr @.str.12, ptr @.str.13
  %396 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %395)
  br label %397

397:                                              ; preds = %379, %363
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #12
  call void @llvm.lifetime.end.p0(i64 104, ptr %26) #12
  br label %398

398:                                              ; preds = %397, %360
  %399 = load i8, ptr @do_ssim, align 1, !tbaa !11, !range !13, !noundef !14
  %400 = trunc i8 %399 to i1
  br i1 %400, label %401, label %436

401:                                              ; preds = %398
  call void @llvm.lifetime.start.p0(i64 104, ptr %29) #12
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #12
  %402 = load ptr, ptr %19, align 8, !tbaa !9
  %403 = load i32, ptr %24, align 4, !tbaa !5
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds %struct.metric, ptr %402, i64 %404
  store ptr %405, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #12
  %406 = load ptr, ptr %15, align 8, !tbaa !9
  %407 = load ptr, ptr %16, align 8, !tbaa !9
  %408 = load i32, ptr %11, align 4, !tbaa !5
  %409 = load i32, ptr %12, align 4, !tbaa !5
  %410 = load i64, ptr %13, align 8, !tbaa !18
  %411 = load i32, ptr %22, align 4, !tbaa !5
  %412 = load ptr, ptr %30, align 8, !tbaa !9
  %413 = call noundef zeroext i1 @_ZL13UpdateMetricsPhS_iimiP6metricS1_b(ptr noundef %406, ptr noundef %407, i32 noundef %408, i32 noundef %409, i64 noundef %410, i32 noundef %411, ptr noundef %412, ptr noundef %29, i1 noundef zeroext false)
  %414 = zext i1 %413 to i8
  store i8 %414, ptr %31, align 1, !tbaa !11
  %415 = load i8, ptr @verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %416 = trunc i8 %415 to i1
  br i1 %416, label %417, label %435

417:                                              ; preds = %401
  %418 = getelementptr inbounds %struct.metric, ptr %29, i32 0, i32 0
  %419 = load double, ptr %418, align 8, !tbaa !22
  %420 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %419)
  %421 = getelementptr inbounds %struct.metric, ptr %29, i32 0, i32 1
  %422 = load double, ptr %421, align 8, !tbaa !25
  %423 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %422)
  %424 = getelementptr inbounds %struct.metric, ptr %29, i32 0, i32 2
  %425 = load double, ptr %424, align 8, !tbaa !26
  %426 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %425)
  %427 = getelementptr inbounds %struct.metric, ptr %29, i32 0, i32 3
  %428 = load double, ptr %427, align 8, !tbaa !27
  %429 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %428)
  %430 = load i8, ptr %31, align 1, !tbaa !11, !range !13, !noundef !14
  %431 = trunc i8 %430 to i1
  %432 = zext i1 %431 to i64
  %433 = select i1 %431, ptr @.str.12, ptr @.str.13
  %434 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %433)
  br label %435

435:                                              ; preds = %417, %401
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #12
  call void @llvm.lifetime.end.p0(i64 104, ptr %29) #12
  br label %436

436:                                              ; preds = %435, %398
  %437 = load i8, ptr @verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %438 = trunc i8 %437 to i1
  br i1 %438, label %439, label %453

439:                                              ; preds = %436
  %440 = load i8, ptr @show_name, align 1, !tbaa !11, !range !13, !noundef !14
  %441 = trunc i8 %440 to i1
  br i1 %441, label %442, label %451

442:                                              ; preds = %439
  %443 = load ptr, ptr %5, align 8, !tbaa !9
  %444 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %445 = load i32, ptr %24, align 4, !tbaa !5
  %446 = add nsw i32 %444, %445
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds ptr, ptr %443, i64 %447
  %449 = load ptr, ptr %448, align 8, !tbaa !9
  %450 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %449)
  br label %451

451:                                              ; preds = %442, %439
  %452 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %453

453:                                              ; preds = %451, %436
  store i32 0, ptr %9, align 4
  br label %454

454:                                              ; preds = %453, %353
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  %455 = load i32, ptr %9, align 4
  switch i32 %455, label %460 [
    i32 0, label %456
  ]

456:                                              ; preds = %454
  br label %457

457:                                              ; preds = %456
  %458 = load i32, ptr %24, align 4, !tbaa !5
  %459 = add nsw i32 %458, 1
  store i32 %459, ptr %24, align 4, !tbaa !5
  br label %336, !llvm.loop !40

460:                                              ; preds = %454, %340
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #12
  br label %461

461:                                              ; preds = %460
  store i32 0, ptr %9, align 4
  br label %462

462:                                              ; preds = %461, %334
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #12
  %463 = load i32, ptr %9, align 4
  switch i32 %463, label %803 [
    i32 0, label %464
    i32 17, label %468
  ]

464:                                              ; preds = %462
  br label %465

465:                                              ; preds = %464
  %466 = load i32, ptr %22, align 4, !tbaa !5
  %467 = add nsw i32 %466, 1
  store i32 %467, ptr %22, align 4, !tbaa !5
  br label %318, !llvm.loop !41

468:                                              ; preds = %462, %325
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #12
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %469

469:                                              ; preds = %760, %468
  %470 = load i32, ptr %32, align 4, !tbaa !5
  %471 = load i32, ptr @num_rec, align 4, !tbaa !5
  %472 = icmp slt i32 %470, %471
  br i1 %472, label %474, label %473

473:                                              ; preds = %469
  store i32 23, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #12
  br label %763

474:                                              ; preds = %469
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #12
  %475 = load ptr, ptr %18, align 8, !tbaa !9
  %476 = load i32, ptr %32, align 4, !tbaa !5
  %477 = sext i32 %476 to i64
  %478 = getelementptr inbounds %struct.metric, ptr %475, i64 %477
  store ptr %478, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #12
  %479 = load ptr, ptr %19, align 8, !tbaa !9
  %480 = load i32, ptr %32, align 4, !tbaa !5
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds %struct.metric, ptr %479, i64 %481
  store ptr %482, ptr %34, align 8, !tbaa !9
  %483 = load i32, ptr %22, align 4, !tbaa !5
  %484 = icmp sgt i32 %483, 0
  br i1 %484, label %485, label %529

485:                                              ; preds = %474
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #12
  %486 = load i32, ptr %22, align 4, !tbaa !5
  %487 = sitofp i32 %486 to double
  %488 = fdiv double 1.000000e+00, %487
  store double %488, ptr %35, align 8, !tbaa !38
  %489 = load double, ptr %35, align 8, !tbaa !38
  %490 = load ptr, ptr %33, align 8, !tbaa !9
  %491 = getelementptr inbounds %struct.metric, ptr %490, i32 0, i32 0
  %492 = load double, ptr %491, align 8, !tbaa !22
  %493 = fmul double %492, %489
  store double %493, ptr %491, align 8, !tbaa !22
  %494 = load double, ptr %35, align 8, !tbaa !38
  %495 = load ptr, ptr %33, align 8, !tbaa !9
  %496 = getelementptr inbounds %struct.metric, ptr %495, i32 0, i32 1
  %497 = load double, ptr %496, align 8, !tbaa !25
  %498 = fmul double %497, %494
  store double %498, ptr %496, align 8, !tbaa !25
  %499 = load double, ptr %35, align 8, !tbaa !38
  %500 = load ptr, ptr %33, align 8, !tbaa !9
  %501 = getelementptr inbounds %struct.metric, ptr %500, i32 0, i32 2
  %502 = load double, ptr %501, align 8, !tbaa !26
  %503 = fmul double %502, %499
  store double %503, ptr %501, align 8, !tbaa !26
  %504 = load double, ptr %35, align 8, !tbaa !38
  %505 = load ptr, ptr %33, align 8, !tbaa !9
  %506 = getelementptr inbounds %struct.metric, ptr %505, i32 0, i32 3
  %507 = load double, ptr %506, align 8, !tbaa !27
  %508 = fmul double %507, %504
  store double %508, ptr %506, align 8, !tbaa !27
  %509 = load double, ptr %35, align 8, !tbaa !38
  %510 = load ptr, ptr %34, align 8, !tbaa !9
  %511 = getelementptr inbounds %struct.metric, ptr %510, i32 0, i32 0
  %512 = load double, ptr %511, align 8, !tbaa !22
  %513 = fmul double %512, %509
  store double %513, ptr %511, align 8, !tbaa !22
  %514 = load double, ptr %35, align 8, !tbaa !38
  %515 = load ptr, ptr %34, align 8, !tbaa !9
  %516 = getelementptr inbounds %struct.metric, ptr %515, i32 0, i32 1
  %517 = load double, ptr %516, align 8, !tbaa !25
  %518 = fmul double %517, %514
  store double %518, ptr %516, align 8, !tbaa !25
  %519 = load double, ptr %35, align 8, !tbaa !38
  %520 = load ptr, ptr %34, align 8, !tbaa !9
  %521 = getelementptr inbounds %struct.metric, ptr %520, i32 0, i32 2
  %522 = load double, ptr %521, align 8, !tbaa !26
  %523 = fmul double %522, %519
  store double %523, ptr %521, align 8, !tbaa !26
  %524 = load double, ptr %35, align 8, !tbaa !38
  %525 = load ptr, ptr %34, align 8, !tbaa !9
  %526 = getelementptr inbounds %struct.metric, ptr %525, i32 0, i32 3
  %527 = load double, ptr %526, align 8, !tbaa !27
  %528 = fmul double %527, %524
  store double %528, ptr %526, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #12
  br label %529

529:                                              ; preds = %485, %474
  %530 = load i8, ptr @do_psnr, align 1, !tbaa !11, !range !13, !noundef !14
  %531 = trunc i8 %530 to i1
  br i1 %531, label %532, label %588

532:                                              ; preds = %529
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #12
  %533 = load ptr, ptr %33, align 8, !tbaa !9
  %534 = getelementptr inbounds %struct.metric, ptr %533, i32 0, i32 8
  %535 = load double, ptr %534, align 8, !tbaa !33
  %536 = load i32, ptr %11, align 4, !tbaa !5
  %537 = sitofp i32 %536 to double
  %538 = load i32, ptr %22, align 4, !tbaa !5
  %539 = sitofp i32 %538 to double
  %540 = fmul double %537, %539
  %541 = call double @ComputePSNR(double noundef %535, double noundef %540)
  store double %541, ptr %36, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #12
  %542 = load ptr, ptr %33, align 8, !tbaa !9
  %543 = getelementptr inbounds %struct.metric, ptr %542, i32 0, i32 9
  %544 = load double, ptr %543, align 8, !tbaa !34
  %545 = load i32, ptr %12, align 4, !tbaa !5
  %546 = sitofp i32 %545 to double
  %547 = load i32, ptr %22, align 4, !tbaa !5
  %548 = sitofp i32 %547 to double
  %549 = fmul double %546, %548
  %550 = call double @ComputePSNR(double noundef %544, double noundef %549)
  store double %550, ptr %37, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #12
  %551 = load ptr, ptr %33, align 8, !tbaa !9
  %552 = getelementptr inbounds %struct.metric, ptr %551, i32 0, i32 10
  %553 = load double, ptr %552, align 8, !tbaa !35
  %554 = load i32, ptr %12, align 4, !tbaa !5
  %555 = sitofp i32 %554 to double
  %556 = load i32, ptr %22, align 4, !tbaa !5
  %557 = sitofp i32 %556 to double
  %558 = fmul double %555, %557
  %559 = call double @ComputePSNR(double noundef %553, double noundef %558)
  store double %559, ptr %38, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #12
  %560 = load ptr, ptr %33, align 8, !tbaa !9
  %561 = getelementptr inbounds %struct.metric, ptr %560, i32 0, i32 11
  %562 = load double, ptr %561, align 8, !tbaa !36
  %563 = load i64, ptr %13, align 8, !tbaa !18
  %564 = uitofp i64 %563 to double
  %565 = load i32, ptr %22, align 4, !tbaa !5
  %566 = sitofp i32 %565 to double
  %567 = fmul double %564, %566
  %568 = call double @ComputePSNR(double noundef %562, double noundef %567)
  store double %568, ptr %39, align 8, !tbaa !38
  %569 = load double, ptr %36, align 8, !tbaa !38
  %570 = load double, ptr %37, align 8, !tbaa !38
  %571 = load double, ptr %38, align 8, !tbaa !38
  %572 = load double, ptr %39, align 8, !tbaa !38
  %573 = load i32, ptr %22, align 4, !tbaa !5
  %574 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, double noundef %569, double noundef %570, double noundef %571, double noundef %572, i32 noundef %573)
  %575 = load i8, ptr @show_name, align 1, !tbaa !11, !range !13, !noundef !14
  %576 = trunc i8 %575 to i1
  br i1 %576, label %577, label %586

577:                                              ; preds = %532
  %578 = load ptr, ptr %5, align 8, !tbaa !9
  %579 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %580 = load i32, ptr %32, align 4, !tbaa !5
  %581 = add nsw i32 %579, %580
  %582 = sext i32 %581 to i64
  %583 = getelementptr inbounds ptr, ptr %578, i64 %582
  %584 = load ptr, ptr %583, align 8, !tbaa !9
  %585 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %584)
  br label %586

586:                                              ; preds = %577, %532
  %587 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #12
  br label %588

588:                                              ; preds = %586, %529
  %589 = load i8, ptr @quiet, align 1, !tbaa !11, !range !13, !noundef !14
  %590 = trunc i8 %589 to i1
  br i1 %590, label %642, label %591

591:                                              ; preds = %588
  %592 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %593 = load i8, ptr @do_psnr, align 1, !tbaa !11, !range !13, !noundef !14
  %594 = trunc i8 %593 to i1
  br i1 %594, label %595, label %610

595:                                              ; preds = %591
  %596 = load ptr, ptr %33, align 8, !tbaa !9
  %597 = getelementptr inbounds %struct.metric, ptr %596, i32 0, i32 0
  %598 = load double, ptr %597, align 8, !tbaa !22
  %599 = load ptr, ptr %33, align 8, !tbaa !9
  %600 = getelementptr inbounds %struct.metric, ptr %599, i32 0, i32 1
  %601 = load double, ptr %600, align 8, !tbaa !25
  %602 = load ptr, ptr %33, align 8, !tbaa !9
  %603 = getelementptr inbounds %struct.metric, ptr %602, i32 0, i32 2
  %604 = load double, ptr %603, align 8, !tbaa !26
  %605 = load ptr, ptr %33, align 8, !tbaa !9
  %606 = getelementptr inbounds %struct.metric, ptr %605, i32 0, i32 3
  %607 = load double, ptr %606, align 8, !tbaa !27
  %608 = load i32, ptr %22, align 4, !tbaa !5
  %609 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, double noundef %598, double noundef %601, double noundef %604, double noundef %607, i32 noundef %608)
  br label %610

610:                                              ; preds = %595, %591
  %611 = load i8, ptr @do_ssim, align 1, !tbaa !11, !range !13, !noundef !14
  %612 = trunc i8 %611 to i1
  br i1 %612, label %613, label %628

613:                                              ; preds = %610
  %614 = load ptr, ptr %34, align 8, !tbaa !9
  %615 = getelementptr inbounds %struct.metric, ptr %614, i32 0, i32 0
  %616 = load double, ptr %615, align 8, !tbaa !22
  %617 = load ptr, ptr %34, align 8, !tbaa !9
  %618 = getelementptr inbounds %struct.metric, ptr %617, i32 0, i32 1
  %619 = load double, ptr %618, align 8, !tbaa !25
  %620 = load ptr, ptr %34, align 8, !tbaa !9
  %621 = getelementptr inbounds %struct.metric, ptr %620, i32 0, i32 2
  %622 = load double, ptr %621, align 8, !tbaa !26
  %623 = load ptr, ptr %34, align 8, !tbaa !9
  %624 = getelementptr inbounds %struct.metric, ptr %623, i32 0, i32 3
  %625 = load double, ptr %624, align 8, !tbaa !27
  %626 = load i32, ptr %22, align 4, !tbaa !5
  %627 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, double noundef %616, double noundef %619, double noundef %622, double noundef %625, i32 noundef %626)
  br label %628

628:                                              ; preds = %613, %610
  %629 = load i8, ptr @show_name, align 1, !tbaa !11, !range !13, !noundef !14
  %630 = trunc i8 %629 to i1
  br i1 %630, label %631, label %640

631:                                              ; preds = %628
  %632 = load ptr, ptr %5, align 8, !tbaa !9
  %633 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %634 = load i32, ptr %32, align 4, !tbaa !5
  %635 = add nsw i32 %633, %634
  %636 = sext i32 %635 to i64
  %637 = getelementptr inbounds ptr, ptr %632, i64 %636
  %638 = load ptr, ptr %637, align 8, !tbaa !9
  %639 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %638)
  br label %640

640:                                              ; preds = %631, %628
  %641 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %642

642:                                              ; preds = %640, %588
  %643 = load i8, ptr @quiet, align 1, !tbaa !11, !range !13, !noundef !14
  %644 = trunc i8 %643 to i1
  br i1 %644, label %700, label %645

645:                                              ; preds = %642
  %646 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %647 = load i8, ptr @do_psnr, align 1, !tbaa !11, !range !13, !noundef !14
  %648 = trunc i8 %647 to i1
  br i1 %648, label %649, label %666

649:                                              ; preds = %645
  %650 = load ptr, ptr %33, align 8, !tbaa !9
  %651 = getelementptr inbounds %struct.metric, ptr %650, i32 0, i32 4
  %652 = load double, ptr %651, align 8, !tbaa !28
  %653 = load ptr, ptr %33, align 8, !tbaa !9
  %654 = getelementptr inbounds %struct.metric, ptr %653, i32 0, i32 5
  %655 = load double, ptr %654, align 8, !tbaa !29
  %656 = load ptr, ptr %33, align 8, !tbaa !9
  %657 = getelementptr inbounds %struct.metric, ptr %656, i32 0, i32 6
  %658 = load double, ptr %657, align 8, !tbaa !30
  %659 = load ptr, ptr %33, align 8, !tbaa !9
  %660 = getelementptr inbounds %struct.metric, ptr %659, i32 0, i32 7
  %661 = load double, ptr %660, align 8, !tbaa !31
  %662 = load ptr, ptr %33, align 8, !tbaa !9
  %663 = getelementptr inbounds %struct.metric, ptr %662, i32 0, i32 12
  %664 = load i32, ptr %663, align 8, !tbaa !32
  %665 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, double noundef %652, double noundef %655, double noundef %658, double noundef %661, i32 noundef %664)
  br label %666

666:                                              ; preds = %649, %645
  %667 = load i8, ptr @do_ssim, align 1, !tbaa !11, !range !13, !noundef !14
  %668 = trunc i8 %667 to i1
  br i1 %668, label %669, label %686

669:                                              ; preds = %666
  %670 = load ptr, ptr %34, align 8, !tbaa !9
  %671 = getelementptr inbounds %struct.metric, ptr %670, i32 0, i32 4
  %672 = load double, ptr %671, align 8, !tbaa !28
  %673 = load ptr, ptr %34, align 8, !tbaa !9
  %674 = getelementptr inbounds %struct.metric, ptr %673, i32 0, i32 5
  %675 = load double, ptr %674, align 8, !tbaa !29
  %676 = load ptr, ptr %34, align 8, !tbaa !9
  %677 = getelementptr inbounds %struct.metric, ptr %676, i32 0, i32 6
  %678 = load double, ptr %677, align 8, !tbaa !30
  %679 = load ptr, ptr %34, align 8, !tbaa !9
  %680 = getelementptr inbounds %struct.metric, ptr %679, i32 0, i32 7
  %681 = load double, ptr %680, align 8, !tbaa !31
  %682 = load ptr, ptr %34, align 8, !tbaa !9
  %683 = getelementptr inbounds %struct.metric, ptr %682, i32 0, i32 12
  %684 = load i32, ptr %683, align 8, !tbaa !32
  %685 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, double noundef %672, double noundef %675, double noundef %678, double noundef %681, i32 noundef %684)
  br label %686

686:                                              ; preds = %669, %666
  %687 = load i8, ptr @show_name, align 1, !tbaa !11, !range !13, !noundef !14
  %688 = trunc i8 %687 to i1
  br i1 %688, label %689, label %698

689:                                              ; preds = %686
  %690 = load ptr, ptr %5, align 8, !tbaa !9
  %691 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %692 = load i32, ptr %32, align 4, !tbaa !5
  %693 = add nsw i32 %691, %692
  %694 = sext i32 %693 to i64
  %695 = getelementptr inbounds ptr, ptr %690, i64 %694
  %696 = load ptr, ptr %695, align 8, !tbaa !9
  %697 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %696)
  br label %698

698:                                              ; preds = %689, %686
  %699 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %700

700:                                              ; preds = %698, %642
  %701 = load i8, ptr @do_mse, align 1, !tbaa !11, !range !13, !noundef !14
  %702 = trunc i8 %701 to i1
  br i1 %702, label %703, label %759

703:                                              ; preds = %700
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #12
  %704 = load ptr, ptr %33, align 8, !tbaa !9
  %705 = getelementptr inbounds %struct.metric, ptr %704, i32 0, i32 8
  %706 = load double, ptr %705, align 8, !tbaa !33
  %707 = load i32, ptr %11, align 4, !tbaa !5
  %708 = sitofp i32 %707 to double
  %709 = load i32, ptr %22, align 4, !tbaa !5
  %710 = sitofp i32 %709 to double
  %711 = fmul double %708, %710
  %712 = call noundef double @_ZL6GetMSEdd(double noundef %706, double noundef %711)
  store double %712, ptr %40, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #12
  %713 = load ptr, ptr %33, align 8, !tbaa !9
  %714 = getelementptr inbounds %struct.metric, ptr %713, i32 0, i32 9
  %715 = load double, ptr %714, align 8, !tbaa !34
  %716 = load i32, ptr %12, align 4, !tbaa !5
  %717 = sitofp i32 %716 to double
  %718 = load i32, ptr %22, align 4, !tbaa !5
  %719 = sitofp i32 %718 to double
  %720 = fmul double %717, %719
  %721 = call noundef double @_ZL6GetMSEdd(double noundef %715, double noundef %720)
  store double %721, ptr %41, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #12
  %722 = load ptr, ptr %33, align 8, !tbaa !9
  %723 = getelementptr inbounds %struct.metric, ptr %722, i32 0, i32 10
  %724 = load double, ptr %723, align 8, !tbaa !35
  %725 = load i32, ptr %12, align 4, !tbaa !5
  %726 = sitofp i32 %725 to double
  %727 = load i32, ptr %22, align 4, !tbaa !5
  %728 = sitofp i32 %727 to double
  %729 = fmul double %726, %728
  %730 = call noundef double @_ZL6GetMSEdd(double noundef %724, double noundef %729)
  store double %730, ptr %42, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #12
  %731 = load ptr, ptr %33, align 8, !tbaa !9
  %732 = getelementptr inbounds %struct.metric, ptr %731, i32 0, i32 11
  %733 = load double, ptr %732, align 8, !tbaa !36
  %734 = load i64, ptr %13, align 8, !tbaa !18
  %735 = uitofp i64 %734 to double
  %736 = load i32, ptr %22, align 4, !tbaa !5
  %737 = sitofp i32 %736 to double
  %738 = fmul double %735, %737
  %739 = call noundef double @_ZL6GetMSEdd(double noundef %733, double noundef %738)
  store double %739, ptr %43, align 8, !tbaa !38
  %740 = load double, ptr %40, align 8, !tbaa !38
  %741 = load double, ptr %41, align 8, !tbaa !38
  %742 = load double, ptr %42, align 8, !tbaa !38
  %743 = load double, ptr %43, align 8, !tbaa !38
  %744 = load i32, ptr %22, align 4, !tbaa !5
  %745 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, double noundef %740, double noundef %741, double noundef %742, double noundef %743, i32 noundef %744)
  %746 = load i8, ptr @show_name, align 1, !tbaa !11, !range !13, !noundef !14
  %747 = trunc i8 %746 to i1
  br i1 %747, label %748, label %757

748:                                              ; preds = %703
  %749 = load ptr, ptr %5, align 8, !tbaa !9
  %750 = load i32, ptr @fileindex_rec, align 4, !tbaa !5
  %751 = load i32, ptr %32, align 4, !tbaa !5
  %752 = add nsw i32 %750, %751
  %753 = sext i32 %752 to i64
  %754 = getelementptr inbounds ptr, ptr %749, i64 %753
  %755 = load ptr, ptr %754, align 8, !tbaa !9
  %756 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %755)
  br label %757

757:                                              ; preds = %748, %703
  %758 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #12
  br label %759

759:                                              ; preds = %757, %700
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #12
  br label %760

760:                                              ; preds = %759
  %761 = load i32, ptr %32, align 4, !tbaa !5
  %762 = add nsw i32 %761, 1
  store i32 %762, ptr %32, align 4, !tbaa !5
  br label %469, !llvm.loop !42

763:                                              ; preds = %473
  %764 = load ptr, ptr %6, align 8, !tbaa !9
  %765 = call i32 @fclose(ptr noundef %764)
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #12
  store i32 0, ptr %44, align 4, !tbaa !5
  br label %766

766:                                              ; preds = %778, %763
  %767 = load i32, ptr %44, align 4, !tbaa !5
  %768 = load i32, ptr @num_rec, align 4, !tbaa !5
  %769 = icmp slt i32 %767, %768
  br i1 %769, label %771, label %770

770:                                              ; preds = %766
  store i32 26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #12
  br label %781

771:                                              ; preds = %766
  %772 = load ptr, ptr %7, align 8, !tbaa !9
  %773 = load i32, ptr %44, align 4, !tbaa !5
  %774 = sext i32 %773 to i64
  %775 = getelementptr inbounds ptr, ptr %772, i64 %774
  %776 = load ptr, ptr %775, align 8, !tbaa !9
  %777 = call i32 @fclose(ptr noundef %776)
  br label %778

778:                                              ; preds = %771
  %779 = load i32, ptr %44, align 4, !tbaa !5
  %780 = add nsw i32 %779, 1
  store i32 %780, ptr %44, align 4, !tbaa !5
  br label %766, !llvm.loop !43

781:                                              ; preds = %770
  %782 = load ptr, ptr %18, align 8, !tbaa !9
  %783 = icmp eq ptr %782, null
  br i1 %783, label %785, label %784

784:                                              ; preds = %781
  call void @_ZdaPv(ptr noundef %782) #15
  br label %785

785:                                              ; preds = %784, %781
  %786 = load ptr, ptr %19, align 8, !tbaa !9
  %787 = icmp eq ptr %786, null
  br i1 %787, label %789, label %788

788:                                              ; preds = %785
  call void @_ZdaPv(ptr noundef %786) #15
  br label %789

789:                                              ; preds = %788, %785
  %790 = load ptr, ptr %15, align 8, !tbaa !9
  %791 = icmp eq ptr %790, null
  br i1 %791, label %793, label %792

792:                                              ; preds = %789
  call void @_ZdaPv(ptr noundef %790) #15
  br label %793

793:                                              ; preds = %792, %789
  %794 = load ptr, ptr %16, align 8, !tbaa !9
  %795 = icmp eq ptr %794, null
  br i1 %795, label %797, label %796

796:                                              ; preds = %793
  call void @_ZdaPv(ptr noundef %794) #15
  br label %797

797:                                              ; preds = %796, %793
  %798 = load ptr, ptr %7, align 8, !tbaa !9
  %799 = icmp eq ptr %798, null
  br i1 %799, label %801, label %800

800:                                              ; preds = %797
  call void @_ZdaPv(ptr noundef %798) #15
  br label %801

801:                                              ; preds = %800, %797
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #12
  %802 = load i32, ptr %3, align 4
  ret i32 %802

803:                                              ; preds = %462
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ParseOptionsiPPKc(i32 noundef, ptr noundef) #1

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #7

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

declare i32 @fclose(ptr noundef) #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #9

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #3

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

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL13UpdateMetricsPhS_iimiP6metricS1_b(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare double @ComputePSNR(double noundef, double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef double @_ZL6GetMSEdd(double noundef, double noundef) #11

attributes #0 = { mustprogress norecurse 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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nobuiltin 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 #10 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #11 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #12 = { nounwind }
attributes #13 = { noreturn nounwind }
attributes #14 = { builtin allocsize(0) }
attributes #15 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTS6metric", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24, !24, i64 32, !24, i64 40, !24, i64 48, !24, i64 56, !24, i64 64, !24, i64 72, !24, i64 80, !24, i64 88, !6, i64 96}
!24 = !{!"double", !7, i64 0}
!25 = !{!23, !24, i64 8}
!26 = !{!23, !24, i64 16}
!27 = !{!23, !24, i64 24}
!28 = !{!23, !24, i64 32}
!29 = !{!23, !24, i64 40}
!30 = !{!23, !24, i64 48}
!31 = !{!23, !24, i64 56}
!32 = !{!23, !6, i64 96}
!33 = !{!23, !24, i64 64}
!34 = !{!23, !24, i64 72}
!35 = !{!23, !24, i64 80}
!36 = !{!23, !24, i64 88}
!37 = !{i64 0, i64 8, !38, i64 8, i64 8, !38, i64 16, i64 8, !38, i64 24, i64 8, !38, i64 32, i64 8, !38, i64 40, i64 8, !38, i64 48, i64 8, !38, i64 56, i64 8, !38, i64 64, i64 8, !38, i64 72, i64 8, !38, i64 80, i64 8, !38, i64 88, i64 8, !38, i64 96, i64 4, !5}
!38 = !{!24, !24, i64 0}
!39 = distinct !{!39, !16}
!40 = distinct !{!40, !16}
!41 = distinct !{!41, !16}
!42 = distinct !{!42, !16}
!43 = distinct !{!43, !16}


; 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.metric = type { double, double, double, double, double, double, double, double, double, double, double, double, i32 }

@verbose = external dso_local local_unnamed_addr global i8, align 1
@quiet = external dso_local local_unnamed_addr global i8, align 1
@show_name = external dso_local local_unnamed_addr global i8, align 1
@do_psnr = external dso_local local_unnamed_addr global i8, align 1
@do_ssim = external dso_local local_unnamed_addr global i8, align 1
@do_mse = external dso_local local_unnamed_addr global i8, align 1
@image_width = external dso_local local_unnamed_addr global i32, align 4
@image_height = external dso_local local_unnamed_addr global i32, align 4
@fileindex_org = external dso_local local_unnamed_addr global i32, align 4
@fileindex_rec = external dso_local local_unnamed_addr global i32, align 4
@num_rec = external dso_local local_unnamed_addr global i32, align 4
@num_skip_org = external dso_local local_unnamed_addr global i32, align 4
@num_skip_rec = external dso_local local_unnamed_addr global i32, align 4
@num_frames = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.metric, align 8
  %4 = alloca %struct.metric, align 8
  tail call void @_ZL12ParseOptionsiPPKc(i32 noundef %0, ptr noundef %1)
  %5 = load i8, ptr @do_psnr, align 1, !tbaa !5, !range !9, !noundef !10
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %11, label %7

7:                                                ; preds = %2
  %8 = load i8, ptr @do_ssim, align 1, !tbaa !5, !range !9, !noundef !10
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %11, label %10

10:                                               ; preds = %7
  store i8 1, ptr @do_psnr, align 1, !tbaa !5
  br label %11

11:                                               ; preds = %10, %7, %2
  %12 = load i32, ptr @fileindex_org, align 4, !tbaa !11
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds ptr, ptr %1, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = tail call noalias ptr @fopen(ptr noundef %15, ptr noundef nonnull @.str)
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %25

18:                                               ; preds = %11
  %19 = load ptr, ptr @stderr, align 8, !tbaa !13
  %20 = load i32, ptr @fileindex_org, align 4, !tbaa !11
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds ptr, ptr %1, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.1, ptr noundef %23) #12
  tail call void @exit(i32 noundef 1) #13
  unreachable

25:                                               ; preds = %11
  %26 = load i32, ptr @num_rec, align 4, !tbaa !11
  %27 = sext i32 %26 to i64
  %28 = icmp slt i32 %26, 0
  %29 = shl nsw i64 %27, 3
  %30 = select i1 %28, i64 -1, i64 %29
  %31 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %30) #14
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %31, i8 0, i64 %29, i1 false)
  %32 = icmp sgt i32 %26, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %71, %25
  %33 = load i32, ptr @image_width, align 4, !tbaa !11
  %34 = load i32, ptr @image_height, align 4, !tbaa !11
  %35 = mul nsw i32 %34, %33
  %36 = add nsw i32 %33, 1
  %37 = sdiv i32 %36, 2
  %38 = add nsw i32 %34, 1
  %39 = sdiv i32 %38, 2
  %40 = mul nsw i32 %39, %37
  %41 = shl nsw i32 %40, 1
  %42 = add nsw i32 %41, %35
  %43 = sext i32 %42 to i64
  %44 = load i32, ptr @num_skip_org, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = mul nsw i64 %43, %45
  %47 = tail call i32 @fseek(ptr noundef nonnull %16, i64 noundef %46, i32 noundef 0)
  %48 = load i32, ptr @num_rec, align 4, !tbaa !11
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph223, label %._crit_edge.._crit_edge224_crit_edge

._crit_edge.._crit_edge224_crit_edge:             ; preds = %._crit_edge
  %.pre282 = sext i32 %48 to i64
  br label %._crit_edge224

.lr.ph:                                           ; preds = %25, %71
  %indvars.iv277 = phi i32 [ %indvars.iv.next278, %71 ], [ 0, %25 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %71 ], [ 0, %25 ]
  %50 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %51 = trunc nuw nsw i64 %indvars.iv to i32
  %52 = add nsw i32 %50, %51
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %1, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = tail call noalias ptr @fopen(ptr noundef %55, ptr noundef nonnull @.str)
  %57 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv
  store ptr %56, ptr %57, align 8, !tbaa !13
  %58 = icmp eq ptr %56, null
  br i1 %58, label %59, label %71

59:                                               ; preds = %.lr.ph
  %60 = load ptr, ptr @stderr, align 8, !tbaa !13
  %61 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %62 = add nsw i32 %61, %51
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %1, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.1, ptr noundef %65) #12
  %67 = tail call i32 @fclose(ptr noundef nonnull %16)
  %.not255 = icmp eq i64 %indvars.iv, 0
  br i1 %.not255, label %._crit_edge254, label %.lr.ph253.preheader

.lr.ph253.preheader:                              ; preds = %59
  %wide.trip.count280 = zext nneg i32 %indvars.iv277 to i64
  br label %.lr.ph253

.lr.ph253:                                        ; preds = %.lr.ph253.preheader, %.lr.ph253
  %indvars.iv274 = phi i64 [ 0, %.lr.ph253.preheader ], [ %indvars.iv.next275, %.lr.ph253 ]
  %68 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv274
  %69 = load ptr, ptr %68, align 8, !tbaa !13
  %70 = tail call i32 @fclose(ptr noundef %69)
  %indvars.iv.next275 = add nuw nsw i64 %indvars.iv274, 1
  %exitcond281.not = icmp eq i64 %indvars.iv.next275, %wide.trip.count280
  br i1 %exitcond281.not, label %._crit_edge254, label %.lr.ph253, !llvm.loop !15

._crit_edge254:                                   ; preds = %.lr.ph253, %59
  tail call void @_ZdaPv(ptr noundef nonnull %31) #15
  tail call void @exit(i32 noundef 1) #13
  unreachable

71:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %72 = load i32, ptr @num_rec, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next, %73
  %indvars.iv.next278 = add nuw nsw i32 %indvars.iv277, 1
  br i1 %74, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge224:                                   ; preds = %.lr.ph223, %._crit_edge.._crit_edge224_crit_edge
  %.pre-phi = phi i64 [ %.pre282, %._crit_edge.._crit_edge224_crit_edge ], [ %92, %.lr.ph223 ]
  %.lcssa = phi i32 [ %48, %._crit_edge.._crit_edge224_crit_edge ], [ %91, %.lr.ph223 ]
  %75 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %43) #14
  %76 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %43) #14
  %77 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %.pre-phi, i64 104)
  %78 = extractvalue { i64, i1 } %77, 1
  %79 = extractvalue { i64, i1 } %77, 0
  %80 = select i1 %78, i64 -1, i64 %79
  %81 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %80) #14
  %82 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %80) #14
  %83 = icmp sgt i32 %.lcssa, 0
  br i1 %83, label %.lr.ph227.preheader, label %._crit_edge228

.lr.ph227.preheader:                              ; preds = %._crit_edge224
  %wide.trip.count = zext nneg i32 %.lcssa to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %84 = icmp eq i32 %.lcssa, 1
  br i1 %84, label %._crit_edge228.loopexit.unr-lcssa, label %.lr.ph227.preheader.new

.lr.ph227.preheader.new:                          ; preds = %.lr.ph227.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph227

.lr.ph223:                                        ; preds = %._crit_edge, %.lr.ph223
  %indvars.iv259 = phi i64 [ %indvars.iv.next260, %.lr.ph223 ], [ 0, %._crit_edge ]
  %85 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv259
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = load i32, ptr @num_skip_rec, align 4, !tbaa !11
  %88 = sext i32 %87 to i64
  %89 = mul nsw i64 %88, %43
  %90 = tail call i32 @fseek(ptr noundef %86, i64 noundef %89, i32 noundef 0)
  %indvars.iv.next260 = add nuw nsw i64 %indvars.iv259, 1
  %91 = load i32, ptr @num_rec, align 4, !tbaa !11
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next260, %92
  br i1 %93, label %.lr.ph223, label %._crit_edge224, !llvm.loop !18

._crit_edge228.loopexit.unr-lcssa:                ; preds = %.lr.ph227, %.lr.ph227.preheader
  %indvars.iv262.unr = phi i64 [ 0, %.lr.ph227.preheader ], [ %indvars.iv.next263.1, %.lr.ph227 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge228, label %.lr.ph227.epil

.lr.ph227.epil:                                   ; preds = %._crit_edge228.loopexit.unr-lcssa
  %94 = getelementptr inbounds %struct.metric, ptr %81, i64 %indvars.iv262.unr
  %95 = getelementptr inbounds i8, ptr %94, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %94, i8 0, i64 32, i1 false)
  store <2 x double> <double 1.280000e+02, double 1.280000e+02>, ptr %95, align 8, !tbaa !19
  %96 = getelementptr inbounds i8, ptr %94, i64 48
  store <2 x double> <double 1.280000e+02, double 1.280000e+02>, ptr %96, align 8, !tbaa !19
  %97 = getelementptr inbounds i8, ptr %94, i64 64
  %98 = getelementptr inbounds %struct.metric, ptr %94, i64 %indvars.iv262.unr
  %99 = getelementptr inbounds %struct.metric, ptr %82, i64 %indvars.iv262.unr
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(36) %97, i8 0, i64 36, i1 false)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %99, ptr noundef nonnull align 8 dereferenceable(104) %98, i64 104, i1 false), !tbaa.struct !21
  br label %._crit_edge228

._crit_edge228:                                   ; preds = %.lr.ph227.epil, %._crit_edge228.loopexit.unr-lcssa, %._crit_edge224
  %100 = load i8, ptr @verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %101 = trunc nuw i8 %100 to i1
  br i1 %101, label %114, label %118

.lr.ph227:                                        ; preds = %.lr.ph227, %.lr.ph227.preheader.new
  %indvars.iv262 = phi i64 [ 0, %.lr.ph227.preheader.new ], [ %indvars.iv.next263.1, %.lr.ph227 ]
  %niter = phi i64 [ 0, %.lr.ph227.preheader.new ], [ %niter.next.1, %.lr.ph227 ]
  %102 = getelementptr inbounds %struct.metric, ptr %81, i64 %indvars.iv262
  %103 = getelementptr inbounds i8, ptr %102, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %102, i8 0, i64 32, i1 false)
  store <2 x double> <double 1.280000e+02, double 1.280000e+02>, ptr %103, align 8, !tbaa !19
  %104 = getelementptr inbounds i8, ptr %102, i64 48
  store <2 x double> <double 1.280000e+02, double 1.280000e+02>, ptr %104, align 8, !tbaa !19
  %105 = getelementptr inbounds i8, ptr %102, i64 64
  %106 = getelementptr inbounds %struct.metric, ptr %102, i64 %indvars.iv262
  %107 = getelementptr inbounds %struct.metric, ptr %82, i64 %indvars.iv262
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(36) %105, i8 0, i64 36, i1 false)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %107, ptr noundef nonnull align 8 dereferenceable(104) %106, i64 104, i1 false), !tbaa.struct !21
  %indvars.iv.next263 = or disjoint i64 %indvars.iv262, 1
  %108 = getelementptr inbounds %struct.metric, ptr %81, i64 %indvars.iv.next263
  %109 = getelementptr inbounds i8, ptr %108, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %108, i8 0, i64 32, i1 false)
  store <2 x double> <double 1.280000e+02, double 1.280000e+02>, ptr %109, align 8, !tbaa !19
  %110 = getelementptr inbounds i8, ptr %108, i64 48
  store <2 x double> <double 1.280000e+02, double 1.280000e+02>, ptr %110, align 8, !tbaa !19
  %111 = getelementptr inbounds i8, ptr %108, i64 64
  %112 = getelementptr inbounds %struct.metric, ptr %108, i64 %indvars.iv.next263
  %113 = getelementptr inbounds %struct.metric, ptr %82, i64 %indvars.iv.next263
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(36) %111, i8 0, i64 36, i1 false)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %113, ptr noundef nonnull align 8 dereferenceable(104) %112, i64 104, i1 false), !tbaa.struct !21
  %indvars.iv.next263.1 = add nuw nsw i64 %indvars.iv262, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge228.loopexit.unr-lcssa, label %.lr.ph227, !llvm.loop !22

114:                                              ; preds = %._crit_edge228
  %115 = load i32, ptr @image_width, align 4, !tbaa !11
  %116 = load i32, ptr @image_height, align 4, !tbaa !11
  %117 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %115, i32 noundef %116)
  br label %118

118:                                              ; preds = %114, %._crit_edge228
  %119 = load i8, ptr @quiet, align 1, !tbaa !5, !range !9, !noundef !10
  %120 = trunc nuw i8 %119 to i1
  br i1 %120, label %135, label %121

121:                                              ; preds = %118
  %122 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %123 = load i8, ptr @do_psnr, align 1, !tbaa !5, !range !9, !noundef !10
  %124 = trunc nuw i8 %123 to i1
  br i1 %124, label %125, label %127

125:                                              ; preds = %121
  %126 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %127

127:                                              ; preds = %125, %121
  %128 = load i8, ptr @do_ssim, align 1, !tbaa !5, !range !9, !noundef !10
  %129 = trunc nuw i8 %128 to i1
  br i1 %129, label %130, label %.sink.split

130:                                              ; preds = %127
  %131 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %.sink.split

.sink.split:                                      ; preds = %130, %127
  %132 = load i8, ptr @show_name, align 1, !tbaa !5, !range !9, !noundef !10
  %133 = trunc nuw i8 %132 to i1
  %.str.7..str.8 = select i1 %133, ptr @.str.7, ptr @.str.8
  %134 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7..str.8)
  br label %135

135:                                              ; preds = %.sink.split, %118
  %136 = load i32, ptr @num_frames, align 4, !tbaa !11
  %or.cond235 = icmp sgt i32 %136, -1
  br i1 %or.cond235, label %.lr.ph238, label %.critedge

.lr.ph238:                                        ; preds = %135
  %137 = getelementptr inbounds i8, ptr %3, i64 8
  %138 = getelementptr inbounds i8, ptr %3, i64 16
  %139 = getelementptr inbounds i8, ptr %3, i64 24
  %140 = getelementptr inbounds i8, ptr %4, i64 8
  %141 = getelementptr inbounds i8, ptr %4, i64 16
  %142 = getelementptr inbounds i8, ptr %4, i64 24
  br label %143

143:                                              ; preds = %.lr.ph238, %._crit_edge231
  %.0208236 = phi i32 [ 0, %.lr.ph238 ], [ %216, %._crit_edge231 ]
  %144 = call i64 @fread(ptr noundef nonnull %75, i64 noundef 1, i64 noundef %43, ptr noundef nonnull %16)
  %145 = icmp ult i64 %144, %43
  br i1 %145, label %.critedge, label %.preheader

.preheader:                                       ; preds = %143
  %146 = load i32, ptr @num_rec, align 4, !tbaa !11
  %147 = icmp sgt i32 %146, 0
  br i1 %147, label %.lr.ph230, label %._crit_edge231

.lr.ph230:                                        ; preds = %.preheader, %212
  %indvars.iv265 = phi i64 [ %indvars.iv.next266, %212 ], [ 0, %.preheader ]
  %148 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv265
  %149 = load ptr, ptr %148, align 8, !tbaa !13
  %150 = call i64 @fread(ptr noundef nonnull %76, i64 noundef 1, i64 noundef %43, ptr noundef %149)
  %.not215 = icmp ult i64 %150, %43
  br i1 %.not215, label %._crit_edge231, label %151

151:                                              ; preds = %.lr.ph230
  %152 = load i8, ptr @verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %153 = trunc nuw i8 %152 to i1
  br i1 %153, label %154, label %156

154:                                              ; preds = %151
  %155 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %.0208236)
  br label %156

156:                                              ; preds = %154, %151
  %157 = load i8, ptr @do_psnr, align 1, !tbaa !5, !range !9, !noundef !10
  %158 = trunc nuw i8 %157 to i1
  br i1 %158, label %159, label %176

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %3) #16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %3, i8 0, i64 104, i1 false)
  %160 = getelementptr inbounds %struct.metric, ptr %81, i64 %indvars.iv265
  %161 = call noundef zeroext i1 @_ZL13UpdateMetricsPhS_iimiP6metricS1_b(ptr noundef nonnull %75, ptr noundef nonnull %76, i32 noundef %35, i32 noundef %40, i64 noundef %43, i32 noundef %.0208236, ptr noundef nonnull %160, ptr noundef nonnull %3, i1 noundef zeroext true)
  %162 = load i8, ptr @verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %163 = trunc nuw i8 %162 to i1
  br i1 %163, label %164, label %175

164:                                              ; preds = %159
  %165 = load double, ptr %3, align 8, !tbaa !23
  %166 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %165)
  %167 = load double, ptr %137, align 8, !tbaa !25
  %168 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %167)
  %169 = load double, ptr %138, align 8, !tbaa !26
  %170 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %169)
  %171 = load double, ptr %139, align 8, !tbaa !27
  %172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %171)
  %173 = select i1 %161, ptr @.str.12, ptr @.str.13
  %174 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull %173)
  br label %175

175:                                              ; preds = %164, %159
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %3) #16
  br label %176

176:                                              ; preds = %175, %156
  %177 = load i8, ptr @do_ssim, align 1, !tbaa !5, !range !9, !noundef !10
  %178 = trunc nuw i8 %177 to i1
  br i1 %178, label %179, label %196

179:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %4) #16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %4, i8 0, i64 104, i1 false)
  %180 = getelementptr inbounds %struct.metric, ptr %82, i64 %indvars.iv265
  %181 = call noundef zeroext i1 @_ZL13UpdateMetricsPhS_iimiP6metricS1_b(ptr noundef nonnull %75, ptr noundef nonnull %76, i32 noundef %35, i32 noundef %40, i64 noundef %43, i32 noundef %.0208236, ptr noundef nonnull %180, ptr noundef nonnull %4, i1 noundef zeroext false)
  %182 = load i8, ptr @verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %183 = trunc nuw i8 %182 to i1
  br i1 %183, label %184, label %195

184:                                              ; preds = %179
  %185 = load double, ptr %4, align 8, !tbaa !23
  %186 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %185)
  %187 = load double, ptr %140, align 8, !tbaa !25
  %188 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %187)
  %189 = load double, ptr %141, align 8, !tbaa !26
  %190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %189)
  %191 = load double, ptr %142, align 8, !tbaa !27
  %192 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %191)
  %193 = select i1 %181, ptr @.str.12, ptr @.str.13
  %194 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull %193)
  br label %195

195:                                              ; preds = %184, %179
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #16
  br label %196

196:                                              ; preds = %195, %176
  %197 = load i8, ptr @verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %198 = trunc nuw i8 %197 to i1
  br i1 %198, label %199, label %212

199:                                              ; preds = %196
  %200 = load i8, ptr @show_name, align 1, !tbaa !5, !range !9, !noundef !10
  %201 = trunc nuw i8 %200 to i1
  br i1 %201, label %202, label %210

202:                                              ; preds = %199
  %203 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %204 = trunc nuw nsw i64 %indvars.iv265 to i32
  %205 = add nsw i32 %203, %204
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds ptr, ptr %1, i64 %206
  %208 = load ptr, ptr %207, align 8, !tbaa !13
  %209 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %208)
  br label %210

210:                                              ; preds = %202, %199
  %211 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %212

212:                                              ; preds = %210, %196
  %indvars.iv.next266 = add nuw nsw i64 %indvars.iv265, 1
  %213 = load i32, ptr @num_rec, align 4, !tbaa !11
  %214 = sext i32 %213 to i64
  %215 = icmp slt i64 %indvars.iv.next266, %214
  br i1 %215, label %.lr.ph230, label %._crit_edge231, !llvm.loop !28

._crit_edge231:                                   ; preds = %212, %.lr.ph230, %.preheader
  %216 = add nuw nsw i32 %.0208236, 1
  %217 = load i32, ptr @num_frames, align 4, !tbaa !11
  %.not = icmp eq i32 %217, 0
  %.not214 = icmp slt i32 %216, %217
  %or.cond = select i1 %.not, i1 true, i1 %.not214
  br i1 %or.cond, label %143, label %.critedge, !llvm.loop !29

.critedge:                                        ; preds = %._crit_edge231, %143, %135
  %.0208.lcssa = phi i32 [ 0, %135 ], [ %.0208236, %143 ], [ %216, %._crit_edge231 ]
  %218 = load i32, ptr @num_rec, align 4, !tbaa !11
  %219 = icmp sgt i32 %218, 0
  br i1 %219, label %.lr.ph245, label %._crit_edge246

.lr.ph245:                                        ; preds = %.critedge
  %.not216 = icmp eq i32 %.0208.lcssa, 0
  %220 = uitofp nneg i32 %.0208.lcssa to double
  %221 = fdiv double 1.000000e+00, %220
  %222 = sitofp i32 %35 to double
  %223 = fmul double %222, %220
  %224 = sitofp i32 %40 to double
  %225 = fmul double %224, %220
  %226 = uitofp i64 %43 to double
  %227 = fmul double %226, %220
  %228 = insertelement <2 x double> poison, double %221, i64 0
  %229 = shufflevector <2 x double> %228, <2 x double> poison, <2 x i32> zeroinitializer
  br label %233

._crit_edge246:                                   ; preds = %393, %.critedge
  %230 = call i32 @fclose(ptr noundef nonnull %16)
  %231 = load i32, ptr @num_rec, align 4, !tbaa !11
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %.lr.ph249, label %._crit_edge250

233:                                              ; preds = %.lr.ph245, %393
  %indvars.iv268 = phi i64 [ 0, %.lr.ph245 ], [ %indvars.iv.next269, %393 ]
  %234 = getelementptr inbounds %struct.metric, ptr %81, i64 %indvars.iv268
  %235 = getelementptr inbounds %struct.metric, ptr %82, i64 %indvars.iv268
  br i1 %.not216, label %247, label %236

236:                                              ; preds = %233
  %237 = load <2 x double>, ptr %234, align 8, !tbaa !19
  %238 = fmul <2 x double> %229, %237
  store <2 x double> %238, ptr %234, align 8, !tbaa !19
  %239 = getelementptr inbounds i8, ptr %234, i64 16
  %240 = load <2 x double>, ptr %239, align 8, !tbaa !19
  %241 = fmul <2 x double> %229, %240
  store <2 x double> %241, ptr %239, align 8, !tbaa !19
  %242 = load <2 x double>, ptr %235, align 8, !tbaa !19
  %243 = fmul <2 x double> %229, %242
  store <2 x double> %243, ptr %235, align 8, !tbaa !19
  %244 = getelementptr inbounds i8, ptr %235, i64 16
  %245 = load <2 x double>, ptr %244, align 8, !tbaa !19
  %246 = fmul <2 x double> %229, %245
  store <2 x double> %246, ptr %244, align 8, !tbaa !19
  br label %247

247:                                              ; preds = %236, %233
  %248 = load i8, ptr @do_psnr, align 1, !tbaa !5, !range !9, !noundef !10
  %249 = trunc nuw i8 %248 to i1
  br i1 %249, label %250, label %276

250:                                              ; preds = %247
  %251 = getelementptr inbounds i8, ptr %234, i64 64
  %252 = load double, ptr %251, align 8, !tbaa !30
  %253 = call double @ComputePSNR(double noundef %252, double noundef %223)
  %254 = getelementptr inbounds i8, ptr %234, i64 72
  %255 = load double, ptr %254, align 8, !tbaa !31
  %256 = call double @ComputePSNR(double noundef %255, double noundef %225)
  %257 = getelementptr inbounds i8, ptr %234, i64 80
  %258 = load double, ptr %257, align 8, !tbaa !32
  %259 = call double @ComputePSNR(double noundef %258, double noundef %225)
  %260 = getelementptr inbounds i8, ptr %234, i64 88
  %261 = load double, ptr %260, align 8, !tbaa !33
  %262 = call double @ComputePSNR(double noundef %261, double noundef %227)
  %263 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, double noundef %253, double noundef %256, double noundef %259, double noundef %262, i32 noundef %.0208.lcssa)
  %264 = load i8, ptr @show_name, align 1, !tbaa !5, !range !9, !noundef !10
  %265 = trunc nuw i8 %264 to i1
  br i1 %265, label %266, label %274

266:                                              ; preds = %250
  %267 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %268 = trunc nuw nsw i64 %indvars.iv268 to i32
  %269 = add nsw i32 %267, %268
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds ptr, ptr %1, i64 %270
  %272 = load ptr, ptr %271, align 8, !tbaa !13
  %273 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %272)
  br label %274

274:                                              ; preds = %266, %250
  %275 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %276

276:                                              ; preds = %274, %247
  %277 = load i8, ptr @quiet, align 1, !tbaa !5, !range !9, !noundef !10
  %278 = trunc nuw i8 %277 to i1
  br i1 %278, label %317, label %279

279:                                              ; preds = %276
  %280 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %281 = load i8, ptr @do_psnr, align 1, !tbaa !5, !range !9, !noundef !10
  %282 = trunc nuw i8 %281 to i1
  br i1 %282, label %283, label %292

283:                                              ; preds = %279
  %284 = load double, ptr %234, align 8, !tbaa !23
  %285 = getelementptr inbounds i8, ptr %234, i64 8
  %286 = load double, ptr %285, align 8, !tbaa !25
  %287 = getelementptr inbounds i8, ptr %234, i64 16
  %288 = load double, ptr %287, align 8, !tbaa !26
  %289 = getelementptr inbounds i8, ptr %234, i64 24
  %290 = load double, ptr %289, align 8, !tbaa !27
  %291 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, double noundef %284, double noundef %286, double noundef %288, double noundef %290, i32 noundef %.0208.lcssa)
  br label %292

292:                                              ; preds = %283, %279
  %293 = load i8, ptr @do_ssim, align 1, !tbaa !5, !range !9, !noundef !10
  %294 = trunc nuw i8 %293 to i1
  br i1 %294, label %295, label %304

295:                                              ; preds = %292
  %296 = load double, ptr %235, align 8, !tbaa !23
  %297 = getelementptr inbounds i8, ptr %235, i64 8
  %298 = load double, ptr %297, align 8, !tbaa !25
  %299 = getelementptr inbounds i8, ptr %235, i64 16
  %300 = load double, ptr %299, align 8, !tbaa !26
  %301 = getelementptr inbounds i8, ptr %235, i64 24
  %302 = load double, ptr %301, align 8, !tbaa !27
  %303 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, double noundef %296, double noundef %298, double noundef %300, double noundef %302, i32 noundef %.0208.lcssa)
  br label %304

304:                                              ; preds = %295, %292
  %305 = load i8, ptr @show_name, align 1, !tbaa !5, !range !9, !noundef !10
  %306 = trunc nuw i8 %305 to i1
  br i1 %306, label %307, label %315

307:                                              ; preds = %304
  %308 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %309 = trunc nuw nsw i64 %indvars.iv268 to i32
  %310 = add nsw i32 %308, %309
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds ptr, ptr %1, i64 %311
  %313 = load ptr, ptr %312, align 8, !tbaa !13
  %314 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %313)
  br label %315

315:                                              ; preds = %307, %304
  %316 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.pre = load i8, ptr @quiet, align 1, !tbaa !5, !range !9
  br label %317

317:                                              ; preds = %315, %276
  %318 = phi i8 [ %.pre, %315 ], [ %277, %276 ]
  %319 = trunc nuw i8 %318 to i1
  br i1 %319, label %364, label %320

320:                                              ; preds = %317
  %321 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %322 = load i8, ptr @do_psnr, align 1, !tbaa !5, !range !9, !noundef !10
  %323 = trunc nuw i8 %322 to i1
  br i1 %323, label %324, label %336

324:                                              ; preds = %320
  %325 = getelementptr inbounds i8, ptr %234, i64 32
  %326 = load double, ptr %325, align 8, !tbaa !34
  %327 = getelementptr inbounds i8, ptr %234, i64 40
  %328 = load double, ptr %327, align 8, !tbaa !35
  %329 = getelementptr inbounds i8, ptr %234, i64 48
  %330 = load double, ptr %329, align 8, !tbaa !36
  %331 = getelementptr inbounds i8, ptr %234, i64 56
  %332 = load double, ptr %331, align 8, !tbaa !37
  %333 = getelementptr inbounds i8, ptr %234, i64 96
  %334 = load i32, ptr %333, align 8, !tbaa !38
  %335 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, double noundef %326, double noundef %328, double noundef %330, double noundef %332, i32 noundef %334)
  br label %336

336:                                              ; preds = %324, %320
  %337 = load i8, ptr @do_ssim, align 1, !tbaa !5, !range !9, !noundef !10
  %338 = trunc nuw i8 %337 to i1
  br i1 %338, label %339, label %351

339:                                              ; preds = %336
  %340 = getelementptr inbounds i8, ptr %235, i64 32
  %341 = load double, ptr %340, align 8, !tbaa !34
  %342 = getelementptr inbounds i8, ptr %235, i64 40
  %343 = load double, ptr %342, align 8, !tbaa !35
  %344 = getelementptr inbounds i8, ptr %235, i64 48
  %345 = load double, ptr %344, align 8, !tbaa !36
  %346 = getelementptr inbounds i8, ptr %235, i64 56
  %347 = load double, ptr %346, align 8, !tbaa !37
  %348 = getelementptr inbounds i8, ptr %235, i64 96
  %349 = load i32, ptr %348, align 8, !tbaa !38
  %350 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, double noundef %341, double noundef %343, double noundef %345, double noundef %347, i32 noundef %349)
  br label %351

351:                                              ; preds = %339, %336
  %352 = load i8, ptr @show_name, align 1, !tbaa !5, !range !9, !noundef !10
  %353 = trunc nuw i8 %352 to i1
  br i1 %353, label %354, label %362

354:                                              ; preds = %351
  %355 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %356 = trunc nuw nsw i64 %indvars.iv268 to i32
  %357 = add nsw i32 %355, %356
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds ptr, ptr %1, i64 %358
  %360 = load ptr, ptr %359, align 8, !tbaa !13
  %361 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %360)
  br label %362

362:                                              ; preds = %354, %351
  %363 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %364

364:                                              ; preds = %362, %317
  %365 = load i8, ptr @do_mse, align 1, !tbaa !5, !range !9, !noundef !10
  %366 = trunc nuw i8 %365 to i1
  br i1 %366, label %367, label %393

367:                                              ; preds = %364
  %368 = getelementptr inbounds i8, ptr %234, i64 64
  %369 = load double, ptr %368, align 8, !tbaa !30
  %370 = call noundef double @_ZL6GetMSEdd(double noundef %369, double noundef %223)
  %371 = getelementptr inbounds i8, ptr %234, i64 72
  %372 = load double, ptr %371, align 8, !tbaa !31
  %373 = call noundef double @_ZL6GetMSEdd(double noundef %372, double noundef %225)
  %374 = getelementptr inbounds i8, ptr %234, i64 80
  %375 = load double, ptr %374, align 8, !tbaa !32
  %376 = call noundef double @_ZL6GetMSEdd(double noundef %375, double noundef %225)
  %377 = getelementptr inbounds i8, ptr %234, i64 88
  %378 = load double, ptr %377, align 8, !tbaa !33
  %379 = call noundef double @_ZL6GetMSEdd(double noundef %378, double noundef %227)
  %380 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, double noundef %370, double noundef %373, double noundef %376, double noundef %379, i32 noundef %.0208.lcssa)
  %381 = load i8, ptr @show_name, align 1, !tbaa !5, !range !9, !noundef !10
  %382 = trunc nuw i8 %381 to i1
  br i1 %382, label %383, label %391

383:                                              ; preds = %367
  %384 = load i32, ptr @fileindex_rec, align 4, !tbaa !11
  %385 = trunc nuw nsw i64 %indvars.iv268 to i32
  %386 = add nsw i32 %384, %385
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds ptr, ptr %1, i64 %387
  %389 = load ptr, ptr %388, align 8, !tbaa !13
  %390 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %389)
  br label %391

391:                                              ; preds = %383, %367
  %392 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %393

393:                                              ; preds = %391, %364
  %indvars.iv.next269 = add nuw nsw i64 %indvars.iv268, 1
  %394 = load i32, ptr @num_rec, align 4, !tbaa !11
  %395 = sext i32 %394 to i64
  %396 = icmp slt i64 %indvars.iv.next269, %395
  br i1 %396, label %233, label %._crit_edge246, !llvm.loop !39

.lr.ph249:                                        ; preds = %._crit_edge246, %.lr.ph249
  %indvars.iv271 = phi i64 [ %indvars.iv.next272, %.lr.ph249 ], [ 0, %._crit_edge246 ]
  %397 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv271
  %398 = load ptr, ptr %397, align 8, !tbaa !13
  %399 = call i32 @fclose(ptr noundef %398)
  %indvars.iv.next272 = add nuw nsw i64 %indvars.iv271, 1
  %400 = load i32, ptr @num_rec, align 4, !tbaa !11
  %401 = sext i32 %400 to i64
  %402 = icmp slt i64 %indvars.iv.next272, %401
  br i1 %402, label %.lr.ph249, label %._crit_edge250, !llvm.loop !40

._crit_edge250:                                   ; preds = %.lr.ph249, %._crit_edge246
  call void @_ZdaPv(ptr noundef nonnull %81) #15
  call void @_ZdaPv(ptr noundef nonnull %82) #15
  call void @_ZdaPv(ptr noundef nonnull %75) #15
  call void @_ZdaPv(ptr noundef nonnull %76) #15
  call void @_ZdaPv(ptr noundef nonnull %31) #15
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ParseOptionsiPPKc(i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #5

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #8

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL13UpdateMetricsPhS_iimiP6metricS1_b(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare double @ComputePSNR(double noundef, double noundef) local_unnamed_addr #10

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef double @_ZL6GetMSEdd(double noundef, double noundef) local_unnamed_addr #11

attributes #0 = { mustprogress norecurse 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nobuiltin 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 #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { "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 #11 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #12 = { cold nounwind }
attributes #13 = { noreturn nounwind }
attributes #14 = { builtin allocsize(0) }
attributes #15 = { builtin nounwind }
attributes #16 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{i64 0, i64 8, !19, i64 8, i64 8, !19, i64 16, i64 8, !19, i64 24, i64 8, !19, i64 32, i64 8, !19, i64 40, i64 8, !19, i64 48, i64 8, !19, i64 56, i64 8, !19, i64 64, i64 8, !19, i64 72, i64 8, !19, i64 80, i64 8, !19, i64 88, i64 8, !19, i64 96, i64 4, !11}
!22 = distinct !{!22, !16}
!23 = !{!24, !20, i64 0}
!24 = !{!"_ZTS6metric", !20, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !20, i64 32, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !12, i64 96}
!25 = !{!24, !20, i64 8}
!26 = !{!24, !20, i64 16}
!27 = !{!24, !20, i64 24}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !16}
!30 = !{!24, !20, i64 64}
!31 = !{!24, !20, i64 72}
!32 = !{!24, !20, i64 80}
!33 = !{!24, !20, i64 88}
!34 = !{!24, !20, i64 32}
!35 = !{!24, !20, i64 40}
!36 = !{!24, !20, i64 48}
!37 = !{!24, !20, i64 56}
!38 = !{!24, !12, i64 96}
!39 = distinct !{!39, !16}
!40 = distinct !{!40, !16}


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