; LLVM IR from yinqiwen/ardb :: src/common/channel/timer (timer)

; 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.btree::btree_iterator" = type <{ ptr, i32, [4 x i8] }>
%"struct.btree::btree_iterator.3" = type <{ ptr, i32, [4 x i8] }>
%"class.ardb::Timer" = type { ptr, %"class.ardb::TimerTaskQueue", %"class.btree::btree_map" }
%"class.ardb::TimerTaskQueue" = type { ptr, i32, i32 }
%"class.btree::btree_map" = type { %"class.btree::btree_map_container" }
%"class.btree::btree_map_container" = type { %"class.btree::btree_unique_container" }
%"class.btree::btree_unique_container" = type { %"class.btree::btree_container" }
%"class.btree::btree_container" = type { %"class.btree::btree" }
%"class.btree::btree" = type { %"struct.btree::btree<btree::btree_map_params<unsigned int, ardb::TimerTask *, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, ardb::TimerTask *>>, 256>>::empty_base_handle" }
%"struct.btree::btree<btree::btree_map_params<unsigned int, ardb::TimerTask *, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, ardb::TimerTask *>>, 256>>::empty_base_handle" = type { ptr }

@_ZTISt9bad_alloc = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

; 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
declare dso_local void @_ZN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE4findERS9_(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEERSA_PSA_EneERKNS0_IKSD_RKSA_PSI_EE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4ardb5Timer10DoScheduleEPNS_9TimerTaskEllNS_8TimeUnitE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, i64 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4ardb5Timer10DoScheduleEPNS_8RunnableEllNS_8TimeUnitEPFvS2_E(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, ptr noundef %5) #1 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.btree::btree_iterator", align 8
  %16 = alloca %"struct.btree::btree_iterator.3", align 8
  %17 = alloca %"struct.btree::btree_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store i64 %3, ptr %11, align 8, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds ptr, ptr %25, i64 4
  %27 = load ptr, ptr %26, align 8
  %28 = call noundef i32 %27(ptr noundef nonnull align 8 dereferenceable(32) %24)
  store i32 %28, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %29 = getelementptr inbounds %"class.ardb::Timer", ptr %24, i32 0, i32 2
  call void @_ZN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE4findERS9_(ptr dead_on_unwind writable sret(%"struct.btree::btree_iterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %30 = getelementptr inbounds %"class.ardb::Timer", ptr %24, i32 0, i32 2
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE3endEv(ptr dead_on_unwind writable sret(%"struct.btree::btree_iterator") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %30)
  call void @_ZN5btree14btree_iteratorIKNS_10btree_nodeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEERKSA_PSF_EC2ERKNS0_ISD_RSA_PSA_EE(ptr noundef nonnull align 8 dereferenceable(12) %16, ptr noundef nonnull align 8 dereferenceable(12) %17)
  %31 = call noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEERSA_PSA_EneERKNS0_IKSD_RKSA_PSI_EE(ptr noundef nonnull align 8 dereferenceable(12) %15, ptr noundef nonnull align 8 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  br i1 %31, label %32, label %33

32:                                               ; preds = %6
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %76

33:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %33
  %35 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #8
          to label %36 unwind label %41

36:                                               ; preds = %34
  %37 = load i32, ptr %14, align 4, !tbaa !15
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN4ardb9TimerTaskC2EjPNS_8RunnableEPFvS2_E(ptr noundef nonnull align 8 dereferenceable(60) %35, i32 noundef %37, ptr noundef %38, ptr noundef %39)
          to label %40 unwind label %45

40:                                               ; preds = %36
  store ptr %35, ptr %19, align 8, !tbaa !5
  br label %56

41:                                               ; preds = %34
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %20, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %21, align 4
  br label %49

45:                                               ; preds = %36
  %46 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %20, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %21, align 4
  call void @_ZdlPvm(ptr noundef %35, i64 noundef 64) #9
  br label %49

49:                                               ; preds = %45, %41
  %50 = load i32, ptr %21, align 4
  %51 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #7
  %52 = icmp eq i32 %50, %51
  br i1 %52, label %53, label %75

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %54 = load ptr, ptr %20, align 8
  %55 = call ptr @__cxa_begin_catch(ptr %54) #7
  store ptr %55, ptr %22, align 8
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %56

56:                                               ; preds = %53, %40
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  %60 = icmp eq ptr null, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %74

62:                                               ; preds = %58
  %63 = load ptr, ptr %19, align 8, !tbaa !5
  %64 = load i64, ptr %10, align 8, !tbaa !9
  %65 = load i64, ptr %11, align 8, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN4ardb5Timer10DoScheduleEPNS_9TimerTaskEllNS_8TimeUnitE(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef %63, i64 noundef %64, i64 noundef %65, i32 noundef %66)
  %67 = load ptr, ptr %19, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.ardb::Timer", ptr %24, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %69 = load ptr, ptr %19, align 8, !tbaa !5
  %70 = call noundef i32 @_ZN4ardb9TimerTask5GetIDEv(ptr noundef nonnull align 8 dereferenceable(60) %69)
  store i32 %70, ptr %23, align 4, !tbaa !15
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull align 4 dereferenceable(4) %23)
  store ptr %67, ptr %71, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  %73 = call noundef i32 @_ZN4ardb9TimerTask5GetIDEv(ptr noundef nonnull align 8 dereferenceable(60) %72)
  store i32 %73, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %74

74:                                               ; preds = %62, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %76

75:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %78

76:                                               ; preds = %74, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  %77 = load i32, ptr %7, align 4
  ret i32 %77

78:                                               ; preds = %75
  %79 = load ptr, ptr %20, align 8
  %80 = load i32, ptr %21, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { 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 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 = { nobuiltin 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind memory(none) }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN4ardb8TimeUnitE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !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.btree::btree_iterator" = type <{ ptr, i32, [4 x i8] }>
%"struct.btree::btree_iterator.3" = type <{ ptr, i32, [4 x i8] }>

@_ZTISt9bad_alloc = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

; 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
declare dso_local void @_ZN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE4findERS9_(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEERSA_PSA_EneERKNS0_IKSD_RKSA_PSI_EE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4ardb5Timer10DoScheduleEPNS_9TimerTaskEllNS_8TimeUnitE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4ardb5Timer10DoScheduleEPNS_8RunnableEllNS_8TimeUnitEPFvS2_E(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, ptr noundef %5) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca %"struct.btree::btree_iterator", align 8
  %9 = alloca %"struct.btree::btree_iterator.3", align 8
  %10 = alloca %"struct.btree::btree_iterator", align 8
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 32
  %14 = load ptr, ptr %13, align 8
  %15 = tail call noundef i32 %14(ptr noundef nonnull align 8 dereferenceable(32) %0)
  store i32 %15, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE4findERS9_(ptr dead_on_unwind nonnull writable sret(%"struct.btree::btree_iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.btree::btree_iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %16)
  call void @_ZN5btree14btree_iteratorIKNS_10btree_nodeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEERKSA_PSF_EC2ERKNS0_ISD_RSA_PSA_EE(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %10)
  %17 = call noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEERSA_PSA_EneERKNS0_IKSD_RKSA_PSI_EE(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br i1 %17, label %33, label %18

18:                                               ; preds = %6
  %19 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #7
          to label %27 unwind label %20

20:                                               ; preds = %18
  %21 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %22 = extractvalue { ptr, i32 } %21, 1
  %23 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #6
  %24 = icmp eq i32 %22, %23
  br i1 %24, label %.thread, label %32

.thread:                                          ; preds = %20
  %25 = extractvalue { ptr, i32 } %21, 0
  %26 = call ptr @__cxa_begin_catch(ptr %25) #6
  call void @__cxa_end_catch()
  br label %33

27:                                               ; preds = %18
  %28 = load i32, ptr %7, align 4, !tbaa !8
  call void @_ZN4ardb9TimerTaskC2EjPNS_8RunnableEPFvS2_E(ptr noundef nonnull align 8 dereferenceable(60) %19, i32 noundef %28, ptr noundef %1, ptr noundef %5)
  call void @_ZN4ardb5Timer10DoScheduleEPNS_9TimerTaskEllNS_8TimeUnitE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %19, i64 noundef %2, i64 noundef %3, i32 noundef %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %29 = call noundef i32 @_ZN4ardb9TimerTask5GetIDEv(ptr noundef nonnull align 8 dereferenceable(60) %19)
  store i32 %29, ptr %11, align 4, !tbaa !8
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb9TimerTaskESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store ptr %19, ptr %30, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %31 = call noundef i32 @_ZN4ardb9TimerTask5GetIDEv(ptr noundef nonnull align 8 dereferenceable(60) %19)
  br label %33

32:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  resume { ptr, i32 } %21

33:                                               ; preds = %.thread, %27, %6
  %.1 = phi i32 [ -1, %6 ], [ %31, %27 ], [ -1, %.thread ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  ret i32 %.1
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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

attributes #0 = { mustprogress 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 = { 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 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 = { nobuiltin allocsize(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 = { nofree nosync nounwind memory(none) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

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

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


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