; LLVM IR from nbdd0121/GenerationalGC :: Heap.ll (ZN6norlit2gc4Heap8AllocateEm)

; 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.norlit::gc::Heap::LargeObjectNode" = type { ptr, ptr }

@_ZN6norlit2gc4Heap18large_object_spaceE = external dso_local global %"struct.norlit::gc::Heap::LargeObjectNode", align 8
@_ZN6norlit2gc4Heap10eden_spaceE = external dso_local global ptr, align 8
@_ZN6norlit2gc4Heap19survivor_from_spaceE = external dso_local global ptr, align 8
@_ZN6norlit2gc4Heap15allocating_sizeE = external dso_local global i32, align 4
@_ZN6norlit2gc4Heap17allocating_objectE = external dso_local global ptr, align 8
@_ZN6norlit2gc4Heap17full_gc_suggestedE = external dso_local global i8, align 1
@_ZN6norlit2gc4Heap13no_gc_counterE = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__._ZN6norlit2gc4Heap8AllocateEm = external hidden unnamed_addr constant [48 x i8], align 1
@_ZTISt9bad_alloc = external constant ptr
@.str.2 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6norlit2gc4Heap8AllocateEm(i64 noundef %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  %7 = load ptr, ptr @_ZN6norlit2gc4Heap17allocating_objectE, align 8, !tbaa !9
  %8 = icmp ne ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %1
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 264, ptr noundef @__PRETTY_FUNCTION__._ZN6norlit2gc4Heap8AllocateEm) #6
  unreachable

10:                                               ; preds = %1
  %11 = load i64, ptr %3, align 8, !tbaa !5
  %12 = icmp ugt i64 %11, 4294967295
  br i1 %12, label %13, label %15

13:                                               ; preds = %10
  %14 = call ptr @__cxa_allocate_exception(i64 8) #7
  call void @_ZNSt9bad_allocC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @__cxa_throw(ptr %14, ptr @_ZTISt9bad_alloc, ptr @_ZNSt9bad_allocD1Ev) #8
  unreachable

15:                                               ; preds = %10
  %16 = load i64, ptr %3, align 8, !tbaa !5
  %17 = add i64 %16, 7
  %18 = and i64 %17, -8
  store i64 %18, ptr %3, align 8, !tbaa !5
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr @_ZN6norlit2gc4Heap15allocating_sizeE, align 4, !tbaa !11
  %21 = load i64, ptr %3, align 8, !tbaa !5
  %22 = icmp ugt i64 %21, 4096
  br i1 %22, label %23, label %50

23:                                               ; preds = %15
  %24 = load i64, ptr @_ZN6norlit2gc4Heap13no_gc_counterE, align 8, !tbaa !5
  %25 = icmp ne i64 %24, 0
  br i1 %25, label %30, label %26

26:                                               ; preds = %23
  %27 = load i8, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13, !range !15, !noundef !16
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  call void @_ZN6norlit2gc4Heap7MajorGCEv()
  store i8 0, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13
  br label %31

30:                                               ; preds = %26, %23
  store i8 1, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13
  br label %31

31:                                               ; preds = %30, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %32 = load i64, ptr %3, align 8, !tbaa !5
  %33 = add i64 16, %32
  %34 = call noundef ptr @_ZN6norlit2gc8Platform8AllocateEm(i64 noundef %33)
  store ptr %34, ptr %4, align 8, !tbaa !9
  %35 = load ptr, ptr @_ZN6norlit2gc4Heap18large_object_spaceE, align 8, !tbaa !17
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  %37 = getelementptr inbounds %"struct.norlit::gc::Heap::LargeObjectNode", ptr %36, i32 0, i32 0
  store ptr %35, ptr %37, align 8, !tbaa !17
  %38 = load ptr, ptr %4, align 8, !tbaa !9
  %39 = getelementptr inbounds %"struct.norlit::gc::Heap::LargeObjectNode", ptr %38, i32 0, i32 1
  store ptr @_ZN6norlit2gc4Heap18large_object_spaceE, ptr %39, align 8, !tbaa !19
  %40 = load ptr, ptr %4, align 8, !tbaa !9
  %41 = load ptr, ptr @_ZN6norlit2gc4Heap18large_object_spaceE, align 8, !tbaa !17
  %42 = getelementptr inbounds %"struct.norlit::gc::Heap::LargeObjectNode", ptr %41, i32 0, i32 1
  store ptr %40, ptr %42, align 8, !tbaa !19
  %43 = load ptr, ptr %4, align 8, !tbaa !9
  store ptr %43, ptr @_ZN6norlit2gc4Heap18large_object_spaceE, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %44 = load ptr, ptr %4, align 8, !tbaa !9
  %45 = getelementptr inbounds %"struct.norlit::gc::Heap::LargeObjectNode", ptr %44, i64 1
  store ptr %45, ptr %5, align 8, !tbaa !9
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %46, ptr @_ZN6norlit2gc4Heap17allocating_objectE, align 8, !tbaa !9
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %47)
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %49, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %86

50:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %51 = load ptr, ptr @_ZN6norlit2gc4Heap10eden_spaceE, align 8, !tbaa !9
  %52 = load i64, ptr %3, align 8, !tbaa !5
  %53 = call noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40) %51, i64 noundef %52, i1 noundef zeroext false)
  store ptr %53, ptr %6, align 8, !tbaa !9
  %54 = load ptr, ptr %6, align 8, !tbaa !9
  %55 = icmp ne ptr %54, null
  br i1 %55, label %81, label %56

56:                                               ; preds = %50
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %58 = load i64, ptr @_ZN6norlit2gc4Heap13no_gc_counterE, align 8, !tbaa !5
  %59 = icmp ne i64 %58, 0
  br i1 %59, label %75, label %60

60:                                               ; preds = %56
  %61 = load i8, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13, !range !15, !noundef !16
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  call void @_ZN6norlit2gc4Heap7MajorGCEv()
  store i8 0, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13
  br label %65

64:                                               ; preds = %60
  call void @_ZN6norlit2gc4Heap7MinorGCEv()
  br label %65

65:                                               ; preds = %64, %63
  %66 = load ptr, ptr @_ZN6norlit2gc4Heap10eden_spaceE, align 8, !tbaa !9
  %67 = load i64, ptr %3, align 8, !tbaa !5
  %68 = call noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40) %66, i64 noundef %67, i1 noundef zeroext false)
  store ptr %68, ptr %6, align 8, !tbaa !9
  %69 = load ptr, ptr %6, align 8, !tbaa !9
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %72

71:                                               ; preds = %65
  br label %74

72:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 316, ptr noundef @__PRETTY_FUNCTION__._ZN6norlit2gc4Heap8AllocateEm) #6
  unreachable

73:                                               ; No predecessors!
  br label %74

74:                                               ; preds = %73, %71
  br label %80

75:                                               ; preds = %56
  %76 = load ptr, ptr @_ZN6norlit2gc4Heap19survivor_from_spaceE, align 8, !tbaa !9
  %77 = load i64, ptr %3, align 8, !tbaa !5
  %78 = call noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40) %76, i64 noundef %77, i1 noundef zeroext true)
  store ptr %78, ptr %6, align 8, !tbaa !9
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %80

80:                                               ; preds = %75, %74
  br label %81

81:                                               ; preds = %80, %50
  %82 = load ptr, ptr %6, align 8, !tbaa !9
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %82)
  %84 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %84, ptr @_ZN6norlit2gc4Heap17allocating_objectE, align 8, !tbaa !9
  %85 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %85, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %86

86:                                               ; preds = %81, %31
  %87 = load ptr, ptr %2, align 8
  ret ptr %87
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare ptr @__cxa_allocate_exception(i64)

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

; Function Attrs: nounwind
declare void @_ZNSt9bad_allocD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6norlit2gc4Heap7MajorGCEv() #1 align 2

declare noundef ptr @_ZN6norlit2gc8Platform8AllocateEm(i64 noundef) #5

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

declare noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6norlit2gc4Heap7MinorGCEv() #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #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 = { "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 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTSN6norlit2gc4Heap15LargeObjectNodeE", !10, i64 0, !10, i64 8}
!19 = !{!18, !10, i64 8}


; 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.norlit::gc::Heap::LargeObjectNode" = type { ptr, ptr }

@_ZN6norlit2gc4Heap18large_object_spaceE = external dso_local global %"struct.norlit::gc::Heap::LargeObjectNode", align 8
@_ZN6norlit2gc4Heap10eden_spaceE = external dso_local local_unnamed_addr global ptr, align 8
@_ZN6norlit2gc4Heap19survivor_from_spaceE = external dso_local local_unnamed_addr global ptr, align 8
@_ZN6norlit2gc4Heap15allocating_sizeE = external dso_local local_unnamed_addr global i32, align 4
@_ZN6norlit2gc4Heap17allocating_objectE = external dso_local local_unnamed_addr global ptr, align 8
@_ZN6norlit2gc4Heap17full_gc_suggestedE = external dso_local local_unnamed_addr global i8, align 1
@_ZN6norlit2gc4Heap13no_gc_counterE = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__._ZN6norlit2gc4Heap8AllocateEm = external hidden unnamed_addr constant [48 x i8], align 1
@_ZTISt9bad_alloc = external constant ptr
@.str.2 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6norlit2gc4Heap8AllocateEm(i64 noundef %0) local_unnamed_addr #0 align 2 {
  %2 = load ptr, ptr @_ZN6norlit2gc4Heap17allocating_objectE, align 8, !tbaa !5
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %4, label %3

3:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 264, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6norlit2gc4Heap8AllocateEm) #6
  unreachable

4:                                                ; preds = %1
  %5 = icmp ugt i64 %0, 4294967295
  br i1 %5, label %6, label %8

6:                                                ; preds = %4
  %7 = tail call ptr @__cxa_allocate_exception(i64 8) #7
  tail call void @_ZNSt9bad_allocC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  tail call void @__cxa_throw(ptr nonnull %7, ptr nonnull @_ZTISt9bad_alloc, ptr nonnull @_ZNSt9bad_allocD1Ev) #8
  unreachable

8:                                                ; preds = %4
  %9 = add nuw nsw i64 %0, 7
  %10 = and i64 %9, 8589934584
  %11 = trunc i64 %10 to i32
  store i32 %11, ptr @_ZN6norlit2gc4Heap15allocating_sizeE, align 4, !tbaa !9
  %12 = icmp ugt i64 %10, 4096
  br i1 %12, label %13, label %27

13:                                               ; preds = %8
  %14 = load i64, ptr @_ZN6norlit2gc4Heap13no_gc_counterE, align 8, !tbaa !11
  %.not29 = icmp eq i64 %14, 0
  br i1 %.not29, label %15, label %19

15:                                               ; preds = %13
  %16 = load i8, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13, !range !15, !noundef !16
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  tail call void @_ZN6norlit2gc4Heap7MajorGCEv()
  br label %19

19:                                               ; preds = %13, %15, %18
  %storemerge = phi i8 [ 0, %18 ], [ 1, %15 ], [ 1, %13 ]
  store i8 %storemerge, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13
  %20 = add nuw nsw i64 %10, 16
  %21 = tail call noundef ptr @_ZN6norlit2gc8Platform8AllocateEm(i64 noundef %20)
  %22 = load ptr, ptr @_ZN6norlit2gc4Heap18large_object_spaceE, align 8, !tbaa !17
  store ptr %22, ptr %21, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %21, i64 8
  store ptr @_ZN6norlit2gc4Heap18large_object_spaceE, ptr %23, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %22, i64 8
  store ptr %21, ptr %24, align 8, !tbaa !19
  store ptr %21, ptr @_ZN6norlit2gc4Heap18large_object_spaceE, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %21, i64 16
  store ptr %25, ptr @_ZN6norlit2gc4Heap17allocating_objectE, align 8, !tbaa !5
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %25)
  br label %48

27:                                               ; preds = %8
  %28 = load ptr, ptr @_ZN6norlit2gc4Heap10eden_spaceE, align 8, !tbaa !5
  %29 = tail call noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40) %28, i64 noundef %10, i1 noundef zeroext false)
  %.not26 = icmp eq ptr %29, null
  br i1 %.not26, label %30, label %46

30:                                               ; preds = %27
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %32 = load i64, ptr @_ZN6norlit2gc4Heap13no_gc_counterE, align 8, !tbaa !11
  %.not27 = icmp eq i64 %32, 0
  br i1 %.not27, label %33, label %42

33:                                               ; preds = %30
  %34 = load i8, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13, !range !15, !noundef !16
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  tail call void @_ZN6norlit2gc4Heap7MajorGCEv()
  store i8 0, ptr @_ZN6norlit2gc4Heap17full_gc_suggestedE, align 1, !tbaa !13
  br label %38

37:                                               ; preds = %33
  tail call void @_ZN6norlit2gc4Heap7MinorGCEv()
  br label %38

38:                                               ; preds = %37, %36
  %39 = load ptr, ptr @_ZN6norlit2gc4Heap10eden_spaceE, align 8, !tbaa !5
  %40 = tail call noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40) %39, i64 noundef %10, i1 noundef zeroext false)
  %.not28 = icmp eq ptr %40, null
  br i1 %.not28, label %41, label %46

41:                                               ; preds = %38
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 316, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6norlit2gc4Heap8AllocateEm) #6
  unreachable

42:                                               ; preds = %30
  %43 = load ptr, ptr @_ZN6norlit2gc4Heap19survivor_from_spaceE, align 8, !tbaa !5
  %44 = tail call noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40) %43, i64 noundef %10, i1 noundef zeroext true)
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %46

46:                                               ; preds = %42, %38, %27
  %.0 = phi ptr [ %29, %27 ], [ %44, %42 ], [ %40, %38 ]
  %47 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %.0)
  store ptr %.0, ptr @_ZN6norlit2gc4Heap17allocating_objectE, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %46, %19
  %.021 = phi ptr [ %25, %19 ], [ %.0, %46 ]
  ret ptr %.021
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

; Function Attrs: nounwind
declare void @_ZNSt9bad_allocD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6norlit2gc4Heap7MajorGCEv() local_unnamed_addr #0 align 2

declare noundef ptr @_ZN6norlit2gc8Platform8AllocateEm(i64 noundef) local_unnamed_addr #4

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

declare noundef ptr @_ZN6norlit2gc11MemorySpace8AllocateEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6norlit2gc4Heap7MinorGCEv() local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { 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 #2 = { 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 #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 = { 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 #6 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSN6norlit2gc4Heap15LargeObjectNodeE", !6, i64 0, !6, i64 8}
!19 = !{!18, !6, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass