; LLVM IR from Aeternum-Veritas/Merry :: legacy/MerryAssembler/src/parser.ll (ZN5merry9front_end6Parser7get_astEv)

; 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"

%"class.merry::front_end::Ast" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::variant" = type { %"struct.std::__detail::__variant::_Variant_base.base", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base" = type { %"struct.std::__detail::__variant::_Move_assign_base.base" }
%"struct.std::__detail::__variant::_Move_assign_base.base" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base" }
%"struct.std::__detail::__variant::_Copy_assign_base.base" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base" }
%"struct.std::__detail::__variant::_Move_ctor_base.base" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base" = type { %"struct.std::__detail::__variant::_Variant_storage.base" }
%"struct.std::__detail::__variant::_Variant_storage.base" = type { %"union.std::__detail::__variant::_Variadic_union", i8 }
%"union.std::__detail::__variant::_Variadic_union" = type { %"struct.std::__detail::__variant::_Uninitialized" }
%"struct.std::__detail::__variant::_Uninitialized" = type { %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [40 x i8] }
%"class.merry::front_end::AstNodeLabel" = type { %"class.std::__cxx11::basic_string", i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5merry9front_end6Parser7get_astEv(ptr dead_on_unwind noalias writable sret(%"class.merry::front_end::Ast") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::variant", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::variant", align 8
  %10 = alloca %"class.merry::front_end::AstNodeLabel", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZN5merry9front_end3AstC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %14

14:                                               ; preds = %62, %2
  br label %15

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #5
  invoke void @_ZN5merry9front_end6Parser13get_next_nodeEv(ptr dead_on_unwind writable sret(%"class.std::variant") align 8 %6, ptr noundef nonnull align 8 dereferenceable(96) %13)
          to label %16 unwind label %29

16:                                               ; preds = %15
  invoke void @_ZNSt7variantIJN5merry9front_end11AstNodeInstENS1_12AstNodeLabelEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(41) %9, ptr noundef nonnull align 8 dereferenceable(41) %6)
          to label %17 unwind label %33

17:                                               ; preds = %16
  invoke void @_ZN5merry9front_end3Ast17add_inst_or_labelESt7variantIJNS0_11AstNodeInstENS0_12AstNodeLabelEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %9)
          to label %18 unwind label %37

18:                                               ; preds = %17
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %9) #5
  %19 = call noundef i64 @_ZNKSt7variantIJN5merry9front_end11AstNodeInstENS1_12AstNodeLabelEEE5indexEv(ptr noundef nonnull align 8 dereferenceable(41) %6) #5
  %20 = icmp eq i64 %19, 1
  br i1 %20, label %21, label %59

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #5
  %22 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getIN5merry9front_end12AstNodeLabelEJNS1_11AstNodeInstES2_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(41) %6)
          to label %23 unwind label %41

23:                                               ; preds = %21
  invoke void @_ZN5merry9front_end12AstNodeLabelC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %24 unwind label %41

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  invoke void @_ZN5merry9front_end12AstNodeLabel8get_nameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %25 unwind label %45

25:                                               ; preds = %24
  %26 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str)
          to label %27 unwind label %49

27:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br i1 %26, label %28, label %54

28:                                               ; preds = %27
  store i32 3, ptr %12, align 4
  br label %55

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %7, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %8, align 4
  br label %64

33:                                               ; preds = %16
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  br label %63

37:                                               ; preds = %17
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %9) #5
  br label %63

41:                                               ; preds = %23, %21
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  br label %58

45:                                               ; preds = %24
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  br label %53

49:                                               ; preds = %25
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %7, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %53

53:                                               ; preds = %49, %45
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @_ZN5merry9front_end12AstNodeLabelD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  br label %58

54:                                               ; preds = %27
  store i32 0, ptr %12, align 4
  br label %55

55:                                               ; preds = %54, %28
  call void @_ZN5merry9front_end12AstNodeLabelD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #5
  %56 = load i32, ptr %12, align 4
  switch i32 %56, label %60 [
    i32 0, label %57
  ]

57:                                               ; preds = %55
  br label %59

58:                                               ; preds = %53, %41
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #5
  br label %63

59:                                               ; preds = %57, %18
  store i32 0, ptr %12, align 4
  br label %60

60:                                               ; preds = %59, %55
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #5
  %61 = load i32, ptr %12, align 4
  switch i32 %61, label %74 [
    i32 0, label %62
    i32 3, label %65
  ]

62:                                               ; preds = %60
  br label %14, !llvm.loop !9

63:                                               ; preds = %58, %37, %33
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %6) #5
  br label %64

64:                                               ; preds = %63, %29
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #5
  call void @_ZN5merry9front_end3AstD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %69

65:                                               ; preds = %60
  store i1 true, ptr %5, align 1
  store i32 1, ptr %12, align 4
  %66 = load i1, ptr %5, align 1
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  call void @_ZN5merry9front_end3AstD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %68

68:                                               ; preds = %67, %65
  ret void

69:                                               ; preds = %64
  %70 = load ptr, ptr %7, align 8
  %71 = load i32, ptr %8, align 4
  %72 = insertvalue { ptr, i32 } poison, ptr %70, 0
  %73 = insertvalue { ptr, i32 } %72, i32 %71, 1
  resume { ptr, i32 } %73

74:                                               ; preds = %60
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5merry9front_end6Parser13get_next_nodeEv(ptr dead_on_unwind noalias writable sret(%"class.std::variant") align 8, ptr noundef nonnull align 8 dereferenceable(96)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt7variantIJN5merry9front_end11AstNodeInstENS1_12AstNodeLabelEEE5indexEv(ptr noundef nonnull align 8 dereferenceable(41)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getIN5merry9front_end12AstNodeLabelEJNS1_11AstNodeInstES2_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(41)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5merry9front_end12AstNodeLabelC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5merry9front_end12AstNodeLabel8get_nameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5merry9front_end3AstD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { inlinehint 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 #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.merry::front_end::Ast" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>, std::allocator<std::variant<merry::front_end::AstNodeInst, merry::front_end::AstNodeLabel>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::variant" = type { %"struct.std::__detail::__variant::_Variant_base.base", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base" = type { %"struct.std::__detail::__variant::_Move_assign_base.base" }
%"struct.std::__detail::__variant::_Move_assign_base.base" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base" }
%"struct.std::__detail::__variant::_Copy_assign_base.base" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base" }
%"struct.std::__detail::__variant::_Move_ctor_base.base" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base" = type { %"struct.std::__detail::__variant::_Variant_storage.base" }
%"struct.std::__detail::__variant::_Variant_storage.base" = type { %"union.std::__detail::__variant::_Variadic_union", i8 }
%"union.std::__detail::__variant::_Variadic_union" = type { %"struct.std::__detail::__variant::_Uninitialized" }
%"struct.std::__detail::__variant::_Uninitialized" = type { %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [40 x i8] }
%"class.merry::front_end::AstNodeLabel" = type { %"class.std::__cxx11::basic_string", i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5merry9front_end6Parser7get_astEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.merry::front_end::Ast") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::variant", align 8
  %4 = alloca %"class.std::variant", align 8
  %5 = alloca %"class.merry::front_end::AstNodeLabel", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN5merry9front_end3AstC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %7

7:                                                ; preds = %.critedge, %2
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  invoke void @_ZN5merry9front_end6Parser13get_next_nodeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::variant") align 8 %3, ptr noundef nonnull align 8 dereferenceable(96) %1)
          to label %8 unwind label %19

8:                                                ; preds = %7
  invoke void @_ZNSt7variantIJN5merry9front_end11AstNodeInstENS1_12AstNodeLabelEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(41) %4, ptr noundef nonnull align 8 dereferenceable(41) %3)
          to label %9 unwind label %21

9:                                                ; preds = %8
  invoke void @_ZN5merry9front_end3Ast17add_inst_or_labelESt7variantIJNS0_11AstNodeInstENS0_12AstNodeLabelEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull %4)
          to label %10 unwind label %23

10:                                               ; preds = %9
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %4) #5
  %11 = call noundef i64 @_ZNKSt7variantIJN5merry9front_end11AstNodeInstENS1_12AstNodeLabelEEE5indexEv(ptr noundef nonnull align 8 dereferenceable(41) %3) #5
  %12 = icmp eq i64 %11, 1
  br i1 %12, label %13, label %.critedge

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  %14 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getIN5merry9front_end12AstNodeLabelEJNS1_11AstNodeInstES2_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(41) %3)
          to label %15 unwind label %25

15:                                               ; preds = %13
  invoke void @_ZN5merry9front_end12AstNodeLabelC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %16 unwind label %25

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  invoke void @_ZN5merry9front_end12AstNodeLabel8get_nameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %17 unwind label %27

17:                                               ; preds = %16
  %18 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZN5merry9front_end12AstNodeLabelD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br i1 %18, label %30, label %.critedge

19:                                               ; preds = %7
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %32

21:                                               ; preds = %8
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %31

23:                                               ; preds = %9
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %4) #5
  br label %31

25:                                               ; preds = %15, %13
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %16
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZN5merry9front_end12AstNodeLabelD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br label %31

.critedge:                                        ; preds = %17, %10
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  br label %7

30:                                               ; preds = %17
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  ret void

31:                                               ; preds = %29, %23, %21
  %.pn.pn = phi { ptr, i32 } [ %.pn, %29 ], [ %24, %23 ], [ %22, %21 ]
  call void @_ZNSt8__detail9__variant16_Variant_storageILb0EJN5merry9front_end11AstNodeInstENS3_12AstNodeLabelEEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #5
  br label %32

32:                                               ; preds = %31, %19
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %31 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  call void @_ZN5merry9front_end3AstD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5merry9front_end6Parser13get_next_nodeEv(ptr dead_on_unwind noalias writable sret(%"class.std::variant") align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5merry9front_end3Ast17add_inst_or_labelESt7variantIJNS0_11AstNodeInstENS0_12AstNodeLabelEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt7variantIJN5merry9front_end11AstNodeInstENS1_12AstNodeLabelEEE5indexEv(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getIN5merry9front_end12AstNodeLabelEJNS1_11AstNodeInstES2_EERT_RSt7variantIJDpT0_EE(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5merry9front_end12AstNodeLabelC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5merry9front_end12AstNodeLabel8get_nameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5merry9front_end3AstD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { inlinehint 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 #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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass