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

; 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.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%class.CMemTest = type { i32, i8, ptr }
%struct.PtrSize = type { ptr, i64 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@.str = external hidden unnamed_addr constant [98 x i8], align 1
@Tfree = external dso_local global ptr, align 8
@__FUNCTION__._ZN8CMemTest9AddrArifmEv = external hidden unnamed_addr constant [10 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [11 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef, ptr noundef, i64 noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, ...) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z8TreallocPvm(ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7Tmallocm(i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7Tcallocmm(i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8CMemTest9AddrArifmEv(ptr noundef nonnull align 8 dereferenceable(16) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %15 = call noundef ptr @_Z7Tmallocm(i64 noundef 400000)
  store ptr %15, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %class.CMemTest, ptr %14, i32 0, i32 1
  %17 = load i8, ptr %16, align 4, !tbaa !9, !range !13, !noundef !14
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %21

19:                                               ; preds = %1
  %20 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 618, ptr noundef @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %20, ptr noundef @.str.54)
  br label %21

21:                                               ; preds = %19, %1
  %22 = getelementptr inbounds %class.CMemTest, ptr %14, i32 0, i32 1
  %23 = load i8, ptr %22, align 4, !tbaa !9, !range !13, !noundef !14
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %27

25:                                               ; preds = %21
  %26 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 619, ptr noundef @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %26, ptr noundef @.str.55)
  br label %27

27:                                               ; preds = %25, %21
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  br label %32

31:                                               ; preds = %27
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 620, ptr noundef @.str.56, ptr noundef null)
  br label %32

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

33:                                               ; preds = %58, %32
  %34 = load i32, ptr %4, align 4, !tbaa !15
  %35 = icmp slt i32 %34, 25000
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %61

37:                                               ; preds = %33
  %38 = call i32 @rand() #5
  %39 = sext i32 %38 to i64
  %40 = urem i64 %39, 1000
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = load i32, ptr %4, align 4, !tbaa !15
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %struct.PtrSize, ptr %41, i64 %43
  %45 = getelementptr inbounds %struct.PtrSize, ptr %44, i32 0, i32 1
  store i64 %40, ptr %45, align 8, !tbaa !16
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = load i32, ptr %4, align 4, !tbaa !15
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %struct.PtrSize, ptr %46, i64 %48
  %50 = getelementptr inbounds %struct.PtrSize, ptr %49, i32 0, i32 1
  %51 = load i64, ptr %50, align 8, !tbaa !16
  %52 = call noundef ptr @_Z7Tmallocm(i64 noundef %51)
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = load i32, ptr %4, align 4, !tbaa !15
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds %struct.PtrSize, ptr %53, i64 %55
  %57 = getelementptr inbounds %struct.PtrSize, ptr %56, i32 0, i32 0
  store ptr %52, ptr %57, align 8, !tbaa !19
  br label %58

58:                                               ; preds = %37
  %59 = load i32, ptr %4, align 4, !tbaa !15
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %4, align 4, !tbaa !15
  br label %33, !llvm.loop !20

61:                                               ; preds = %36
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qsort(ptr noundef %62, i64 noundef 25000, i64 noundef 16, ptr noundef @_ZL8cmpAddrsPKvS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %63

63:                                               ; preds = %112, %61
  %64 = load i32, ptr %5, align 4, !tbaa !15
  %65 = icmp slt i32 %64, 24999
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %115

67:                                               ; preds = %63
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !15
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %struct.PtrSize, ptr %68, i64 %70
  %72 = getelementptr inbounds %struct.PtrSize, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = icmp ne ptr null, %73
  br i1 %74, label %75, label %111

75:                                               ; preds = %67
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !15
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.PtrSize, ptr %76, i64 %79
  %81 = getelementptr inbounds %struct.PtrSize, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !19
  %83 = icmp ne ptr null, %82
  br i1 %83, label %84, label %111

84:                                               ; preds = %75
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !15
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.PtrSize, ptr %85, i64 %87
  %89 = getelementptr inbounds %struct.PtrSize, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !19
  %91 = ptrtoint ptr %90 to i64
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load i32, ptr %5, align 4, !tbaa !15
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %struct.PtrSize, ptr %92, i64 %94
  %96 = getelementptr inbounds %struct.PtrSize, ptr %95, i32 0, i32 1
  %97 = load i64, ptr %96, align 8, !tbaa !16
  %98 = add i64 %91, %97
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = load i32, ptr %5, align 4, !tbaa !15
  %101 = add nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds %struct.PtrSize, ptr %99, i64 %102
  %104 = getelementptr inbounds %struct.PtrSize, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !19
  %106 = ptrtoint ptr %105 to i64
  %107 = icmp ule i64 %98, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %84
  br label %110

109:                                              ; preds = %84
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 632, ptr noundef @.str.57, ptr noundef @.str.58)
  br label %110

110:                                              ; preds = %109, %108
  br label %111

111:                                              ; preds = %110, %75, %67
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %5, align 4, !tbaa !15
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %5, align 4, !tbaa !15
  br label %63, !llvm.loop !22

115:                                              ; preds = %66
  %116 = getelementptr inbounds %class.CMemTest, ptr %14, i32 0, i32 1
  %117 = load i8, ptr %116, align 4, !tbaa !9, !range !13, !noundef !14
  %118 = trunc i8 %117 to i1
  br i1 %118, label %119, label %121

119:                                              ; preds = %115
  %120 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 635, ptr noundef @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %120, ptr noundef @.str.59)
  br label %121

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

122:                                              ; preds = %173, %121
  %123 = load i32, ptr %6, align 4, !tbaa !15
  %124 = icmp slt i32 %123, 25000
  br i1 %124, label %126, label %125

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %176

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = load i32, ptr %6, align 4, !tbaa !15
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %struct.PtrSize, ptr %127, i64 %129
  %131 = getelementptr inbounds %struct.PtrSize, ptr %130, i32 0, i32 1
  %132 = load i64, ptr %131, align 8, !tbaa !16
  %133 = mul i64 %132, 2
  store i64 %133, ptr %7, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = load i32, ptr %6, align 4, !tbaa !15
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds %struct.PtrSize, ptr %134, i64 %136
  %138 = getelementptr inbounds %struct.PtrSize, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !19
  %140 = load i64, ptr %7, align 8, !tbaa !23
  %141 = call noundef ptr @_Z8TreallocPvm(ptr noundef %139, i64 noundef %140)
  store ptr %141, ptr %8, align 8, !tbaa !5
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = icmp ne ptr null, %142
  br i1 %143, label %144, label %157

144:                                              ; preds = %126
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = load i32, ptr %6, align 4, !tbaa !15
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds %struct.PtrSize, ptr %146, i64 %148
  %150 = getelementptr inbounds %struct.PtrSize, ptr %149, i32 0, i32 0
  store ptr %145, ptr %150, align 8, !tbaa !19
  %151 = load i64, ptr %7, align 8, !tbaa !23
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = load i32, ptr %6, align 4, !tbaa !15
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds %struct.PtrSize, ptr %152, i64 %154
  %156 = getelementptr inbounds %struct.PtrSize, ptr %155, i32 0, i32 1
  store i64 %151, ptr %156, align 8, !tbaa !16
  br label %172

157:                                              ; preds = %126
  %158 = load i64, ptr %7, align 8, !tbaa !23
  %159 = icmp eq i64 %158, 0
  br i1 %159, label %160, label %171

160:                                              ; preds = %157
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = load i32, ptr %6, align 4, !tbaa !15
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds %struct.PtrSize, ptr %161, i64 %163
  %165 = getelementptr inbounds %struct.PtrSize, ptr %164, i32 0, i32 0
  store ptr null, ptr %165, align 8, !tbaa !19
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = load i32, ptr %6, align 4, !tbaa !15
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds %struct.PtrSize, ptr %166, i64 %168
  %170 = getelementptr inbounds %struct.PtrSize, ptr %169, i32 0, i32 1
  store i64 0, ptr %170, align 8, !tbaa !16
  br label %171

171:                                              ; preds = %160, %157
  br label %172

172:                                              ; preds = %171, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %6, align 4, !tbaa !15
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %6, align 4, !tbaa !15
  br label %122, !llvm.loop !24

176:                                              ; preds = %125
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qsort(ptr noundef %177, i64 noundef 25000, i64 noundef 16, ptr noundef @_ZL8cmpAddrsPKvS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !15
  br label %178

178:                                              ; preds = %227, %176
  %179 = load i32, ptr %9, align 4, !tbaa !15
  %180 = icmp slt i32 %179, 24999
  br i1 %180, label %182, label %181

181:                                              ; preds = %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %230

182:                                              ; preds = %178
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = load i32, ptr %9, align 4, !tbaa !15
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds %struct.PtrSize, ptr %183, i64 %185
  %187 = getelementptr inbounds %struct.PtrSize, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !19
  %189 = icmp ne ptr null, %188
  br i1 %189, label %190, label %226

190:                                              ; preds = %182
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = load i32, ptr %9, align 4, !tbaa !15
  %193 = add nsw i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds %struct.PtrSize, ptr %191, i64 %194
  %196 = getelementptr inbounds %struct.PtrSize, ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !19
  %198 = icmp ne ptr null, %197
  br i1 %198, label %199, label %226

199:                                              ; preds = %190
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = load i32, ptr %9, align 4, !tbaa !15
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds %struct.PtrSize, ptr %200, i64 %202
  %204 = getelementptr inbounds %struct.PtrSize, ptr %203, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8, !tbaa !19
  %206 = ptrtoint ptr %205 to i64
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  %208 = load i32, ptr %9, align 4, !tbaa !15
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds %struct.PtrSize, ptr %207, i64 %209
  %211 = getelementptr inbounds %struct.PtrSize, ptr %210, i32 0, i32 1
  %212 = load i64, ptr %211, align 8, !tbaa !16
  %213 = add i64 %206, %212
  %214 = load ptr, ptr %3, align 8, !tbaa !5
  %215 = load i32, ptr %9, align 4, !tbaa !15
  %216 = add nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %struct.PtrSize, ptr %214, i64 %217
  %219 = getelementptr inbounds %struct.PtrSize, ptr %218, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !19
  %221 = ptrtoint ptr %220 to i64
  %222 = icmp ule i64 %213, %221
  br i1 %222, label %223, label %224

223:                                              ; preds = %199
  br label %225

224:                                              ; preds = %199
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 654, ptr noundef @.str.57, ptr noundef @.str.58)
  br label %225

225:                                              ; preds = %224, %223
  br label %226

226:                                              ; preds = %225, %190, %182
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %9, align 4, !tbaa !15
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %9, align 4, !tbaa !15
  br label %178, !llvm.loop !25

230:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !15
  br label %231

231:                                              ; preds = %243, %230
  %232 = load i32, ptr %10, align 4, !tbaa !15
  %233 = icmp slt i32 %232, 25000
  br i1 %233, label %235, label %234

234:                                              ; preds = %231
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %246

235:                                              ; preds = %231
  %236 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = load i32, ptr %10, align 4, !tbaa !15
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds %struct.PtrSize, ptr %237, i64 %239
  %241 = getelementptr inbounds %struct.PtrSize, ptr %240, i32 0, i32 0
  %242 = load ptr, ptr %241, align 8, !tbaa !19
  call void %236(ptr noundef %242)
  br label %243

243:                                              ; preds = %235
  %244 = load i32, ptr %10, align 4, !tbaa !15
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %10, align 4, !tbaa !15
  br label %231, !llvm.loop !26

246:                                              ; preds = %234
  %247 = getelementptr inbounds %class.CMemTest, ptr %14, i32 0, i32 1
  %248 = load i8, ptr %247, align 4, !tbaa !9, !range !13, !noundef !14
  %249 = trunc i8 %248 to i1
  br i1 %249, label %250, label %252

250:                                              ; preds = %246
  %251 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 661, ptr noundef @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %251, ptr noundef @.str.60)
  br label %252

252:                                              ; preds = %250, %246
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !15
  br label %253

253:                                              ; preds = %278, %252
  %254 = load i32, ptr %11, align 4, !tbaa !15
  %255 = icmp slt i32 %254, 25000
  br i1 %255, label %257, label %256

256:                                              ; preds = %253
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %281

257:                                              ; preds = %253
  %258 = call i32 @rand() #5
  %259 = sext i32 %258 to i64
  %260 = urem i64 %259, 1000
  %261 = load ptr, ptr %3, align 8, !tbaa !5
  %262 = load i32, ptr %11, align 4, !tbaa !15
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds %struct.PtrSize, ptr %261, i64 %263
  %265 = getelementptr inbounds %struct.PtrSize, ptr %264, i32 0, i32 1
  store i64 %260, ptr %265, align 8, !tbaa !16
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = load i32, ptr %11, align 4, !tbaa !15
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds %struct.PtrSize, ptr %266, i64 %268
  %270 = getelementptr inbounds %struct.PtrSize, ptr %269, i32 0, i32 1
  %271 = load i64, ptr %270, align 8, !tbaa !16
  %272 = call noundef ptr @_Z7Tcallocmm(i64 noundef %271, i64 noundef 1)
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  %274 = load i32, ptr %11, align 4, !tbaa !15
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds %struct.PtrSize, ptr %273, i64 %275
  %277 = getelementptr inbounds %struct.PtrSize, ptr %276, i32 0, i32 0
  store ptr %272, ptr %277, align 8, !tbaa !19
  br label %278

278:                                              ; preds = %257
  %279 = load i32, ptr %11, align 4, !tbaa !15
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %11, align 4, !tbaa !15
  br label %253, !llvm.loop !27

281:                                              ; preds = %256
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qsort(ptr noundef %282, i64 noundef 25000, i64 noundef 16, ptr noundef @_ZL8cmpAddrsPKvS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %283

283:                                              ; preds = %332, %281
  %284 = load i32, ptr %12, align 4, !tbaa !15
  %285 = icmp slt i32 %284, 24999
  br i1 %285, label %287, label %286

286:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %335

287:                                              ; preds = %283
  %288 = load ptr, ptr %3, align 8, !tbaa !5
  %289 = load i32, ptr %12, align 4, !tbaa !15
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds %struct.PtrSize, ptr %288, i64 %290
  %292 = getelementptr inbounds %struct.PtrSize, ptr %291, i32 0, i32 0
  %293 = load ptr, ptr %292, align 8, !tbaa !19
  %294 = icmp ne ptr null, %293
  br i1 %294, label %295, label %331

295:                                              ; preds = %287
  %296 = load ptr, ptr %3, align 8, !tbaa !5
  %297 = load i32, ptr %12, align 4, !tbaa !15
  %298 = add nsw i32 %297, 1
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds %struct.PtrSize, ptr %296, i64 %299
  %301 = getelementptr inbounds %struct.PtrSize, ptr %300, i32 0, i32 0
  %302 = load ptr, ptr %301, align 8, !tbaa !19
  %303 = icmp ne ptr null, %302
  br i1 %303, label %304, label %331

304:                                              ; preds = %295
  %305 = load ptr, ptr %3, align 8, !tbaa !5
  %306 = load i32, ptr %12, align 4, !tbaa !15
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds %struct.PtrSize, ptr %305, i64 %307
  %309 = getelementptr inbounds %struct.PtrSize, ptr %308, i32 0, i32 0
  %310 = load ptr, ptr %309, align 8, !tbaa !19
  %311 = ptrtoint ptr %310 to i64
  %312 = load ptr, ptr %3, align 8, !tbaa !5
  %313 = load i32, ptr %12, align 4, !tbaa !15
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds %struct.PtrSize, ptr %312, i64 %314
  %316 = getelementptr inbounds %struct.PtrSize, ptr %315, i32 0, i32 1
  %317 = load i64, ptr %316, align 8, !tbaa !16
  %318 = add i64 %311, %317
  %319 = load ptr, ptr %3, align 8, !tbaa !5
  %320 = load i32, ptr %12, align 4, !tbaa !15
  %321 = add nsw i32 %320, 1
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds %struct.PtrSize, ptr %319, i64 %322
  %324 = getelementptr inbounds %struct.PtrSize, ptr %323, i32 0, i32 0
  %325 = load ptr, ptr %324, align 8, !tbaa !19
  %326 = ptrtoint ptr %325 to i64
  %327 = icmp ule i64 %318, %326
  br i1 %327, label %328, label %329

328:                                              ; preds = %304
  br label %330

329:                                              ; preds = %304
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 673, ptr noundef @.str.57, ptr noundef @.str.58)
  br label %330

330:                                              ; preds = %329, %328
  br label %331

331:                                              ; preds = %330, %295, %287
  br label %332

332:                                              ; preds = %331
  %333 = load i32, ptr %12, align 4, !tbaa !15
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %12, align 4, !tbaa !15
  br label %283, !llvm.loop !28

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

336:                                              ; preds = %348, %335
  %337 = load i32, ptr %13, align 4, !tbaa !15
  %338 = icmp slt i32 %337, 25000
  br i1 %338, label %340, label %339

339:                                              ; preds = %336
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %351

340:                                              ; preds = %336
  %341 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %342 = load ptr, ptr %3, align 8, !tbaa !5
  %343 = load i32, ptr %13, align 4, !tbaa !15
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds %struct.PtrSize, ptr %342, i64 %344
  %346 = getelementptr inbounds %struct.PtrSize, ptr %345, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !19
  call void %341(ptr noundef %347)
  br label %348

348:                                              ; preds = %340
  %349 = load i32, ptr %13, align 4, !tbaa !15
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %13, align 4, !tbaa !15
  br label %336, !llvm.loop !29

351:                                              ; preds = %339
  %352 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %353 = load ptr, ptr %3, align 8, !tbaa !5
  call void %352(ptr noundef %353)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

; Function Attrs: nounwind
declare i32 @rand() #3

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 4}
!10 = !{!"_ZTS8CMemTest", !11, i64 0, !12, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !18, i64 8}
!17 = !{!"_ZTS7PtrSize", !6, i64 0, !18, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!17, !6, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!18, !18, i64 0}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}
!27 = distinct !{!27, !21}
!28 = distinct !{!28, !21}
!29 = distinct !{!29, !21}


; 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.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%struct.PtrSize = type { ptr, i64 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@.str = external hidden unnamed_addr constant [98 x i8], align 1
@Tfree = external dso_local local_unnamed_addr global ptr, align 8
@__FUNCTION__._ZN8CMemTest9AddrArifmEv = external hidden unnamed_addr constant [10 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, ...) local_unnamed_addr #1 align 2

; 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 uwtable
declare dso_local noundef ptr @_Z8TreallocPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7Tmallocm(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7Tcallocmm(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8CMemTest9AddrArifmEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %0) local_unnamed_addr #1 align 2 {
  %2 = tail call noundef ptr @_Z7Tmallocm(i64 noundef 400000)
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load i8, ptr %3, align 4, !tbaa !5, !range !12, !noundef !13
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %8

6:                                                ; preds = %1
  %7 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 618, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef nonnull @.str.54)
  %.pre = load i8, ptr %3, align 4, !tbaa !5, !range !12
  br label %8

8:                                                ; preds = %6, %1
  %9 = phi i8 [ %.pre, %6 ], [ %4, %1 ]
  %10 = trunc nuw i8 %9 to i1
  br i1 %10, label %11, label %13

11:                                               ; preds = %8
  %12 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 619, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %12, ptr noundef nonnull @.str.55)
  br label %13

13:                                               ; preds = %11, %8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %14, label %.preheader148

14:                                               ; preds = %13
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 620, ptr noundef nonnull @.str.56, ptr noundef null)
  br label %.preheader148

.preheader148:                                    ; preds = %13, %14
  br label %16

15:                                               ; preds = %16
  tail call void @qsort(ptr noundef nonnull %2, i64 noundef 25000, i64 noundef 16, ptr noundef nonnull @_ZL8cmpAddrsPKvS0_)
  br label %26

16:                                               ; preds = %.preheader148, %16
  %indvars.iv = phi i64 [ %indvars.iv.next, %16 ], [ 0, %.preheader148 ]
  %17 = tail call i32 @rand() #5
  %18 = sext i32 %17 to i64
  %19 = urem i64 %18, 1000
  %20 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  store i64 %19, ptr %21, align 8, !tbaa !14
  %22 = tail call noundef ptr @_Z7Tmallocm(i64 noundef %19)
  store ptr %22, ptr %20, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 25000
  br i1 %exitcond.not, label %15, label %16, !llvm.loop !18

23:                                               ; preds = %39
  %24 = load i8, ptr %3, align 4, !tbaa !5, !range !12, !noundef !13
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %40, label %.preheader147

.preheader147:                                    ; preds = %40, %23
  br label %43

26:                                               ; preds = %15, %39
  %indvars.iv118 = phi i64 [ 0, %15 ], [ %indvars.iv.next119, %39 ]
  %27 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv118
  %28 = load ptr, ptr %27, align 8, !tbaa !17
  %.not105 = icmp eq ptr %28, null
  br i1 %.not105, label %39, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %27, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %.not106 = icmp eq ptr %31, null
  br i1 %.not106, label %39, label %32

32:                                               ; preds = %29
  %33 = ptrtoint ptr %28 to i64
  %34 = getelementptr inbounds i8, ptr %27, i64 8
  %35 = load i64, ptr %34, align 8, !tbaa !14
  %36 = add i64 %35, %33
  %37 = ptrtoint ptr %31 to i64
  %.not107 = icmp ugt i64 %36, %37
  br i1 %.not107, label %38, label %39

38:                                               ; preds = %32
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 632, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.58)
  br label %39

39:                                               ; preds = %26, %29, %32, %38
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next119, 24999
  br i1 %exitcond121.not, label %23, label %26, !llvm.loop !20

40:                                               ; preds = %23
  %41 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 635, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %41, ptr noundef nonnull @.str.59)
  br label %.preheader147

42:                                               ; preds = %54
  tail call void @qsort(ptr noundef nonnull %2, i64 noundef 25000, i64 noundef 16, ptr noundef nonnull @_ZL8cmpAddrsPKvS0_)
  br label %55

43:                                               ; preds = %.preheader147, %54
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %54 ], [ 0, %.preheader147 ]
  %44 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv122
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !14
  %47 = shl i64 %46, 1
  %48 = load ptr, ptr %44, align 8, !tbaa !17
  %49 = tail call noundef ptr @_Z8TreallocPvm(ptr noundef %48, i64 noundef %47)
  %.not104 = icmp eq ptr %49, null
  br i1 %.not104, label %51, label %50

50:                                               ; preds = %43
  store ptr %49, ptr %44, align 8, !tbaa !17
  store i64 %47, ptr %45, align 8, !tbaa !14
  br label %54

51:                                               ; preds = %43
  %52 = icmp eq i64 %47, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %44, i8 0, i64 16, i1 false)
  br label %54

54:                                               ; preds = %51, %53, %50
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next123, 25000
  br i1 %exitcond125.not, label %42, label %43, !llvm.loop !21

55:                                               ; preds = %42, %68
  %indvars.iv126 = phi i64 [ 0, %42 ], [ %indvars.iv.next127, %68 ]
  %56 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv126
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %.not101 = icmp eq ptr %57, null
  br i1 %.not101, label %68, label %58

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %56, i64 16
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %.not102 = icmp eq ptr %60, null
  br i1 %.not102, label %68, label %61

61:                                               ; preds = %58
  %62 = ptrtoint ptr %57 to i64
  %63 = getelementptr inbounds i8, ptr %56, i64 8
  %64 = load i64, ptr %63, align 8, !tbaa !14
  %65 = add i64 %64, %62
  %66 = ptrtoint ptr %60 to i64
  %.not103 = icmp ugt i64 %65, %66
  br i1 %.not103, label %67, label %68

67:                                               ; preds = %61
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 654, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.58)
  br label %68

68:                                               ; preds = %55, %58, %61, %67
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next127, 24999
  br i1 %exitcond129.not, label %.preheader108, label %55, !llvm.loop !22

69:                                               ; preds = %.preheader108
  %70 = load i8, ptr %3, align 4, !tbaa !5, !range !12, !noundef !13
  %71 = trunc nuw i8 %70 to i1
  br i1 %71, label %75, label %.preheader146

.preheader146:                                    ; preds = %75, %69
  br label %78

.preheader108:                                    ; preds = %68, %.preheader108
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %.preheader108 ], [ 0, %68 ]
  %72 = load ptr, ptr @Tfree, align 8, !tbaa !23
  %73 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv130
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  tail call void %72(ptr noundef %74)
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond133.not = icmp eq i64 %indvars.iv.next131, 25000
  br i1 %exitcond133.not, label %69, label %.preheader108, !llvm.loop !24

75:                                               ; preds = %69
  %76 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 661, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest9AddrArifmEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %76, ptr noundef nonnull @.str.60)
  br label %.preheader146

77:                                               ; preds = %78
  tail call void @qsort(ptr noundef nonnull %2, i64 noundef 25000, i64 noundef 16, ptr noundef nonnull @_ZL8cmpAddrsPKvS0_)
  br label %85

78:                                               ; preds = %.preheader146, %78
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %78 ], [ 0, %.preheader146 ]
  %79 = tail call i32 @rand() #5
  %80 = sext i32 %79 to i64
  %81 = urem i64 %80, 1000
  %82 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv134
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  store i64 %81, ptr %83, align 8, !tbaa !14
  %84 = tail call noundef ptr @_Z7Tcallocmm(i64 noundef %81, i64 noundef 1)
  store ptr %84, ptr %82, align 8, !tbaa !17
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %exitcond137.not = icmp eq i64 %indvars.iv.next135, 25000
  br i1 %exitcond137.not, label %77, label %78, !llvm.loop !25

85:                                               ; preds = %77, %98
  %indvars.iv138 = phi i64 [ 0, %77 ], [ %indvars.iv.next139, %98 ]
  %86 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv138
  %87 = load ptr, ptr %86, align 8, !tbaa !17
  %.not98 = icmp eq ptr %87, null
  br i1 %.not98, label %98, label %88

88:                                               ; preds = %85
  %89 = getelementptr inbounds i8, ptr %86, i64 16
  %90 = load ptr, ptr %89, align 8, !tbaa !17
  %.not99 = icmp eq ptr %90, null
  br i1 %.not99, label %98, label %91

91:                                               ; preds = %88
  %92 = ptrtoint ptr %87 to i64
  %93 = getelementptr inbounds i8, ptr %86, i64 8
  %94 = load i64, ptr %93, align 8, !tbaa !14
  %95 = add i64 %94, %92
  %96 = ptrtoint ptr %90 to i64
  %.not100 = icmp ugt i64 %95, %96
  br i1 %.not100, label %97, label %98

97:                                               ; preds = %91
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 673, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.58)
  br label %98

98:                                               ; preds = %85, %88, %91, %97
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond141.not = icmp eq i64 %indvars.iv.next139, 24999
  br i1 %exitcond141.not, label %.preheader, label %85, !llvm.loop !26

99:                                               ; preds = %.preheader
  %100 = load ptr, ptr @Tfree, align 8, !tbaa !23
  tail call void %100(ptr noundef nonnull %2)
  ret void

.preheader:                                       ; preds = %98, %.preheader
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %.preheader ], [ 0, %98 ]
  %101 = load ptr, ptr @Tfree, align 8, !tbaa !23
  %102 = getelementptr inbounds %struct.PtrSize, ptr %2, i64 %indvars.iv142
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  tail call void %101(ptr noundef %103)
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next143, 25000
  br i1 %exitcond145.not, label %99, label %.preheader, !llvm.loop !27
}

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

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

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

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

attributes #0 = { 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 #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree "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: write) }
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, !10, i64 4}
!6 = !{!"_ZTS8CMemTest", !7, i64 0, !10, i64 4, !11, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!15, !16, i64 8}
!15 = !{!"_ZTS7PtrSize", !11, i64 0, !16, i64 8}
!16 = !{!"long", !8, i64 0}
!17 = !{!15, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass