; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/数据结构/可持久化Treap.ll (ZN21shared_treap_pushdown5splitEPNS_4nodeEi)

; 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.std::pair.18" = type { %"struct.shared_treap_pushdown::pointer", %"struct.shared_treap_pushdown::pointer" }
%"struct.shared_treap_pushdown::pointer" = type { ptr }
%"struct.shared_treap_pushdown::node" = type { %"struct.shared_treap_pushdown::pointer", %"struct.shared_treap_pushdown::pointer", i32, i32, i32, i32, i64 }

@_ZN21shared_treap_pushdownL3nilE = external hidden constant ptr, align 8

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN21shared_treap_pushdown4copyEPNS_4nodeE(ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN21shared_treap_pushdown4node4downEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21shared_treap_pushdown5splitEPNS_4nodeEi(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.18") align 8 %0, ptr noundef %1, i32 noundef %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair.18", align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.18", align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRKPNS0_4nodeERS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) @_ZN21shared_treap_pushdownL3nilE, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br label %83

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %19, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %18
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRPNS0_4nodeERKS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) @_ZN21shared_treap_pushdownL3nilE)
  br label %83

25:                                               ; preds = %18
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef ptr @_ZN21shared_treap_pushdown4copyEPNS_4nodeE(ptr noundef %26)
  store ptr %27, ptr %5, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN21shared_treap_pushdown4node4downEv(ptr noundef nonnull align 8 dereferenceable(40) %28)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %29, i32 0, i32 0
  %31 = call noundef ptr @_ZN21shared_treap_pushdown7pointerptEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 8, !tbaa !11
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = icmp sge i32 %33, %34
  br i1 %35, label %36, label %56

36:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %37, i32 0, i32 0
  %39 = call noundef ptr @_ZNK21shared_treap_pushdown7pointercvPNS_4nodeEEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
  %40 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN21shared_treap_pushdown5splitEPNS_4nodeEi(ptr dead_on_unwind writable sret(%"struct.std::pair.18") align 8 %7, ptr noundef %39, i32 noundef %40)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  store ptr %41, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  store ptr %42, ptr %9, align 8, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %44, i32 0, i32 0
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN21shared_treap_pushdown7pointeraSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %47 unwind label %52

47:                                               ; preds = %36
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN21shared_treap_pushdown4node2upEv(ptr noundef nonnull align 8 dereferenceable(40) %48)
          to label %49 unwind label %52

49:                                               ; preds = %47
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRS1_RPNS0_4nodeETnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %51 unwind label %52

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %83

52:                                               ; preds = %49, %47, %36
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %10, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %84

56:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %57, i32 0, i32 1
  %59 = call noundef ptr @_ZNK21shared_treap_pushdown7pointercvPNS_4nodeEEv(ptr noundef nonnull align 8 dereferenceable(8) %58)
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %61, i32 0, i32 0
  %63 = call noundef ptr @_ZN21shared_treap_pushdown7pointerptEv(ptr noundef nonnull align 8 dereferenceable(8) %62)
  %64 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %63, i32 0, i32 2
  %65 = load i32, ptr %64, align 8, !tbaa !11
  %66 = sub nsw i32 %60, %65
  %67 = sub nsw i32 %66, 1
  call void @_ZN21shared_treap_pushdown5splitEPNS_4nodeEi(ptr dead_on_unwind writable sret(%"struct.std::pair.18") align 8 %12, ptr noundef %59, i32 noundef %67)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  store ptr %68, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  store ptr %69, ptr %14, align 8, !tbaa !5
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.shared_treap_pushdown::node", ptr %71, i32 0, i32 1
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN21shared_treap_pushdown7pointeraSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %70)
          to label %74 unwind label %79

74:                                               ; preds = %56
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN21shared_treap_pushdown4node2upEv(ptr noundef nonnull align 8 dereferenceable(40) %75)
          to label %76 unwind label %79

76:                                               ; preds = %74
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRPNS0_4nodeERS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %78 unwind label %79

78:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %83

79:                                               ; preds = %76, %74, %56
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %84

83:                                               ; preds = %78, %51, %24, %17
  ret void

84:                                               ; preds = %79, %52
  %85 = load ptr, ptr %10, align 8
  %86 = load i32, ptr %11, align 4
  %87 = insertvalue { ptr, i32 } poison, ptr %85, 0
  %88 = insertvalue { ptr, i32 } %87, i32 %86, 1
  resume { ptr, i32 } %88
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16)) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN21shared_treap_pushdown4nodeE", !13, i64 0, !13, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !14, i64 32}
!13 = !{!"_ZTSN21shared_treap_pushdown7pointerE", !6, i64 0}
!14 = !{!"long long", !7, i64 0}


; 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.std::pair.18" = type { %"struct.shared_treap_pushdown::pointer", %"struct.shared_treap_pushdown::pointer" }
%"struct.shared_treap_pushdown::pointer" = type { ptr }

@_ZN21shared_treap_pushdownL3nilE = external hidden constant ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN21shared_treap_pushdown4copyEPNS_4nodeE(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN21shared_treap_pushdown4node4downEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21shared_treap_pushdown5splitEPNS_4nodeEi(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.18") align 8 %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.std::pair.18", align 8
  %6 = alloca %"struct.std::pair.18", align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = icmp eq i32 %2, 0
  br i1 %7, label %8, label %9

8:                                                ; preds = %3
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRKPNS0_4nodeERS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) @_ZN21shared_treap_pushdownL3nilE, ptr noundef nonnull align 8 dereferenceable(8) %4)
  br label %47

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %.not = icmp sgt i32 %11, %2
  br i1 %.not, label %13, label %12

12:                                               ; preds = %9
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRPNS0_4nodeERKS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) @_ZN21shared_treap_pushdownL3nilE)
  br label %47

13:                                               ; preds = %9
  %14 = tail call noundef ptr @_ZN21shared_treap_pushdown4copyEPNS_4nodeE(ptr noundef nonnull %1)
  store ptr %14, ptr %4, align 8, !tbaa !5
  tail call void @_ZN21shared_treap_pushdown4node4downEv(ptr noundef nonnull align 8 dereferenceable(40) %14)
  %15 = tail call noundef ptr @_ZN21shared_treap_pushdown7pointerptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %.not12 = icmp slt i32 %17, %2
  br i1 %.not12, label %29, label %18

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %19 = tail call noundef ptr @_ZNK21shared_treap_pushdown7pointercvPNS_4nodeEEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @_ZN21shared_treap_pushdown5splitEPNS_4nodeEi(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.18") align 8 %5, ptr noundef %19, i32 noundef %2)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN21shared_treap_pushdown7pointeraSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %24 unwind label %27

24:                                               ; preds = %18
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN21shared_treap_pushdown4node2upEv(ptr noundef nonnull align 8 dereferenceable(40) %25)
  invoke void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRS1_RPNS0_4nodeETnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %26 unwind label %27

26:                                               ; preds = %24
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %47

27:                                               ; preds = %24, %18
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %48

29:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %30 = getelementptr inbounds i8, ptr %14, i64 8
  %31 = tail call noundef ptr @_ZNK21shared_treap_pushdown7pointercvPNS_4nodeEEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = tail call noundef ptr @_ZN21shared_treap_pushdown7pointerptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load i32, ptr %33, align 8, !tbaa !9
  %35 = xor i32 %34, -1
  %36 = add i32 %35, %2
  call void @_ZN21shared_treap_pushdown5splitEPNS_4nodeEi(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.18") align 8 %6, ptr noundef %31, i32 noundef %36)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EN21shared_treap_pushdown7pointerES1_EONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS6_(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN21shared_treap_pushdown7pointeraSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %42 unwind label %45

42:                                               ; preds = %29
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN21shared_treap_pushdown4node2upEv(ptr noundef nonnull align 8 dereferenceable(40) %43)
  invoke void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_EC2IRPNS0_4nodeERS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %44 unwind label %45

44:                                               ; preds = %42
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %47

45:                                               ; preds = %42, %29
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIN21shared_treap_pushdown7pointerES1_ED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %48

47:                                               ; preds = %44, %26, %12, %8
  ret void

48:                                               ; preds = %45, %27
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %46, %45 ]
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = { 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 = !{!10, !12, i64 16}
!10 = !{!"_ZTSN21shared_treap_pushdown4nodeE", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !13, i64 32}
!11 = !{!"_ZTSN21shared_treap_pushdown7pointerE", !6, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long long", !7, i64 0}


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