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

; 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::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%class.UnorderedSet.473 = type { %"class.std::unordered_set.475" }
%"class.std::unordered_set.475" = type { %"class.std::_Hashtable.476" }
%"class.std::_Hashtable.476" = 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::initializer_list" = type { ptr, i64 }
%"struct.std::pair.495" = type <{ %"class.UnorderedSet<cfg::Block *>::FixedIterator", i8, [7 x i8] }>
%"class.UnorderedSet<cfg::Block *>::FixedIterator" = type { %"struct.std::__detail::_Node_iterator.497" }
%"struct.std::__detail::_Node_iterator.497" = type { %"struct.std::__detail::_Node_iterator_base.498" }
%"struct.std::__detail::_Node_iterator_base.498" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3cfg16ControlFlowGraph26get_first_block_with_insnsEv = external hidden unnamed_addr constant [65 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg5Block3endEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(104)) #1 align 2

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

; Function Attrs: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg5Block14get_first_insnEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(104)) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK3cfg16ControlFlowGraph26get_first_block_with_insnsEv(ptr noundef nonnull align 8 dereferenceable(160) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %class.UnorderedSet.473, align 8
  %5 = alloca %"class.std::initializer_list", align 8
  %6 = alloca [1 x ptr], align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.boost::intrusive::list_iterator", align 8
  %10 = alloca %"class.boost::intrusive::list_iterator", align 8
  %11 = alloca %"struct.std::pair.495", align 8
  %12 = alloca { ptr, i8 }, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  %14 = call noundef zeroext i1 @_ZNK3cfg16ControlFlowGraph8editableEv(ptr noundef nonnull align 8 dereferenceable(160) %13)
  br i1 %14, label %15, label %16

15:                                               ; preds = %1
  br label %18

16:                                               ; preds = %1
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.46, ptr noundef @.str.8, i32 noundef 1557, ptr noundef @__PRETTY_FUNCTION__._ZNK3cfg16ControlFlowGraph26get_first_block_with_insnsEv, i32 noundef 2, ptr noundef @.str.9) #6
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %19 = call noundef ptr @_ZNK3cfg16ControlFlowGraph11entry_blockEv(ptr noundef nonnull align 8 dereferenceable(160) %13)
  store ptr %19, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %20, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 0
  store ptr %6, ptr %21, align 8, !tbaa !9
  %22 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 1
  store i64 1, ptr %22, align 8, !tbaa !12
  %23 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8
  %25 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %26 = load i64, ptr %25, align 8
  call void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EEC2ESt16initializer_listIS2_E(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr %24, i64 %26)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %27

27:                                               ; preds = %73, %18
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  br i1 %29, label %30, label %43

30:                                               ; preds = %27
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = invoke noundef zeroext i1 @_ZNK3cfg5Block5emptyEv(ptr noundef nonnull align 8 dereferenceable(104) %31)
          to label %33 unwind label %56

33:                                               ; preds = %30
  br i1 %32, label %41, label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZN3cfg5Block14get_first_insnEv(ptr dead_on_unwind writable sret(%"class.boost::intrusive::list_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(104) %35)
          to label %36 unwind label %60

36:                                               ; preds = %34
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZN3cfg5Block3endEv(ptr dead_on_unwind writable sret(%"class.boost::intrusive::list_iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(104) %37)
          to label %38 unwind label %64

38:                                               ; preds = %36
  %39 = invoke noundef zeroext i1 @_ZN5boost9intrusiveeqERKNS0_13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb0EEES9_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %40 unwind label %64

40:                                               ; preds = %38
  br label %41

41:                                               ; preds = %40, %33
  %42 = phi i1 [ true, %33 ], [ %39, %40 ]
  br label %43

43:                                               ; preds = %41, %27
  %44 = phi i1 [ false, %27 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br i1 %44, label %45, label %74

45:                                               ; preds = %43
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = invoke noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104) %46)
          to label %48 unwind label %56

48:                                               ; preds = %45
  store ptr %47, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %49 = invoke { ptr, i8 } @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %50 unwind label %69

50:                                               ; preds = %48
  store { ptr, i8 } %49, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %12, i64 9, i1 false)
  %51 = getelementptr inbounds %"struct.std::pair.495", ptr %11, i32 0, i32 1
  %52 = load i8, ptr %51, align 8, !tbaa !13, !range !19, !noundef !20
  %53 = trunc i8 %52 to i1
  %54 = xor i1 %53, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br i1 %54, label %55, label %73

55:                                               ; preds = %50
  store ptr null, ptr %3, align 8, !tbaa !5
  br label %74

56:                                               ; preds = %45, %30
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %7, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %8, align 4
  br label %76

60:                                               ; preds = %34
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  br label %68

64:                                               ; preds = %38, %36
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %7, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %68

68:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %76

69:                                               ; preds = %48
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br label %76

73:                                               ; preds = %50
  br label %27, !llvm.loop !21

74:                                               ; preds = %55, %43
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret ptr %75

76:                                               ; preds = %69, %68, %56
  call void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %7, align 8
  %79 = load i32, ptr %8, align 4
  %80 = insertvalue { ptr, i32 } poison, ptr %78, 0
  %81 = insertvalue { ptr, i32 } %80, i32 %79, 1
  resume { ptr, i32 } %81
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EEC2ESt16initializer_listIS2_E(ptr noundef nonnull align 8 dereferenceable(56), ptr, i64) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3cfg5Block5emptyEv(ptr noundef nonnull align 8 dereferenceable(104)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 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 = { 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 = { noreturn "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { noreturn }
attributes #7 = { 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 0}
!10 = !{!"_ZTSSt16initializer_listIPN3cfg5BlockEE", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !18, i64 8}
!14 = !{!"_ZTSSt4pairIN12UnorderedSetIPN3cfg5BlockESt4hashIS3_ESt8equal_toIS3_EE13FixedIteratorEbE", !15, i64 0, !18, i64 8}
!15 = !{!"_ZTSN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EE13FixedIteratorE", !16, i64 0}
!16 = !{!"_ZTSNSt8__detail14_Node_iteratorIPN3cfg5BlockELb1ELb0EEE", !17, i64 0}
!17 = !{!"_ZTSNSt8__detail19_Node_iterator_baseIPN3cfg5BlockELb0EEE", !6, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"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::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%class.UnorderedSet.473 = type { %"class.std::unordered_set.475" }
%"class.std::unordered_set.475" = type { %"class.std::_Hashtable.476" }
%"class.std::_Hashtable.476" = 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 }

@.str.8 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3cfg16ControlFlowGraph26get_first_block_with_insnsEv = external hidden unnamed_addr constant [65 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg5Block3endEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #1 align 2

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

; Function Attrs: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg5Block14get_first_insnEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK3cfg16ControlFlowGraph26get_first_block_with_insnsEv(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.UnorderedSet.473, align 8
  %4 = alloca [1 x ptr], align 8
  %5 = alloca %"class.boost::intrusive::list_iterator", align 8
  %6 = alloca %"class.boost::intrusive::list_iterator", align 8
  %7 = tail call noundef zeroext i1 @_ZNK3cfg16ControlFlowGraph8editableEv(ptr noundef nonnull align 8 dereferenceable(160) %0)
  br i1 %7, label %9, label %8

8:                                                ; preds = %1
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.8, i32 noundef 1557, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3cfg16ControlFlowGraph26get_first_block_with_insnsEv, i32 noundef 2, ptr noundef nonnull @.str.9) #5
  unreachable

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %10 = tail call noundef ptr @_ZNK3cfg16ControlFlowGraph11entry_blockEv(ptr noundef nonnull align 8 dereferenceable(160) %0)
  store ptr %10, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store ptr %10, ptr %4, align 8, !tbaa !5
  call void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EEC2ESt16initializer_listIS2_E(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr nonnull %4, i64 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %11

11:                                               ; preds = %27, %9
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %12, null
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  br i1 %.not, label %.critedge, label %13

13:                                               ; preds = %11
  %14 = invoke noundef zeroext i1 @_ZNK3cfg5Block5emptyEv(ptr noundef nonnull align 8 dereferenceable(104) %12)
          to label %15 unwind label %30

15:                                               ; preds = %13
  br i1 %14, label %.critedge2, label %16

16:                                               ; preds = %15
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN3cfg5Block14get_first_insnEv(ptr dead_on_unwind nonnull writable sret(%"class.boost::intrusive::list_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(104) %17)
          to label %18 unwind label %32

18:                                               ; preds = %16
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN3cfg5Block3endEv(ptr dead_on_unwind nonnull writable sret(%"class.boost::intrusive::list_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(104) %19)
          to label %20 unwind label %34

20:                                               ; preds = %18
  %21 = call noundef zeroext i1 @_ZN5boost9intrusiveeqERKNS0_13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb0EEES9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %21, label %22, label %.loopexit.loopexit

.critedge2:                                       ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %22

22:                                               ; preds = %.critedge2, %20
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = invoke noundef ptr @_ZNK3cfg5Block7goes_toEv(ptr noundef nonnull align 8 dereferenceable(104) %23)
          to label %25 unwind label %30

25:                                               ; preds = %22
  store ptr %24, ptr %2, align 8, !tbaa !5
  %26 = invoke { ptr, i8 } @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %27 unwind label %37

27:                                               ; preds = %25
  %.fca.1.extract = extractvalue { ptr, i8 } %26, 1
  %28 = trunc i8 %.fca.1.extract to i1
  br i1 %28, label %11, label %29, !llvm.loop !9

29:                                               ; preds = %27
  store ptr null, ptr %2, align 8, !tbaa !5
  br label %.loopexit

30:                                               ; preds = %22, %13
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %40

32:                                               ; preds = %16
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %36

36:                                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %40

37:                                               ; preds = %25
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %40

.critedge:                                        ; preds = %11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %20
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.critedge, %29
  %39 = phi ptr [ %.pre, %.loopexit.loopexit ], [ null, %.critedge ], [ null, %29 ]
  call void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret ptr %39

40:                                               ; preds = %37, %36, %30
  %.pn10 = phi { ptr, i32 } [ %38, %37 ], [ %31, %30 ], [ %.pn, %36 ]
  call void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn10
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EEC2ESt16initializer_listIS2_E(ptr noundef nonnull align 8 dereferenceable(56), ptr, i64) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3cfg5Block5emptyEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12UnorderedSetIPN3cfg5BlockESt4hashIS2_ESt8equal_toIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 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 = { 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 = { noreturn "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 = { noreturn }
attributes #6 = { nounwind }

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

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


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