; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R2Shapes/R2Grid.ll (ZN6R2Grid11ReadPNGFileEPKc)

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

%class.R2Affine = type <{ %class.R2Transformation, %class.R3Matrix, i32, [4 x i8] }>
%class.R2Transformation = type { ptr }
%class.R3Matrix = type { [3 x [3 x double]] }
%class.R2Grid = type { %class.R2Affine, %class.R2Affine, double, ptr, [2 x i32], i32, i32 }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@R2identity_affine = external global %class.R2Affine, align 8
@stderr = external global ptr, align 8
@.str.40 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(84) ptr @_ZN8R2AffineaSERKS_(ptr noundef nonnull align 8 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(84)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef, double noundef) #4 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6R2Grid11ReadPNGFileEPKc(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %1) #7 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca [4 x i32], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noalias ptr @fopen(ptr noundef %27, ptr noundef @.str.40)
  store ptr %28, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %35, label %31

31:                                               ; preds = %2
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.76, ptr noundef %33) #8
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %325

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %36 = call noalias ptr @png_create_read_struct(ptr noundef @.str.77, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %36, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %42

39:                                               ; preds = %35
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = call i32 @fclose(ptr noundef %40)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %324

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call noalias ptr @png_create_info_struct(ptr noundef %43)
  store ptr %44, ptr %9, align 8, !tbaa !5
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %50

47:                                               ; preds = %42
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call i32 @fclose(ptr noundef %48)
  call void @png_destroy_read_struct(ptr noundef %8, ptr noundef null, ptr noundef null)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %323

50:                                               ; preds = %42
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_init_io(ptr noundef %51, ptr noundef %52)
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_read_info(ptr noundef %53, ptr noundef %54)
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = call zeroext i8 @png_get_color_type(ptr noundef %55, ptr noundef %56)
  store i8 %57, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = call i32 @png_get_image_width(ptr noundef %58, ptr noundef %59)
  store i32 %60, ptr %11, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = call i32 @png_get_image_height(ptr noundef %61, ptr noundef %62)
  store i32 %63, ptr %12, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = call i64 @png_get_rowbytes(ptr noundef %64, ptr noundef %65)
  %67 = trunc i64 %66 to i32
  store i32 %67, ptr %13, align 4, !tbaa !10
  %68 = load i32, ptr %13, align 4, !tbaa !10
  %69 = srem i32 %68, 4
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %76

71:                                               ; preds = %50
  %72 = load i32, ptr %13, align 4, !tbaa !10
  %73 = sdiv i32 %72, 4
  %74 = add nsw i32 %73, 1
  %75 = mul nsw i32 %74, 4
  store i32 %75, ptr %13, align 4, !tbaa !10
  br label %76

76:                                               ; preds = %71, %50
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = call zeroext i8 @png_get_bit_depth(ptr noundef %77, ptr noundef %78)
  store i8 %79, ptr %14, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %80 = load i8, ptr %14, align 1, !tbaa !9
  %81 = zext i8 %80 to i32
  %82 = sdiv i32 %81, 8
  store i32 %82, ptr %15, align 4, !tbaa !10
  %83 = load i32, ptr %13, align 4, !tbaa !10
  %84 = load i32, ptr %15, align 4, !tbaa !10
  %85 = load i32, ptr %11, align 4, !tbaa !10
  %86 = mul nsw i32 %84, %85
  %87 = icmp sge i32 %83, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %76
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.78, i32 noundef 3930, ptr noundef @.str.2)
  br label %89

89:                                               ; preds = %88, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !10
  %90 = load i8, ptr %10, align 1, !tbaa !9
  %91 = zext i8 %90 to i32
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %89
  store i32 1, ptr %16, align 4, !tbaa !10
  br label %115

94:                                               ; preds = %89
  %95 = load i8, ptr %10, align 1, !tbaa !9
  %96 = zext i8 %95 to i32
  %97 = icmp eq i32 %96, 4
  br i1 %97, label %98, label %99

98:                                               ; preds = %94
  store i32 2, ptr %16, align 4, !tbaa !10
  br label %114

99:                                               ; preds = %94
  %100 = load i8, ptr %10, align 1, !tbaa !9
  %101 = zext i8 %100 to i32
  %102 = icmp eq i32 %101, 2
  br i1 %102, label %103, label %104

103:                                              ; preds = %99
  store i32 3, ptr %16, align 4, !tbaa !10
  br label %113

104:                                              ; preds = %99
  %105 = load i8, ptr %10, align 1, !tbaa !9
  %106 = zext i8 %105 to i32
  %107 = icmp eq i32 %106, 6
  br i1 %107, label %108, label %109

108:                                              ; preds = %104
  store i32 4, ptr %16, align 4, !tbaa !10
  br label %112

109:                                              ; preds = %104
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = call i32 @fclose(ptr noundef %110)
  call void @png_destroy_read_struct(ptr noundef %8, ptr noundef null, ptr noundef null)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %322

112:                                              ; preds = %108
  br label %113

113:                                              ; preds = %112, %103
  br label %114

114:                                              ; preds = %113, %98
  br label %115

115:                                              ; preds = %114, %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %116 = load i32, ptr %12, align 4, !tbaa !10
  %117 = load i32, ptr %13, align 4, !tbaa !10
  %118 = mul nsw i32 %116, %117
  %119 = sext i32 %118 to i64
  %120 = call noalias noundef nonnull ptr @_Znam(i64 noundef %119) #9
  store ptr %120, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load i32, ptr %12, align 4, !tbaa !10
  %123 = sext i32 %122 to i64
  %124 = mul i64 %123, 8
  %125 = call noalias ptr @png_malloc(ptr noundef %121, i64 noundef %124)
  store ptr %125, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !10
  br label %126

126:                                              ; preds = %145, %115
  %127 = load i32, ptr %19, align 4, !tbaa !10
  %128 = load i32, ptr %12, align 4, !tbaa !10
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %148

131:                                              ; preds = %126
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = load i32, ptr %12, align 4, !tbaa !10
  %134 = load i32, ptr %19, align 4, !tbaa !10
  %135 = sub nsw i32 %133, %134
  %136 = sub nsw i32 %135, 1
  %137 = load i32, ptr %13, align 4, !tbaa !10
  %138 = mul nsw i32 %136, %137
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr %132, i64 %139
  %141 = load ptr, ptr %18, align 8, !tbaa !5
  %142 = load i32, ptr %19, align 4, !tbaa !10
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %141, i64 %143
  store ptr %140, ptr %144, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %131
  %146 = load i32, ptr %19, align 4, !tbaa !10
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %19, align 4, !tbaa !10
  br label %126, !llvm.loop !12

148:                                              ; preds = %130
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load ptr, ptr %18, align 8, !tbaa !5
  call void @png_read_image(ptr noundef %149, ptr noundef %150)
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_read_end(ptr noundef %151, ptr noundef %152)
  %153 = load i32, ptr %11, align 4, !tbaa !10
  %154 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 4
  %155 = getelementptr inbounds [2 x i32], ptr %154, i64 0, i64 0
  store i32 %153, ptr %155, align 8, !tbaa !10
  %156 = load i32, ptr %12, align 4, !tbaa !10
  %157 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 4
  %158 = getelementptr inbounds [2 x i32], ptr %157, i64 0, i64 1
  store i32 %156, ptr %158, align 4, !tbaa !10
  %159 = load i32, ptr %11, align 4, !tbaa !10
  %160 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 5
  store i32 %159, ptr %160, align 8, !tbaa !14
  %161 = load i32, ptr %11, align 4, !tbaa !10
  %162 = load i32, ptr %12, align 4, !tbaa !10
  %163 = mul nsw i32 %161, %162
  %164 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 6
  store i32 %163, ptr %164, align 4, !tbaa !20
  %165 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 2
  store double 1.000000e+00, ptr %165, align 8, !tbaa !21
  %166 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 1
  %167 = call noundef nonnull align 8 dereferenceable(84) ptr @_ZN8R2AffineaSERKS_(ptr noundef nonnull align 8 dereferenceable(84) %166, ptr noundef nonnull align 8 dereferenceable(84) @R2identity_affine)
  %168 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 0
  %169 = call noundef nonnull align 8 dereferenceable(84) ptr @_ZN8R2AffineaSERKS_(ptr noundef nonnull align 8 dereferenceable(84) %168, ptr noundef nonnull align 8 dereferenceable(84) @R2identity_affine)
  %170 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 3
  %171 = load ptr, ptr %170, align 8, !tbaa !22
  %172 = icmp ne ptr %171, null
  br i1 %172, label %173, label %179

173:                                              ; preds = %148
  %174 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 3
  %175 = load ptr, ptr %174, align 8, !tbaa !22
  %176 = icmp eq ptr %175, null
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  call void @_ZdaPv(ptr noundef %175) #10
  br label %178

178:                                              ; preds = %177, %173
  br label %179

179:                                              ; preds = %178, %148
  %180 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 6
  %181 = load i32, ptr %180, align 4, !tbaa !20
  %182 = sext i32 %181 to i64
  %183 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %182, i64 8)
  %184 = extractvalue { i64, i1 } %183, 1
  %185 = extractvalue { i64, i1 } %183, 0
  %186 = select i1 %184, i64 -1, i64 %185
  %187 = call noalias noundef nonnull ptr @_Znam(i64 noundef %186) #9
  %188 = getelementptr inbounds %class.R2Grid, ptr %26, i32 0, i32 3
  store ptr %187, ptr %188, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !10
  br label %189

189:                                              ; preds = %310, %179
  %190 = load i32, ptr %20, align 4, !tbaa !10
  %191 = load i32, ptr %12, align 4, !tbaa !10
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %194, label %193

193:                                              ; preds = %189
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %313

194:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !10
  br label %195

