; LLVM IR from facebook/redex :: libredex/ControlFlow.ll (ZN3cfg16ControlFlowGraph29remove_unreachable_succ_edgesEv)

; 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.boost::dynamic_bitset" = type { %"class.std::vector.182", i64 }
%"class.std::vector.182" = type { %"struct.std::_Vector_base.183" }
%"struct.std::_Vector_base.183" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.cfg::ControlFlowGraph" = type { %"class.std::map", %class.UnorderedSet, ptr, ptr, ptr, i32, i8, i8, i8, %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, cfg::Block *>, std::_Select1st<std::pair<const unsigned long, cfg::Block *>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, cfg::Block *>, std::_Select1st<std::pair<const unsigned long, cfg::Block *>>, std::less<unsigned long>>::_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 }
%class.UnorderedSet = type { %"class.std::unordered_set" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<IRInstruction *, std::allocator<IRInstruction *>>::_Vector_impl" }
%"struct.std::_Vector_base<IRInstruction *, std::allocator<IRInstruction *>>::_Vector_impl" = type { %"struct.std::_Vector_base<IRInstruction *, std::allocator<IRInstruction *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<IRInstruction *, std::allocator<IRInstruction *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.178" = type { i64, ptr }

@.str.42 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef, i32 noundef) #1

declare void @_Z5trace11TraceModuleibPKcz(i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef, ...) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cfg16ControlFlowGraph29remove_unreachable_succ_edgesEv(ptr noundef nonnull align 8 dereferenceable(160) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.boost::dynamic_bitset", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = getelementptr inbounds %"class.cfg::ControlFlowGraph", ptr %11, i32 0, i32 0
  %13 = call noundef zeroext i1 @_ZNKSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  br i1 %13, label %14, label %15

14:                                               ; preds = %1
  br label %79

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @_ZNK3cfg16ControlFlowGraph5visitEv(ptr dead_on_unwind writable sret(%"class.boost::dynamic_bitset") align 8 %4, ptr noundef nonnull align 8 dereferenceable(160) %11)
  store ptr %4, ptr %3, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = invoke noundef zeroext i1 @_ZNK5boost14dynamic_bitsetImSaImEE3allEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %18 unwind label %20

18:                                               ; preds = %15
  br i1 %17, label %19, label %24

19:                                               ; preds = %18
  store i32 1, ptr %7, align 4
  br label %77

20:                                               ; preds = %72, %69, %15
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %5, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %6, align 4
  br label %80

24:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %25 = getelementptr inbounds %"class.cfg::ControlFlowGraph", ptr %11, i32 0, i32 0
  %26 = call ptr @_ZNSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %25) #5
  %27 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %8, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %66, %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %29 = getelementptr inbounds %"class.cfg::ControlFlowGraph", ptr %11, i32 0, i32 0
  %30 = call ptr @_ZNSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %29) #5
  %31 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %9, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  %32 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %35 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %36 = getelementptr inbounds %"struct.std::pair.178", ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  store ptr %37, ptr %10, align 8, !tbaa !5
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = invoke noundef i64 @_ZNK3cfg5Block2idEv(ptr noundef nonnull align 8 dereferenceable(104) %39)
          to label %41 unwind label %45

41:                                               ; preds = %34
  %42 = invoke noundef zeroext i1 @_ZNK5boost14dynamic_bitsetImSaImEE4testEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef %40)
          to label %43 unwind label %45

43:                                               ; preds = %41
  br i1 %42, label %44, label %49

44:                                               ; preds = %43
  store i32 4, ptr %7, align 4
  br label %63

45:                                               ; preds = %60, %56, %53, %50, %41, %34
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %5, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %80

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %49
  %51 = invoke noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 19, i32 noundef 5)
          to label %52 unwind label %45

52:                                               ; preds = %50
  br i1 %51, label %53, label %58

53:                                               ; preds = %52
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = invoke noundef i64 @_ZNK3cfg5Block2idEv(ptr noundef nonnull align 8 dereferenceable(104) %54)
          to label %56 unwind label %45

56:                                               ; preds = %53
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 19, i32 noundef 5, i1 noundef zeroext false, ptr noundef @.str.42, i64 noundef %55)
          to label %57 unwind label %45

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57, %52
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3cfg16ControlFlowGraph17delete_succ_edgesEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(160) %11, ptr noundef %61)
          to label %62 unwind label %45

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

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

65:                                               ; preds = %63
  br label %66

66:                                               ; preds = %65, %63
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %28, !llvm.loop !12

68:                                               ; preds = %33
  br label %69

69:                                               ; preds = %68
  %70 = invoke noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 19, i32 noundef 5)
          to label %71 unwind label %20

71:                                               ; preds = %69
  br i1 %70, label %72, label %74

72:                                               ; preds = %71
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 19, i32 noundef 5, i1 noundef zeroext false, ptr noundef @.str.43)
          to label %73 unwind label %20

