; 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.testBinaryHeapInsert.values = external hidden unnamed_addr constant [10 x i32], align 16
@__const.testBinaryHeapInsert.maxHeapValues = external hidden unnamed_addr constant [10 x i32], align 16
@__const.testBinaryHeapInsert.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: 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) #2

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

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

declare void @destroyBinaryHeap(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @testBinaryHeapInsert(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 i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %10 = call ptr @binaryHeapInitialization(ptr noundef @free, ptr noundef @compareIntPointersBHT1)
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %11 = call ptr @binaryHeapInitialization(ptr noundef @free, ptr noundef @compareIntPointersBHT2)
  store ptr %11, ptr %4, align 8, !tbaa !5
  call void @binaryHeapInsert(ptr noundef null, ptr noundef null)
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ErrorTestStruct, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %12, ptr noundef @.str, i32 noundef 103, ptr noundef null, i32 noundef -83386157, i32 noundef %15)
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  call void @binaryHeapInsert(ptr noundef %16, ptr noundef null)
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ErrorTestStruct, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %17, ptr noundef @.str, i32 noundef 106, ptr noundef null, i32 noundef -83384987, i32 noundef %20)
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.testBinaryHeapInsert.values, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.testBinaryHeapInsert.maxHeapValues, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.testBinaryHeapInsert.minHeapValues, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !12
  br label %21

21:                                               ; preds = %38, %1
  %22 = load i32, ptr %8, align 4, !tbaa !12
  %23 = icmp slt i32 %22, 10
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %21
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !12
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10 x i32], ptr %5, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !12
  %31 = call ptr @generateIntPointerBHT(i32 noundef %30)
  call void @binaryHeapInsert(ptr noundef %26, ptr noundef %31)
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = load i32, ptr %8, align 4, !tbaa !12
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [10 x i32], ptr %5, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = call ptr @generateIntPointerBHT(i32 noundef %36)
  call void @binaryHeapInsert(ptr noundef %32, ptr noundef %37)
  br label %38

38:                                               ; preds = %25
  %39 = load i32, ptr %8, align 4, !tbaa !12
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %8, align 4, !tbaa !12
  br label %21, !llvm.loop !13

41:                                               ; preds = %24
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.BinaryHeap, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.BinaryHeap, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !17
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.BinaryHeap, ptr %49, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = call i32 @isValidBinaryHeap(ptr noundef %45, i32 noundef 0, i32 noundef %48, ptr noundef %51)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %42, ptr noundef @.str, i32 noundef 119, ptr noundef null, i32 noundef 1, i32 noundef %52)
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.BinaryHeap, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.BinaryHeap, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 4, !tbaa !17
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.BinaryHeap, ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = call i32 @isValidBinaryHeap(ptr noundef %56, i32 noundef 0, i32 noundef %59, ptr noundef %62)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %53, ptr noundef @.str, i32 noundef 120, ptr noundef null, i32 noundef 1, i32 noundef %63)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %64

64:                                               ; preds = %95, %41
  %65 = load i32, ptr %9, align 4, !tbaa !12
  %66 = icmp slt i32 %65, 10
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %64
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = load i32, ptr %9, align 4, !tbaa !12
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !12
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.BinaryHeap, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load i32, ptr %9, align 4, !tbaa !12
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %69, ptr noundef @.str, i32 noundef 123, ptr noundef null, i32 noundef %73, i32 noundef %81)
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !12
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !12
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.BinaryHeap, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !15
  %90 = load i32, ptr %9, align 4, !tbaa !12
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load i32, ptr %93, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %82, ptr noundef @.str, i32 noundef 124, ptr noundef null, i32 noundef %86, i32 noundef %94)
  br label %95

95:                                               ; preds = %68
  %96 = load i32, ptr %9, align 4, !tbaa !12
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %9, align 4, !tbaa !12
  br label %64, !llvm.loop !19

98:                                               ; preds = %67
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyBinaryHeap(ptr noundef %99)
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  call void @destroyBinaryHeap(ptr noundef %100)
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

declare void @binaryHeapInsert(ptr noundef, ptr noundef) #2

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

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


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

@.str = external hidden unnamed_addr constant [156 x i8], align 1
@ERROR_TEST = external dso_local local_unnamed_addr global ptr, align 8
@__const.testBinaryHeapInsert.values = external hidden unnamed_addr constant [10 x i32], align 16
@__const.testBinaryHeapInsert.maxHeapValues = external hidden unnamed_addr constant [10 x i32], align 16
@__const.testBinaryHeapInsert.minHeapValues = 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: 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 #1

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

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

declare void @destroyBinaryHeap(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @testBinaryHeapInsert(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call ptr @binaryHeapInitialization(ptr noundef nonnull @free, ptr noundef nonnull @compareIntPointersBHT1) #3
  %3 = tail call ptr @binaryHeapInitialization(ptr noundef nonnull @free, ptr noundef nonnull @compareIntPointersBHT2) #3
  tail call void @binaryHeapInsert(ptr noundef null, ptr noundef null) #3
  %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 103, ptr noundef null, i32 noundef -83386157, i32 noundef %5) #3
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef null) #3
  %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 106, ptr noundef null, i32 noundef -83384987, i32 noundef %7) #3
  %8 = load i32, ptr @__const.testBinaryHeapInsert.values, align 16, !tbaa !12
  %9 = tail call ptr @generateIntPointerBHT(i32 noundef %8)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %9) #3
  %10 = tail call ptr @generateIntPointerBHT(i32 noundef %8)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %10) #3
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 4), align 4, !tbaa !12
  %12 = tail call ptr @generateIntPointerBHT(i32 noundef %11)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %12) #3
  %13 = tail call ptr @generateIntPointerBHT(i32 noundef %11)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %13) #3
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 8), align 8, !tbaa !12
  %15 = tail call ptr @generateIntPointerBHT(i32 noundef %14)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %15) #3
  %16 = tail call ptr @generateIntPointerBHT(i32 noundef %14)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %16) #3
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 12), align 4, !tbaa !12
  %18 = tail call ptr @generateIntPointerBHT(i32 noundef %17)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %18) #3
  %19 = tail call ptr @generateIntPointerBHT(i32 noundef %17)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %19) #3
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 16), align 16, !tbaa !12
  %21 = tail call ptr @generateIntPointerBHT(i32 noundef %20)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %21) #3
  %22 = tail call ptr @generateIntPointerBHT(i32 noundef %20)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %22) #3
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 20), align 4, !tbaa !12
  %24 = tail call ptr @generateIntPointerBHT(i32 noundef %23)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %24) #3
  %25 = tail call ptr @generateIntPointerBHT(i32 noundef %23)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %25) #3
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 24), align 8, !tbaa !12
  %27 = tail call ptr @generateIntPointerBHT(i32 noundef %26)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %27) #3
  %28 = tail call ptr @generateIntPointerBHT(i32 noundef %26)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %28) #3
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 28), align 4, !tbaa !12
  %30 = tail call ptr @generateIntPointerBHT(i32 noundef %29)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %30) #3
  %31 = tail call ptr @generateIntPointerBHT(i32 noundef %29)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %31) #3
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 32), align 16, !tbaa !12
  %33 = tail call ptr @generateIntPointerBHT(i32 noundef %32)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %33) #3
  %34 = tail call ptr @generateIntPointerBHT(i32 noundef %32)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %34) #3
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.values, i64 36), align 4, !tbaa !12
  %36 = tail call ptr @generateIntPointerBHT(i32 noundef %35)
  tail call void @binaryHeapInsert(ptr noundef %2, ptr noundef %36) #3
  %37 = tail call ptr @generateIntPointerBHT(i32 noundef %35)
  tail call void @binaryHeapInsert(ptr noundef %3, ptr noundef %37) #3
  %38 = load ptr, ptr %2, align 8, !tbaa !13
  %39 = getelementptr inbounds i8, ptr %2, i64 12
  %40 = load i32, ptr %39, align 4, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %2, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = tail call i32 @isValidBinaryHeap(ptr noundef %38, i32 noundef 0, i32 noundef %40, ptr noundef %42)
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 119, ptr noundef null, i32 noundef 1, i32 noundef %43) #3
  %44 = load ptr, ptr %3, align 8, !tbaa !13
  %45 = getelementptr inbounds i8, ptr %3, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !15
  %47 = getelementptr inbounds i8, ptr %3, i64 24
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = tail call i32 @isValidBinaryHeap(ptr noundef %44, i32 noundef 0, i32 noundef %46, ptr noundef %48)
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 120, ptr noundef null, i32 noundef 1, i32 noundef %49) #3
  %50 = load i32, ptr @__const.testBinaryHeapInsert.maxHeapValues, align 16, !tbaa !12
  %51 = load ptr, ptr %2, align 8, !tbaa !13
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = load i32, ptr %52, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %50, i32 noundef %53) #3
  %54 = load i32, ptr @__const.testBinaryHeapInsert.minHeapValues, align 16, !tbaa !12
  %55 = load ptr, ptr %3, align 8, !tbaa !13
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = load i32, ptr %56, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %54, i32 noundef %57) #3
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 4), align 4, !tbaa !12
  %59 = load ptr, ptr %2, align 8, !tbaa !13
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = load i32, ptr %61, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %58, i32 noundef %62) #3
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 4), align 4, !tbaa !12
  %64 = load ptr, ptr %3, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = load i32, ptr %66, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %63, i32 noundef %67) #3
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 8), align 8, !tbaa !12
  %69 = load ptr, ptr %2, align 8, !tbaa !13
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = load i32, ptr %71, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %68, i32 noundef %72) #3
  %73 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 8), align 8, !tbaa !12
  %74 = load ptr, ptr %3, align 8, !tbaa !13
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %73, i32 noundef %77) #3
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 12), align 4, !tbaa !12
  %79 = load ptr, ptr %2, align 8, !tbaa !13
  %80 = getelementptr inbounds i8, ptr %79, i64 24
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = load i32, ptr %81, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %78, i32 noundef %82) #3
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 12), align 4, !tbaa !12
  %84 = load ptr, ptr %3, align 8, !tbaa !13
  %85 = getelementptr inbounds i8, ptr %84, i64 24
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %83, i32 noundef %87) #3
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 16), align 16, !tbaa !12
  %89 = load ptr, ptr %2, align 8, !tbaa !13
  %90 = getelementptr inbounds i8, ptr %89, i64 32
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load i32, ptr %91, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %88, i32 noundef %92) #3
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 16), align 16, !tbaa !12
  %94 = load ptr, ptr %3, align 8, !tbaa !13
  %95 = getelementptr inbounds i8, ptr %94, i64 32
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i32, ptr %96, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %93, i32 noundef %97) #3
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 20), align 4, !tbaa !12
  %99 = load ptr, ptr %2, align 8, !tbaa !13
  %100 = getelementptr inbounds i8, ptr %99, i64 40
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = load i32, ptr %101, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %98, i32 noundef %102) #3
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 20), align 4, !tbaa !12
  %104 = load ptr, ptr %3, align 8, !tbaa !13
  %105 = getelementptr inbounds i8, ptr %104, i64 40
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = load i32, ptr %106, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %103, i32 noundef %107) #3
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 24), align 8, !tbaa !12
  %109 = load ptr, ptr %2, align 8, !tbaa !13
  %110 = getelementptr inbounds i8, ptr %109, i64 48
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load i32, ptr %111, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %108, i32 noundef %112) #3
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 24), align 8, !tbaa !12
  %114 = load ptr, ptr %3, align 8, !tbaa !13
  %115 = getelementptr inbounds i8, ptr %114, i64 48
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %113, i32 noundef %117) #3
  %118 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 28), align 4, !tbaa !12
  %119 = load ptr, ptr %2, align 8, !tbaa !13
  %120 = getelementptr inbounds i8, ptr %119, i64 56
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = load i32, ptr %121, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %118, i32 noundef %122) #3
  %123 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 28), align 4, !tbaa !12
  %124 = load ptr, ptr %3, align 8, !tbaa !13
  %125 = getelementptr inbounds i8, ptr %124, i64 56
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %123, i32 noundef %127) #3
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 32), align 16, !tbaa !12
  %129 = load ptr, ptr %2, align 8, !tbaa !13
  %130 = getelementptr inbounds i8, ptr %129, i64 64
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load i32, ptr %131, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %128, i32 noundef %132) #3
  %133 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 32), align 16, !tbaa !12
  %134 = load ptr, ptr %3, align 8, !tbaa !13
  %135 = getelementptr inbounds i8, ptr %134, i64 64
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = load i32, ptr %136, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %133, i32 noundef %137) #3
  %138 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.maxHeapValues, i64 36), align 4, !tbaa !12
  %139 = load ptr, ptr %2, align 8, !tbaa !13
  %140 = getelementptr inbounds i8, ptr %139, i64 72
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = load i32, ptr %141, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 123, ptr noundef null, i32 noundef %138, i32 noundef %142) #3
  %143 = load i32, ptr getelementptr inbounds (i8, ptr @__const.testBinaryHeapInsert.minHeapValues, i64 36), align 4, !tbaa !12
  %144 = load ptr, ptr %3, align 8, !tbaa !13
  %145 = getelementptr inbounds i8, ptr %144, i64 72
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = load i32, ptr %146, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 124, ptr noundef null, i32 noundef %143, i32 noundef %147) #3
  tail call void @destroyBinaryHeap(ptr noundef nonnull %2) #3
  tail call void @destroyBinaryHeap(ptr noundef nonnull %3) #3
  ret void
}

declare void @binaryHeapInsert(ptr noundef, ptr noundef) local_unnamed_addr #1

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 = { "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 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 #3 = { 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/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