195:                                              ; preds = %306, %194
  %196 = load i32, ptr %21, align 4, !tbaa !10
  %197 = load i32, ptr %11, align 4, !tbaa !10
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %200, label %199

199:                                              ; preds = %195
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %309

200:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !10
  br label %201

201:                                              ; preds = %250, %200
  %202 = load i32, ptr %23, align 4, !tbaa !10
  %203 = load i32, ptr %16, align 4, !tbaa !10
  %204 = icmp slt i32 %202, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %201
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %253

206:                                              ; preds = %201
  %207 = load i32, ptr %23, align 4, !tbaa !10
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 %208
  store i32 0, ptr %209, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !10
  br label %210

210:                                              ; preds = %246, %206
  %211 = load i32, ptr %24, align 4, !tbaa !10
  %212 = load i32, ptr %15, align 4, !tbaa !10
  %213 = icmp slt i32 %211, %212
  br i1 %213, label %215, label %214

214:                                              ; preds = %210
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %249

215:                                              ; preds = %210
  %216 = load i32, ptr %23, align 4, !tbaa !10
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !10
  %220 = shl i32 %219, 8
  %221 = load i32, ptr %23, align 4, !tbaa !10
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 %222
  store i32 %220, ptr %223, align 4, !tbaa !10
  %224 = load ptr, ptr %18, align 8, !tbaa !5
  %225 = load i32, ptr %12, align 4, !tbaa !10
  %226 = sub nsw i32 %225, 1
  %227 = load i32, ptr %20, align 4, !tbaa !10
  %228 = sub nsw i32 %226, %227
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds ptr, ptr %224, i64 %229
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  %232 = load i32, ptr %15, align 4, !tbaa !10
  %233 = load i32, ptr %21, align 4, !tbaa !10
  %234 = mul nsw i32 %232, %233
  %235 = load i32, ptr %24, align 4, !tbaa !10
  %236 = add nsw i32 %234, %235
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds i8, ptr %231, i64 %237
  %239 = load i8, ptr %238, align 1, !tbaa !9
  %240 = zext i8 %239 to i32
  %241 = load i32, ptr %23, align 4, !tbaa !10
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 %242
  %244 = load i32, ptr %243, align 4, !tbaa !10
  %245 = add nsw i32 %244, %240
  store i32 %245, ptr %243, align 4, !tbaa !10
  br label %246

246:                                              ; preds = %215
  %247 = load i32, ptr %24, align 4, !tbaa !10
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %24, align 4, !tbaa !10
  br label %210, !llvm.loop !23

249:                                              ; preds = %214
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %23, align 4, !tbaa !10
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %23, align 4, !tbaa !10
  br label %201, !llvm.loop !24

253:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store double 0.000000e+00, ptr %25, align 8, !tbaa !25
  %254 = load i32, ptr %16, align 4, !tbaa !10
  %255 = icmp eq i32 %254, 1
  br i1 %255, label %256, label %260

256:                                              ; preds = %253
  %257 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 0
  %258 = load i32, ptr %257, align 16, !tbaa !10
  %259 = sitofp i32 %258 to double
  store double %259, ptr %25, align 8, !tbaa !25
  br label %302

260:                                              ; preds = %253
  %261 = load i32, ptr %16, align 4, !tbaa !10
  %262 = icmp eq i32 %261, 2
  br i1 %262, label %263, label %267

263:                                              ; preds = %260
  %264 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 0
  %265 = load i32, ptr %264, align 16, !tbaa !10
  %266 = sitofp i32 %265 to double
  store double %266, ptr %25, align 8, !tbaa !25
  br label %301

267:                                              ; preds = %260
  %268 = load i32, ptr %16, align 4, !tbaa !10
  %269 = icmp eq i32 %268, 3
  br i1 %269, label %270, label %283

270:                                              ; preds = %267
  %271 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 0
  %272 = load i32, ptr %271, align 16, !tbaa !10
  %273 = sitofp i32 %272 to double
  %274 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 1
  %275 = load i32, ptr %274, align 4, !tbaa !10
  %276 = sitofp i32 %275 to double
  %277 = fmul double 5.900000e-01, %276
  %278 = call double @llvm.fmuladd.f64(double 3.000000e-01, double %273, double %277)
  %279 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 2
  %280 = load i32, ptr %279, align 8, !tbaa !10
  %281 = sitofp i32 %280 to double
  %282 = call double @llvm.fmuladd.f64(double 1.100000e-01, double %281, double %278)
  store double %282, ptr %25, align 8, !tbaa !25
  br label %300

283:                                              ; preds = %267
  %284 = load i32, ptr %16, align 4, !tbaa !10
  %285 = icmp eq i32 %284, 4
  br i1 %285, label %286, label %299

286:                                              ; preds = %283
  %287 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 0
  %288 = load i32, ptr %287, align 16, !tbaa !10
  %289 = sitofp i32 %288 to double
  %290 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 1
  %291 = load i32, ptr %290, align 4, !tbaa !10
  %292 = sitofp i32 %291 to double
  %293 = fmul double 5.900000e-01, %292
  %294 = call double @llvm.fmuladd.f64(double 3.000000e-01, double %289, double %293)
  %295 = getelementptr inbounds [4 x i32], ptr %22, i64 0, i64 2
  %296 = load i32, ptr %295, align 8, !tbaa !10
  %297 = sitofp i32 %296 to double
  %298 = call double @llvm.fmuladd.f64(double 1.100000e-01, double %297, double %294)
  store double %298, ptr %25, align 8, !tbaa !25
  br label %299

299:                                              ; preds = %286, %283
  br label %300

300:                                              ; preds = %299, %270
  br label %301

301:                                              ; preds = %300, %263
  br label %302

302:                                              ; preds = %301, %256
  %303 = load i32, ptr %21, align 4, !tbaa !10
  %304 = load i32, ptr %20, align 4, !tbaa !10
  %305 = load double, ptr %25, align 8, !tbaa !25
  call void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208) %26, i32 noundef %303, i32 noundef %304, double noundef %305)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %306

306:                                              ; preds = %302
  %307 = load i32, ptr %21, align 4, !tbaa !10
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %21, align 4, !tbaa !10
  br label %195, !llvm.loop !26

309:                                              ; preds = %199
  br label %310

310:                                              ; preds = %309
  %311 = load i32, ptr %20, align 4, !tbaa !10
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %20, align 4, !tbaa !10
  br label %189, !llvm.loop !27

313:                                              ; preds = %193
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  %315 = load ptr, ptr %18, align 8, !tbaa !5
  call void @png_free(ptr noundef %314, ptr noundef %315)
  %316 = load ptr, ptr %17, align 8, !tbaa !5
  %317 = icmp eq ptr %316, null
  br i1 %317, label %319, label %318

318:                                              ; preds = %313
  call void @_ZdaPv(ptr noundef %316) #10
  br label %319

319:                                              ; preds = %318, %313
  call void @png_destroy_read_struct(ptr noundef %8, ptr noundef %9, ptr noundef null)
  %320 = load ptr, ptr %6, align 8, !tbaa !5
  %321 = call i32 @fclose(ptr noundef %320)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %322

322:                                              ; preds = %319, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  br label %323

323:                                              ; preds = %322, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %324

324:                                              ; preds = %323, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %325

325:                                              ; preds = %324, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %326 = load i32, ptr %3, align 4
  ret i32 %326
}

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

declare i32 @fclose(ptr noundef) #2

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

declare noalias ptr @png_create_info_struct(ptr noundef) #2

declare void @png_destroy_read_struct(ptr noundef, ptr noundef, ptr noundef) #2

declare void @png_init_io(ptr noundef, ptr noundef) #2

declare void @png_read_info(ptr noundef, ptr noundef) #2

declare zeroext i8 @png_get_color_type(ptr noundef, ptr noundef) #2

declare i32 @png_get_image_width(ptr noundef, ptr noundef) #2

declare i32 @png_get_image_height(ptr noundef, ptr noundef) #2

declare i64 @png_get_rowbytes(ptr noundef, ptr noundef) #2

declare zeroext i8 @png_get_bit_depth(ptr noundef, ptr noundef) #2

declare noalias ptr @png_malloc(ptr noundef, i64 noundef) #2

declare void @png_read_image(ptr noundef, ptr noundef) #2

declare void @png_read_end(ptr noundef, ptr noundef) #2

declare void @png_free(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !11, i64 200}
!15 = !{!"_ZTS6R2Grid", !16, i64 0, !16, i64 88, !19, i64 176, !6, i64 184, !7, i64 192, !11, i64 200, !11, i64 204}
!16 = !{!"_ZTS8R2Affine", !17, i64 0, !18, i64 8, !11, i64 80}
!17 = !{!"_ZTS16R2Transformation"}
!18 = !{!"_ZTS8R3Matrix", !7, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!15, !11, i64 204}
!21 = !{!15, !19, i64 176}
!22 = !{!15, !6, i64 184}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = !{!19, !19, i64 0}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}


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

%class.R2Affine = type <{ %class.R2Transformation, %class.R3Matrix, i32, [4 x i8] }>
%class.R2Transformation = type { ptr }
%class.R3Matrix = type { [3 x [3 x double]] }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@R2identity_affine = external global %class.R2Affine, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.40 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [35 x i8], align 1

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

declare void @_Z7RNAbortPKcz(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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(84) ptr @_ZN8R2AffineaSERKS_(ptr noundef nonnull align 8 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef, double noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN6R2Grid11ReadPNGFileEPKc(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %1) local_unnamed_addr #7 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [4 x i32], align 16
  %6 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.40)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %10

7:                                                ; preds = %2
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.76, ptr noundef %1) #9
  br label %283

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  %11 = tail call noalias ptr @png_create_read_struct(ptr noundef nonnull @.str.77, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %11, ptr %3, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %15

13:                                               ; preds = %10
  %14 = tail call i32 @fclose(ptr noundef nonnull %6)
  br label %282

15:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %16 = tail call noalias ptr @png_create_info_struct(ptr noundef nonnull %11)
  store ptr %16, ptr %4, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %20

18:                                               ; preds = %15
  %19 = tail call i32 @fclose(ptr noundef nonnull %6)
  call void @png_destroy_read_struct(ptr noundef nonnull %3, ptr noundef null, ptr noundef null)
  br label %281

20:                                               ; preds = %15
  tail call void @png_init_io(ptr noundef nonnull %11, ptr noundef nonnull %6)
  tail call void @png_read_info(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %21 = tail call zeroext i8 @png_get_color_type(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %22 = tail call i32 @png_get_image_width(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %23 = tail call i32 @png_get_image_height(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %24 = tail call i64 @png_get_rowbytes(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %25 = trunc i64 %24 to i32
  %26 = and i32 %25, 3
  %.not82 = icmp eq i32 %26, 0
  br i1 %.not82, label %31, label %27

27:                                               ; preds = %20
  %28 = sdiv i32 %25, 4
  %29 = shl nsw i32 %28, 2
  %30 = add i32 %29, 4
  br label %31

31:                                               ; preds = %27, %20
  %.075 = phi i32 [ %30, %27 ], [ %25, %20 ]
  %32 = tail call zeroext i8 @png_get_bit_depth(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %33 = lshr i8 %32, 3
  %34 = zext nneg i8 %33 to i32
  %35 = mul nsw i32 %22, %34
  %.not83 = icmp slt i32 %.075, %35
  br i1 %.not83, label %36, label %37

36:                                               ; preds = %31
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.78, i32 noundef 3930, ptr noundef nonnull @.str.2)
  br label %37

37:                                               ; preds = %36, %31
  %38 = icmp eq i8 %21, 0
  br i1 %38, label %44, label %39

39:                                               ; preds = %37
  switch i8 %21, label %42 [
    i8 4, label %44
    i8 2, label %40
    i8 6, label %41
  ]

40:                                               ; preds = %39
  br label %44

41:                                               ; preds = %39
  br label %44

42:                                               ; preds = %39
  %43 = tail call i32 @fclose(ptr noundef nonnull %6)
  call void @png_destroy_read_struct(ptr noundef nonnull %3, ptr noundef null, ptr noundef null)
  br label %281

44:                                               ; preds = %39, %37, %41, %40
  %45 = phi i1 [ false, %40 ], [ false, %41 ], [ false, %37 ], [ true, %39 ]
  %exitcond128.not.2 = phi i1 [ true, %40 ], [ false, %41 ], [ false, %37 ], [ false, %39 ]
  %.074 = phi i64 [ 12, %40 ], [ 16, %41 ], [ 4, %37 ], [ 8, %39 ]
  %46 = mul nsw i32 %.075, %23
  %47 = sext i32 %46 to i64
  %48 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %47) #11
  %49 = sext i32 %23 to i64
  %50 = shl nsw i64 %49, 3
  %51 = tail call noalias ptr @png_malloc(ptr noundef nonnull %11, i64 noundef %50)
  %52 = icmp sgt i32 %23, 0
  br i1 %52, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %44
  %53 = sext i32 %.075 to i64
  %wide.trip.count = zext nneg i32 %23 to i64
  %min.iters.check = icmp ult i32 %23, 4
  br i1 %min.iters.check, label %.lr.ph.preheader181, label %vector.ph

.lr.ph.preheader181:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %49, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert176 = insertelement <2 x i64> poison, i64 %53, i64 0
  %broadcast.splat177 = shufflevector <2 x i64> %broadcast.splatinsert176, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %54 = xor <2 x i64> %vec.ind, <i64 -1, i64 -1>
  %55 = add nsw <2 x i64> %broadcast.splat, %54
  %reass.sub = sub <2 x i64> %broadcast.splat, %vec.ind
  %56 = add <2 x i64> %reass.sub, <i64 -3, i64 -3>
  %57 = mul nsw <2 x i64> %55, %broadcast.splat177
  %58 = mul nsw <2 x i64> %56, %broadcast.splat177
  %59 = getelementptr inbounds i8, ptr %48, <2 x i64> %57
  %60 = getelementptr inbounds i8, ptr %48, <2 x i64> %58
  %61 = getelementptr inbounds ptr, ptr %51, i64 %index
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  store <2 x ptr> %59, ptr %61, align 8, !tbaa !5
  store <2 x ptr> %60, ptr %62, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %63 = icmp eq i64 %index.next, %n.vec
  br i1 %63, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader181

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %44
  tail call void @png_read_image(ptr noundef nonnull %11, ptr noundef %51)
  tail call void @png_read_end(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %64 = getelementptr inbounds i8, ptr %0, i64 192
  store i32 %22, ptr %64, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %0, i64 196
  store i32 %23, ptr %65, align 4, !tbaa !13
  %66 = getelementptr inbounds i8, ptr %0, i64 200
  store i32 %22, ptr %66, align 8, !tbaa !15
  %67 = mul nsw i32 %23, %22
  %68 = getelementptr inbounds i8, ptr %0, i64 204
  store i32 %67, ptr %68, align 4, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %0, i64 176
  store double 1.000000e+00, ptr %69, align 8, !tbaa !22
  %70 = getelementptr inbounds i8, ptr %0, i64 88
  %71 = tail call noundef nonnull align 8 dereferenceable(84) ptr @_ZN8R2AffineaSERKS_(ptr noundef nonnull align 8 dereferenceable(84) %70, ptr noundef nonnull align 8 dereferenceable(84) @R2identity_affine)
  %72 = tail call noundef nonnull align 8 dereferenceable(84) ptr @_ZN8R2AffineaSERKS_(ptr noundef nonnull align 8 dereferenceable(84) %0, ptr noundef nonnull align 8 dereferenceable(84) @R2identity_affine)
  %73 = getelementptr inbounds i8, ptr %0, i64 184
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %.not84 = icmp eq ptr %74, null
  br i1 %.not84, label %81, label %80

.lr.ph:                                           ; preds = %.lr.ph.preheader181, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader181 ]
  %75 = xor i64 %indvars.iv, -1
  %76 = add nsw i64 %49, %75
  %77 = mul nsw i64 %76, %53
  %78 = getelementptr inbounds i8, ptr %48, i64 %77
  %79 = getelementptr inbounds ptr, ptr %51, i64 %indvars.iv
  store ptr %78, ptr %79, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

80:                                               ; preds = %._crit_edge
  tail call void @_ZdaPv(ptr noundef nonnull %74) #12
  br label %81

81:                                               ; preds = %80, %._crit_edge
  %82 = load i32, ptr %68, align 4, !tbaa !21
  %83 = sext i32 %82 to i64
  %84 = icmp slt i32 %82, 0
  %85 = shl nsw i64 %83, 3
  %86 = select i1 %84, i64 -1, i64 %85
  %87 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %86) #11
  store ptr %87, ptr %73, align 8, !tbaa !23
  br i1 %52, label %.preheader.lr.ph, label %._crit_edge102

.preheader.lr.ph:                                 ; preds = %81
  %88 = icmp sgt i32 %22, 0
  %.not112 = icmp ult i8 %32, 8
  br i1 %88, label %.preheader.lr.ph.split.us, label %._crit_edge102

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  br i1 %38, label %.preheader.lr.ph.split.us.split.us, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph.split.us
  %89 = zext nneg i8 %33 to i64
  %wide.trip.count140 = zext nneg i32 %23 to i64
  %90 = getelementptr ptr, ptr %51, i64 %49
  %wide.trip.count135 = zext nneg i32 %22 to i64
  %91 = add nsw i64 %89, -1
  %xtraiter = and i64 %89, 3
  %92 = icmp ult i64 %91, 3
  %unroll_iter = and i64 %89, 28
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %xtraiter.1 = and i64 %89, 3
  %93 = icmp ult i64 %91, 3
  %unroll_iter.1 = and i64 %89, 28
  %lcmp.mod.1.not = icmp eq i64 %xtraiter.1, 0
  %.4.sroa_idx205 = getelementptr inbounds i8, ptr %5, i64 4
  %xtraiter.2 = and i64 %89, 3
  %94 = icmp ult i64 %91, 3
  %unroll_iter.2 = and i64 %89, 28
  %lcmp.mod.2.not = icmp eq i64 %xtraiter.2, 0
  %.8.sroa_idx207 = getelementptr inbounds i8, ptr %5, i64 8
  %xtraiter.3 = and i64 %89, 3
  %95 = icmp ult i64 %91, 3
  %unroll_iter.3 = and i64 %89, 28
  %lcmp.mod.3.not = icmp eq i64 %xtraiter.3, 0
  %.12.sroa_idx = getelementptr inbounds i8, ptr %5, i64 12
  %.4.sroa_idx = getelementptr inbounds i8, ptr %5, i64 4
  %.8.sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  br label %.preheader.us

.preheader.lr.ph.split.us.split.us:               ; preds = %.preheader.lr.ph.split.us
  br i1 %.not112, label %.preheader.us.us, label %.preheader.us.us.us.preheader

.preheader.us.us.us.preheader:                    ; preds = %.preheader.lr.ph.split.us.split.us
  %96 = zext nneg i8 %33 to i64
  %wide.trip.count160 = zext nneg i32 %23 to i64
  %97 = getelementptr ptr, ptr %51, i64 %49
  %wide.trip.count155 = zext nneg i32 %22 to i64
  %98 = add nsw i64 %96, -1
  %xtraiter190 = and i64 %96, 3
  %99 = icmp ult i64 %98, 3
  %unroll_iter195 = and i64 %96, 28
  %lcmp.mod193.not = icmp eq i64 %xtraiter190, 0
  %xtraiter190.1 = and i64 %96, 3
  %100 = icmp ult i64 %98, 3
  %unroll_iter195.1 = and i64 %96, 28
  %lcmp.mod193.1.not = icmp eq i64 %xtraiter190.1, 0
  %.4.sroa_idx206 = getelementptr inbounds i8, ptr %5, i64 4
  %xtraiter190.2 = and i64 %96, 3
  %101 = icmp ult i64 %98, 3
  %unroll_iter195.2 = and i64 %96, 28
  %lcmp.mod193.2.not = icmp eq i64 %xtraiter190.2, 0
  %.8.sroa_idx208 = getelementptr inbounds i8, ptr %5, i64 8
  %xtraiter190.3 = and i64 %96, 3
  %102 = icmp ult i64 %98, 3
  %unroll_iter195.3 = and i64 %96, 28
  %lcmp.mod193.3.not = icmp eq i64 %xtraiter190.3, 0
  %.12.sroa_idx209 = getelementptr inbounds i8, ptr %5, i64 12
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %.preheader.us.us.us.preheader, %._crit_edge95.split.us.split.us.us.us.us
  %indvars.iv157 = phi i64 [ 0, %.preheader.us.us.us.preheader ], [ %indvars.iv.next158, %._crit_edge95.split.us.split.us.us.us.us ]
  %103 = xor i64 %indvars.iv157, -1
  %104 = getelementptr ptr, ptr %97, i64 %103
  %105 = trunc nuw nsw i64 %indvars.iv157 to i32
  br label %.split.us.us.us.us.us.us

.split.us.us.us.us.us.us:                         ; preds = %.split92.us.us.us.us.us.us, %.preheader.us.us.us
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %.split92.us.us.us.us.us.us ], [ 0, %.preheader.us.us.us ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5)
  %106 = mul nuw nsw i64 %indvars.iv152, %96
  %107 = load ptr, ptr %104, align 8, !tbaa !5
  %invariant.gep170 = getelementptr inbounds i8, ptr %107, i64 %106
  br i1 %99, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa, label %.lr.ph88.us.us.us.us.us.us.new

.lr.ph88.us.us.us.us.us.us.new:                   ; preds = %.split.us.us.us.us.us.us, %.lr.ph88.us.us.us.us.us.us.new
  %indvars.iv142 = phi i64 [ %indvars.iv.next143.3, %.lr.ph88.us.us.us.us.us.us.new ], [ 0, %.split.us.us.us.us.us.us ]
  %niter196 = phi i64 [ %niter196.next.3, %.lr.ph88.us.us.us.us.us.us.new ], [ 0, %.split.us.us.us.us.us.us ]
  %indvars.iv.next143.3 = add nuw nsw i64 %indvars.iv142, 4
  %niter196.next.3 = add i64 %niter196, 4
  %niter196.ncmp.3 = icmp eq i64 %niter196.next.3, %unroll_iter195
  br i1 %niter196.ncmp.3, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit, label %.lr.ph88.us.us.us.us.us.us.new, !llvm.loop !25

._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit: ; preds = %.lr.ph88.us.us.us.us.us.us.new
  %gep171 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142
  %108 = load i8, ptr %gep171, align 1, !tbaa !26
  %109 = zext i8 %108 to i32
  %110 = shl nuw nsw i32 %109, 16
  %indvars.iv.next143 = or disjoint i64 %indvars.iv142, 1
  %gep171.1 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143
  %111 = load i8, ptr %gep171.1, align 1, !tbaa !26
  %112 = zext i8 %111 to i32
  %113 = shl nuw nsw i32 %112, 8
  %114 = or disjoint i32 %110, %113
  %indvars.iv.next143.1 = or disjoint i64 %indvars.iv142, 2
  %gep171.2 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.1
  %115 = load i8, ptr %gep171.2, align 1, !tbaa !26
  %116 = zext i8 %115 to i32
  %117 = or disjoint i32 %114, %116
  %118 = shl nuw i32 %117, 8
  %indvars.iv.next143.2 = or disjoint i64 %indvars.iv142, 3
  %gep171.3 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.2
  %119 = load i8, ptr %gep171.3, align 1, !tbaa !26
  %120 = zext i8 %119 to i32
  %121 = or disjoint i32 %118, %120
  br label %._crit_edge89.us.us.us.us.us.us.unr-lcssa

._crit_edge89.us.us.us.us.us.us.unr-lcssa:        ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit, %.split.us.us.us.us.us.us
  %.lcssa.ph = phi i32 [ poison, %.split.us.us.us.us.us.us ], [ %121, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit ]
  %indvars.iv142.unr = phi i64 [ 0, %.split.us.us.us.us.us.us ], [ %indvars.iv.next143.3, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit ]
  %.unr192 = phi i32 [ 0, %.split.us.us.us.us.us.us ], [ %121, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit ]
  br i1 %lcmp.mod193.not, label %._crit_edge89.us.us.us.us.us.us, label %.epil.preheader189

.epil.preheader189:                               ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa, %.epil.preheader189
  %indvars.iv142.epil = phi i64 [ %indvars.iv.next143.epil, %.epil.preheader189 ], [ %indvars.iv142.unr, %._crit_edge89.us.us.us.us.us.us.unr-lcssa ]
  %122 = phi i32 [ %126, %.epil.preheader189 ], [ %.unr192, %._crit_edge89.us.us.us.us.us.us.unr-lcssa ]
  %epil.iter191 = phi i64 [ %epil.iter191.next, %.epil.preheader189 ], [ 0, %._crit_edge89.us.us.us.us.us.us.unr-lcssa ]
  %123 = shl i32 %122, 8
  %gep171.epil = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.epil
  %124 = load i8, ptr %gep171.epil, align 1, !tbaa !26
  %125 = zext i8 %124 to i32
  %126 = or disjoint i32 %123, %125
  %indvars.iv.next143.epil = add nuw nsw i64 %indvars.iv142.epil, 1
  %epil.iter191.next = add i64 %epil.iter191, 1
  %epil.iter191.cmp.not = icmp eq i64 %epil.iter191.next, %xtraiter190
  br i1 %epil.iter191.cmp.not, label %._crit_edge89.us.us.us.us.us.us, label %.epil.preheader189, !llvm.loop !27

._crit_edge89.us.us.us.us.us.us:                  ; preds = %.epil.preheader189, %._crit_edge89.us.us.us.us.us.us.unr-lcssa
  %.lcssa = phi i32 [ %.lcssa.ph, %._crit_edge89.us.us.us.us.us.us.unr-lcssa ], [ %126, %.epil.preheader189 ]
  store i32 %.lcssa, ptr %5, align 16, !tbaa !13
  br i1 %38, label %.split92.us.us.us.us.us.us, label %.lr.ph88.us.us.us.us.us.us.1, !llvm.loop !29

.lr.ph88.us.us.us.us.us.us.1:                     ; preds = %._crit_edge89.us.us.us.us.us.us
  br i1 %100, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1, label %.lr.ph88.us.us.us.us.us.us.new.1

.lr.ph88.us.us.us.us.us.us.new.1:                 ; preds = %.lr.ph88.us.us.us.us.us.us.1, %.lr.ph88.us.us.us.us.us.us.new.1
  %indvars.iv142.1 = phi i64 [ %indvars.iv.next143.3.1, %.lr.ph88.us.us.us.us.us.us.new.1 ], [ 0, %.lr.ph88.us.us.us.us.us.us.1 ]
  %niter196.1 = phi i64 [ %niter196.next.3.1, %.lr.ph88.us.us.us.us.us.us.new.1 ], [ 0, %.lr.ph88.us.us.us.us.us.us.1 ]
  %indvars.iv.next143.3.1 = add nuw nsw i64 %indvars.iv142.1, 4
  %niter196.next.3.1 = add i64 %niter196.1, 4
  %niter196.ncmp.3.1 = icmp eq i64 %niter196.next.3.1, %unroll_iter195.1
  br i1 %niter196.ncmp.3.1, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.1, label %.lr.ph88.us.us.us.us.us.us.new.1, !llvm.loop !25

._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.1: ; preds = %.lr.ph88.us.us.us.us.us.us.new.1
  %gep171.1197 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.1
  %127 = load i8, ptr %gep171.1197, align 1, !tbaa !26
  %128 = zext i8 %127 to i32
  %129 = shl nuw nsw i32 %128, 16
  %indvars.iv.next143.1198 = or disjoint i64 %indvars.iv142.1, 1
  %gep171.1.1 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.1198
  %130 = load i8, ptr %gep171.1.1, align 1, !tbaa !26
  %131 = zext i8 %130 to i32
  %132 = shl nuw nsw i32 %131, 8
  %133 = or disjoint i32 %129, %132
  %indvars.iv.next143.1.1 = or disjoint i64 %indvars.iv142.1, 2
  %gep171.2.1 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.1.1
  %134 = load i8, ptr %gep171.2.1, align 1, !tbaa !26
  %135 = zext i8 %134 to i32
  %136 = or disjoint i32 %133, %135
  %137 = shl nuw i32 %136, 8
  %indvars.iv.next143.2.1 = or disjoint i64 %indvars.iv142.1, 3
  %gep171.3.1 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.2.1
  %138 = load i8, ptr %gep171.3.1, align 1, !tbaa !26
  %139 = zext i8 %138 to i32
  %140 = or disjoint i32 %137, %139
  br label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1

._crit_edge89.us.us.us.us.us.us.unr-lcssa.1:      ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.1, %.lr.ph88.us.us.us.us.us.us.1
  %.lcssa.ph.1 = phi i32 [ poison, %.lr.ph88.us.us.us.us.us.us.1 ], [ %140, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.1 ]
  %indvars.iv142.unr.1 = phi i64 [ 0, %.lr.ph88.us.us.us.us.us.us.1 ], [ %indvars.iv.next143.3.1, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.1 ]
  %.unr192.1 = phi i32 [ 0, %.lr.ph88.us.us.us.us.us.us.1 ], [ %140, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.1 ]
  br i1 %lcmp.mod193.1.not, label %._crit_edge89.us.us.us.us.us.us.1, label %.epil.preheader189.1

.epil.preheader189.1:                             ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1, %.epil.preheader189.1
  %indvars.iv142.epil.1 = phi i64 [ %indvars.iv.next143.epil.1, %.epil.preheader189.1 ], [ %indvars.iv142.unr.1, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1 ]
  %141 = phi i32 [ %145, %.epil.preheader189.1 ], [ %.unr192.1, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1 ]
  %epil.iter191.1 = phi i64 [ %epil.iter191.next.1, %.epil.preheader189.1 ], [ 0, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1 ]
  %142 = shl i32 %141, 8
  %gep171.epil.1 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.epil.1
  %143 = load i8, ptr %gep171.epil.1, align 1, !tbaa !26
  %144 = zext i8 %143 to i32
  %145 = or disjoint i32 %142, %144
  %indvars.iv.next143.epil.1 = add nuw nsw i64 %indvars.iv142.epil.1, 1
  %epil.iter191.next.1 = add i64 %epil.iter191.1, 1
  %epil.iter191.cmp.1.not = icmp eq i64 %epil.iter191.next.1, %xtraiter190.1
  br i1 %epil.iter191.cmp.1.not, label %._crit_edge89.us.us.us.us.us.us.1, label %.epil.preheader189.1, !llvm.loop !27

._crit_edge89.us.us.us.us.us.us.1:                ; preds = %.epil.preheader189.1, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1
  %.lcssa.1 = phi i32 [ %.lcssa.ph.1, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.1 ], [ %145, %.epil.preheader189.1 ]
  store i32 %.lcssa.1, ptr %.4.sroa_idx206, align 4, !tbaa !13
  br i1 %45, label %.split92.us.us.us.us.us.us, label %.lr.ph88.us.us.us.us.us.us.2, !llvm.loop !29

.lr.ph88.us.us.us.us.us.us.2:                     ; preds = %._crit_edge89.us.us.us.us.us.us.1
  br i1 %101, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2, label %.lr.ph88.us.us.us.us.us.us.new.2

.lr.ph88.us.us.us.us.us.us.new.2:                 ; preds = %.lr.ph88.us.us.us.us.us.us.2, %.lr.ph88.us.us.us.us.us.us.new.2
  %indvars.iv142.2 = phi i64 [ %indvars.iv.next143.3.2, %.lr.ph88.us.us.us.us.us.us.new.2 ], [ 0, %.lr.ph88.us.us.us.us.us.us.2 ]
  %niter196.2 = phi i64 [ %niter196.next.3.2, %.lr.ph88.us.us.us.us.us.us.new.2 ], [ 0, %.lr.ph88.us.us.us.us.us.us.2 ]
  %indvars.iv.next143.3.2 = add nuw nsw i64 %indvars.iv142.2, 4
  %niter196.next.3.2 = add i64 %niter196.2, 4
  %niter196.ncmp.3.2 = icmp eq i64 %niter196.next.3.2, %unroll_iter195.2
  br i1 %niter196.ncmp.3.2, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.2, label %.lr.ph88.us.us.us.us.us.us.new.2, !llvm.loop !25

._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.2: ; preds = %.lr.ph88.us.us.us.us.us.us.new.2
  %gep171.2199 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.2
  %146 = load i8, ptr %gep171.2199, align 1, !tbaa !26
  %147 = zext i8 %146 to i32
  %148 = shl nuw nsw i32 %147, 16
  %indvars.iv.next143.2200 = or disjoint i64 %indvars.iv142.2, 1
  %gep171.1.2 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.2200
  %149 = load i8, ptr %gep171.1.2, align 1, !tbaa !26
  %150 = zext i8 %149 to i32
  %151 = shl nuw nsw i32 %150, 8
  %152 = or disjoint i32 %148, %151
  %indvars.iv.next143.1.2 = or disjoint i64 %indvars.iv142.2, 2
  %gep171.2.2 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.1.2
  %153 = load i8, ptr %gep171.2.2, align 1, !tbaa !26
  %154 = zext i8 %153 to i32
  %155 = or disjoint i32 %152, %154
  %156 = shl nuw i32 %155, 8
  %indvars.iv.next143.2.2 = or disjoint i64 %indvars.iv142.2, 3
  %gep171.3.2 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.2.2
  %157 = load i8, ptr %gep171.3.2, align 1, !tbaa !26
  %158 = zext i8 %157 to i32
  %159 = or disjoint i32 %156, %158
  br label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2

._crit_edge89.us.us.us.us.us.us.unr-lcssa.2:      ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.2, %.lr.ph88.us.us.us.us.us.us.2
  %.lcssa.ph.2 = phi i32 [ poison, %.lr.ph88.us.us.us.us.us.us.2 ], [ %159, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.2 ]
  %indvars.iv142.unr.2 = phi i64 [ 0, %.lr.ph88.us.us.us.us.us.us.2 ], [ %indvars.iv.next143.3.2, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.2 ]
  %.unr192.2 = phi i32 [ 0, %.lr.ph88.us.us.us.us.us.us.2 ], [ %159, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.2 ]
  br i1 %lcmp.mod193.2.not, label %._crit_edge89.us.us.us.us.us.us.2, label %.epil.preheader189.2

.epil.preheader189.2:                             ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2, %.epil.preheader189.2
  %indvars.iv142.epil.2 = phi i64 [ %indvars.iv.next143.epil.2, %.epil.preheader189.2 ], [ %indvars.iv142.unr.2, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2 ]
  %160 = phi i32 [ %164, %.epil.preheader189.2 ], [ %.unr192.2, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2 ]
  %epil.iter191.2 = phi i64 [ %epil.iter191.next.2, %.epil.preheader189.2 ], [ 0, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2 ]
  %161 = shl i32 %160, 8
  %gep171.epil.2 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.epil.2
  %162 = load i8, ptr %gep171.epil.2, align 1, !tbaa !26
  %163 = zext i8 %162 to i32
  %164 = or disjoint i32 %161, %163
  %indvars.iv.next143.epil.2 = add nuw nsw i64 %indvars.iv142.epil.2, 1
  %epil.iter191.next.2 = add i64 %epil.iter191.2, 1
  %epil.iter191.cmp.2.not = icmp eq i64 %epil.iter191.next.2, %xtraiter190.2
  br i1 %epil.iter191.cmp.2.not, label %._crit_edge89.us.us.us.us.us.us.2, label %.epil.preheader189.2, !llvm.loop !27

._crit_edge89.us.us.us.us.us.us.2:                ; preds = %.epil.preheader189.2, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2
  %.lcssa.2 = phi i32 [ %.lcssa.ph.2, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.2 ], [ %164, %.epil.preheader189.2 ]
  store i32 %.lcssa.2, ptr %.8.sroa_idx208, align 8, !tbaa !13
  br i1 %exitcond128.not.2, label %.split92.us.us.us.us.us.us, label %.lr.ph88.us.us.us.us.us.us.3, !llvm.loop !29

.lr.ph88.us.us.us.us.us.us.3:                     ; preds = %._crit_edge89.us.us.us.us.us.us.2
  br i1 %102, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3, label %.lr.ph88.us.us.us.us.us.us.new.3

.lr.ph88.us.us.us.us.us.us.new.3:                 ; preds = %.lr.ph88.us.us.us.us.us.us.3, %.lr.ph88.us.us.us.us.us.us.new.3
  %indvars.iv142.3 = phi i64 [ %indvars.iv.next143.3.3, %.lr.ph88.us.us.us.us.us.us.new.3 ], [ 0, %.lr.ph88.us.us.us.us.us.us.3 ]
  %niter196.3 = phi i64 [ %niter196.next.3.3, %.lr.ph88.us.us.us.us.us.us.new.3 ], [ 0, %.lr.ph88.us.us.us.us.us.us.3 ]
  %indvars.iv.next143.3.3 = add nuw nsw i64 %indvars.iv142.3, 4
  %niter196.next.3.3 = add i64 %niter196.3, 4
  %niter196.ncmp.3.3 = icmp eq i64 %niter196.next.3.3, %unroll_iter195.3
  br i1 %niter196.ncmp.3.3, label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.3, label %.lr.ph88.us.us.us.us.us.us.new.3, !llvm.loop !25

._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.3: ; preds = %.lr.ph88.us.us.us.us.us.us.new.3
  %gep171.3201 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.3
  %165 = load i8, ptr %gep171.3201, align 1, !tbaa !26
  %166 = zext i8 %165 to i32
  %167 = shl nuw nsw i32 %166, 16
  %indvars.iv.next143.3202 = or disjoint i64 %indvars.iv142.3, 1
  %gep171.1.3 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.3202
  %168 = load i8, ptr %gep171.1.3, align 1, !tbaa !26
  %169 = zext i8 %168 to i32
  %170 = shl nuw nsw i32 %169, 8
  %171 = or disjoint i32 %167, %170
  %indvars.iv.next143.1.3 = or disjoint i64 %indvars.iv142.3, 2
  %gep171.2.3 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.1.3
  %172 = load i8, ptr %gep171.2.3, align 1, !tbaa !26
  %173 = zext i8 %172 to i32
  %174 = or disjoint i32 %171, %173
  %175 = shl nuw i32 %174, 8
  %indvars.iv.next143.2.3 = or disjoint i64 %indvars.iv142.3, 3
  %gep171.3.3 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv.next143.2.3
  %176 = load i8, ptr %gep171.3.3, align 1, !tbaa !26
  %177 = zext i8 %176 to i32
  %178 = or disjoint i32 %175, %177
  br label %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3

._crit_edge89.us.us.us.us.us.us.unr-lcssa.3:      ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.3, %.lr.ph88.us.us.us.us.us.us.3
  %.lcssa.ph.3 = phi i32 [ poison, %.lr.ph88.us.us.us.us.us.us.3 ], [ %178, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.3 ]
  %indvars.iv142.unr.3 = phi i64 [ 0, %.lr.ph88.us.us.us.us.us.us.3 ], [ %indvars.iv.next143.3.3, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.3 ]
  %.unr192.3 = phi i32 [ 0, %.lr.ph88.us.us.us.us.us.us.3 ], [ %178, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.loopexit.3 ]
  br i1 %lcmp.mod193.3.not, label %._crit_edge89.us.us.us.us.us.us.3, label %.epil.preheader189.3

.epil.preheader189.3:                             ; preds = %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3, %.epil.preheader189.3
  %indvars.iv142.epil.3 = phi i64 [ %indvars.iv.next143.epil.3, %.epil.preheader189.3 ], [ %indvars.iv142.unr.3, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3 ]
  %179 = phi i32 [ %183, %.epil.preheader189.3 ], [ %.unr192.3, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3 ]
  %epil.iter191.3 = phi i64 [ %epil.iter191.next.3, %.epil.preheader189.3 ], [ 0, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3 ]
  %180 = shl i32 %179, 8
  %gep171.epil.3 = getelementptr inbounds i8, ptr %invariant.gep170, i64 %indvars.iv142.epil.3
  %181 = load i8, ptr %gep171.epil.3, align 1, !tbaa !26
  %182 = zext i8 %181 to i32
  %183 = or disjoint i32 %180, %182
  %indvars.iv.next143.epil.3 = add nuw nsw i64 %indvars.iv142.epil.3, 1
  %epil.iter191.next.3 = add i64 %epil.iter191.3, 1
  %epil.iter191.cmp.3.not = icmp eq i64 %epil.iter191.next.3, %xtraiter190.3
  br i1 %epil.iter191.cmp.3.not, label %._crit_edge89.us.us.us.us.us.us.3, label %.epil.preheader189.3, !llvm.loop !27

._crit_edge89.us.us.us.us.us.us.3:                ; preds = %.epil.preheader189.3, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3
  %.lcssa.3 = phi i32 [ %.lcssa.ph.3, %._crit_edge89.us.us.us.us.us.us.unr-lcssa.3 ], [ %183, %.epil.preheader189.3 ]
  store i32 %.lcssa.3, ptr %.12.sroa_idx209, align 4, !tbaa !13
  br label %.split92.us.us.us.us.us.us

.split92.us.us.us.us.us.us:                       ; preds = %._crit_edge89.us.us.us.us.us.us.3, %._crit_edge89.us.us.us.us.us.us.2, %._crit_edge89.us.us.us.us.us.us.1, %._crit_edge89.us.us.us.us.us.us
  %.0.204 = load i32, ptr %5, align 16, !tbaa !13
  %184 = sitofp i32 %.0.204 to double
  %185 = trunc nuw nsw i64 %indvars.iv152 to i32
  tail call void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208) %0, i32 noundef %185, i32 noundef %105, double noundef %184)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5)
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond156.not = icmp eq i64 %indvars.iv.next153, %wide.trip.count155
  br i1 %exitcond156.not, label %._crit_edge95.split.us.split.us.us.us.us, label %.split.us.us.us.us.us.us, !llvm.loop !30

._crit_edge95.split.us.split.us.us.us.us:         ; preds = %.split92.us.us.us.us.us.us
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %._crit_edge102, label %.preheader.us.us.us, !llvm.loop !31

.preheader.us.us:                                 ; preds = %.preheader.lr.ph.split.us.split.us, %._crit_edge95.split.us.split.us110.us
  %.07199.us.us = phi i32 [ %188, %._crit_edge95.split.us.split.us110.us ], [ 0, %.preheader.lr.ph.split.us.split.us ]
  br label %.split.us98.us.us

.split.us98.us.us:                                ; preds = %.preheader.us.us, %.split.us98.us.us
  %.07093.us.us109.us = phi i32 [ 0, %.preheader.us.us ], [ %187, %.split.us98.us.us ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %5, i8 0, i64 %.074, i1 false), !tbaa !13
  %.0.203 = load i32, ptr %5, align 16, !tbaa !13
  %186 = sitofp i32 %.0.203 to double
  tail call void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208) %0, i32 noundef %.07093.us.us109.us, i32 noundef %.07199.us.us, double noundef %186)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5)
  %187 = add nuw nsw i32 %.07093.us.us109.us, 1
  %exitcond165.not = icmp eq i32 %187, %22
  br i1 %exitcond165.not, label %._crit_edge95.split.us.split.us110.us, label %.split.us98.us.us, !llvm.loop !30

._crit_edge95.split.us.split.us110.us:            ; preds = %.split.us98.us.us
  %188 = add nuw nsw i32 %.07199.us.us, 1
  %exitcond166.not = icmp eq i32 %188, %23
  br i1 %exitcond166.not, label %._crit_edge102, label %.preheader.us.us, !llvm.loop !31

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge95.split.us107
  %indvars.iv137 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next138, %._crit_edge95.split.us107 ]
  %189 = xor i64 %indvars.iv137, -1
  %190 = getelementptr ptr, ptr %90, i64 %189
  %191 = trunc nuw nsw i64 %indvars.iv137 to i32
  br label %192

192:                                              ; preds = %.preheader.us, %199
  %indvars.iv132 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next133, %199 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5)
  br i1 %.not112, label %.split.us106.preheader, label %.split.us.us

.split.us106.preheader:                           ; preds = %192
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %5, i8 0, i64 %.074, i1 false), !tbaa !13
  br label %.split92.us104

193:                                              ; preds = %.split92.us104
  %.4. = load i32, ptr %.4.sroa_idx, align 4, !tbaa !13
  %194 = sitofp i32 %.4. to double
  %195 = fmul double %194, 5.900000e-01
  %196 = tail call double @llvm.fmuladd.f64(double %201, double 3.000000e-01, double %195)
  %.8. = load i32, ptr %.8.sroa_idx, align 8, !tbaa !13
  %197 = sitofp i32 %.8. to double
  %198 = tail call double @llvm.fmuladd.f64(double %197, double 1.100000e-01, double %196)
  br label %199

199:                                              ; preds = %.split92.us104, %193
  %.0.us = phi double [ %198, %193 ], [ %201, %.split92.us104 ]
  %200 = trunc nuw nsw i64 %indvars.iv132 to i32
  tail call void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208) %0, i32 noundef %200, i32 noundef %191, double noundef %.0.us)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5)
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond136.not = icmp eq i64 %indvars.iv.next133, %wide.trip.count135
  br i1 %exitcond136.not, label %._crit_edge95.split.us107, label %192, !llvm.loop !30

.split92.us104:                                   ; preds = %._crit_edge89.us.us, %._crit_edge89.us.us.1, %._crit_edge89.us.us.2, %._crit_edge89.us.us.3, %.split.us106.preheader
  %.0. = load i32, ptr %5, align 16, !tbaa !13
  %201 = sitofp i32 %.0. to double
  br i1 %45, label %199, label %193

.split.us.us:                                     ; preds = %192
  %202 = mul nuw nsw i64 %indvars.iv132, %89
  %203 = load ptr, ptr %190, align 8, !tbaa !5
  %invariant.gep = getelementptr inbounds i8, ptr %203, i64 %202
  br i1 %92, label %._crit_edge89.us.us.unr-lcssa, label %.lr.ph88.us.us.new

.lr.ph88.us.us.new:                               ; preds = %.split.us.us, %.lr.ph88.us.us.new
  %indvars.iv119 = phi i64 [ %indvars.iv.next120.3, %.lr.ph88.us.us.new ], [ 0, %.split.us.us ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph88.us.us.new ], [ 0, %.split.us.us ]
  %indvars.iv.next120.3 = add nuw nsw i64 %indvars.iv119, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge89.us.us.unr-lcssa.loopexit, label %.lr.ph88.us.us.new, !llvm.loop !25

._crit_edge89.us.us.unr-lcssa.loopexit:           ; preds = %.lr.ph88.us.us.new
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119
  %204 = load i8, ptr %gep, align 1, !tbaa !26
  %205 = zext i8 %204 to i32
  %206 = shl nuw nsw i32 %205, 16
  %indvars.iv.next120 = or disjoint i64 %indvars.iv119, 1
  %gep.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120
  %207 = load i8, ptr %gep.1, align 1, !tbaa !26
  %208 = zext i8 %207 to i32
  %209 = shl nuw nsw i32 %208, 8
  %210 = or disjoint i32 %206, %209
  %indvars.iv.next120.1 = or disjoint i64 %indvars.iv119, 2
  %gep.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.1
  %211 = load i8, ptr %gep.2, align 1, !tbaa !26
  %212 = zext i8 %211 to i32
  %213 = or disjoint i32 %210, %212
  %214 = shl nuw i32 %213, 8
  %indvars.iv.next120.2 = or disjoint i64 %indvars.iv119, 3
  %gep.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.2
  %215 = load i8, ptr %gep.3, align 1, !tbaa !26
  %216 = zext i8 %215 to i32
  %217 = or disjoint i32 %214, %216
  br label %._crit_edge89.us.us.unr-lcssa

._crit_edge89.us.us.unr-lcssa:                    ; preds = %._crit_edge89.us.us.unr-lcssa.loopexit, %.split.us.us
  %.lcssa180.ph = phi i32 [ poison, %.split.us.us ], [ %217, %._crit_edge89.us.us.unr-lcssa.loopexit ]
  %indvars.iv119.unr = phi i64 [ 0, %.split.us.us ], [ %indvars.iv.next120.3, %._crit_edge89.us.us.unr-lcssa.loopexit ]
  %.unr = phi i32 [ 0, %.split.us.us ], [ %217, %._crit_edge89.us.us.unr-lcssa.loopexit ]
  br i1 %lcmp.mod.not, label %._crit_edge89.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge89.us.us.unr-lcssa, %.epil.preheader
  %indvars.iv119.epil = phi i64 [ %indvars.iv.next120.epil, %.epil.preheader ], [ %indvars.iv119.unr, %._crit_edge89.us.us.unr-lcssa ]
  %218 = phi i32 [ %222, %.epil.preheader ], [ %.unr, %._crit_edge89.us.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge89.us.us.unr-lcssa ]
  %219 = shl i32 %218, 8
  %gep.epil = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.epil
  %220 = load i8, ptr %gep.epil, align 1, !tbaa !26
  %221 = zext i8 %220 to i32
  %222 = or disjoint i32 %219, %221
  %indvars.iv.next120.epil = add nuw nsw i64 %indvars.iv119.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge89.us.us, label %.epil.preheader, !llvm.loop !32

._crit_edge89.us.us:                              ; preds = %.epil.preheader, %._crit_edge89.us.us.unr-lcssa
  %.lcssa180 = phi i32 [ %.lcssa180.ph, %._crit_edge89.us.us.unr-lcssa ], [ %222, %.epil.preheader ]
  store i32 %.lcssa180, ptr %5, align 16, !tbaa !13
  br i1 %38, label %.split92.us104, label %.lr.ph88.us.us.1, !llvm.loop !29

.lr.ph88.us.us.1:                                 ; preds = %._crit_edge89.us.us
  br i1 %93, label %._crit_edge89.us.us.unr-lcssa.1, label %.lr.ph88.us.us.new.1

.lr.ph88.us.us.new.1:                             ; preds = %.lr.ph88.us.us.1, %.lr.ph88.us.us.new.1
  %indvars.iv119.1 = phi i64 [ %indvars.iv.next120.3.1, %.lr.ph88.us.us.new.1 ], [ 0, %.lr.ph88.us.us.1 ]
  %niter.1 = phi i64 [ %niter.next.3.1, %.lr.ph88.us.us.new.1 ], [ 0, %.lr.ph88.us.us.1 ]
  %indvars.iv.next120.3.1 = add nuw nsw i64 %indvars.iv119.1, 4
  %niter.next.3.1 = add i64 %niter.1, 4
  %niter.ncmp.3.1 = icmp eq i64 %niter.next.3.1, %unroll_iter.1
  br i1 %niter.ncmp.3.1, label %._crit_edge89.us.us.unr-lcssa.loopexit.1, label %.lr.ph88.us.us.new.1, !llvm.loop !25

._crit_edge89.us.us.unr-lcssa.loopexit.1:         ; preds = %.lr.ph88.us.us.new.1
  %gep.1183 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.1
  %223 = load i8, ptr %gep.1183, align 1, !tbaa !26
  %224 = zext i8 %223 to i32
  %225 = shl nuw nsw i32 %224, 16
  %indvars.iv.next120.1184 = or disjoint i64 %indvars.iv119.1, 1
  %gep.1.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.1184
  %226 = load i8, ptr %gep.1.1, align 1, !tbaa !26
  %227 = zext i8 %226 to i32
  %228 = shl nuw nsw i32 %227, 8
  %229 = or disjoint i32 %225, %228
  %indvars.iv.next120.1.1 = or disjoint i64 %indvars.iv119.1, 2
  %gep.2.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.1.1
  %230 = load i8, ptr %gep.2.1, align 1, !tbaa !26
  %231 = zext i8 %230 to i32
  %232 = or disjoint i32 %229, %231
  %233 = shl nuw i32 %232, 8
  %indvars.iv.next120.2.1 = or disjoint i64 %indvars.iv119.1, 3
  %gep.3.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.2.1
  %234 = load i8, ptr %gep.3.1, align 1, !tbaa !26
  %235 = zext i8 %234 to i32
  %236 = or disjoint i32 %233, %235
  br label %._crit_edge89.us.us.unr-lcssa.1

._crit_edge89.us.us.unr-lcssa.1:                  ; preds = %._crit_edge89.us.us.unr-lcssa.loopexit.1, %.lr.ph88.us.us.1
  %.lcssa180.ph.1 = phi i32 [ poison, %.lr.ph88.us.us.1 ], [ %236, %._crit_edge89.us.us.unr-lcssa.loopexit.1 ]
  %indvars.iv119.unr.1 = phi i64 [ 0, %.lr.ph88.us.us.1 ], [ %indvars.iv.next120.3.1, %._crit_edge89.us.us.unr-lcssa.loopexit.1 ]
  %.unr.1 = phi i32 [ 0, %.lr.ph88.us.us.1 ], [ %236, %._crit_edge89.us.us.unr-lcssa.loopexit.1 ]
  br i1 %lcmp.mod.1.not, label %._crit_edge89.us.us.1, label %.epil.preheader.1

.epil.preheader.1:                                ; preds = %._crit_edge89.us.us.unr-lcssa.1, %.epil.preheader.1
  %indvars.iv119.epil.1 = phi i64 [ %indvars.iv.next120.epil.1, %.epil.preheader.1 ], [ %indvars.iv119.unr.1, %._crit_edge89.us.us.unr-lcssa.1 ]
  %237 = phi i32 [ %241, %.epil.preheader.1 ], [ %.unr.1, %._crit_edge89.us.us.unr-lcssa.1 ]
  %epil.iter.1 = phi i64 [ %epil.iter.next.1, %.epil.preheader.1 ], [ 0, %._crit_edge89.us.us.unr-lcssa.1 ]
  %238 = shl i32 %237, 8
  %gep.epil.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.epil.1
  %239 = load i8, ptr %gep.epil.1, align 1, !tbaa !26
  %240 = zext i8 %239 to i32
  %241 = or disjoint i32 %238, %240
  %indvars.iv.next120.epil.1 = add nuw nsw i64 %indvars.iv119.epil.1, 1
  %epil.iter.next.1 = add i64 %epil.iter.1, 1
  %epil.iter.cmp.1.not = icmp eq i64 %epil.iter.next.1, %xtraiter.1
  br i1 %epil.iter.cmp.1.not, label %._crit_edge89.us.us.1, label %.epil.preheader.1, !llvm.loop !32

._crit_edge89.us.us.1:                            ; preds = %.epil.preheader.1, %._crit_edge89.us.us.unr-lcssa.1
  %.lcssa180.1 = phi i32 [ %.lcssa180.ph.1, %._crit_edge89.us.us.unr-lcssa.1 ], [ %241, %.epil.preheader.1 ]
  store i32 %.lcssa180.1, ptr %.4.sroa_idx205, align 4, !tbaa !13
  br i1 %45, label %.split92.us104, label %.lr.ph88.us.us.2, !llvm.loop !29

.lr.ph88.us.us.2:                                 ; preds = %._crit_edge89.us.us.1
  br i1 %94, label %._crit_edge89.us.us.unr-lcssa.2, label %.lr.ph88.us.us.new.2

.lr.ph88.us.us.new.2:                             ; preds = %.lr.ph88.us.us.2, %.lr.ph88.us.us.new.2
  %indvars.iv119.2 = phi i64 [ %indvars.iv.next120.3.2, %.lr.ph88.us.us.new.2 ], [ 0, %.lr.ph88.us.us.2 ]
  %niter.2 = phi i64 [ %niter.next.3.2, %.lr.ph88.us.us.new.2 ], [ 0, %.lr.ph88.us.us.2 ]
  %indvars.iv.next120.3.2 = add nuw nsw i64 %indvars.iv119.2, 4
  %niter.next.3.2 = add i64 %niter.2, 4
  %niter.ncmp.3.2 = icmp eq i64 %niter.next.3.2, %unroll_iter.2
  br i1 %niter.ncmp.3.2, label %._crit_edge89.us.us.unr-lcssa.loopexit.2, label %.lr.ph88.us.us.new.2, !llvm.loop !25

._crit_edge89.us.us.unr-lcssa.loopexit.2:         ; preds = %.lr.ph88.us.us.new.2
  %gep.2185 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.2
  %242 = load i8, ptr %gep.2185, align 1, !tbaa !26
  %243 = zext i8 %242 to i32
  %244 = shl nuw nsw i32 %243, 16
  %indvars.iv.next120.2186 = or disjoint i64 %indvars.iv119.2, 1
  %gep.1.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.2186
  %245 = load i8, ptr %gep.1.2, align 1, !tbaa !26
  %246 = zext i8 %245 to i32
  %247 = shl nuw nsw i32 %246, 8
  %248 = or disjoint i32 %244, %247
  %indvars.iv.next120.1.2 = or disjoint i64 %indvars.iv119.2, 2
  %gep.2.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.1.2
  %249 = load i8, ptr %gep.2.2, align 1, !tbaa !26
  %250 = zext i8 %249 to i32
  %251 = or disjoint i32 %248, %250
  %252 = shl nuw i32 %251, 8
  %indvars.iv.next120.2.2 = or disjoint i64 %indvars.iv119.2, 3
  %gep.3.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.2.2
  %253 = load i8, ptr %gep.3.2, align 1, !tbaa !26
  %254 = zext i8 %253 to i32
  %255 = or disjoint i32 %252, %254
  br label %._crit_edge89.us.us.unr-lcssa.2

._crit_edge89.us.us.unr-lcssa.2:                  ; preds = %._crit_edge89.us.us.unr-lcssa.loopexit.2, %.lr.ph88.us.us.2
  %.lcssa180.ph.2 = phi i32 [ poison, %.lr.ph88.us.us.2 ], [ %255, %._crit_edge89.us.us.unr-lcssa.loopexit.2 ]
  %indvars.iv119.unr.2 = phi i64 [ 0, %.lr.ph88.us.us.2 ], [ %indvars.iv.next120.3.2, %._crit_edge89.us.us.unr-lcssa.loopexit.2 ]
  %.unr.2 = phi i32 [ 0, %.lr.ph88.us.us.2 ], [ %255, %._crit_edge89.us.us.unr-lcssa.loopexit.2 ]
  br i1 %lcmp.mod.2.not, label %._crit_edge89.us.us.2, label %.epil.preheader.2

.epil.preheader.2:                                ; preds = %._crit_edge89.us.us.unr-lcssa.2, %.epil.preheader.2
  %indvars.iv119.epil.2 = phi i64 [ %indvars.iv.next120.epil.2, %.epil.preheader.2 ], [ %indvars.iv119.unr.2, %._crit_edge89.us.us.unr-lcssa.2 ]
  %256 = phi i32 [ %260, %.epil.preheader.2 ], [ %.unr.2, %._crit_edge89.us.us.unr-lcssa.2 ]
  %epil.iter.2 = phi i64 [ %epil.iter.next.2, %.epil.preheader.2 ], [ 0, %._crit_edge89.us.us.unr-lcssa.2 ]
  %257 = shl i32 %256, 8
  %gep.epil.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.epil.2
  %258 = load i8, ptr %gep.epil.2, align 1, !tbaa !26
  %259 = zext i8 %258 to i32
  %260 = or disjoint i32 %257, %259
  %indvars.iv.next120.epil.2 = add nuw nsw i64 %indvars.iv119.epil.2, 1
  %epil.iter.next.2 = add i64 %epil.iter.2, 1
  %epil.iter.cmp.2.not = icmp eq i64 %epil.iter.next.2, %xtraiter.2
  br i1 %epil.iter.cmp.2.not, label %._crit_edge89.us.us.2, label %.epil.preheader.2, !llvm.loop !32

._crit_edge89.us.us.2:                            ; preds = %.epil.preheader.2, %._crit_edge89.us.us.unr-lcssa.2
  %.lcssa180.2 = phi i32 [ %.lcssa180.ph.2, %._crit_edge89.us.us.unr-lcssa.2 ], [ %260, %.epil.preheader.2 ]
  store i32 %.lcssa180.2, ptr %.8.sroa_idx207, align 8, !tbaa !13
  br i1 %exitcond128.not.2, label %.split92.us104, label %.lr.ph88.us.us.3, !llvm.loop !29

.lr.ph88.us.us.3:                                 ; preds = %._crit_edge89.us.us.2
  br i1 %95, label %._crit_edge89.us.us.unr-lcssa.3, label %.lr.ph88.us.us.new.3

.lr.ph88.us.us.new.3:                             ; preds = %.lr.ph88.us.us.3, %.lr.ph88.us.us.new.3
  %indvars.iv119.3 = phi i64 [ %indvars.iv.next120.3.3, %.lr.ph88.us.us.new.3 ], [ 0, %.lr.ph88.us.us.3 ]
  %niter.3 = phi i64 [ %niter.next.3.3, %.lr.ph88.us.us.new.3 ], [ 0, %.lr.ph88.us.us.3 ]
  %indvars.iv.next120.3.3 = add nuw nsw i64 %indvars.iv119.3, 4
  %niter.next.3.3 = add i64 %niter.3, 4
  %niter.ncmp.3.3 = icmp eq i64 %niter.next.3.3, %unroll_iter.3
  br i1 %niter.ncmp.3.3, label %._crit_edge89.us.us.unr-lcssa.loopexit.3, label %.lr.ph88.us.us.new.3, !llvm.loop !25

._crit_edge89.us.us.unr-lcssa.loopexit.3:         ; preds = %.lr.ph88.us.us.new.3
  %gep.3187 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.3
  %261 = load i8, ptr %gep.3187, align 1, !tbaa !26
  %262 = zext i8 %261 to i32
  %263 = shl nuw nsw i32 %262, 16
  %indvars.iv.next120.3188 = or disjoint i64 %indvars.iv119.3, 1
  %gep.1.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.3188
  %264 = load i8, ptr %gep.1.3, align 1, !tbaa !26
  %265 = zext i8 %264 to i32
  %266 = shl nuw nsw i32 %265, 8
  %267 = or disjoint i32 %263, %266
  %indvars.iv.next120.1.3 = or disjoint i64 %indvars.iv119.3, 2
  %gep.2.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.1.3
  %268 = load i8, ptr %gep.2.3, align 1, !tbaa !26
  %269 = zext i8 %268 to i32
  %270 = or disjoint i32 %267, %269
  %271 = shl nuw i32 %270, 8
  %indvars.iv.next120.2.3 = or disjoint i64 %indvars.iv119.3, 3
  %gep.3.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next120.2.3
  %272 = load i8, ptr %gep.3.3, align 1, !tbaa !26
  %273 = zext i8 %272 to i32
  %274 = or disjoint i32 %271, %273
  br label %._crit_edge89.us.us.unr-lcssa.3

._crit_edge89.us.us.unr-lcssa.3:                  ; preds = %._crit_edge89.us.us.unr-lcssa.loopexit.3, %.lr.ph88.us.us.3
  %.lcssa180.ph.3 = phi i32 [ poison, %.lr.ph88.us.us.3 ], [ %274, %._crit_edge89.us.us.unr-lcssa.loopexit.3 ]
  %indvars.iv119.unr.3 = phi i64 [ 0, %.lr.ph88.us.us.3 ], [ %indvars.iv.next120.3.3, %._crit_edge89.us.us.unr-lcssa.loopexit.3 ]
  %.unr.3 = phi i32 [ 0, %.lr.ph88.us.us.3 ], [ %274, %._crit_edge89.us.us.unr-lcssa.loopexit.3 ]
  br i1 %lcmp.mod.3.not, label %._crit_edge89.us.us.3, label %.epil.preheader.3

.epil.preheader.3:                                ; preds = %._crit_edge89.us.us.unr-lcssa.3, %.epil.preheader.3
  %indvars.iv119.epil.3 = phi i64 [ %indvars.iv.next120.epil.3, %.epil.preheader.3 ], [ %indvars.iv119.unr.3, %._crit_edge89.us.us.unr-lcssa.3 ]
  %275 = phi i32 [ %279, %.epil.preheader.3 ], [ %.unr.3, %._crit_edge89.us.us.unr-lcssa.3 ]
  %epil.iter.3 = phi i64 [ %epil.iter.next.3, %.epil.preheader.3 ], [ 0, %._crit_edge89.us.us.unr-lcssa.3 ]
  %276 = shl i32 %275, 8
  %gep.epil.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv119.epil.3
  %277 = load i8, ptr %gep.epil.3, align 1, !tbaa !26
  %278 = zext i8 %277 to i32
  %279 = or disjoint i32 %276, %278
  %indvars.iv.next120.epil.3 = add nuw nsw i64 %indvars.iv119.epil.3, 1
  %epil.iter.next.3 = add i64 %epil.iter.3, 1
  %epil.iter.cmp.3.not = icmp eq i64 %epil.iter.next.3, %xtraiter.3
  br i1 %epil.iter.cmp.3.not, label %._crit_edge89.us.us.3, label %.epil.preheader.3, !llvm.loop !32

._crit_edge89.us.us.3:                            ; preds = %.epil.preheader.3, %._crit_edge89.us.us.unr-lcssa.3
  %.lcssa180.3 = phi i32 [ %.lcssa180.ph.3, %._crit_edge89.us.us.unr-lcssa.3 ], [ %279, %.epil.preheader.3 ]
  store i32 %.lcssa180.3, ptr %.12.sroa_idx, align 4, !tbaa !13
  br label %.split92.us104

._crit_edge95.split.us107:                        ; preds = %199
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %exitcond141.not = icmp eq i64 %indvars.iv.next138, %wide.trip.count140
  br i1 %exitcond141.not, label %._crit_edge102, label %.preheader.us, !llvm.loop !31

._crit_edge102:                                   ; preds = %._crit_edge95.split.us107, %._crit_edge95.split.us.split.us.us.us.us, %._crit_edge95.split.us.split.us110.us, %.preheader.lr.ph, %81
  tail call void @png_free(ptr noundef nonnull %11, ptr noundef %51)
  tail call void @_ZdaPv(ptr noundef nonnull %48) #12
  call void @png_destroy_read_struct(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef null)
  %280 = call i32 @fclose(ptr noundef nonnull %6)
  br label %281

281:                                              ; preds = %42, %._crit_edge102, %18
  %.1 = phi i32 [ 0, %18 ], [ 1, %._crit_edge102 ], [ 0, %42 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  br label %282

282:                                              ; preds = %281, %13
  %.2 = phi i32 [ 0, %13 ], [ %.1, %281 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  br label %283

283:                                              ; preds = %282, %7
  %.3 = phi i32 [ %.2, %282 ], [ 0, %7 ]
  ret i32 %.3
}

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

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

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

declare noalias ptr @png_create_info_struct(ptr noundef) local_unnamed_addr #1

declare void @png_destroy_read_struct(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_init_io(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_read_info(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @png_get_color_type(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @png_get_image_width(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @png_get_image_height(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @png_get_rowbytes(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @png_get_bit_depth(ptr noundef, ptr noundef) local_unnamed_addr #1

declare noalias ptr @png_malloc(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @png_read_image(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_read_end(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @png_free(ptr noundef, ptr noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { cold nounwind }
attributes #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 200}
!16 = !{!"_ZTS6R2Grid", !17, i64 0, !17, i64 88, !20, i64 176, !6, i64 184, !7, i64 192, !14, i64 200, !14, i64 204}
!17 = !{!"_ZTS8R2Affine", !18, i64 0, !19, i64 8, !14, i64 80}
!18 = !{!"_ZTS16R2Transformation"}
!19 = !{!"_ZTS8R3Matrix", !7, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!16, !14, i64 204}
!22 = !{!16, !20, i64 176}
!23 = !{!16, !6, i64 184}
!24 = distinct !{!24, !10, !12, !11}
!25 = distinct !{!25, !10}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !28}


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