73:                                               ; preds = %72
  br label %74

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

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  store i32 0, ptr %7, align 4
  br label %77

77:                                               ; preds = %76, %19
  call void @_ZN5boost14dynamic_bitsetImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %78 = load i32, ptr %7, align 4
  switch i32 %78, label %86 [
    i32 0, label %79
    i32 1, label %79
  ]

79:                                               ; preds = %77, %77, %14
  ret void

80:                                               ; preds = %45, %20
  call void @_ZN5boost14dynamic_bitsetImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %5, align 8
  %83 = load i32, ptr %6, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85

86:                                               ; preds = %77, %63
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3cfg5Block2idEv(ptr noundef nonnull align 8 dereferenceable(104)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3cfg16ControlFlowGraph5visitEv(ptr dead_on_unwind noalias writable sret(%"class.boost::dynamic_bitset") align 8, ptr noundef nonnull align 8 dereferenceable(160)) #2 align 2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 = !{!10, !6, i64 8}
!10 = !{!"_ZTSSt4pairIKmPN3cfg5BlockEE", !11, i64 0, !6, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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.boost::dynamic_bitset" = type { %"class.std::vector.182", i64 }
%"class.std::vector.182" = type { %"struct.std::_Vector_base.183" }
%"struct.std::_Vector_base.183" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@.str.42 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_Z5trace11TraceModuleibPKcz(i32 noundef, i32 noundef, i1 noundef zeroext, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cfg16ControlFlowGraph29remove_unreachable_succ_edgesEv(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.boost::dynamic_bitset", align 8
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = tail call noundef zeroext i1 @_ZNKSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  br i1 %5, label %36, label %6

6:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @_ZNK3cfg16ControlFlowGraph5visitEv(ptr dead_on_unwind nonnull writable sret(%"class.boost::dynamic_bitset") align 8 %2, ptr noundef nonnull align 8 dereferenceable(160) %0)
  %7 = call noundef zeroext i1 @_ZNK5boost14dynamic_bitsetImSaImEE3allEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  br i1 %7, label %35, label %10

8:                                                ; preds = %34, %._crit_edge
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %37

10:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %11 = call ptr @_ZNSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %11, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %12 = call ptr @_ZNSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %12, ptr %4, align 8
  %13 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %29, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %14 = invoke noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 19, i32 noundef 5)
          to label %33 unwind label %8

.lr.ph:                                           ; preds = %10, %29
  %15 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = call noundef i64 @_ZNK3cfg5Block2idEv(ptr noundef nonnull align 8 dereferenceable(104) %17)
  %19 = invoke noundef zeroext i1 @_ZNK5boost14dynamic_bitsetImSaImEE4testEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %18)
          to label %20 unwind label %21

20:                                               ; preds = %.lr.ph
  br i1 %19, label %29, label %23

21:                                               ; preds = %28, %26, %23, %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %37

23:                                               ; preds = %20
  %24 = invoke noundef zeroext i1 @_Z12traceEnabled11TraceModulei(i32 noundef 19, i32 noundef 5)
          to label %25 unwind label %21

25:                                               ; preds = %23
  br i1 %24, label %26, label %28

26:                                               ; preds = %25
  %27 = call noundef i64 @_ZNK3cfg5Block2idEv(ptr noundef nonnull align 8 dereferenceable(104) %17)
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 19, i32 noundef 5, i1 noundef zeroext false, ptr noundef nonnull @.str.42, i64 noundef %27)
          to label %28 unwind label %21

28:                                               ; preds = %26, %25
  invoke void @_ZN3cfg16ControlFlowGraph17delete_succ_edgesEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull %17)
          to label %29 unwind label %21

29:                                               ; preds = %28, %20
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %31 = call ptr @_ZNSt3mapImPN3cfg5BlockESt4lessImESaISt4pairIKmS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %31, ptr %4, align 8
  %32 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmPN3cfg5BlockEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !11

33:                                               ; preds = %._crit_edge
  br i1 %14, label %34, label %35

34:                                               ; preds = %33
  invoke void (i32, i32, i1, ptr, ...) @_Z5trace11TraceModuleibPKcz(i32 noundef 19, i32 noundef 5, i1 noundef zeroext false, ptr noundef nonnull @.str.43)
          to label %35 unwind label %8

35:                                               ; preds = %33, %34, %6
  call void @_ZN5boost14dynamic_bitsetImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  br label %36

36:                                               ; preds = %1, %35
  ret void

37:                                               ; preds = %21, %8
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %9, %8 ]
  call void @_ZN5boost14dynamic_bitsetImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3cfg5Block2idEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3cfg16ControlFlowGraph5visitEv(ptr dead_on_unwind noalias writable sret(%"class.boost::dynamic_bitset") align 8, ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #2 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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, !10, i64 8}
!6 = !{!"_ZTSSt4pairIKmPN3cfg5BlockEE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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