; LLVM IR from ahampriyanshu/algo-ds-101 :: Data-Structures/Tree/Fibonacci-Heap (Fibonacci-Heap)

; 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._NODE = type { i32, i32, ptr, ptr, ptr, ptr, i8, i8 }
%struct.fibanocci_heap = type { i32, ptr, i32, i32 }

@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [205 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @make_fib_heap() #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: nounwind uwtable
declare dso_local void @print_heap(ptr noundef) #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @insertion_procedure() #0

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %20 = call noalias ptr @malloc(i64 noundef 24) #7
  store ptr %20, ptr %11, align 8, !tbaa !9
  store ptr null, ptr %11, align 8, !tbaa !9
  br label %21

21:                                               ; preds = %142, %2
  br label %22

22:                                               ; preds = %21
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.10, ptr noundef %14)
  %25 = load i32, ptr %14, align 4, !tbaa !5
  switch i32 %25, label %140 [
    i32 1, label %26
    i32 2, label %28
    i32 3, label %51
    i32 4, label %64
    i32 5, label %78
    i32 6, label %95
    i32 7, label %118
    i32 8, label %133
    i32 9, label %137
  ]

26:                                               ; preds = %22
  %27 = call ptr @make_fib_heap()
  store ptr %27, ptr %11, align 8, !tbaa !9
  br label %142

28:                                               ; preds = %22
  %29 = load ptr, ptr %11, align 8, !tbaa !9
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = call ptr @make_fib_heap()
  store ptr %32, ptr %11, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %31, %28
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.10, ptr noundef %19)
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %47, %33
  %37 = load i32, ptr %18, align 4, !tbaa !5
  %38 = load i32, ptr %19, align 4, !tbaa !5
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %40, label %50

40:                                               ; preds = %36
  %41 = load i32, ptr %18, align 4, !tbaa !5
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %41)
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.10, ptr noundef %17)
  %44 = load ptr, ptr %11, align 8, !tbaa !9
  %45 = load ptr, ptr %6, align 8, !tbaa !9
  %46 = load i32, ptr %17, align 4, !tbaa !5
  call void @insertion(ptr noundef %44, ptr noundef %45, i32 noundef %46)
  br label %47

47:                                               ; preds = %40
  %48 = load i32, ptr %18, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %18, align 4, !tbaa !5
  br label %36, !llvm.loop !11

50:                                               ; preds = %36
  br label %142

51:                                               ; preds = %22
  %52 = load ptr, ptr %11, align 8, !tbaa !9
  %53 = call ptr @find_min_node(ptr noundef %52)
  store ptr %53, ptr %7, align 8, !tbaa !9
  %54 = load ptr, ptr %7, align 8, !tbaa !9
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %58

56:                                               ; preds = %51
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  br label %63

58:                                               ; preds = %51
  %59 = load ptr, ptr %7, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct._NODE, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !13
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %61)
  br label %63

63:                                               ; preds = %58, %56
  br label %142

64:                                               ; preds = %22
  %65 = load ptr, ptr %11, align 8, !tbaa !9
  %66 = icmp eq ptr %65, null
  br i1 %66, label %67, label %69

67:                                               ; preds = %64
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  br label %142

69:                                               ; preds = %64
  %70 = call ptr @insertion_procedure()
  store ptr %70, ptr %12, align 8, !tbaa !9
  %71 = load ptr, ptr %11, align 8, !tbaa !9
  %72 = load ptr, ptr %12, align 8, !tbaa !9
  %73 = call ptr @unionHeap(ptr noundef %71, ptr noundef %72)
  store ptr %73, ptr %11, align 8, !tbaa !9
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  %75 = load ptr, ptr %11, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.fibanocci_heap, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  call void @print_heap(ptr noundef %77)
  br label %142

78:                                               ; preds = %22
  %79 = load ptr, ptr %11, align 8, !tbaa !9
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  br label %94

83:                                               ; preds = %78
  %84 = load ptr, ptr %11, align 8, !tbaa !9
  %85 = call ptr @extract_min(ptr noundef %84)
  store ptr %85, ptr %8, align 8, !tbaa !9
  %86 = load ptr, ptr %8, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct._NODE, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !13
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %88)
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  %91 = load ptr, ptr %11, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.fibanocci_heap, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !16
  call void @print_heap(ptr noundef %93)
  br label %94

94:                                               ; preds = %83, %81
  br label %142

95:                                               ; preds = %22
  %96 = load ptr, ptr %11, align 8, !tbaa !9
  %97 = icmp eq ptr %96, null
  br i1 %97, label %98, label %100

98:                                               ; preds = %95
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  br label %117

100:                                              ; preds = %95
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  %102 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.10, ptr noundef %16)
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %104 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.10, ptr noundef %15)
  %105 = load ptr, ptr %11, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.fibanocci_heap, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !16
  store ptr %107, ptr %10, align 8, !tbaa !9
  %108 = load ptr, ptr %11, align 8, !tbaa !9
  %109 = load ptr, ptr %10, align 8, !tbaa !9
  %110 = load i32, ptr %16, align 4, !tbaa !5
  %111 = load i32, ptr %15, align 4, !tbaa !5
  %112 = call ptr @find_node(ptr noundef %108, ptr noundef %109, i32 noundef %110, i32 noundef %111)
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %114 = load ptr, ptr %11, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.fibanocci_heap, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  call void @print_heap(ptr noundef %116)
  br label %117

117:                                              ; preds = %100, %98
  br label %142

118:                                              ; preds = %22
  %119 = load ptr, ptr %11, align 8, !tbaa !9
  %120 = icmp eq ptr %119, null
  br i1 %120, label %121, label %123

121:                                              ; preds = %118
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  br label %132

123:                                              ; preds = %118
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.26)
  %125 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.10, ptr noundef %16)
  %126 = load ptr, ptr %11, align 8, !tbaa !9
  %127 = load i32, ptr %16, align 4, !tbaa !5
  call void @Delete_Node(ptr noundef %126, i32 noundef %127)
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  %129 = load ptr, ptr %11, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.fibanocci_heap, ptr %129, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8, !tbaa !16
  call void @print_heap(ptr noundef %131)
  br label %142

132:                                              ; preds = %121
  br label %133

133:                                              ; preds = %132, %22
  %134 = load ptr, ptr %11, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.fibanocci_heap, ptr %134, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !16
  call void @print_heap(ptr noundef %136)
  br label %142

137:                                              ; preds = %22
  %138 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %138) #6
  %139 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %139) #6
  call void @exit(i32 noundef 0) #8
  unreachable

140:                                              ; preds = %22
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  br label %142

142:                                              ; preds = %140, %133, %123, %117, %94, %69, %67, %63, %50, %26
  br label %21
}

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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 = { noreturn 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 }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { noreturn 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_NODE", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !15, i64 40, !15, i64 41}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!17, !10, i64 8}
!17 = !{!"fibanocci_heap", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 20}


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

@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [205 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @make_fib_heap() local_unnamed_addr #0

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @insertion_procedure() local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.backedge, %2
  %.027 = phi ptr [ null, %2 ], [ %.027.be, %.loopexit.backedge ]
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.10, ptr noundef nonnull %3)
  %10 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %10, label %86 [
    i32 1, label %11
    i32 2, label %13
    i32 3, label %26
    i32 4, label %34
    i32 5, label %44
    i32 6, label %55
    i32 7, label %71
    i32 8, label %82
    i32 9, label %85
  ]

11:                                               ; preds = %.loopexit
  %12 = call ptr @make_fib_heap()
  br label %.loopexit.backedge

13:                                               ; preds = %.loopexit
  %14 = icmp eq ptr %.027, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %13
  %16 = call ptr @make_fib_heap()
  br label %17

17:                                               ; preds = %15, %13
  %.1 = phi ptr [ %16, %15 ], [ %.027, %13 ]
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.10, ptr noundef nonnull %7)
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %.not29 = icmp slt i32 %20, 1
  br i1 %.not29, label %.loopexit.backedge, label %.lr.ph

.loopexit.backedge:                               ; preds = %.lr.ph, %17, %57, %59, %46, %48, %29, %31, %86, %82, %75, %38, %36, %11
  %.027.be = phi ptr [ %.027, %86 ], [ %.027, %82 ], [ %.027, %75 ], [ null, %57 ], [ %.027, %59 ], [ null, %46 ], [ %.027, %48 ], [ null, %36 ], [ %40, %38 ], [ %.027, %29 ], [ %.027, %31 ], [ %12, %11 ], [ %.1, %17 ], [ %.1, %.lr.ph ]
  br label %.loopexit

.lr.ph:                                           ; preds = %17, %.lr.ph
  %.030 = phi i32 [ %24, %.lr.ph ], [ 1, %17 ]
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %.030)
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.10, ptr noundef nonnull %6)
  %23 = load i32, ptr %6, align 4, !tbaa !5
  call void @insertion(ptr noundef %.1, ptr noundef undef, i32 noundef %23)
  %24 = add nuw nsw i32 %.030, 1
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.030, %25
  br i1 %.not.not, label %.lr.ph, label %.loopexit.backedge, !llvm.loop !9

26:                                               ; preds = %.loopexit
  %27 = call ptr @find_min_node(ptr noundef %.027)
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %31

29:                                               ; preds = %26
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  br label %.loopexit.backedge

31:                                               ; preds = %26
  %32 = load i32, ptr %27, align 8, !tbaa !11
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %32)
  br label %.loopexit.backedge

34:                                               ; preds = %.loopexit
  %35 = icmp eq ptr %.027, null
  br i1 %35, label %36, label %38

36:                                               ; preds = %34
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  br label %.loopexit.backedge

38:                                               ; preds = %34
  %39 = call ptr @insertion_procedure()
  %40 = call ptr @unionHeap(ptr noundef nonnull %.027, ptr noundef %39)
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  %42 = getelementptr inbounds i8, ptr %40, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  call void @print_heap(ptr noundef %43)
  br label %.loopexit.backedge

44:                                               ; preds = %.loopexit
  %45 = icmp eq ptr %.027, null
  br i1 %45, label %46, label %48

46:                                               ; preds = %44
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  br label %.loopexit.backedge

48:                                               ; preds = %44
  %49 = call ptr @extract_min(ptr noundef nonnull %.027)
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %50)
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  %53 = getelementptr inbounds i8, ptr %.027, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  call void @print_heap(ptr noundef %54)
  br label %.loopexit.backedge

55:                                               ; preds = %.loopexit
  %56 = icmp eq ptr %.027, null
  br i1 %56, label %57, label %59

57:                                               ; preds = %55
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  br label %.loopexit.backedge

59:                                               ; preds = %55
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23)
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.10, ptr noundef nonnull %5)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  %63 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.10, ptr noundef nonnull %4)
  %64 = getelementptr inbounds i8, ptr %.027, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = call ptr @find_node(ptr noundef nonnull %.027, ptr noundef %65, i32 noundef %66, i32 noundef %67)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %70 = load ptr, ptr %64, align 8, !tbaa !15
  call void @print_heap(ptr noundef %70)
  br label %.loopexit.backedge

71:                                               ; preds = %.loopexit
  %72 = icmp eq ptr %.027, null
  br i1 %72, label %73, label %75

73:                                               ; preds = %71
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  br label %82

75:                                               ; preds = %71
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26)
  %77 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.10, ptr noundef nonnull %5)
  %78 = load i32, ptr %5, align 4, !tbaa !5
  call void @Delete_Node(ptr noundef nonnull %.027, i32 noundef %78)
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %80 = getelementptr inbounds i8, ptr %.027, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  call void @print_heap(ptr noundef %81)
  br label %.loopexit.backedge

82:                                               ; preds = %73, %.loopexit
  %83 = getelementptr inbounds i8, ptr %.027, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  call void @print_heap(ptr noundef %84)
  br label %.loopexit.backedge

85:                                               ; preds = %.loopexit
  call void @free(ptr noundef %.027) #6
  call void @exit(i32 noundef 0) #7
  unreachable

86:                                               ; preds = %.loopexit
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  br label %.loopexit.backedge
}

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { noreturn 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 = { 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 #5 = { noreturn 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 }
attributes #7 = { noreturn 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, !6, i64 0}
!12 = !{!"_NODE", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !14, i64 40, !14, i64 41}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!16, !13, i64 8}
!16 = !{!"fibanocci_heap", !6, i64 0, !13, i64 8, !6, i64 16, !6, i64 20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass