; LLVM IR from junhyeokahn/PyPnC :: external_source/yaml/src/nodeevents.ll (ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE)

; 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.YAML::detail::node_iterator_base" = type { i32, %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator.17", %"class.__gnu_cxx::__normal_iterator.17" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.17" = type { ptr }
%"struct.YAML::detail::node_iterator_value" = type { %"struct.std::pair.18", ptr }
%"struct.std::pair.18" = type { ptr, ptr }
%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy" = type { %"struct.YAML::detail::node_iterator_value" }
%"class.YAML::NodeEvents" = type { %"class.std::shared_ptr.9", ptr, %"class.std::map.12" }
%"class.std::shared_ptr.9" = type { %"class.std::__shared_ptr.10" }
%"class.std::__shared_ptr.10" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::map.12" = type { %"class.std::_Rb_tree.13" }
%"class.std::_Rb_tree.13" = type { %"struct.std::_Rb_tree<const YAML::detail::node_ref *, std::pair<const YAML::detail::node_ref *const, int>, std::_Select1st<std::pair<const YAML::detail::node_ref *const, int>>, std::less<const YAML::detail::node_ref *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const YAML::detail::node_ref *, std::pair<const YAML::detail::node_ref *const, int>, std::_Select1st<std::pair<const YAML::detail::node_ref *const, int>>, std::less<const YAML::detail::node_ref *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

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

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

; 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 void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %9 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %10 = alloca %"struct.YAML::detail::node_iterator_value", align 8
  %11 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %12 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %13 = alloca %"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy", align 8
  %14 = alloca %"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %16 = getelementptr inbounds %"class.YAML::NodeEvents", ptr %15, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNK4YAML6detail4node3refEv(ptr noundef nonnull align 8 dereferenceable(64) %17)
  store ptr %18, ptr %6, align 8, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIPKN4YAML6detail8node_refEiSt4lessIS4_ESaISt4pairIKS4_iEEEixEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  store ptr %19, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 4, !tbaa !9
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = icmp sgt i32 %24, 1
  br i1 %25, label %26, label %27

26:                                               ; preds = %2
  store i32 1, ptr %7, align 4
  br label %64

27:                                               ; preds = %2
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef i32 @_ZNK4YAML6detail4node4typeEv(ptr noundef nonnull align 8 dereferenceable(64) %28)
  %30 = icmp eq i32 %29, 3
  br i1 %30, label %31, label %42

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #3
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK4YAML6detail4node5beginEv(ptr dead_on_unwind writable sret(%"class.YAML::detail::node_iterator_base") align 8 %8, ptr noundef nonnull align 8 dereferenceable(64) %32)
  br label %33

33:                                               ; preds = %39, %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #3
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind writable sret(%"class.YAML::detail::node_iterator_base") align 8 %9, ptr noundef nonnull align 8 dereferenceable(64) %34)
  %35 = call noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #3
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #3
  br label %41

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #3
  call void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEdeEv(ptr dead_on_unwind writable sret(%"struct.YAML::detail::node_iterator_value") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %8)
  %38 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK4YAML6detail19node_iterator_valueIKNS0_4nodeEEdeEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef nonnull align 8 dereferenceable(64) %38)
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #3
  br label %39

39:                                               ; preds = %37
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEEppEv(ptr noundef nonnull align 8 dereferenceable(32) %8)
  br label %33, !llvm.loop !11

41:                                               ; preds = %36
  br label %63

42:                                               ; preds = %27
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = call noundef i32 @_ZNK4YAML6detail4node4typeEv(ptr noundef nonnull align 8 dereferenceable(64) %43)
  %45 = icmp eq i32 %44, 4
  br i1 %45, label %46, label %62

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #3
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK4YAML6detail4node5beginEv(ptr dead_on_unwind writable sret(%"class.YAML::detail::node_iterator_base") align 8 %11, ptr noundef nonnull align 8 dereferenceable(64) %47)
  br label %48

48:                                               ; preds = %59, %46
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #3
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind writable sret(%"class.YAML::detail::node_iterator_base") align 8 %12, ptr noundef nonnull align 8 dereferenceable(64) %49)
  %50 = call noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #3
  br label %61

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #3
  call void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEptEv(ptr dead_on_unwind writable sret(%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %11)
  %53 = call noundef ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEE5proxyptEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %54 = getelementptr inbounds %"struct.std::pair.18", ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  call void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef nonnull align 8 dereferenceable(64) %55)
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #3
  call void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEptEv(ptr dead_on_unwind writable sret(%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %11)
  %56 = call noundef ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEE5proxyptEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %57 = getelementptr inbounds %"struct.std::pair.18", ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !15
  call void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef nonnull align 8 dereferenceable(64) %58)
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #3
  br label %59

59:                                               ; preds = %52
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEEppEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  br label %48, !llvm.loop !16

61:                                               ; preds = %51
  br label %62

62:                                               ; preds = %61, %42
  br label %63

63:                                               ; preds = %62, %41
  store i32 0, ptr %7, align 4
  br label %64

64:                                               ; preds = %63, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  %65 = load i32, ptr %7, align 4
  switch i32 %65, label %67 [
    i32 0, label %66
    i32 1, label %66
  ]

66:                                               ; preds = %64, %64
  ret void

67:                                               ; preds = %64
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail4node5beginEv(ptr dead_on_unwind noalias writable sret(%"class.YAML::detail::node_iterator_base") align 8, ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind noalias writable sret(%"class.YAML::detail::node_iterator_base") align 8, ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEdeEv(ptr dead_on_unwind noalias writable sret(%"struct.YAML::detail::node_iterator_value") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEptEv(ptr dead_on_unwind noalias writable sret(%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIPKN4YAML6detail4nodeES4_E", !6, i64 0, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = distinct !{!16, !12}


; 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.YAML::detail::node_iterator_base" = type { i32, %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator.17", %"class.__gnu_cxx::__normal_iterator.17" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.17" = type { ptr }
%"struct.YAML::detail::node_iterator_value" = type { %"struct.std::pair.18", ptr }
%"struct.std::pair.18" = type { ptr, ptr }
%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy" = type { %"struct.YAML::detail::node_iterator_value" }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4YAML6detail4node3refEv(ptr noundef nonnull align 8 dereferenceable(64)) local_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) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(64) %1) local_unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %5 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %6 = alloca %"struct.YAML::detail::node_iterator_value", align 8
  %7 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %8 = alloca %"class.YAML::detail::node_iterator_base", align 8
  %9 = alloca %"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy", align 8
  %10 = alloca %"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy", align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %12 = tail call noundef ptr @_ZNK4YAML6detail4node3refEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  store ptr %12, ptr %3, align 8, !tbaa !5
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIPKN4YAML6detail8node_refEiSt4lessIS4_ESaISt4pairIKS4_iEEEixEOS4_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr %13, align 4, !tbaa !9
  %16 = icmp sgt i32 %14, 0
  br i1 %16, label %37, label %17

17:                                               ; preds = %2
  %18 = call noundef i32 @_ZNK4YAML6detail4node4typeEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %19 = icmp eq i32 %18, 3
  br i1 %19, label %20, label %25

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  call void @_ZNK4YAML6detail4node5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.YAML::detail::node_iterator_base") align 8 %4, ptr noundef nonnull align 8 dereferenceable(64) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind nonnull writable sret(%"class.YAML::detail::node_iterator_base") align 8 %5, ptr noundef nonnull align 8 dereferenceable(64) %1)
  %21 = call noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br i1 %21, label %.lr.ph11, label %._crit_edge12

._crit_edge12:                                    ; preds = %.lr.ph11, %20
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  br label %37

.lr.ph11:                                         ; preds = %20, %.lr.ph11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEdeEv(ptr dead_on_unwind nonnull writable sret(%"struct.YAML::detail::node_iterator_value") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4)
  %22 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK4YAML6detail19node_iterator_valueIKNS0_4nodeEEdeEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(64) %22)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEEppEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind nonnull writable sret(%"class.YAML::detail::node_iterator_base") align 8 %5, ptr noundef nonnull align 8 dereferenceable(64) %1)
  %24 = call noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br i1 %24, label %.lr.ph11, label %._crit_edge12, !llvm.loop !11

25:                                               ; preds = %17
  %26 = call noundef i32 @_ZNK4YAML6detail4node4typeEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %27 = icmp eq i32 %26, 4
  br i1 %27, label %28, label %37

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #3
  call void @_ZNK4YAML6detail4node5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.YAML::detail::node_iterator_base") align 8 %7, ptr noundef nonnull align 8 dereferenceable(64) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #3
  call void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind nonnull writable sret(%"class.YAML::detail::node_iterator_base") align 8 %8, ptr noundef nonnull align 8 dereferenceable(64) %1)
  %29 = call noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #3
  br i1 %29, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %28
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  br label %37

.lr.ph:                                           ; preds = %28, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #3
  call void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEptEv(ptr dead_on_unwind nonnull writable sret(%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %7)
  %30 = call noundef ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEE5proxyptEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  call void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(64) %31)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #3
  call void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEptEv(ptr dead_on_unwind nonnull writable sret(%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %7)
  %32 = call noundef ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEE5proxyptEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  call void @_ZN4YAML10NodeEvents5SetupERKNS_6detail4nodeE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(64) %34)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #3
  %35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4YAML6detail18node_iterator_baseIKNS0_4nodeEEppEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #3
  call void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind nonnull writable sret(%"class.YAML::detail::node_iterator_base") align 8 %8, ptr noundef nonnull align 8 dereferenceable(64) %1)
  %36 = call noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #3
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !16

37:                                               ; preds = %._crit_edge12, %._crit_edge, %25, %2
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail4node5beginEv(ptr dead_on_unwind noalias writable sret(%"class.YAML::detail::node_iterator_base") align 8, ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEneIS3_EEbRKNS1_IT_EE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail4node3endEv(ptr dead_on_unwind noalias writable sret(%"class.YAML::detail::node_iterator_base") align 8, ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEdeEv(ptr dead_on_unwind noalias writable sret(%"struct.YAML::detail::node_iterator_value") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZNK4YAML6detail19node_iterator_valueIKNS0_4nodeEEdeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4YAML6detail18node_iterator_baseIKNS0_4nodeEEptEv(ptr dead_on_unwind noalias writable sret(%"struct.YAML::detail::node_iterator_base<const YAML::detail::node>::proxy") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIPKN4YAML6detail4nodeES4_E", !6, i64 0, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = distinct !{!16, !12}


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