; LLVM IR from yudi-matsuzake/libgenerics :: doc/examples (pqueue0)

; 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.priority_queue_t = type { i64, i64, ptr, ptr, %struct.vector_t }
%struct.vector_t = type { ptr, i64, i64, i64 }

@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 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

declare i32 @printf(ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.priority_queue_t, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %6 = call i64 @time(ptr noundef null) #4
  %7 = trunc i64 %6 to i32
  call void @srand(i32 noundef %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %2) #4
  %8 = call i32 @pqueue_create(ptr noundef %2, i64 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %18, %0
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 15
  br i1 %11, label %12, label %21

12:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %13 = call i32 @rand() #4
  %14 = srem i32 %13, 15
  store i32 %14, ptr %4, align 4, !tbaa !5
  %15 = call i32 @pqueue_add(ptr noundef %2, ptr noundef %4)
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %18

18:                                               ; preds = %12
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %3, align 4, !tbaa !5
  br label %9, !llvm.loop !9

21:                                               ; preds = %9
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %31, %21
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 15
  br i1 %24, label %25, label %34

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %26 = call i32 @pqueue_extract(ptr noundef %2, ptr noundef %5)
  %27 = getelementptr inbounds %struct.priority_queue_t, ptr %2, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !11
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %28, i32 noundef %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %31

31:                                               ; preds = %25
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %3, align 4, !tbaa !5
  br label %22, !llvm.loop !16

34:                                               ; preds = %22
  %35 = call i32 @pqueue_destroy(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %2) #4
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #3

declare i32 @pqueue_create(ptr noundef, i64 noundef) #1

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

declare i32 @pqueue_add(ptr noundef, ptr noundef) #1

declare i32 @pqueue_extract(ptr noundef, ptr noundef) #1

declare i32 @pqueue_destroy(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 0}
!12 = !{!"priority_queue_t", !13, i64 0, !13, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!13 = !{!"long", !7, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"vector_t", !14, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!16 = distinct !{!16, !10}


; 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.priority_queue_t = type { i64, i64, ptr, ptr, %struct.vector_t }
%struct.vector_t = type { ptr, i64, i64, i64 }

@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
.preheader.preheader:
  %0 = alloca %struct.priority_queue_t, align 8
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i64 @time(ptr noundef null) #5
  %4 = trunc i64 %3 to i32
  tail call void @srand(i32 noundef %4) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %0) #5
  %5 = call i32 @pqueue_create(ptr noundef nonnull %0, i64 noundef 4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %6 = call i32 @rand() #5
  %7 = srem i32 %6, 15
  store i32 %7, ptr %1, align 4, !tbaa !5
  %8 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %11 = call i32 @rand() #5
  %12 = srem i32 %11, 15
  store i32 %12, ptr %1, align 4, !tbaa !5
  %13 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %16 = call i32 @rand() #5
  %17 = srem i32 %16, 15
  store i32 %17, ptr %1, align 4, !tbaa !5
  %18 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %21 = call i32 @rand() #5
  %22 = srem i32 %21, 15
  store i32 %22, ptr %1, align 4, !tbaa !5
  %23 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %24)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %26 = call i32 @rand() #5
  %27 = srem i32 %26, 15
  store i32 %27, ptr %1, align 4, !tbaa !5
  %28 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %31 = call i32 @rand() #5
  %32 = srem i32 %31, 15
  store i32 %32, ptr %1, align 4, !tbaa !5
  %33 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %34)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %36 = call i32 @rand() #5
  %37 = srem i32 %36, 15
  store i32 %37, ptr %1, align 4, !tbaa !5
  %38 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %39)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %41 = call i32 @rand() #5
  %42 = srem i32 %41, 15
  store i32 %42, ptr %1, align 4, !tbaa !5
  %43 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %44)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %46 = call i32 @rand() #5
  %47 = srem i32 %46, 15
  store i32 %47, ptr %1, align 4, !tbaa !5
  %48 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %49)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %51 = call i32 @rand() #5
  %52 = srem i32 %51, 15
  store i32 %52, ptr %1, align 4, !tbaa !5
  %53 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %54)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %56 = call i32 @rand() #5
  %57 = srem i32 %56, 15
  store i32 %57, ptr %1, align 4, !tbaa !5
  %58 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %59)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %61 = call i32 @rand() #5
  %62 = srem i32 %61, 15
  store i32 %62, ptr %1, align 4, !tbaa !5
  %63 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %64)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %66 = call i32 @rand() #5
  %67 = srem i32 %66, 15
  store i32 %67, ptr %1, align 4, !tbaa !5
  %68 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %69)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %71 = call i32 @rand() #5
  %72 = srem i32 %71, 15
  store i32 %72, ptr %1, align 4, !tbaa !5
  %73 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %74)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %76 = call i32 @rand() #5
  %77 = srem i32 %76, 15
  store i32 %77, ptr %1, align 4, !tbaa !5
  %78 = call i32 @pqueue_add(ptr noundef nonnull %0, ptr noundef nonnull %1) #5
  %79 = load i32, ptr %1, align 4, !tbaa !5
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %79)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %81 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %82 = load i64, ptr %0, align 8, !tbaa !9
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %82, i32 noundef %83)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %85 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %86 = load i64, ptr %0, align 8, !tbaa !9
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %86, i32 noundef %87)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %89 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %90 = load i64, ptr %0, align 8, !tbaa !9
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %90, i32 noundef %91)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %93 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %94 = load i64, ptr %0, align 8, !tbaa !9
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %94, i32 noundef %95)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %97 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %98 = load i64, ptr %0, align 8, !tbaa !9
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %98, i32 noundef %99)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %101 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %102 = load i64, ptr %0, align 8, !tbaa !9
  %103 = load i32, ptr %2, align 4, !tbaa !5
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %102, i32 noundef %103)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %105 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %106 = load i64, ptr %0, align 8, !tbaa !9
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %106, i32 noundef %107)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %109 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %110 = load i64, ptr %0, align 8, !tbaa !9
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %110, i32 noundef %111)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %113 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %114 = load i64, ptr %0, align 8, !tbaa !9
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %114, i32 noundef %115)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %117 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %118 = load i64, ptr %0, align 8, !tbaa !9
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %118, i32 noundef %119)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %121 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %122 = load i64, ptr %0, align 8, !tbaa !9
  %123 = load i32, ptr %2, align 4, !tbaa !5
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %122, i32 noundef %123)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %125 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %126 = load i64, ptr %0, align 8, !tbaa !9
  %127 = load i32, ptr %2, align 4, !tbaa !5
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %126, i32 noundef %127)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %129 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %130 = load i64, ptr %0, align 8, !tbaa !9
  %131 = load i32, ptr %2, align 4, !tbaa !5
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %130, i32 noundef %131)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %133 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %134 = load i64, ptr %0, align 8, !tbaa !9
  %135 = load i32, ptr %2, align 4, !tbaa !5
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %134, i32 noundef %135)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %137 = call i32 @pqueue_extract(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %138 = load i64, ptr %0, align 8, !tbaa !9
  %139 = load i32, ptr %2, align 4, !tbaa !5
  %140 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %138, i32 noundef %139)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %141 = call i32 @pqueue_destroy(ptr noundef nonnull %0) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %0) #5
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #3

declare i32 @pqueue_create(ptr noundef, i64 noundef) local_unnamed_addr #4

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

declare i32 @pqueue_add(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @pqueue_extract(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @pqueue_destroy(ptr noundef) local_unnamed_addr #4

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"priority_queue_t", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"vector_t", !12, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}


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