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

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

@_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
@error_occurred = external dso_local global i8, align 1
@.str.55 = external hidden unnamed_addr constant [11 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
@.str.63 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL8strError = external hidden constant [7 x i8], align 1
@_ZL5strOk = external hidden constant [5 x i8], align 1
@__FUNCTION__._ZN8CMemTest13UniquePointerEv = external hidden unnamed_addr constant [14 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [30 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8CMemTest17ShouldReportErrorEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

22:                                               ; preds = %1
  %23 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 923, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %23, ptr noundef @.str.76)
  br label %24

24:                                               ; preds = %22, %1
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %31

27:                                               ; preds = %24
  %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, %24
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 924, ptr noundef @.str.77, ptr noundef null)
  br label %32

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

33:                                               ; preds = %79, %32
  %34 = load i32, ptr %5, align 4, !tbaa !16
  %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 %5) #5
  br label %82

37:                                               ; preds = %33
  %38 = call i32 @rand() #5
  %39 = sext i32 %38 to i64
  %40 = urem i64 %39, 1000
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load i32, ptr %5, align 4, !tbaa !16
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i64, ptr %41, i64 %43
  store i64 %40, ptr %44, align 8, !tbaa !17
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !16
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i64, ptr %45, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !17
  %50 = mul i64 %49, 4
  %51 = call noundef ptr @_Z7Tmallocm(i64 noundef %50)
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load i32, ptr %5, align 4, !tbaa !16
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  store ptr %51, ptr %55, align 8, !tbaa !5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = load i32, ptr %5, align 4, !tbaa !16
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = icmp eq ptr null, %60
  br i1 %61, label %62, label %67

62:                                               ; preds = %37
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load i32, ptr %5, align 4, !tbaa !16
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i64, ptr %63, i64 %65
  store i64 0, ptr %66, align 8, !tbaa !17
  br label %67

67:                                               ; preds = %62, %37
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !16
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds ptr, ptr %68, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !16
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i64, ptr %73, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !17
  %78 = mul i64 4, %77
  call void @llvm.memset.p0.i64(ptr align 4 %72, i8 0, i64 %78, i1 false)
  br label %79

79:                                               ; preds = %67
  %80 = load i32, ptr %5, align 4, !tbaa !16
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %5, align 4, !tbaa !16
  br label %33, !llvm.loop !19

82:                                               ; preds = %36
  %83 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 1
  %84 = load i8, ptr %83, align 4, !tbaa !13, !range !14, !noundef !15
  %85 = trunc i8 %84 to i1
  br i1 %85, label %86, label %88

86:                                               ; preds = %82
  %87 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 936, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %87, ptr noundef @.str.55)
  br label %88

88:                                               ; preds = %86, %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %89

89:                                               ; preds = %136, %88
  %90 = load i32, ptr %6, align 4, !tbaa !16
  %91 = icmp ult i32 %90, 24999
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !16
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds ptr, ptr %94, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load i32, ptr %6, align 4, !tbaa !16
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds i64, ptr %99, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !17
  %104 = mul i64 4, %103
  %105 = call noundef i64 @_Z7NonZeroPvm(ptr noundef %98, i64 noundef %104)
  store i64 %105, ptr %7, align 8, !tbaa !17
  %106 = load i64, ptr %7, align 8, !tbaa !17
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %124

108:                                              ; preds = %93
  %109 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !9
  %111 = add i32 %110, 1
  store i32 %111, ptr %109, align 8, !tbaa !9
  %112 = call noundef zeroext i1 @_ZN8CMemTest17ShouldReportErrorEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
  br i1 %112, label %113, label %123

113:                                              ; preds = %108
  %114 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 942, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = load i32, ptr %6, align 4, !tbaa !16
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i64, ptr %7, align 8, !tbaa !17
  %121 = getelementptr inbounds i8, ptr %119, i64 %120
  %122 = getelementptr inbounds i8, ptr %121, i64 -1
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %114, ptr noundef @.str.78, ptr noundef %122)
  br label %123

123:                                              ; preds = %113, %108
  br label %124

124:                                              ; preds = %123, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !16
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = load i32, ptr %6, align 4, !tbaa !16
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i64, ptr %130, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !17
  %135 = mul i64 4, %134
  call void @llvm.memset.p0.i64(ptr align 4 %129, i8 1, i64 %135, i1 false)
  br label %136

136:                                              ; preds = %124
  %137 = load i32, ptr %6, align 4, !tbaa !16
  %138 = add i32 %137, 1
  store i32 %138, ptr %6, align 4, !tbaa !16
  br label %89, !llvm.loop !21

139:                                              ; preds = %92
  %140 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %145

143:                                              ; preds = %139
  %144 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 946, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %144, ptr noundef @.str.63, ptr noundef @_ZL8strError)
  br label %152

145:                                              ; preds = %139
  %146 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 1
  %147 = load i8, ptr %146, align 4, !tbaa !13, !range !14, !noundef !15
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %151

149:                                              ; preds = %145
  %150 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 947, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %150, ptr noundef @.str.63, ptr noundef @_ZL5strOk)
  br label %151

151:                                              ; preds = %149, %145
  br label %152

152:                                              ; preds = %151, %143
  %153 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %154 = load i32, ptr %153, align 8, !tbaa !9
  %155 = icmp ugt i32 %154, 0
  %156 = zext i1 %155 to i32
  %157 = load i8, ptr @error_occurred, align 1, !tbaa !22, !range !14, !noundef !15
  %158 = trunc i8 %157 to i1
  %159 = zext i1 %158 to i32
  %160 = or i32 %159, %156
  %161 = icmp ne i32 %160, 0
  %162 = zext i1 %161 to i8
  store i8 %162, ptr @error_occurred, align 1, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !16
  br label %163

163:                                              ; preds = %174, %152
  %164 = load i32, ptr %8, align 4, !tbaa !16
  %165 = icmp slt i32 %164, 25000
  br i1 %165, label %167, label %166

166:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %177

167:                                              ; preds = %163
  %168 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = load i32, ptr %8, align 4, !tbaa !16
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds ptr, ptr %169, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  call void %168(ptr noundef %173)
  br label %174

174:                                              ; preds = %167
  %175 = load i32, ptr %8, align 4, !tbaa !16
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %8, align 4, !tbaa !16
  br label %163, !llvm.loop !23

177:                                              ; preds = %166
  %178 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  store i32 0, ptr %178, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !17
  br label %179

179:                                              ; preds = %203, %177
  %180 = load i64, ptr %9, align 8, !tbaa !17
  %181 = icmp slt i64 %180, 25000
  br i1 %181, label %183, label %182

182:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %206

183:                                              ; preds = %179
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = load i64, ptr %9, align 8, !tbaa !17
  %186 = getelementptr inbounds i64, ptr %184, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !17
  %188 = mul i64 %187, 4
  %189 = call noundef ptr @_Z7Tcallocmm(i64 noundef %188, i64 noundef 2)
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = load i64, ptr %9, align 8, !tbaa !17
  %192 = getelementptr inbounds ptr, ptr %190, i64 %191
  store ptr %189, ptr %192, align 8, !tbaa !5
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = load i64, ptr %9, align 8, !tbaa !17
  %195 = getelementptr inbounds ptr, ptr %193, i64 %194
  %196 = load ptr, ptr %195, align 8, !tbaa !5
  %197 = icmp eq ptr null, %196
  br i1 %197, label %198, label %202

198:                                              ; preds = %183
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = load i64, ptr %9, align 8, !tbaa !17
  %201 = getelementptr inbounds i64, ptr %199, i64 %200
  store i64 0, ptr %201, align 8, !tbaa !17
  br label %202

202:                                              ; preds = %198, %183
  br label %203

203:                                              ; preds = %202
  %204 = load i64, ptr %9, align 8, !tbaa !17
  %205 = add nsw i64 %204, 1
  store i64 %205, ptr %9, align 8, !tbaa !17
  br label %179, !llvm.loop !24

206:                                              ; preds = %182
  %207 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 1
  %208 = load i8, ptr %207, align 4, !tbaa !13, !range !14, !noundef !15
  %209 = trunc i8 %208 to i1
  br i1 %209, label %210, label %212

210:                                              ; preds = %206
  %211 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 960, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %211, ptr noundef @.str.60)
  br label %212

212:                                              ; preds = %210, %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !16
  br label %213

213:                                              ; preds = %260, %212
  %214 = load i32, ptr %10, align 4, !tbaa !16
  %215 = icmp slt i32 %214, 24999
  br i1 %215, label %217, label %216

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

217:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = load i32, ptr %10, align 4, !tbaa !16
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds ptr, ptr %218, i64 %220
  %222 = load ptr, ptr %221, align 8, !tbaa !5
  %223 = load ptr, ptr %4, align 8, !tbaa !5
  %224 = load i32, ptr %10, align 4, !tbaa !16
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds i64, ptr %223, i64 %225
  %227 = load i64, ptr %226, align 8, !tbaa !17
  %228 = mul i64 4, %227
  %229 = call noundef i64 @_Z7NonZeroPvm(ptr noundef %222, i64 noundef %228)
  store i64 %229, ptr %11, align 8, !tbaa !17
  %230 = load i64, ptr %11, align 8, !tbaa !17
  %231 = icmp ne i64 %230, 0
  br i1 %231, label %232, label %248

232:                                              ; preds = %217
  %233 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %234 = load i32, ptr %233, align 8, !tbaa !9
  %235 = add i32 %234, 1
  store i32 %235, ptr %233, align 8, !tbaa !9
  %236 = call noundef zeroext i1 @_ZN8CMemTest17ShouldReportErrorEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
  br i1 %236, label %237, label %247

237:                                              ; preds = %232
  %238 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 966, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = load i32, ptr %10, align 4, !tbaa !16
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds ptr, ptr %239, i64 %241
  %243 = load ptr, ptr %242, align 8, !tbaa !5
  %244 = load i64, ptr %11, align 8, !tbaa !17
  %245 = getelementptr inbounds i8, ptr %243, i64 %244
  %246 = getelementptr inbounds i8, ptr %245, i64 -1
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %238, ptr noundef @.str.78, ptr noundef %246)
  br label %247

247:                                              ; preds = %237, %232
  br label %248

248:                                              ; preds = %247, %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %249 = load ptr, ptr %3, align 8, !tbaa !5
  %250 = load i32, ptr %10, align 4, !tbaa !16
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds ptr, ptr %249, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !5
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = load i32, ptr %10, align 4, !tbaa !16
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds i64, ptr %254, i64 %256
  %258 = load i64, ptr %257, align 8, !tbaa !17
  %259 = mul i64 4, %258
  call void @llvm.memset.p0.i64(ptr align 4 %253, i8 1, i64 %259, i1 false)
  br label %260

260:                                              ; preds = %248
  %261 = load i32, ptr %10, align 4, !tbaa !16
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %10, align 4, !tbaa !16
  br label %213, !llvm.loop !25

263:                                              ; preds = %216
  %264 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %265 = load i32, ptr %264, align 8, !tbaa !9
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %267, label %269

267:                                              ; preds = %263
  %268 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 970, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %268, ptr noundef @.str.63, ptr noundef @_ZL8strError)
  br label %276

269:                                              ; preds = %263
  %270 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 1
  %271 = load i8, ptr %270, align 4, !tbaa !13, !range !14, !noundef !15
  %272 = trunc i8 %271 to i1
  br i1 %272, label %273, label %275

273:                                              ; preds = %269
  %274 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 971, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %274, ptr noundef @.str.63, ptr noundef @_ZL5strOk)
  br label %275

275:                                              ; preds = %273, %269
  br label %276

276:                                              ; preds = %275, %267
  %277 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %278 = load i32, ptr %277, align 8, !tbaa !9
  %279 = icmp ugt i32 %278, 0
  %280 = zext i1 %279 to i32
  %281 = load i8, ptr @error_occurred, align 1, !tbaa !22, !range !14, !noundef !15
  %282 = trunc i8 %281 to i1
  %283 = zext i1 %282 to i32
  %284 = or i32 %283, %280
  %285 = icmp ne i32 %284, 0
  %286 = zext i1 %285 to i8
  store i8 %286, ptr @error_occurred, align 1, !tbaa !22
  %287 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  store i32 0, ptr %287, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !16
  br label %288

288:                                              ; preds = %338, %276
  %289 = load i32, ptr %12, align 4, !tbaa !16
  %290 = icmp slt i32 %289, 25000
  br i1 %290, label %292, label %291

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

292:                                              ; preds = %288
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = load i32, ptr %12, align 4, !tbaa !16
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds i64, ptr %293, i64 %295
  %297 = load i64, ptr %296, align 8, !tbaa !17
  %298 = mul i64 %297, 2
  store i64 %298, ptr %296, align 8, !tbaa !17
  %299 = load ptr, ptr %3, align 8, !tbaa !5
  %300 = load i32, ptr %12, align 4, !tbaa !16
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds ptr, ptr %299, i64 %301
  %303 = load ptr, ptr %302, align 8, !tbaa !5
  %304 = load ptr, ptr %4, align 8, !tbaa !5
  %305 = load i32, ptr %12, align 4, !tbaa !16
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds i64, ptr %304, i64 %306
  %308 = load i64, ptr %307, align 8, !tbaa !17
  %309 = mul i64 %308, 4
  %310 = call noundef ptr @_Z8TreallocPvm(ptr noundef %303, i64 noundef %309)
  %311 = load ptr, ptr %3, align 8, !tbaa !5
  %312 = load i32, ptr %12, align 4, !tbaa !16
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds ptr, ptr %311, i64 %313
  store ptr %310, ptr %314, align 8, !tbaa !5
  %315 = load ptr, ptr %3, align 8, !tbaa !5
  %316 = load i32, ptr %12, align 4, !tbaa !16
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds ptr, ptr %315, i64 %317
  %319 = load ptr, ptr %318, align 8, !tbaa !5
  %320 = icmp eq ptr null, %319
  br i1 %320, label %321, label %326

321:                                              ; preds = %292
  %322 = load ptr, ptr %4, align 8, !tbaa !5
  %323 = load i32, ptr %12, align 4, !tbaa !16
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds i64, ptr %322, i64 %324
  store i64 0, ptr %325, align 8, !tbaa !17
  br label %326

326:                                              ; preds = %321, %292
  %327 = load ptr, ptr %3, align 8, !tbaa !5
  %328 = load i32, ptr %12, align 4, !tbaa !16
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds ptr, ptr %327, i64 %329
  %331 = load ptr, ptr %330, align 8, !tbaa !5
  %332 = load ptr, ptr %4, align 8, !tbaa !5
  %333 = load i32, ptr %12, align 4, !tbaa !16
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds i64, ptr %332, i64 %334
  %336 = load i64, ptr %335, align 8, !tbaa !17
  %337 = mul i64 4, %336
  call void @llvm.memset.p0.i64(ptr align 4 %331, i8 0, i64 %337, i1 false)
  br label %338

338:                                              ; preds = %326
  %339 = load i32, ptr %12, align 4, !tbaa !16
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %12, align 4, !tbaa !16
  br label %288, !llvm.loop !26

341:                                              ; preds = %291
  %342 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 1
  %343 = load i8, ptr %342, align 4, !tbaa !13, !range !14, !noundef !15
  %344 = trunc i8 %343 to i1
  br i1 %344, label %345, label %347

345:                                              ; preds = %341
  %346 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 985, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %346, ptr noundef @.str.59)
  br label %347

347:                                              ; preds = %345, %341
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !16
  br label %348

348:                                              ; preds = %382, %347
  %349 = load i32, ptr %13, align 4, !tbaa !16
  %350 = icmp slt i32 %349, 24999
  br i1 %350, label %352, label %351

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

352:                                              ; preds = %348
  %353 = load ptr, ptr %3, align 8, !tbaa !5
  %354 = load i32, ptr %13, align 4, !tbaa !16
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds ptr, ptr %353, i64 %355
  %357 = load ptr, ptr %356, align 8, !tbaa !5
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = load i32, ptr %13, align 4, !tbaa !16
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds i64, ptr %358, i64 %360
  %362 = load i64, ptr %361, align 8, !tbaa !17
  %363 = mul i64 4, %362
  %364 = call noundef i64 @_Z7NonZeroPvm(ptr noundef %357, i64 noundef %363)
  %365 = icmp ne i64 %364, 0
  br i1 %365, label %366, label %370

366:                                              ; preds = %352
  %367 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %368 = load i32, ptr %367, align 8, !tbaa !9
  %369 = add i32 %368, 1
  store i32 %369, ptr %367, align 8, !tbaa !9
  br label %370

370:                                              ; preds = %366, %352
  %371 = load ptr, ptr %3, align 8, !tbaa !5
  %372 = load i32, ptr %13, align 4, !tbaa !16
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds ptr, ptr %371, i64 %373
  %375 = load ptr, ptr %374, align 8, !tbaa !5
  %376 = load ptr, ptr %4, align 8, !tbaa !5
  %377 = load i32, ptr %13, align 4, !tbaa !16
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds i64, ptr %376, i64 %378
  %380 = load i64, ptr %379, align 8, !tbaa !17
  %381 = mul i64 4, %380
  call void @llvm.memset.p0.i64(ptr align 4 %375, i8 1, i64 %381, i1 false)
  br label %382

382:                                              ; preds = %370
  %383 = load i32, ptr %13, align 4, !tbaa !16
  %384 = add nsw i32 %383, 1
  store i32 %384, ptr %13, align 4, !tbaa !16
  br label %348, !llvm.loop !27

385:                                              ; preds = %351
  %386 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %387 = load i32, ptr %386, align 8, !tbaa !9
  %388 = icmp ne i32 %387, 0
  br i1 %388, label %389, label %391

389:                                              ; preds = %385
  %390 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 992, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %390, ptr noundef @.str.63, ptr noundef @_ZL8strError)
  br label %398

391:                                              ; preds = %385
  %392 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 1
  %393 = load i8, ptr %392, align 4, !tbaa !13, !range !14, !noundef !15
  %394 = trunc i8 %393 to i1
  br i1 %394, label %395, label %397

395:                                              ; preds = %391
  %396 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 993, ptr noundef @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %396, ptr noundef @.str.63, ptr noundef @_ZL5strOk)
  br label %397

397:                                              ; preds = %395, %391
  br label %398

398:                                              ; preds = %397, %389
  %399 = getelementptr inbounds %class.CMemTest, ptr %15, i32 0, i32 0
  %400 = load i32, ptr %399, align 8, !tbaa !9
  %401 = icmp ugt i32 %400, 0
  %402 = zext i1 %401 to i32
  %403 = load i8, ptr @error_occurred, align 1, !tbaa !22, !range !14, !noundef !15
  %404 = trunc i8 %403 to i1
  %405 = zext i1 %404 to i32
  %406 = or i32 %405, %402
  %407 = icmp ne i32 %406, 0
  %408 = zext i1 %407 to i8
  store i8 %408, ptr @error_occurred, align 1, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !16
  br label %409

409:                                              ; preds = %420, %398
  %410 = load i32, ptr %14, align 4, !tbaa !16
  %411 = icmp slt i32 %410, 25000
  br i1 %411, label %413, label %412

412:                                              ; preds = %409
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %423

413:                                              ; preds = %409
  %414 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %415 = load ptr, ptr %3, align 8, !tbaa !5
  %416 = load i32, ptr %14, align 4, !tbaa !16
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds ptr, ptr %415, i64 %417
  %419 = load ptr, ptr %418, align 8, !tbaa !5
  call void %414(ptr noundef %419)
  br label %420

420:                                              ; preds = %413
  %421 = load i32, ptr %14, align 4, !tbaa !16
  %422 = add nsw i32 %421, 1
  store i32 %422, ptr %14, align 4, !tbaa !16
  br label %409, !llvm.loop !28

423:                                              ; preds = %412
  %424 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %425 = load ptr, ptr %4, align 8, !tbaa !5
  call void %424(ptr noundef %425)
  %426 = load ptr, ptr @Tfree, align 8, !tbaa !5
  %427 = load ptr, ptr %3, align 8, !tbaa !5
  call void %426(ptr noundef %427)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

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


; 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] }>

@_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
@error_occurred = external dso_local local_unnamed_addr global i8, align 1
@.str.55 = external hidden unnamed_addr constant [11 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
@.str.63 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZL8strError = external hidden constant [7 x i8], align 1
@_ZL5strOk = external hidden constant [5 x i8], align 1
@__FUNCTION__._ZN8CMemTest13UniquePointerEv = external hidden unnamed_addr constant [14 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [30 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8CMemTest17ShouldReportErrorEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

7:                                                ; preds = %1
  %8 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 923, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %8, ptr noundef nonnull @.str.76)
  br label %9

9:                                                ; preds = %7, %1
  %10 = icmp ne ptr %3, null
  %11 = icmp ne ptr %2, null
  %or.cond = and i1 %11, %10
  br i1 %or.cond, label %.preheader154, label %12

12:                                               ; preds = %9
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 924, ptr noundef nonnull @.str.77, ptr noundef null)
  br label %.preheader154

.preheader154:                                    ; preds = %9, %12
  br label %16

13:                                               ; preds = %26
  %14 = load i8, ptr %4, align 4, !tbaa !12, !range !13, !noundef !14
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %29, label %.preheader153

.preheader153:                                    ; preds = %29, %13
  br label %33

16:                                               ; preds = %.preheader154, %26
  %indvars.iv = phi i64 [ %indvars.iv.next, %26 ], [ 0, %.preheader154 ]
  %17 = tail call i32 @rand() #4
  %18 = sext i32 %17 to i64
  %19 = urem i64 %18, 1000
  %20 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv
  store i64 %19, ptr %20, align 8, !tbaa !15
  %21 = shl nuw nsw i64 %19, 2
  %22 = tail call noundef ptr @_Z7Tmallocm(i64 noundef %21)
  %23 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  store ptr %22, ptr %23, align 8, !tbaa !17
  %24 = icmp eq ptr %22, null
  br i1 %24, label %25, label %._crit_edge

._crit_edge:                                      ; preds = %16
  %.pre = load i64, ptr %20, align 8, !tbaa !15
  br label %26

25:                                               ; preds = %16
  store i64 0, ptr %20, align 8, !tbaa !15
  br label %26

26:                                               ; preds = %._crit_edge, %25
  %27 = phi i64 [ %.pre, %._crit_edge ], [ 0, %25 ]
  %28 = shl i64 %27, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %22, i8 0, i64 %28, i1 false)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 25000
  br i1 %exitcond.not, label %13, label %16, !llvm.loop !18

29:                                               ; preds = %13
  %30 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 936, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %30, ptr noundef nonnull @.str.55)
  br label %.preheader153

31:                                               ; preds = %49
  %32 = load i32, ptr %0, align 8, !tbaa !5
  %.not = icmp eq i32 %32, 0
  br i1 %.not, label %53, label %.sink.split

33:                                               ; preds = %.preheader153, %49
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %49 ], [ 0, %.preheader153 ]
  %34 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv118
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv118
  %37 = load i64, ptr %36, align 8, !tbaa !15
  %38 = shl i64 %37, 2
  %39 = tail call noundef i64 @_Z7NonZeroPvm(ptr noundef %35, i64 noundef %38)
  %.not108 = icmp eq i64 %39, 0
  br i1 %.not108, label %49, label %40

40:                                               ; preds = %33
  %41 = load i32, ptr %0, align 8, !tbaa !5
  %42 = add i32 %41, 1
  store i32 %42, ptr %0, align 8, !tbaa !5
  %43 = tail call noundef zeroext i1 @_ZN8CMemTest17ShouldReportErrorEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  br i1 %43, label %44, label %49

44:                                               ; preds = %40
  %45 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 942, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  %46 = load ptr, ptr %34, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %46, i64 %39
  %48 = getelementptr inbounds i8, ptr %47, i64 -1
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %45, ptr noundef nonnull @.str.78, ptr noundef nonnull %48)
  br label %49

49:                                               ; preds = %40, %44, %33
  %50 = load ptr, ptr %34, align 8, !tbaa !17
  %51 = load i64, ptr %36, align 8, !tbaa !15
  %52 = shl i64 %51, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %50, i8 1, i64 %52, i1 false)
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next119, 24999
  br i1 %exitcond121.not, label %31, label %33, !llvm.loop !20

53:                                               ; preds = %31
  %54 = load i8, ptr %4, align 4, !tbaa !12, !range !13, !noundef !14
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %.sink.split, label %57

.sink.split:                                      ; preds = %53, %31
  %.sink145 = phi i64 [ 946, %31 ], [ 947, %53 ]
  %_ZL5strOk.sink = phi ptr [ @_ZL8strError, %31 ], [ @_ZL5strOk, %53 ]
  %56 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef %.sink145, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %56, ptr noundef nonnull @.str.63, ptr noundef nonnull %_ZL5strOk.sink)
  br label %57

57:                                               ; preds = %.sink.split, %53
  %58 = load i32, ptr %0, align 8, !tbaa !5
  %59 = icmp ne i32 %58, 0
  %60 = load i8, ptr @error_occurred, align 1, !tbaa !21, !range !13, !noundef !14
  %61 = zext i1 %59 to i8
  %62 = or i8 %60, %61
  store i8 %62, ptr @error_occurred, align 1, !tbaa !21
  br label %64

63:                                               ; preds = %64
  store i32 0, ptr %0, align 8, !tbaa !5
  br label %71

64:                                               ; preds = %57, %64
  %indvars.iv122 = phi i64 [ 0, %57 ], [ %indvars.iv.next123, %64 ]
  %65 = load ptr, ptr @Tfree, align 8, !tbaa !17
  %66 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv122
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  tail call void %65(ptr noundef %67)
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next123, 25000
  br i1 %exitcond125.not, label %63, label %64, !llvm.loop !22

68:                                               ; preds = %79
  %69 = load i8, ptr %4, align 4, !tbaa !12, !range !13, !noundef !14
  %70 = trunc nuw i8 %69 to i1
  br i1 %70, label %81, label %.preheader152

.preheader152:                                    ; preds = %81, %68
  br label %85

71:                                               ; preds = %63, %79
  %.099112 = phi i64 [ 0, %63 ], [ %80, %79 ]
  %72 = getelementptr inbounds i64, ptr %3, i64 %.099112
  %73 = load i64, ptr %72, align 8, !tbaa !15
  %74 = shl i64 %73, 2
  %75 = tail call noundef ptr @_Z7Tcallocmm(i64 noundef %74, i64 noundef 2)
  %76 = getelementptr inbounds ptr, ptr %2, i64 %.099112
  store ptr %75, ptr %76, align 8, !tbaa !17
  %77 = icmp eq ptr %75, null
  br i1 %77, label %78, label %79

78:                                               ; preds = %71
  store i64 0, ptr %72, align 8, !tbaa !15
  br label %79

79:                                               ; preds = %71, %78
  %80 = add nuw nsw i64 %.099112, 1
  %exitcond126.not = icmp eq i64 %80, 25000
  br i1 %exitcond126.not, label %68, label %71, !llvm.loop !23

81:                                               ; preds = %68
  %82 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 960, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %82, ptr noundef nonnull @.str.60)
  br label %.preheader152

83:                                               ; preds = %101
  %84 = load i32, ptr %0, align 8, !tbaa !5
  %.not104 = icmp eq i32 %84, 0
  br i1 %.not104, label %105, label %.sink.split146

85:                                               ; preds = %.preheader152, %101
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %101 ], [ 0, %.preheader152 ]
  %86 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv127
  %87 = load ptr, ptr %86, align 8, !tbaa !17
  %88 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv127
  %89 = load i64, ptr %88, align 8, !tbaa !15
  %90 = shl i64 %89, 2
  %91 = tail call noundef i64 @_Z7NonZeroPvm(ptr noundef %87, i64 noundef %90)
  %.not107 = icmp eq i64 %91, 0
  br i1 %.not107, label %101, label %92

92:                                               ; preds = %85
  %93 = load i32, ptr %0, align 8, !tbaa !5
  %94 = add i32 %93, 1
  store i32 %94, ptr %0, align 8, !tbaa !5
  %95 = tail call noundef zeroext i1 @_ZN8CMemTest17ShouldReportErrorEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  br i1 %95, label %96, label %101

96:                                               ; preds = %92
  %97 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 966, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  %98 = load ptr, ptr %86, align 8, !tbaa !17
  %99 = getelementptr inbounds i8, ptr %98, i64 %91
  %100 = getelementptr inbounds i8, ptr %99, i64 -1
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %97, ptr noundef nonnull @.str.78, ptr noundef nonnull %100)
  br label %101

101:                                              ; preds = %92, %96, %85
  %102 = load ptr, ptr %86, align 8, !tbaa !17
  %103 = load i64, ptr %88, align 8, !tbaa !15
  %104 = shl i64 %103, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %102, i8 1, i64 %104, i1 false)
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond130.not = icmp eq i64 %indvars.iv.next128, 24999
  br i1 %exitcond130.not, label %83, label %85, !llvm.loop !24

105:                                              ; preds = %83
  %106 = load i8, ptr %4, align 4, !tbaa !12, !range !13, !noundef !14
  %107 = trunc nuw i8 %106 to i1
  br i1 %107, label %.sink.split146, label %109

.sink.split146:                                   ; preds = %105, %83
  %.sink148 = phi i64 [ 970, %83 ], [ 971, %105 ]
  %_ZL5strOk.sink147 = phi ptr [ @_ZL8strError, %83 ], [ @_ZL5strOk, %105 ]
  %108 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef %.sink148, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %108, ptr noundef nonnull @.str.63, ptr noundef nonnull %_ZL5strOk.sink147)
  br label %109

109:                                              ; preds = %.sink.split146, %105
  %110 = load i32, ptr %0, align 8, !tbaa !5
  %111 = icmp ne i32 %110, 0
  %112 = load i8, ptr @error_occurred, align 1, !tbaa !21, !range !13, !noundef !14
  %113 = zext i1 %111 to i8
  %114 = or i8 %112, %113
  store i8 %114, ptr @error_occurred, align 1, !tbaa !21
  store i32 0, ptr %0, align 8, !tbaa !5
  br label %118

115:                                              ; preds = %128
  %116 = load i8, ptr %4, align 4, !tbaa !12, !range !13, !noundef !14
  %117 = trunc nuw i8 %116 to i1
  br i1 %117, label %131, label %.preheader

.preheader:                                       ; preds = %131, %115
  br label %135

118:                                              ; preds = %109, %128
  %indvars.iv131 = phi i64 [ 0, %109 ], [ %indvars.iv.next132, %128 ]
  %119 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv131
  %120 = load i64, ptr %119, align 8, !tbaa !15
  %121 = shl i64 %120, 1
  store i64 %121, ptr %119, align 8, !tbaa !15
  %122 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv131
  %123 = load ptr, ptr %122, align 8, !tbaa !17
  %124 = shl i64 %120, 3
  %125 = tail call noundef ptr @_Z8TreallocPvm(ptr noundef %123, i64 noundef %124)
  store ptr %125, ptr %122, align 8, !tbaa !17
  %126 = icmp eq ptr %125, null
  br i1 %126, label %127, label %._crit_edge143

._crit_edge143:                                   ; preds = %118
  %.pre144 = load i64, ptr %119, align 8, !tbaa !15
  br label %128

127:                                              ; preds = %118
  store i64 0, ptr %119, align 8, !tbaa !15
  br label %128

128:                                              ; preds = %._crit_edge143, %127
  %129 = phi i64 [ %.pre144, %._crit_edge143 ], [ 0, %127 ]
  %130 = shl i64 %129, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %125, i8 0, i64 %130, i1 false)
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next132, 25000
  br i1 %exitcond134.not, label %115, label %118, !llvm.loop !25

131:                                              ; preds = %115
  %132 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 985, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %132, ptr noundef nonnull @.str.59)
  br label %.preheader

133:                                              ; preds = %145
  %134 = load i32, ptr %0, align 8, !tbaa !5
  %.not105 = icmp eq i32 %134, 0
  br i1 %.not105, label %149, label %.sink.split149

135:                                              ; preds = %.preheader, %145
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %145 ], [ 0, %.preheader ]
  %136 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv135
  %137 = load ptr, ptr %136, align 8, !tbaa !17
  %138 = getelementptr inbounds i64, ptr %3, i64 %indvars.iv135
  %139 = load i64, ptr %138, align 8, !tbaa !15
  %140 = shl i64 %139, 2
  %141 = tail call noundef i64 @_Z7NonZeroPvm(ptr noundef %137, i64 noundef %140)
  %.not106 = icmp eq i64 %141, 0
  br i1 %.not106, label %145, label %142

142:                                              ; preds = %135
  %143 = load i32, ptr %0, align 8, !tbaa !5
  %144 = add i32 %143, 1
  store i32 %144, ptr %0, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %142, %135
  %146 = load ptr, ptr %136, align 8, !tbaa !17
  %147 = load i64, ptr %138, align 8, !tbaa !15
  %148 = shl i64 %147, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %146, i8 1, i64 %148, i1 false)
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond138.not = icmp eq i64 %indvars.iv.next136, 24999
  br i1 %exitcond138.not, label %133, label %135, !llvm.loop !26

149:                                              ; preds = %133
  %150 = load i8, ptr %4, align 4, !tbaa !12, !range !13, !noundef !14
  %151 = trunc nuw i8 %150 to i1
  br i1 %151, label %.sink.split149, label %153

.sink.split149:                                   ; preds = %149, %133
  %.sink151 = phi i64 [ 992, %133 ], [ 993, %149 ]
  %_ZL5strOk.sink150 = phi ptr [ @_ZL8strError, %133 ], [ @_ZL5strOk, %149 ]
  %152 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef %.sink151, ptr noundef nonnull @__FUNCTION__._ZN8CMemTest13UniquePointerEv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %152, ptr noundef nonnull @.str.63, ptr noundef nonnull %_ZL5strOk.sink150)
  br label %153

153:                                              ; preds = %.sink.split149, %149
  %154 = load i32, ptr %0, align 8, !tbaa !5
  %155 = icmp ne i32 %154, 0
  %156 = load i8, ptr @error_occurred, align 1, !tbaa !21, !range !13, !noundef !14
  %157 = zext i1 %155 to i8
  %158 = or i8 %156, %157
  store i8 %158, ptr @error_occurred, align 1, !tbaa !21
  br label %162

159:                                              ; preds = %162
  %160 = load ptr, ptr @Tfree, align 8, !tbaa !17
  tail call void %160(ptr noundef %3)
  %161 = load ptr, ptr @Tfree, align 8, !tbaa !17
  tail call void %161(ptr noundef nonnull %2)
  ret void

162:                                              ; preds = %153, %162
  %indvars.iv139 = phi i64 [ 0, %153 ], [ %indvars.iv.next140, %162 ]
  %163 = load ptr, ptr @Tfree, align 8, !tbaa !17
  %164 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv139
  %165 = load ptr, ptr %164, align 8, !tbaa !17
  tail call void %163(ptr noundef %165)
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next140, 25000
  br i1 %exitcond142.not, label %159, label %162, !llvm.loop !27
}

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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, !7, i64 0}
!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 = !{!6, !10, i64 4}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!10, !10, i64 0}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!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,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass