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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.mallinfo = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@.str.17 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [164 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8TestMainv() #1 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.mallinfo, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #9
  store ptr null, ptr %1, align 8, !tbaa !5
  %8 = call ptr @dlsym(ptr noundef null, ptr noundef @.str.23) #9
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %0
  br label %12

11:                                               ; preds = %0
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 382, ptr noundef @.str.24, ptr noundef @.str.25)
  br label %12

12:                                               ; preds = %11, %10
  %13 = call ptr @getenv(ptr noundef @.str.26) #9
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  br label %17

16:                                               ; preds = %12
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 391, ptr noundef @.str.27, ptr noundef @.str.28)
  br label %17

17:                                               ; preds = %16, %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  %18 = call ptr @getenv(ptr noundef @.str.26) #9
  %19 = call noalias ptr @strdup(ptr noundef %18) #9
  store ptr %19, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  store ptr @.str.29, ptr %3, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call ptr @getenv(ptr noundef %20) #9
  %22 = icmp ne ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %17
  br label %25

24:                                               ; preds = %17
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 397, ptr noundef @.str.30, ptr noundef @.str.31)
  br label %25

25:                                               ; preds = %24, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call noundef i32 @_ZN7Harness6SetEnvEPKcS1_(ptr noundef %26, ptr noundef @.str.32)
  store i32 %27, ptr %4, align 4, !tbaa !9
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  br label %32

31:                                               ; preds = %25
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 399, ptr noundef @.str.33, ptr noundef null)
  br label %32

32:                                               ; preds = %31, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  %33 = call ptr @getenv(ptr noundef @.str.26) #9
  store ptr %33, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %42

36:                                               ; preds = %32
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = call i32 @strcmp(ptr noundef %37, ptr noundef %38) #10
  %40 = icmp eq i32 0, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %36
  br label %43

42:                                               ; preds = %36, %32
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 401, ptr noundef @.str.34, ptr noundef @.str.35)
  br label %43

43:                                               ; preds = %42, %41
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %44) #9
  call void @_Z20CheckStdFuncOverloadPFPvmEPFS_mmEPFS_S_mEPFvS_E(ptr noundef @malloc, ptr noundef @calloc, ptr noundef @realloc, ptr noundef @free)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %45 = call i32 @posix_memalign(ptr noundef %1, i64 noundef 1024, i64 noundef 24387) #9
  store i32 %45, ptr %6, align 4, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = icmp eq i32 0, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %43
  br label %50

49:                                               ; preds = %43
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 409, ptr noundef @.str.36, ptr noundef null)
  br label %50

50:                                               ; preds = %49, %48
  %51 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_ZL23scalableMallocCheckSizePvm(ptr noundef %51, i64 noundef 24387)
  %52 = load ptr, ptr %1, align 8, !tbaa !5
  %53 = call noundef zeroext i1 @_ZL10is_alignedIPvEbT_m(ptr noundef %52, i64 noundef 1024)
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  br label %56

55:                                               ; preds = %50
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 411, ptr noundef @.str.37, ptr noundef null)
  br label %56

56:                                               ; preds = %55, %54
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  call void @free(ptr noundef %57) #9
  call void @_Z23CheckVallocFuncOverloadPFPvmEPFvS_E(ptr noundef @valloc, ptr noundef @free)
  call void @_Z12CheckPvallocPFPvmEPFvS_E(ptr noundef @pvalloc, ptr noundef @free)
  call void @_Z25CheckMemalignFuncOverloadPFPvmmEPFvS_E(ptr noundef @memalign, ptr noundef @free)
  call void @_Z25CheckMemalignFuncOverloadPFPvmmEPFvS_E(ptr noundef @aligned_alloc, ptr noundef @free)
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #9
  call void @mallinfo(ptr dead_on_unwind writable sret(%struct.mallinfo) align 4 %7) #9
  %58 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 0
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %98, label %61

61:                                               ; preds = %56
  %62 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %98, label %65

65:                                               ; preds = %61
  %66 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !14
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %98, label %69

69:                                               ; preds = %65
  %70 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 3
  %71 = load i32, ptr %70, align 4, !tbaa !15
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %98, label %73

73:                                               ; preds = %69
  %74 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 4
  %75 = load i32, ptr %74, align 4, !tbaa !16
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %98, label %77

77:                                               ; preds = %73
  %78 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 5
  %79 = load i32, ptr %78, align 4, !tbaa !17
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %98, label %81

81:                                               ; preds = %77
  %82 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 6
  %83 = load i32, ptr %82, align 4, !tbaa !18
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %98, label %85

85:                                               ; preds = %81
  %86 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 7
  %87 = load i32, ptr %86, align 4, !tbaa !19
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %98, label %89

89:                                               ; preds = %85
  %90 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 8
  %91 = load i32, ptr %90, align 4, !tbaa !20
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %98, label %93

93:                                               ; preds = %89
  %94 = getelementptr inbounds %struct.mallinfo, ptr %7, i32 0, i32 9
  %95 = load i32, ptr %94, align 4, !tbaa !21
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  br label %99

98:                                               ; preds = %93, %89, %85, %81, %77, %73, %69, %65, %61, %56
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 431, ptr noundef @.str.38, ptr noundef null)
  br label %99

99:                                               ; preds = %98, %97
  call void @_Z20CheckStdFuncOverloadPFPvmEPFS_mmEPFS_S_mEPFvS_E(ptr noundef @__libc_malloc, ptr noundef @__libc_calloc, ptr noundef @__libc_realloc, ptr noundef @__libc_free)
  call void @_Z25CheckMemalignFuncOverloadPFPvmmEPFvS_E(ptr noundef @__libc_memalign, ptr noundef @__libc_free)
  call void @_Z23CheckVallocFuncOverloadPFPvmEPFvS_E(ptr noundef @__libc_valloc, ptr noundef @__libc_free)
  call void @_Z12CheckPvallocPFPvmEPFvS_E(ptr noundef @__libc_pvalloc, ptr noundef @__libc_free)
  call void @_Z16CheckFreeAlignedv()
  call void @_Z22CheckNewDeleteOverloadv()
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #9
  ret i32 0
}

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

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #2

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16CheckFreeAlignedv() #1

; Function Attrs: nounwind
declare i32 @posix_memalign(ptr noundef, i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z22CheckNewDeleteOverloadv() #1

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #6

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #7

; Function Attrs: nounwind
declare noalias ptr @valloc(i64 noundef) #2

; Function Attrs: nounwind
declare noalias ptr @pvalloc(i64 noundef) #2

; Function Attrs: nounwind allocsize(1)
declare noalias ptr @memalign(i64 noundef, i64 noundef) #7

; Function Attrs: nounwind allocsize(1)
declare noalias ptr @aligned_alloc(i64 noundef, i64 noundef) #7

; Function Attrs: nounwind
declare void @mallinfo(ptr dead_on_unwind writable sret(%struct.mallinfo) align 4) #2

declare ptr @__libc_malloc(i64 noundef) #8

declare ptr @__libc_calloc(i64 noundef, i64 noundef) #8

declare ptr @__libc_realloc(ptr noundef, i64 noundef) #8

declare void @__libc_free(ptr noundef) #8

declare ptr @__libc_memalign(i64 noundef, i64 noundef) #8

declare ptr @__libc_valloc(i64 noundef) #8

declare ptr @__libc_pvalloc(i64 noundef) #8

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "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 allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind allocsize(1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS8mallinfo", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !10, i64 12}
!16 = !{!12, !10, i64 16}
!17 = !{!12, !10, i64 20}
!18 = !{!12, !10, i64 24}
!19 = !{!12, !10, i64 28}
!20 = !{!12, !10, i64 32}
!21 = !{!12, !10, i64 36}


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

%struct.mallinfo = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@.str.17 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [164 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8TestMainv() local_unnamed_addr #1 {
  %1 = alloca ptr, align 8
  %2 = alloca %struct.mallinfo, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #14
  store ptr null, ptr %1, align 8, !tbaa !5
  %3 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.23) #14
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %4, label %5

4:                                                ; preds = %0
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 382, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.25)
  br label %5

5:                                                ; preds = %0, %4
  %6 = tail call ptr @getenv(ptr noundef nonnull @.str.26) #14
  %.not33 = icmp eq ptr %6, null
  br i1 %.not33, label %7, label %8

7:                                                ; preds = %5
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 391, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.28)
  br label %8

8:                                                ; preds = %5, %7
  %9 = tail call ptr @getenv(ptr noundef nonnull @.str.26) #14
  %10 = tail call noalias ptr @strdup(ptr noundef %9) #14
  %11 = tail call ptr @getenv(ptr noundef nonnull @.str.29) #14
  %.not34 = icmp eq ptr %11, null
  br i1 %.not34, label %13, label %12

12:                                               ; preds = %8
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 397, ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.31)
  br label %13

13:                                               ; preds = %8, %12
  %14 = tail call noundef i32 @_ZN7Harness6SetEnvEPKcS1_(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.32)
  %.not35 = icmp eq i32 %14, 0
  br i1 %.not35, label %16, label %15

15:                                               ; preds = %13
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 399, ptr noundef nonnull @.str.33, ptr noundef null)
  br label %16

16:                                               ; preds = %13, %15
  %17 = tail call ptr @getenv(ptr noundef nonnull @.str.26) #14
  %.not36 = icmp eq ptr %17, null
  br i1 %.not36, label %21, label %18

18:                                               ; preds = %16
  %19 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) %10) #15
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %22, label %21

21:                                               ; preds = %18, %16
  tail call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 401, ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.35)
  br label %22

22:                                               ; preds = %18, %21
  tail call void @free(ptr noundef %10) #14
  tail call void @_Z20CheckStdFuncOverloadPFPvmEPFS_mmEPFS_S_mEPFvS_E(ptr noundef nonnull @malloc, ptr noundef nonnull @calloc, ptr noundef nonnull @realloc, ptr noundef nonnull @free)
  %23 = call i32 @posix_memalign(ptr noundef nonnull %1, i64 noundef 1024, i64 noundef 24387) #14
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 409, ptr noundef nonnull @.str.36, ptr noundef null)
  br label %26

26:                                               ; preds = %22, %25
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_ZL23scalableMallocCheckSizePvm(ptr noundef %27, i64 noundef 24387)
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZL10is_alignedIPvEbT_m(ptr noundef %28, i64 noundef 1024)
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 411, ptr noundef nonnull @.str.37, ptr noundef null)
  br label %31

31:                                               ; preds = %26, %30
  %32 = load ptr, ptr %1, align 8, !tbaa !5
  call void @free(ptr noundef %32) #14
  call void @_Z23CheckVallocFuncOverloadPFPvmEPFvS_E(ptr noundef nonnull @valloc, ptr noundef nonnull @free)
  call void @_Z12CheckPvallocPFPvmEPFvS_E(ptr noundef nonnull @pvalloc, ptr noundef nonnull @free)
  call void @_Z25CheckMemalignFuncOverloadPFPvmmEPFvS_E(ptr noundef nonnull @memalign, ptr noundef nonnull @free)
  call void @_Z25CheckMemalignFuncOverloadPFPvmmEPFvS_E(ptr noundef nonnull @aligned_alloc, ptr noundef nonnull @free)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #14
  call void @mallinfo(ptr dead_on_unwind nonnull writable sret(%struct.mallinfo) align 4 %2) #14
  %33 = load <8 x i32>, ptr %2, align 4
  %.fr = freeze <8 x i32> %33
  %34 = icmp ne <8 x i32> %.fr, zeroinitializer
  %35 = getelementptr inbounds i8, ptr %2, i64 32
  %36 = load i32, ptr %35, align 4
  %.fr39 = freeze i32 %36
  %37 = icmp ne i32 %.fr39, 0
  %38 = getelementptr inbounds i8, ptr %2, i64 36
  %39 = load i32, ptr %38, align 4
  %40 = icmp ne i32 %39, 0
  %41 = bitcast <8 x i1> %34 to i8
  %42 = icmp ne i8 %41, 0
  %op.rdx = or i1 %42, %37
  %op.rdx37 = select i1 %op.rdx, i1 true, i1 %40
  br i1 %op.rdx37, label %43, label %44

43:                                               ; preds = %31
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 431, ptr noundef nonnull @.str.38, ptr noundef null)
  br label %44

44:                                               ; preds = %31, %43
  call void @_Z20CheckStdFuncOverloadPFPvmEPFS_mmEPFS_S_mEPFvS_E(ptr noundef nonnull @__libc_malloc, ptr noundef nonnull @__libc_calloc, ptr noundef nonnull @__libc_realloc, ptr noundef nonnull @__libc_free)
  call void @_Z25CheckMemalignFuncOverloadPFPvmmEPFvS_E(ptr noundef nonnull @__libc_memalign, ptr noundef nonnull @__libc_free)
  call void @_Z23CheckVallocFuncOverloadPFPvmEPFvS_E(ptr noundef nonnull @__libc_valloc, ptr noundef nonnull @__libc_free)
  call void @_Z12CheckPvallocPFPvmEPFvS_E(ptr noundef nonnull @__libc_pvalloc, ptr noundef nonnull @__libc_free)
  call void @_Z16CheckFreeAlignedv()
  call void @_Z22CheckNewDeleteOverloadv()
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #14
  ret i32 0
}

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

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16CheckFreeAlignedv() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare i32 @posix_memalign(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z22CheckNewDeleteOverloadv() local_unnamed_addr #1

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #7

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) #9

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) #10

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) #11

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @valloc(i64 noundef) #9

; Function Attrs: nounwind
declare noalias ptr @pvalloc(i64 noundef) #6

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized,aligned") allocsize(1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @memalign(i64 allocalign noundef, i64 noundef) #12

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized,aligned") allocsize(1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @aligned_alloc(i64 allocalign noundef, i64 noundef) #12

; Function Attrs: nounwind
declare void @mallinfo(ptr dead_on_unwind writable sret(%struct.mallinfo) align 4) local_unnamed_addr #6

declare ptr @__libc_malloc(i64 noundef) #13

declare ptr @__libc_calloc(i64 noundef, i64 noundef) #13

declare ptr @__libc_realloc(ptr noundef, i64 noundef) #13

declare void @__libc_free(ptr noundef) #13

declare ptr @__libc_memalign(i64 noundef, i64 noundef) #13

declare ptr @__libc_valloc(i64 noundef) #13

declare ptr @__libc_pvalloc(i64 noundef) #13

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind memory(read) "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #12 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized,aligned") allocsize(1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #13 = { "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 #14 = { nounwind }
attributes #15 = { nounwind willreturn memory(read) }

!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"}


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass