; LLVM IR from ShahjalalShohag/code-library :: Data Structures (Persistent Meldable 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.heap = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@h = external dso_local global [100 x %struct.heap], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4heapIiEC2EPNS0_4nodeE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.heap, align 8
  %4 = alloca %struct.heap, align 8
  %5 = alloca %struct.heap, align 8
  %6 = alloca %struct.heap, align 8
  %7 = alloca %struct.heap, align 8
  %8 = alloca %struct.heap, align 8
  %9 = alloca %struct.heap, align 8
  %10 = alloca %struct.heap, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.heap, align 8
  store i32 0, ptr %1, align 4
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %19

19:                                               ; preds = %27, %0
  %20 = load i32, ptr %2, align 4, !tbaa !8
  %21 = icmp slt i32 %20, 100
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %30

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @_ZN4heapIiEC2EPNS0_4nodeE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef null)
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100 x %struct.heap], ptr @h, i64 0, i64 %25
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %3, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %27

27:                                               ; preds = %23
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %2, align 4, !tbaa !8
  br label %19, !llvm.loop !14

30:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %31 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) @h, i32 noundef 20)
  %32 = getelementptr inbounds %struct.heap, ptr %4, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 1), ptr align 8 %4, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %33 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 1), i32 noundef 10)
  %34 = getelementptr inbounds %struct.heap, ptr %5, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 2), ptr align 8 %5, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %35 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 2), i32 noundef 30)
  %36 = getelementptr inbounds %struct.heap, ptr %6, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 3), ptr align 8 %6, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %37 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 1), i32 noundef 5)
  %38 = getelementptr inbounds %struct.heap, ptr %7, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 4), ptr align 8 %7, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %39 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 4), i32 noundef 15)
  %40 = getelementptr inbounds %struct.heap, ptr %8, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 4), ptr align 8 %8, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 3), i64 8, i1 false), !tbaa.struct !11
  %41 = getelementptr inbounds %struct.heap, ptr %10, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8
  %43 = call ptr @_ZN4heapIiE4meldES0_(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 4), ptr %42)
  %44 = getelementptr inbounds %struct.heap, ptr %9, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 5), ptr align 8 %9, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %45

45:                                               ; preds = %56, %30
  %46 = load i32, ptr %11, align 4, !tbaa !8
  %47 = icmp sle i32 %46, 5
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %59

49:                                               ; preds = %45
  %50 = load i32, ptr %11, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100 x %struct.heap], ptr @h, i64 0, i64 %51
  %53 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %53)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %54, i8 noundef signext 10)
  br label %56

56:                                               ; preds = %49
  %57 = load i32, ptr %11, align 4, !tbaa !8
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %11, align 4, !tbaa !8
  br label %45, !llvm.loop !16

59:                                               ; preds = %48
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %61

61:                                               ; preds = %64, %59
  %62 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 5))
  %63 = icmp ne i32 %62, -1
  br i1 %63, label %64, label %70

64:                                               ; preds = %61
  %65 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 5))
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %65)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %66, i8 noundef signext 10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %68 = call ptr @_ZN4heapIiE3popEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 5))
  %69 = getelementptr inbounds %struct.heap, ptr %12, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([100 x %struct.heap], ptr @h, i64 0, i64 5), ptr align 8 %12, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %61, !llvm.loop !17

70:                                               ; preds = %61
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4heapIiE4meldES0_(ptr noundef nonnull align 8 dereferenceable(8), ptr) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4heapIiE3popEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{i64 0, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; 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.heap = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@h = external dso_local global [100 x %struct.heap], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4heapIiEC2EPNS0_4nodeE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %struct.heap, align 8
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  br label %32

8:                                                ; preds = %32
  %9 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) @h, i32 noundef 20)
  store ptr %9, ptr getelementptr inbounds (i8, ptr @h, i64 8), align 8, !tbaa !8
  %10 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 8), i32 noundef 10)
  store ptr %10, ptr getelementptr inbounds (i8, ptr @h, i64 16), align 16, !tbaa !8
  %11 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 16), i32 noundef 30)
  store ptr %11, ptr getelementptr inbounds (i8, ptr @h, i64 24), align 8, !tbaa !8
  %12 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 8), i32 noundef 5)
  store ptr %12, ptr getelementptr inbounds (i8, ptr @h, i64 32), align 16, !tbaa !8
  %13 = call ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 32), i32 noundef 15)
  store ptr %13, ptr getelementptr inbounds (i8, ptr @h, i64 32), align 16, !tbaa !8
  %.sroa.03.0.copyload = load ptr, ptr getelementptr inbounds (i8, ptr @h, i64 24), align 8, !tbaa !8
  %14 = call ptr @_ZN4heapIiE4meldES0_(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 32), ptr %.sroa.03.0.copyload)
  store ptr %14, ptr getelementptr inbounds (i8, ptr @h, i64 40), align 8, !tbaa !8
  %15 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 8))
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %15)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %16, i8 noundef signext 10)
  %18 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 16))
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %18)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %19, i8 noundef signext 10)
  %21 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 24))
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %21)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %22, i8 noundef signext 10)
  %24 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 32))
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %24)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %25, i8 noundef signext 10)
  %27 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 40))
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %27)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %28, i8 noundef signext 10)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %31 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 40))
  %.not16 = icmp eq i32 %31, -1
  br i1 %.not16, label %._crit_edge, label %.lr.ph

32:                                               ; preds = %0, %32
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %32 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZN4heapIiEC2EPNS0_4nodeE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef null)
  %33 = getelementptr inbounds [100 x %struct.heap], ptr @h, i64 0, i64 %indvars.iv
  %34 = load i64, ptr %1, align 8, !tbaa !8
  store i64 %34, ptr %33, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100
  br i1 %exitcond.not, label %8, label %32, !llvm.loop !11

.lr.ph:                                           ; preds = %8, %.lr.ph
  %35 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 40))
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %36, i8 noundef signext 10)
  %38 = call ptr @_ZN4heapIiE3popEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 40))
  store ptr %38, ptr getelementptr inbounds (i8, ptr @h, i64 40), align 8, !tbaa !8
  %39 = call noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @h, i64 40))
  %.not = icmp eq i32 %39, -1
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %8
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4heapIiE6insertEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4heapIiE4meldES0_(ptr noundef nonnull align 8 dereferenceable(8), ptr) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4heapIiE3topEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4heapIiE3popEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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