; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Unit Test/Tests/DataStructuresTests/TreesTest/BinaryHeapTest (BinaryHeapTest)

; 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.ErrorTestStruct = type { i32 }
%struct.BinaryHeap = type { ptr, i32, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [156 x i8], align 1
@ERROR_TEST = external dso_local global ptr, align 8
@__const.testBinaryHeapInsertAll.values = external hidden unnamed_addr constant [10 x i32], align 16
@__const.testBinaryHeapInsertAll.maxHeapValues = external hidden unnamed_addr constant [10 x i32], align 16
@__const.testBinaryHeapInsertAll.minHeapValues = external hidden unnamed_addr constant [10 x i32], align 16

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateIntPointerBHT(i32 noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIntPointersBHT1(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIntPointersBHT2(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @isValidBinaryHeap(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #0

declare ptr @binaryHeapInitialization(ptr noundef, ptr noundef) #3

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #3

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

declare void @destroyBinaryHeap(ptr noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nounwind uwtable
define dso_local void @testBinaryHeapInsertAll(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [10 x i32], align 16
  %6 = alloca [10 x i32], align 16
  %7 = alloca [10 x i32], align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %11 = call ptr @binaryHeapInitialization(ptr noundef @free, ptr noundef @compareIntPointersBHT1)
  store ptr %11, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %12 = call ptr @binaryHeapInitialization(ptr noundef @free, ptr noundef @compareIntPointersBHT2)
  store ptr %12, ptr %4, align 8, !tbaa !5
  call void @binaryHeapInsertAll(ptr noundef null, ptr noundef null, i32 noundef 0)
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.ErrorTestStruct, ptr %14, i32 0, i32 0
  %16 = load i32, ptr %15, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %13, ptr noundef @.str, i32 noundef 141, ptr noundef null, i32 noundef -83386157, i32 noundef %16)
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  call void @binaryHeapInsertAll(ptr noundef %17, ptr noundef null, i32 noundef 0)
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ErrorTestStruct, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %18, ptr noundef @.str, i32 noundef 144, ptr noundef null, i32 noundef -83384987, i32 noundef %21)
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.testBinaryHeapInsertAll.values, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.testBinaryHeapInsertAll.maxHeapValues, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.testBinaryHeapInsertAll.minHeapValues, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %22 = call noalias ptr @malloc(i64 noundef 80) #7
  store ptr %22, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %23 = call noalias ptr @malloc(i64 noundef 80) #7
  store ptr %23, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %24

24:                                               ; preds = %47, %1
  %25 = load i32, ptr %10, align 4, !tbaa !12
  %26 = icmp slt i32 %25, 10
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %50

28:                                               ; preds = %24
  %29 = load i32, ptr %10, align 4, !tbaa !12
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [10 x i32], ptr %5, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = call ptr @generateIntPointerBHT(i32 noundef %32)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load i32, ptr %10, align 4, !tbaa !12
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  store ptr %33, ptr %37, align 8, !tbaa !5
  %38 = load i32, ptr %10, align 4, !tbaa !12
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [10 x i32], ptr %5, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = call ptr @generateIntPointerBHT(i32 noundef %41)
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i32, ptr %10, align 4, !tbaa !12
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds ptr, ptr %43, i64 %45
  store ptr %42, ptr %46, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %28
  %48 = load i32, ptr %10, align 4, !tbaa !12
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %10, align 4, !tbaa !12
  br label %24, !llvm.loop !13

50:                                               ; preds = %27
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  call void @binaryHeapInsertAll(ptr noundef %51, ptr noundef %52, i32 noundef 10)
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  call void @binaryHeapInsertAll(ptr noundef %53, ptr noundef %54, i32 noundef 10)
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.BinaryHeap, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !15
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.BinaryHeap, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 4, !tbaa !17
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.BinaryHeap, ptr %62, i32 0, i32 4
  %64 = load ptr, ptr %63, align 8, !tbaa !18
  %65 = call i32 @isValidBinaryHeap(ptr noundef %58, i32 noundef 0, i32 noundef %61, ptr noundef %64)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %55, ptr noundef @.str, i32 noundef 164, ptr noundef null, i32 noundef 1, i32 noundef %65)
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.BinaryHeap, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.BinaryHeap, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 4, !tbaa !17
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.BinaryHeap, ptr %73, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !18
  %76 = call i32 @isValidBinaryHeap(ptr noundef %69, i32 noundef 0, i32 noundef %72, ptr noundef %75)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %66, ptr noundef @.str, i32 noundef 165, ptr noundef null, i32 noundef 1, i32 noundef %76)
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %77) #6
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %78) #6
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyBinaryHeap(ptr noundef %79)
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  call void @destroyBinaryHeap(ptr noundef %80)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

declare void @binaryHeapInsertAll(ptr noundef, ptr noundef, i32 noundef) #3

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

!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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"BinaryHeap", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24}
!17 = !{!16, !11, i64 12}
!18 = !{!16, !6, i64 24}


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

@.str = external hidden unnamed_addr constant [156 x i8], align 1
@ERROR_TEST = external dso_local local_unnamed_addr global ptr, align 8
@__const.testBinaryHeapInsertAll.values = external hidden unnamed_addr constant [10 x i32], align 16

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateIntPointerBHT(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIntPointersBHT1(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIntPointersBHT2(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @isValidBinaryHeap(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @binaryHeapInitialization(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

declare void @destroyBinaryHeap(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @testBinaryHeapInsertAll(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call ptr @binaryHeapInitialization(ptr noundef nonnull @free, ptr noundef nonnull @compareIntPointersBHT1) #4
  %3 = tail call ptr @binaryHeapInitialization(ptr noundef nonnull @free, ptr noundef nonnull @compareIntPointersBHT2) #4
  tail call void @binaryHeapInsertAll(ptr noundef null, ptr noundef null, i32 noundef 0) #4
  %4 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %5 = load i32, ptr %4, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 141, ptr noundef null, i32 noundef -83386157, i32 noundef %5) #4
  tail call void @binaryHeapInsertAll(ptr noundef %2, ptr noundef null, i32 noundef 0) #4
  %6 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %7 = load i32, ptr %6, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 144, ptr noundef null, i32 noundef -83384987, i32 noundef %7) #4
  %8 = tail call noalias dereferenceable_or_null(80) ptr @malloc(i64 noundef 80) #5
  %9 = tail call noalias dereferenceable_or_null(80) ptr @malloc(i64 noundef 80) #5
  %10 = load i32, ptr @__const.testBinaryHeapInsertAll.values, align 16, !tbaa !12
  %11 = tail call ptr @generateIntPointerBHT(i32 noundef %10)
  store ptr %11, ptr %8, align 8, !tbaa !5
  %12 = tail call ptr @generateIntPointerBHT(i32 noundef %10)
  store ptr %12, ptr %9, align 8, !tbaa !5
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 4), align 4, !tbaa !12
  %14 = tail call ptr @generateIntPointerBHT(i32 noundef %13)
  %15 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %14, ptr %15, align 8, !tbaa !5
  %16 = tail call ptr @generateIntPointerBHT(i32 noundef %13)
  %17 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %16, ptr %17, align 8, !tbaa !5
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 8), align 8, !tbaa !12
  %19 = tail call ptr @generateIntPointerBHT(i32 noundef %18)
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %19, ptr %20, align 8, !tbaa !5
  %21 = tail call ptr @generateIntPointerBHT(i32 noundef %18)
  %22 = getelementptr inbounds i8, ptr %9, i64 16
  store ptr %21, ptr %22, align 8, !tbaa !5
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 12), align 4, !tbaa !12
  %24 = tail call ptr @generateIntPointerBHT(i32 noundef %23)
  %25 = getelementptr inbounds i8, ptr %8, i64 24
  store ptr %24, ptr %25, align 8, !tbaa !5
  %26 = tail call ptr @generateIntPointerBHT(i32 noundef %23)
  %27 = getelementptr inbounds i8, ptr %9, i64 24
  store ptr %26, ptr %27, align 8, !tbaa !5
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 16), align 16, !tbaa !12
  %29 = tail call ptr @generateIntPointerBHT(i32 noundef %28)
  %30 = getelementptr inbounds i8, ptr %8, i64 32
  store ptr %29, ptr %30, align 8, !tbaa !5
  %31 = tail call ptr @generateIntPointerBHT(i32 noundef %28)
  %32 = getelementptr inbounds i8, ptr %9, i64 32
  store ptr %31, ptr %32, align 8, !tbaa !5
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 20), align 4, !tbaa !12
  %34 = tail call ptr @generateIntPointerBHT(i32 noundef %33)
  %35 = getelementptr inbounds i8, ptr %8, i64 40
  store ptr %34, ptr %35, align 8, !tbaa !5
  %36 = tail call ptr @generateIntPointerBHT(i32 noundef %33)
  %37 = getelementptr inbounds i8, ptr %9, i64 40
  store ptr %36, ptr %37, align 8, !tbaa !5
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 24), align 8, !tbaa !12
  %39 = tail call ptr @generateIntPointerBHT(i32 noundef %38)
  %40 = getelementptr inbounds i8, ptr %8, i64 48
  store ptr %39, ptr %40, align 8, !tbaa !5
  %41 = tail call ptr @generateIntPointerBHT(i32 noundef %38)
  %42 = getelementptr inbounds i8, ptr %9, i64 48
  store ptr %41, ptr %42, align 8, !tbaa !5
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 28), align 4, !tbaa !12
  %44 = tail call ptr @generateIntPointerBHT(i32 noundef %43)
  %45 = getelementptr inbounds i8, ptr %8, i64 56
  store ptr %44, ptr %45, align 8, !tbaa !5
  %46 = tail call ptr @generateIntPointerBHT(i32 noundef %43)
  %47 = getelementptr inbounds i8, ptr %9, i64 56
  store ptr %46, ptr %47, align 8, !tbaa !5
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 32), align 16, !tbaa !12
  %49 = tail call ptr @generateIntPointerBHT(i32 noundef %48)
  %50 = getelementptr inbounds i8, ptr %8, i64 64
  store ptr %49, ptr %50, align 8, !tbaa !5
  %51 = tail call ptr @generateIntPointerBHT(i32 noundef %48)
  %52 = getelementptr inbounds i8, ptr %9, i64 64
  store ptr %51, ptr %52, align 8, !tbaa !5
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsertAll.values, i64 36), align 4, !tbaa !12
  %54 = tail call ptr @generateIntPointerBHT(i32 noundef %53)
  %55 = getelementptr inbounds i8, ptr %8, i64 72
  store ptr %54, ptr %55, align 8, !tbaa !5
  %56 = tail call ptr @generateIntPointerBHT(i32 noundef %53)
  %57 = getelementptr inbounds i8, ptr %9, i64 72
  store ptr %56, ptr %57, align 8, !tbaa !5
  tail call void @binaryHeapInsertAll(ptr noundef %2, ptr noundef nonnull %8, i32 noundef 10) #4
  tail call void @binaryHeapInsertAll(ptr noundef %3, ptr noundef nonnull %9, i32 noundef 10) #4
  %58 = load ptr, ptr %2, align 8, !tbaa !13
  %59 = getelementptr inbounds i8, ptr %2, i64 12
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = getelementptr inbounds i8, ptr %2, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = tail call i32 @isValidBinaryHeap(ptr noundef %58, i32 noundef 0, i32 noundef %60, ptr noundef %62)
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 164, ptr noundef null, i32 noundef 1, i32 noundef %63) #4
  %64 = load ptr, ptr %3, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %3, i64 12
  %66 = load i32, ptr %65, align 4, !tbaa !15
  %67 = getelementptr inbounds i8, ptr %3, i64 24
  %68 = load ptr, ptr %67, align 8, !tbaa !16
  %69 = tail call i32 @isValidBinaryHeap(ptr noundef %64, i32 noundef 0, i32 noundef %66, ptr noundef %68)
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 165, ptr noundef null, i32 noundef 1, i32 noundef %69) #4
  tail call void @free(ptr noundef %8) #4
  tail call void @free(ptr noundef %9) #4
  tail call void @destroyBinaryHeap(ptr noundef nonnull %2) #4
  tail call void @destroyBinaryHeap(ptr noundef nonnull %3) #4
  ret void
}

declare void @binaryHeapInsertAll(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"BinaryHeap", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24}
!15 = !{!14, !11, i64 12}
!16 = !{!14, !6, i64 24}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass