; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/test/test_malloc_regression.ll (Z16TestAlignedMsizev)

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

@.str.29 = external hidden unnamed_addr constant [98 x i8], align 1
@__const._Z16TestAlignedMsizev.allocSz = external hidden unnamed_addr constant [8 x i64], align 16
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

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

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

declare i64 @scalable_msize(ptr noundef) #3

declare void @scalable_free(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16TestAlignedMsizev() #1 {
  %1 = alloca i32, align 4
  %2 = alloca [4 x ptr], align 16
  %3 = alloca [4 x i64], align 16
  %4 = alloca [8 x i64], align 16
  %5 = alloca [7 x i64], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %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 i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 4, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const._Z16TestAlignedMsizev.allocSz, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #6
  call void @llvm.memset.p0.i64(ptr align 16 %5, i8 0, i64 56, i1 false)
  %18 = getelementptr inbounds [7 x i64], ptr %5, i32 0, i32 0
  store i64 8, ptr %18, align 16
  %19 = getelementptr inbounds [7 x i64], ptr %5, i32 0, i32 1
  store i64 512, ptr %19, align 8
  %20 = getelementptr inbounds [7 x i64], ptr %5, i32 0, i32 2
  store i64 2048, ptr %20, align 16
  %21 = getelementptr inbounds [7 x i64], ptr %5, i32 0, i32 3
  store i64 4096, ptr %21, align 8
  %22 = getelementptr inbounds [7 x i64], ptr %5, i32 0, i32 4
  store i64 8192, ptr %22, align 16
  %23 = getelementptr inbounds [7 x i64], ptr %5, i32 0, i32 5
  store i64 16384, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %289, %0
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [7 x i64], ptr %5, i64 0, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %292

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %285, %31
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = icmp ne i64 %36, 0
  br i1 %37, label %39, label %38

38:                                               ; preds = %32
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %288

39:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %69, %39
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = icmp slt i32 %41, 4
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %72

44:                                               ; preds = %40
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [7 x i64], ptr %5, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !9
  %53 = call ptr @scalable_aligned_malloc(i64 noundef %48, i64 noundef %52)
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %55
  store ptr %53, ptr %56, align 8, !tbaa !11
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [7 x i64], ptr %5, i64 0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %60, i64 noundef %64)
  br i1 %65, label %66, label %67

66:                                               ; preds = %44
  br label %68

67:                                               ; preds = %44
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.29, i32 noundef 132, ptr noundef @.str.39, ptr noundef null)
  br label %68

68:                                               ; preds = %67, %66
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !5
  br label %40, !llvm.loop !13

72:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %108, %72
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = icmp slt i32 %74, 4
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %111

77:                                               ; preds = %73
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = call i64 @scalable_msize(ptr noundef %81)
  %83 = load i32, ptr %10, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [4 x i64], ptr %3, i64 0, i64 %84
  store i64 %82, ptr %85, align 8, !tbaa !9
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [4 x i64], ptr %3, i64 0, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = icmp uge i64 %89, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %77
  br label %97

96:                                               ; preds = %77
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.29, i32 noundef 138, ptr noundef @.str.40, ptr noundef @.str.41)
  br label %97

97:                                               ; preds = %96, %95
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = trunc i32 %102 to i8
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [4 x i64], ptr %3, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 1 %101, i8 %103, i64 %107, i1 false)
  br label %108

108:                                              ; preds = %97
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %10, align 4, !tbaa !5
  br label %73, !llvm.loop !15

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

112:                                              ; preds = %145, %111
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = icmp slt i32 %113, 4
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %148

116:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %141, %116
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = zext i32 %118 to i64
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [4 x i64], ptr %3, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !9
  %124 = icmp ult i64 %119, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %117
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %144

126:                                              ; preds = %117
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !11
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i8, ptr %130, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !16
  %135 = sext i8 %134 to i32
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = icmp eq i32 %135, %136
  br i1 %137, label %138, label %139

138:                                              ; preds = %126
  br label %140

139:                                              ; preds = %126
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.29, i32 noundef 143, ptr noundef @.str.42, ptr noundef @.str.43)
  br label %140

140:                                              ; preds = %139, %138
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = add i32 %142, 1
  store i32 %143, ptr %12, align 4, !tbaa !5
  br label %117, !llvm.loop !17

144:                                              ; preds = %125
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %11, align 4, !tbaa !5
  br label %112, !llvm.loop !18

148:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %199, %148
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = icmp slt i32 %150, 4
  br i1 %151, label %153, label %152

152:                                              ; preds = %149
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %202

153:                                              ; preds = %149
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !11
  %158 = load i32, ptr %8, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !9
  %162 = mul i64 2, %161
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [7 x i64], ptr %5, i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !9
  %167 = call ptr @scalable_aligned_realloc(ptr noundef %157, i64 noundef %162, i64 noundef %166)
  %168 = load i32, ptr %13, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %169
  store ptr %167, ptr %170, align 8, !tbaa !11
  %171 = load i32, ptr %13, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %172
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [7 x i64], ptr %5, i64 0, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !9
  %179 = call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %174, i64 noundef %178)
  br i1 %179, label %180, label %181

180:                                              ; preds = %153
  br label %182

181:                                              ; preds = %153
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.29, i32 noundef 148, ptr noundef @.str.39, ptr noundef null)
  br label %182

182:                                              ; preds = %181, %180
  %183 = load i32, ptr %13, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !11
  %187 = load i32, ptr %8, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !9
  %191 = getelementptr inbounds i8, ptr %186, i64 %190
  %192 = load i32, ptr %13, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  %194 = trunc i32 %193 to i8
  %195 = load i32, ptr %8, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 1 %191, i8 %194, i64 %198, i1 false)
  br label %199

199:                                              ; preds = %182
  %200 = load i32, ptr %13, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %13, align 4, !tbaa !5
  br label %149, !llvm.loop !19

202:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %268, %202
  %204 = load i32, ptr %14, align 4, !tbaa !5
  %205 = icmp slt i32 %204, 4
  br i1 %205, label %207, label %206

206:                                              ; preds = %203
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %271

207:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %232, %207
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = zext i32 %209 to i64
  %211 = load i32, ptr %8, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !9
  %215 = icmp ult i64 %210, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %208
  store i32 26, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %235

217:                                              ; preds = %208
  %218 = load i32, ptr %14, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %219
  %221 = load ptr, ptr %220, align 8, !tbaa !11
  %222 = load i32, ptr %15, align 4, !tbaa !5
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds i8, ptr %221, i64 %223
  %225 = load i8, ptr %224, align 1, !tbaa !16
  %226 = sext i8 %225 to i32
  %227 = load i32, ptr %14, align 4, !tbaa !5
  %228 = icmp eq i32 %226, %227
  br i1 %228, label %229, label %230

229:                                              ; preds = %217
  br label %231

230:                                              ; preds = %217
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.29, i32 noundef 153, ptr noundef @.str.42, ptr noundef @.str.43)
  br label %231

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

232:                                              ; preds = %231
  %233 = load i32, ptr %15, align 4, !tbaa !5
  %234 = add i32 %233, 1
  store i32 %234, ptr %15, align 4, !tbaa !5
  br label %208, !llvm.loop !20

235:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %236 = load i32, ptr %8, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %237
  %239 = load i64, ptr %238, align 8, !tbaa !9
  store i64 %239, ptr %16, align 8, !tbaa !9
  br label %240

240:                                              ; preds = %264, %235
  %241 = load i64, ptr %16, align 8, !tbaa !9
  %242 = load i32, ptr %8, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %243
  %245 = load i64, ptr %244, align 8, !tbaa !9
  %246 = mul i64 2, %245
  %247 = icmp ult i64 %241, %246
  br i1 %247, label %249, label %248

248:                                              ; preds = %240
  store i32 29, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %267

249:                                              ; preds = %240
  %250 = load i32, ptr %14, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !11
  %254 = load i64, ptr %16, align 8, !tbaa !9
  %255 = getelementptr inbounds i8, ptr %253, i64 %254
  %256 = load i8, ptr %255, align 1, !tbaa !16
  %257 = sext i8 %256 to i32
  %258 = load i32, ptr %14, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  %260 = icmp eq i32 %257, %259
  br i1 %260, label %261, label %262

261:                                              ; preds = %249
  br label %263

262:                                              ; preds = %249
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.29, i32 noundef 155, ptr noundef @.str.44, ptr noundef @.str.43)
  br label %263

263:                                              ; preds = %262, %261
  br label %264

264:                                              ; preds = %263
  %265 = load i64, ptr %16, align 8, !tbaa !9
  %266 = add i64 %265, 1
  store i64 %266, ptr %16, align 8, !tbaa !9
  br label %240, !llvm.loop !21

267:                                              ; preds = %248
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %14, align 4, !tbaa !5
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %14, align 4, !tbaa !5
  br label %203, !llvm.loop !22

271:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %272

272:                                              ; preds = %281, %271
  %273 = load i32, ptr %17, align 4, !tbaa !5
  %274 = icmp slt i32 %273, 4
  br i1 %274, label %276, label %275

275:                                              ; preds = %272
  store i32 32, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %284

276:                                              ; preds = %272
  %277 = load i32, ptr %17, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %278
  %280 = load ptr, ptr %279, align 8, !tbaa !11
  call void @scalable_free(ptr noundef %280)
  br label %281

281:                                              ; preds = %276
  %282 = load i32, ptr %17, align 4, !tbaa !5
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %17, align 4, !tbaa !5
  br label %272, !llvm.loop !23

284:                                              ; preds = %275
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %8, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %8, align 4, !tbaa !5
  br label %32, !llvm.loop !24

288:                                              ; preds = %38
  br label %289

289:                                              ; preds = %288
  %290 = load i32, ptr %6, align 4, !tbaa !5
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %6, align 4, !tbaa !5
  br label %24, !llvm.loop !25

292:                                              ; preds = %30
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

; 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) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef, i64 noundef) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #6 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}


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

@.str.29 = external hidden unnamed_addr constant [98 x i8], align 1
@__const._Z16TestAlignedMsizev.allocSz = external hidden unnamed_addr constant [8 x i64], align 16
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

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

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

declare i64 @scalable_msize(ptr noundef) local_unnamed_addr #3

declare void @scalable_free(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16TestAlignedMsizev() local_unnamed_addr #1 {
.preheader81.lr.ph:
  %0 = alloca [7 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %0) #5
  %1 = getelementptr inbounds i8, ptr %0, i64 48
  store i64 0, ptr %1, align 16
  store i64 8, ptr %0, align 16
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 512, ptr %2, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 2048, ptr %3, align 16
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 4096, ptr %4, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 8192, ptr %5, align 16
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  store i64 16384, ptr %6, align 8
  %7 = load i64, ptr @__const._Z16TestAlignedMsizev.allocSz, align 16, !tbaa !5
  %.not7193 = icmp eq i64 %7, 0
  br i1 %.not7193, label %._crit_edge98, label %.preheader81

.preheader81:                                     ; preds = %.preheader81.lr.ph, %._crit_edge95
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %._crit_edge95 ], [ 0, %.preheader81.lr.ph ]
  %8 = phi i64 [ %13, %._crit_edge95 ], [ 8, %.preheader81.lr.ph ]
  br label %.preheader80

._crit_edge98:                                    ; preds = %._crit_edge95, %.preheader81.lr.ph
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %0) #5
  ret void

.preheader80:                                     ; preds = %.preheader81, %._crit_edge90.3
  %indvars.iv = phi i64 [ 0, %.preheader81 ], [ %indvars.iv.next, %._crit_edge90.3 ]
  %9 = phi i64 [ %7, %.preheader81 ], [ %173, %._crit_edge90.3 ]
  %10 = tail call ptr @scalable_aligned_malloc(i64 noundef %9, i64 noundef %8)
  %11 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %10, i64 noundef %8)
  br i1 %11, label %15, label %14

._crit_edge95:                                    ; preds = %._crit_edge90.3
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %12 = getelementptr inbounds [7 x i64], ptr %0, i64 0, i64 %indvars.iv.next109
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge98, label %.preheader81, !llvm.loop !9

14:                                               ; preds = %.preheader80
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 132, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %15

15:                                               ; preds = %14, %.preheader80
  %16 = tail call ptr @scalable_aligned_malloc(i64 noundef %9, i64 noundef %8)
  %17 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %16, i64 noundef %8)
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 132, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %19

19:                                               ; preds = %18, %15
  %20 = tail call ptr @scalable_aligned_malloc(i64 noundef %9, i64 noundef %8)
  %21 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %20, i64 noundef %8)
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 132, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %23

23:                                               ; preds = %22, %19
  %24 = tail call ptr @scalable_aligned_malloc(i64 noundef %9, i64 noundef %8)
  %25 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %24, i64 noundef %8)
  br i1 %25, label %.preheader79.preheader, label %26

26:                                               ; preds = %23
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 132, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %.preheader79.preheader

.preheader79.preheader:                           ; preds = %26, %23
  %27 = tail call i64 @scalable_msize(ptr noundef %10)
  %.not72 = icmp ult i64 %27, %9
  br i1 %.not72, label %28, label %.preheader79.1

28:                                               ; preds = %.preheader79.preheader
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 138, ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.41)
  br label %.preheader79.1

.preheader79.1:                                   ; preds = %.preheader79.preheader, %28
  tail call void @llvm.memset.p0.i64(ptr align 1 %10, i8 0, i64 %27, i1 false)
  %29 = tail call i64 @scalable_msize(ptr noundef %16)
  %.not72.1 = icmp ult i64 %29, %9
  br i1 %.not72.1, label %30, label %.preheader79.2

30:                                               ; preds = %.preheader79.1
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 138, ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.41)
  br label %.preheader79.2

.preheader79.2:                                   ; preds = %30, %.preheader79.1
  tail call void @llvm.memset.p0.i64(ptr align 1 %16, i8 1, i64 %29, i1 false)
  %31 = tail call i64 @scalable_msize(ptr noundef %20)
  %.not72.2 = icmp ult i64 %31, %9
  br i1 %.not72.2, label %32, label %.preheader79.3

32:                                               ; preds = %.preheader79.2
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 138, ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.41)
  br label %.preheader79.3

.preheader79.3:                                   ; preds = %32, %.preheader79.2
  tail call void @llvm.memset.p0.i64(ptr align 1 %20, i8 2, i64 %31, i1 false)
  %33 = tail call i64 @scalable_msize(ptr noundef %24)
  %.not72.3 = icmp ult i64 %33, %9
  br i1 %.not72.3, label %34, label %.preheader74.preheader

34:                                               ; preds = %.preheader79.3
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 138, ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.41)
  br label %.preheader74.preheader

.preheader74.preheader:                           ; preds = %34, %.preheader79.3
  tail call void @llvm.memset.p0.i64(ptr align 1 %24, i8 3, i64 %33, i1 false)
  %.not99 = icmp eq i64 %27, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %78, %.preheader74.preheader
  %.not99.1 = icmp eq i64 %29, 0
  br i1 %.not99.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %._crit_edge, %42
  %35 = phi i64 [ %44, %42 ], [ 0, %._crit_edge ]
  %.06284.1 = phi i32 [ %43, %42 ], [ 0, %._crit_edge ]
  %36 = getelementptr inbounds i8, ptr %16, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = sext i8 %37 to i64
  %39 = and i64 %38, 4294967295
  %40 = icmp eq i64 %39, 1
  br i1 %40, label %42, label %41

41:                                               ; preds = %.lr.ph.1
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 143, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %42

42:                                               ; preds = %41, %.lr.ph.1
  %43 = add i32 %.06284.1, 1
  %44 = zext i32 %43 to i64
  %45 = icmp ugt i64 %29, %44
  br i1 %45, label %.lr.ph.1, label %._crit_edge.1, !llvm.loop !12

._crit_edge.1:                                    ; preds = %42, %._crit_edge
  %.not99.2 = icmp eq i64 %31, 0
  br i1 %.not99.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %._crit_edge.1, %53
  %46 = phi i64 [ %55, %53 ], [ 0, %._crit_edge.1 ]
  %.06284.2 = phi i32 [ %54, %53 ], [ 0, %._crit_edge.1 ]
  %47 = getelementptr inbounds i8, ptr %20, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i64
  %50 = and i64 %49, 4294967295
  %51 = icmp eq i64 %50, 2
  br i1 %51, label %53, label %52

52:                                               ; preds = %.lr.ph.2
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 143, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %53

53:                                               ; preds = %52, %.lr.ph.2
  %54 = add i32 %.06284.2, 1
  %55 = zext i32 %54 to i64
  %56 = icmp ugt i64 %31, %55
  br i1 %56, label %.lr.ph.2, label %._crit_edge.2, !llvm.loop !12

._crit_edge.2:                                    ; preds = %53, %._crit_edge.1
  %.not99.3 = icmp eq i64 %33, 0
  br i1 %.not99.3, label %._crit_edge.3, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %._crit_edge.2, %64
  %57 = phi i64 [ %66, %64 ], [ 0, %._crit_edge.2 ]
  %.06284.3 = phi i32 [ %65, %64 ], [ 0, %._crit_edge.2 ]
  %58 = getelementptr inbounds i8, ptr %24, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = sext i8 %59 to i64
  %61 = and i64 %60, 4294967295
  %62 = icmp eq i64 %61, 3
  br i1 %62, label %64, label %63

63:                                               ; preds = %.lr.ph.3
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 143, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %64

64:                                               ; preds = %63, %.lr.ph.3
  %65 = add i32 %.06284.3, 1
  %66 = zext i32 %65 to i64
  %67 = icmp ugt i64 %33, %66
  br i1 %67, label %.lr.ph.3, label %._crit_edge.3, !llvm.loop !12

._crit_edge.3:                                    ; preds = %64, %._crit_edge.2
  %68 = shl i64 %9, 1
  %69 = tail call ptr @scalable_aligned_realloc(ptr noundef %10, i64 noundef %68, i64 noundef %8)
  %70 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %69, i64 noundef %8)
  br i1 %70, label %83, label %82

.lr.ph:                                           ; preds = %.preheader74.preheader, %78
  %71 = phi i64 [ %80, %78 ], [ 0, %.preheader74.preheader ]
  %.06284 = phi i32 [ %79, %78 ], [ 0, %.preheader74.preheader ]
  %72 = getelementptr inbounds i8, ptr %10, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !11
  %74 = sext i8 %73 to i64
  %75 = and i64 %74, 4294967295
  %76 = icmp eq i64 %75, 0
  br i1 %76, label %78, label %77

77:                                               ; preds = %.lr.ph
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 143, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %78

78:                                               ; preds = %77, %.lr.ph
  %79 = add i32 %.06284, 1
  %80 = zext i32 %79 to i64
  %81 = icmp ugt i64 %27, %80
  br i1 %81, label %.lr.ph, label %._crit_edge, !llvm.loop !12

82:                                               ; preds = %._crit_edge.3
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 148, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %83

83:                                               ; preds = %._crit_edge.3, %82
  %84 = getelementptr inbounds i8, ptr %69, i64 %9
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %84, i8 1, i64 %9, i1 false)
  %85 = tail call ptr @scalable_aligned_realloc(ptr noundef %16, i64 noundef %68, i64 noundef %8)
  %86 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %85, i64 noundef %8)
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 148, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %88

88:                                               ; preds = %87, %83
  %89 = getelementptr inbounds i8, ptr %85, i64 %9
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %89, i8 2, i64 %9, i1 false)
  %90 = tail call ptr @scalable_aligned_realloc(ptr noundef %20, i64 noundef %68, i64 noundef %8)
  %91 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %90, i64 noundef %8)
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 148, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %93

93:                                               ; preds = %92, %88
  %94 = getelementptr inbounds i8, ptr %90, i64 %9
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %94, i8 3, i64 %9, i1 false)
  %95 = tail call ptr @scalable_aligned_realloc(ptr noundef %24, i64 noundef %68, i64 noundef %8)
  %96 = tail call noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef %95, i64 noundef %8)
  br i1 %96, label %.preheader76, label %97

97:                                               ; preds = %93
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 148, ptr noundef nonnull @.str.39, ptr noundef null)
  br label %.preheader76

.preheader76:                                     ; preds = %97, %93
  %98 = getelementptr inbounds i8, ptr %95, i64 %9
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %98, i8 4, i64 %9, i1 false)
  %99 = icmp sgt i64 %9, 0
  br label %100

.preheader:                                       ; preds = %108
  br i1 %99, label %.lr.ph89, label %._crit_edge90.preheader

._crit_edge90.preheader:                          ; preds = %180, %.preheader
  br label %._crit_edge90

100:                                              ; preds = %.preheader76, %108
  %101 = phi i64 [ 0, %.preheader76 ], [ %110, %108 ]
  %.05987 = phi i32 [ 0, %.preheader76 ], [ %109, %108 ]
  %102 = getelementptr inbounds i8, ptr %69, i64 %101
  %103 = load i8, ptr %102, align 1, !tbaa !11
  %104 = sext i8 %103 to i64
  %105 = and i64 %104, 4294967295
  %106 = icmp eq i64 %105, 0
  br i1 %106, label %108, label %107

107:                                              ; preds = %100
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 153, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %108

108:                                              ; preds = %107, %100
  %109 = add i32 %.05987, 1
  %110 = zext i32 %109 to i64
  %111 = icmp ugt i64 %9, %110
  br i1 %111, label %100, label %.preheader, !llvm.loop !13

._crit_edge90:                                    ; preds = %._crit_edge90.preheader, %119
  %112 = phi i64 [ %121, %119 ], [ 0, %._crit_edge90.preheader ]
  %.05987.1 = phi i32 [ %120, %119 ], [ 0, %._crit_edge90.preheader ]
  %113 = getelementptr inbounds i8, ptr %85, i64 %112
  %114 = load i8, ptr %113, align 1, !tbaa !11
  %115 = sext i8 %114 to i64
  %116 = and i64 %115, 4294967295
  %117 = icmp eq i64 %116, 1
  br i1 %117, label %119, label %118

118:                                              ; preds = %._crit_edge90
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 153, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %119

119:                                              ; preds = %118, %._crit_edge90
  %120 = add i32 %.05987.1, 1
  %121 = zext i32 %120 to i64
  %122 = icmp ugt i64 %9, %121
  br i1 %122, label %._crit_edge90, label %.preheader.1, !llvm.loop !13

.preheader.1:                                     ; preds = %119
  br i1 %99, label %.lr.ph89.1, label %._crit_edge90.1.preheader

.lr.ph89.1:                                       ; preds = %.preheader.1, %129
  %.05888.1 = phi i64 [ %130, %129 ], [ %9, %.preheader.1 ]
  %123 = getelementptr inbounds i8, ptr %85, i64 %.05888.1
  %124 = load i8, ptr %123, align 1, !tbaa !11
  %125 = sext i8 %124 to i64
  %126 = and i64 %125, 4294967295
  %127 = icmp eq i64 %126, 2
  br i1 %127, label %129, label %128

128:                                              ; preds = %.lr.ph89.1
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 155, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.43)
  br label %129

129:                                              ; preds = %128, %.lr.ph89.1
  %130 = add nuw i64 %.05888.1, 1
  %131 = icmp ult i64 %130, %68
  br i1 %131, label %.lr.ph89.1, label %._crit_edge90.1.preheader, !llvm.loop !14

._crit_edge90.1.preheader:                        ; preds = %129, %.preheader.1
  br label %._crit_edge90.1

._crit_edge90.1:                                  ; preds = %._crit_edge90.1.preheader, %139
  %132 = phi i64 [ %141, %139 ], [ 0, %._crit_edge90.1.preheader ]
  %.05987.2 = phi i32 [ %140, %139 ], [ 0, %._crit_edge90.1.preheader ]
  %133 = getelementptr inbounds i8, ptr %90, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !11
  %135 = sext i8 %134 to i64
  %136 = and i64 %135, 4294967295
  %137 = icmp eq i64 %136, 2
  br i1 %137, label %139, label %138

138:                                              ; preds = %._crit_edge90.1
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 153, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %139

139:                                              ; preds = %138, %._crit_edge90.1
  %140 = add i32 %.05987.2, 1
  %141 = zext i32 %140 to i64
  %142 = icmp ugt i64 %9, %141
  br i1 %142, label %._crit_edge90.1, label %.preheader.2, !llvm.loop !13

.preheader.2:                                     ; preds = %139
  br i1 %99, label %.lr.ph89.2, label %._crit_edge90.2.preheader

.lr.ph89.2:                                       ; preds = %.preheader.2, %149
  %.05888.2 = phi i64 [ %150, %149 ], [ %9, %.preheader.2 ]
  %143 = getelementptr inbounds i8, ptr %90, i64 %.05888.2
  %144 = load i8, ptr %143, align 1, !tbaa !11
  %145 = sext i8 %144 to i64
  %146 = and i64 %145, 4294967295
  %147 = icmp eq i64 %146, 3
  br i1 %147, label %149, label %148

148:                                              ; preds = %.lr.ph89.2
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 155, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.43)
  br label %149

149:                                              ; preds = %148, %.lr.ph89.2
  %150 = add nuw i64 %.05888.2, 1
  %151 = icmp ult i64 %150, %68
  br i1 %151, label %.lr.ph89.2, label %._crit_edge90.2.preheader, !llvm.loop !14

._crit_edge90.2.preheader:                        ; preds = %149, %.preheader.2
  br label %._crit_edge90.2

._crit_edge90.2:                                  ; preds = %._crit_edge90.2.preheader, %159
  %152 = phi i64 [ %161, %159 ], [ 0, %._crit_edge90.2.preheader ]
  %.05987.3 = phi i32 [ %160, %159 ], [ 0, %._crit_edge90.2.preheader ]
  %153 = getelementptr inbounds i8, ptr %95, i64 %152
  %154 = load i8, ptr %153, align 1, !tbaa !11
  %155 = sext i8 %154 to i64
  %156 = and i64 %155, 4294967295
  %157 = icmp eq i64 %156, 3
  br i1 %157, label %159, label %158

158:                                              ; preds = %._crit_edge90.2
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 153, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.43)
  br label %159

159:                                              ; preds = %158, %._crit_edge90.2
  %160 = add i32 %.05987.3, 1
  %161 = zext i32 %160 to i64
  %162 = icmp ugt i64 %9, %161
  br i1 %162, label %._crit_edge90.2, label %.preheader.3, !llvm.loop !13

.preheader.3:                                     ; preds = %159
  br i1 %99, label %.lr.ph89.3, label %._crit_edge90.3

.lr.ph89.3:                                       ; preds = %.preheader.3, %169
  %.05888.3 = phi i64 [ %170, %169 ], [ %9, %.preheader.3 ]
  %163 = getelementptr inbounds i8, ptr %95, i64 %.05888.3
  %164 = load i8, ptr %163, align 1, !tbaa !11
  %165 = sext i8 %164 to i64
  %166 = and i64 %165, 4294967295
  %167 = icmp eq i64 %166, 4
  br i1 %167, label %169, label %168

168:                                              ; preds = %.lr.ph89.3
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 155, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.43)
  br label %169

169:                                              ; preds = %168, %.lr.ph89.3
  %170 = add nuw i64 %.05888.3, 1
  %171 = icmp ult i64 %170, %68
  br i1 %171, label %.lr.ph89.3, label %._crit_edge90.3, !llvm.loop !14

._crit_edge90.3:                                  ; preds = %169, %.preheader.3
  tail call void @scalable_free(ptr noundef %69)
  tail call void @scalable_free(ptr noundef %85)
  tail call void @scalable_free(ptr noundef %90)
  tail call void @scalable_free(ptr noundef nonnull %95)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %172 = getelementptr inbounds [8 x i64], ptr @__const._Z16TestAlignedMsizev.allocSz, i64 0, i64 %indvars.iv.next
  %173 = load i64, ptr %172, align 8, !tbaa !5
  %.not71 = icmp eq i64 %173, 0
  br i1 %.not71, label %._crit_edge95, label %.preheader80, !llvm.loop !15

.lr.ph89:                                         ; preds = %.preheader, %180
  %.05888 = phi i64 [ %181, %180 ], [ %9, %.preheader ]
  %174 = getelementptr inbounds i8, ptr %69, i64 %.05888
  %175 = load i8, ptr %174, align 1, !tbaa !11
  %176 = sext i8 %175 to i64
  %177 = and i64 %176, 4294967295
  %178 = icmp eq i64 %177, 1
  br i1 %178, label %180, label %179

179:                                              ; preds = %.lr.ph89
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.29, i32 noundef 155, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.43)
  br label %180

180:                                              ; preds = %179, %.lr.ph89
  %181 = add nuw i64 %.05888, 1
  %182 = icmp ult i64 %181, %68
  br i1 %182, label %.lr.ph89, label %._crit_edge90.preheader, !llvm.loop !14
}

declare ptr @scalable_aligned_malloc(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL10is_alignedIPcEbT_m(ptr noundef, i64 noundef) local_unnamed_addr #4

declare ptr @scalable_aligned_realloc(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nounwind willreturn memory(argmem: write) }
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 = { inlinehint 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 #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass