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

; 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.38" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.instruction_lowering::CaseKeysExtentBuilder" = type { %"class.std::optional" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<instruction_lowering::CaseKeysExtent>::_Storage", i8 }>
%"union.std::_Optional_payload_base<instruction_lowering::CaseKeysExtent>::_Storage" = type { %"struct.instruction_lowering::CaseKeysExtent" }
%"struct.instruction_lowering::CaseKeysExtent" = type { i32, i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.cfg::Block" = type { i64, %class.IRList, %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator", %"class.std::vector.11", %"class.std::vector.11", ptr }
%class.IRList = type { %"class.boost::intrusive::list" }
%"class.boost::intrusive::list" = type { %"class.boost::intrusive::list_impl" }
%"class.boost::intrusive::list_impl" = type { %"struct.boost::intrusive::list_impl<boost::intrusive::mhtraits<MethodItemEntry, boost::intrusive::list_member_hook<>, &MethodItemEntry::list_hook_>, unsigned long, true, void>::data_t" }
%"struct.boost::intrusive::list_impl<boost::intrusive::mhtraits<MethodItemEntry, boost::intrusive::list_member_hook<>, &MethodItemEntry::list_hook_>, unsigned long, true, void>::data_t" = type { %"struct.boost::intrusive::list_impl<boost::intrusive::mhtraits<MethodItemEntry, boost::intrusive::list_member_hook<>, &MethodItemEntry::list_hook_>, unsigned long, true, void>::root_plus_size" }
%"struct.boost::intrusive::list_impl<boost::intrusive::mhtraits<MethodItemEntry, boost::intrusive::list_member_hook<>, &MethodItemEntry::list_hook_>, unsigned long, true, void>::root_plus_size" = type { %"struct.boost::intrusive::detail::size_holder", %"struct.boost::intrusive::detail::default_header_holder" }
%"struct.boost::intrusive::detail::size_holder" = type { i64 }
%"struct.boost::intrusive::detail::default_header_holder" = type { %"struct.boost::intrusive::list_node" }
%"struct.boost::intrusive::list_node" = type { ptr, ptr }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl" }
%"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl" = type { %"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cfg::Edge *, std::allocator<cfg::Edge *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MethodItemEntry = type { %"class.boost::intrusive::list_member_hook", i32, %union.anon.16 }
%"class.boost::intrusive::list_member_hook" = type { %"class.boost::intrusive::generic_hook" }
%"class.boost::intrusive::generic_hook" = type { %"struct.boost::intrusive::list_node" }
%union.anon.16 = 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.10 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3cfg5Block19estimate_code_unitsEv = external hidden unnamed_addr constant [49 x i8], align 1

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3cfg16ControlFlowGraph8editableEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3cfg5Block3endEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator.38") align 8, ptr noundef nonnull align 8 dereferenceable(104)) #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: mustprogress uwtable
declare dso_local void @_ZNK3cfg5Block13get_last_insnEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator.38") align 8, ptr noundef nonnull align 8 dereferenceable(104)) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK3cfg5Block19estimate_code_unitsEv(ptr noundef nonnull align 8 dereferenceable(104) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.boost::intrusive::list_iterator.38", align 8
  %5 = alloca %"class.boost::intrusive::list_iterator.38", align 8
  %6 = alloca %"class.instruction_lowering::CaseKeysExtentBuilder", align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_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::Block", ptr %11, i32 0, i32 6
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %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.10, ptr noundef @.str.8, i32 noundef 352, ptr noundef @__PRETTY_FUNCTION__._ZNK3cfg5Block19estimate_code_unitsEv, i32 noundef 2, ptr noundef @.str.9) #7
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %19 = getelementptr inbounds %"class.cfg::Block", ptr %11, i32 0, i32 1
  %20 = call noundef i32 @_ZNK6IRList19estimate_code_unitsEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  store i32 %20, ptr %3, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @_ZNK3cfg5Block13get_last_insnEv(ptr dead_on_unwind writable sret(%"class.boost::intrusive::list_iterator.38") align 8 %4, ptr noundef nonnull align 8 dereferenceable(104) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @_ZNK3cfg5Block3endEv(ptr dead_on_unwind writable sret(%"class.boost::intrusive::list_iterator.38") align 8 %5, ptr noundef nonnull align 8 dereferenceable(104) %11)
  %21 = call noundef zeroext i1 @_ZN5boost9intrusiveneERKNS0_13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb1EEES9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %21, label %22, label %28

22:                                               ; preds = %18
  %23 = call noundef ptr @_ZNK5boost9intrusive13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %24 = getelementptr inbounds %struct.MethodItemEntry, ptr %23, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !28
  %26 = call noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %27 = call noundef zeroext i1 @_ZN6opcode9is_switchE8IROpcode(i16 noundef zeroext %26)
  br label %28

28:                                               ; preds = %22, %18
  %29 = phi i1 [ false, %18 ], [ %27, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br i1 %29, label %30, label %61

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  call void @_ZN20instruction_lowering21CaseKeysExtentBuilderC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3cfg5Block5succsEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
  store ptr %31, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #8
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %54, %30
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %56

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  store ptr %43, ptr %10, align 8, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  %46 = zext i8 %45 to i32
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %48, label %53

48:                                               ; preds = %41
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK3cfg4Edge8case_keyEv(ptr noundef nonnull align 8 dereferenceable(32) %49)
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKR5boost8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %50)
  %52 = load i32, ptr %51, align 4, !tbaa !26
  call void @_ZN20instruction_lowering21CaseKeysExtentBuilder6insertEi(ptr noundef nonnull align 4 dereferenceable(16) %6, i32 noundef %52)
  br label %53

53:                                               ; preds = %48, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %54

54:                                               ; preds = %53
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %38

56:                                               ; preds = %40
  %57 = call noundef ptr @_ZNK20instruction_lowering21CaseKeysExtentBuilderptEv(ptr noundef nonnull align 4 dereferenceable(16) %6)
  %58 = call noundef i32 @_ZNK20instruction_lowering14CaseKeysExtent34estimate_switch_payload_code_unitsEv(ptr noundef nonnull align 4 dereferenceable(12) %57)
  %59 = load i32, ptr %3, align 4, !tbaa !26
  %60 = add i32 %59, %58
  store i32 %60, ptr %3, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  br label %61

61:                                               ; preds = %56, %28
  %62 = load i32, ptr %3, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret i32 %62
}

declare noundef i32 @_ZNK6IRList19estimate_code_unitsEv(ptr noundef nonnull align 8 dereferenceable(24)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6opcode9is_switchE8IROpcode(i16 noundef zeroext) #6

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

declare void @_ZN20instruction_lowering21CaseKeysExtentBuilder6insertEi(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) #5

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

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

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

declare noundef ptr @_ZNK20instruction_lowering21CaseKeysExtentBuilderptEv(ptr noundef nonnull align 4 dereferenceable(16)) #5

declare noundef i32 @_ZNK20instruction_lowering14CaseKeysExtent34estimate_switch_payload_code_unitsEv(ptr noundef nonnull align 4 dereferenceable(12)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 = { "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 = { 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 #7 = { noreturn }
attributes #8 = { 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 96}
!10 = !{!"_ZTSN3cfg5BlockE", !11, i64 0, !12, i64 8, !20, i64 32, !20, i64 40, !22, i64 48, !22, i64 72, !6, i64 96}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTS6IRList", !13, i64 0}
!13 = !{!"_ZTSN5boost9intrusive4listI15MethodItemEntryJNS0_11member_hookIS2_NS0_16list_member_hookIJEEEXadL_ZNS2_10list_hook_EEEEEEEE", !14, i64 0}
!14 = !{!"_ZTSN5boost9intrusive9list_implINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEEmLb1EvEE", !15, i64 0}
!15 = !{!"_ZTSN5boost9intrusive9list_implINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEEmLb1EvE6data_tE", !16, i64 0}
!16 = !{!"_ZTSN5boost9intrusive9list_implINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEEmLb1EvE14root_plus_sizeE", !17, i64 0, !18, i64 8}
!17 = !{!"_ZTSN5boost9intrusive6detail11size_holderILb1EmvEE", !11, i64 0}
!18 = !{!"_ZTSN5boost9intrusive6detail21default_header_holderINS0_16list_node_traitsIPvEEEE", !19, i64 0}
!19 = !{!"_ZTSN5boost9intrusive9list_nodeIPvEE", !6, i64 0, !6, i64 8}
!20 = !{!"_ZTSN5boost9intrusive13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb0EEE", !21, i64 0}
!21 = !{!"_ZTSN5boost9intrusive17iiterator_membersIPNS0_9list_nodeIPvEEPKNS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS7_10list_hook_EEEEELb0EEE", !6, i64 0}
!22 = !{!"_ZTSSt6vectorIPN3cfg4EdgeESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIPN3cfg4EdgeESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN3cfg4EdgeESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN3cfg4EdgeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!27, !27, i64 0}
!27 = !{!"int", !7, i64 0}
!28 = !{!7, !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"

%"class.boost::intrusive::list_iterator.38" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.instruction_lowering::CaseKeysExtentBuilder" = type { %"class.std::optional" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<instruction_lowering::CaseKeysExtent>::_Storage", i8 }>
%"union.std::_Optional_payload_base<instruction_lowering::CaseKeysExtent>::_Storage" = type { %"struct.instruction_lowering::CaseKeysExtent" }
%"struct.instruction_lowering::CaseKeysExtent" = type { i32, i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = 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.10 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3cfg5Block19estimate_code_unitsEv = external hidden unnamed_addr constant [49 x i8], align 1

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3cfg16ControlFlowGraph8editableEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3cfg5Block3endEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator.38") align 8, ptr noundef nonnull align 8 dereferenceable(104)) 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 @_ZNK3cfg5Block13get_last_insnEv(ptr dead_on_unwind noalias writable sret(%"class.boost::intrusive::list_iterator.38") align 8, ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK3cfg5Block19estimate_code_unitsEv(ptr noundef nonnull align 8 dereferenceable(104) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.boost::intrusive::list_iterator.38", align 8
  %3 = alloca %"class.boost::intrusive::list_iterator.38", align 8
  %4 = alloca %"class.instruction_lowering::CaseKeysExtentBuilder", align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 96
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = tail call noundef zeroext i1 @_ZNK3cfg16ControlFlowGraph8editableEv(ptr noundef nonnull align 8 dereferenceable(160) %8)
  br i1 %9, label %11, label %10

10:                                               ; preds = %1
  tail call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.8, i32 noundef 352, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3cfg5Block19estimate_code_unitsEv, i32 noundef 2, ptr noundef nonnull @.str.9) #7
  unreachable

11:                                               ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = tail call noundef i32 @_ZNK6IRList19estimate_code_unitsEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @_ZNK3cfg5Block13get_last_insnEv(ptr dead_on_unwind nonnull writable sret(%"class.boost::intrusive::list_iterator.38") align 8 %2, ptr noundef nonnull align 8 dereferenceable(104) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @_ZNK3cfg5Block3endEv(ptr dead_on_unwind nonnull writable sret(%"class.boost::intrusive::list_iterator.38") align 8 %3, ptr noundef nonnull align 8 dereferenceable(104) %0)
  %14 = call noundef zeroext i1 @_ZN5boost9intrusiveneERKNS0_13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb1EEES9_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %14, label %15, label %.critedge

15:                                               ; preds = %11
  %16 = call noundef ptr @_ZNK5boost9intrusive13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %17 = getelementptr inbounds i8, ptr %16, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !25
  %19 = call noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %20 = call noundef zeroext i1 @_ZN6opcode9is_switchE8IROpcode(i16 noundef zeroext %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br i1 %20, label %21, label %40

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  call void @_ZN20instruction_lowering21CaseKeysExtentBuilderC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %4) #8
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3cfg5Block5succsEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %23 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  store ptr %23, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %24 = call ptr @_ZNKSt6vectorIPN3cfg4EdgeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  store ptr %24, ptr %6, align 8
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %37, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %26 = call noundef ptr @_ZNK20instruction_lowering21CaseKeysExtentBuilderptEv(ptr noundef nonnull align 4 dereferenceable(16) %4)
  %27 = call noundef i32 @_ZNK20instruction_lowering14CaseKeysExtent34estimate_switch_payload_code_unitsEv(ptr noundef nonnull align 4 dereferenceable(12) %26)
  %28 = add i32 %27, %13
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %40

.lr.ph:                                           ; preds = %21, %37
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %30 = load ptr, ptr %29, align 8, !tbaa !26
  %31 = call noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32) %30)
  %32 = icmp eq i8 %31, 1
  br i1 %32, label %33, label %37

33:                                               ; preds = %.lr.ph
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK3cfg4Edge8case_keyEv(ptr noundef nonnull align 8 dereferenceable(32) %30)
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKR5boost8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %34)
  %36 = load i32, ptr %35, align 4, !tbaa !27
  call void @_ZN20instruction_lowering21CaseKeysExtentBuilder6insertEi(ptr noundef nonnull align 4 dereferenceable(16) %4, i32 noundef %36)
  br label %37

37:                                               ; preds = %33, %.lr.ph
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3cfg4EdgeESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %39, label %.lr.ph, label %._crit_edge

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

40:                                               ; preds = %.critedge, %._crit_edge, %15
  %.0 = phi i32 [ %28, %._crit_edge ], [ %13, %15 ], [ %13, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret i32 %.0
}

declare noundef i32 @_ZNK6IRList19estimate_code_unitsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6opcode9is_switchE8IROpcode(i16 noundef zeroext) local_unnamed_addr #6

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3cfg4Edge4typeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare void @_ZN20instruction_lowering21CaseKeysExtentBuilder6insertEi(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) local_unnamed_addr #5

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

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

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

declare noundef ptr @_ZNK20instruction_lowering21CaseKeysExtentBuilderptEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5

declare noundef i32 @_ZNK20instruction_lowering14CaseKeysExtent34estimate_switch_payload_code_unitsEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 = { "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 = { 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 #7 = { noreturn }
attributes #8 = { 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, !18, i64 96}
!6 = !{!"_ZTSN3cfg5BlockE", !7, i64 0, !10, i64 8, !19, i64 32, !19, i64 40, !21, i64 48, !21, i64 72, !18, i64 96}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6IRList", !11, i64 0}
!11 = !{!"_ZTSN5boost9intrusive4listI15MethodItemEntryJNS0_11member_hookIS2_NS0_16list_member_hookIJEEEXadL_ZNS2_10list_hook_EEEEEEEE", !12, i64 0}
!12 = !{!"_ZTSN5boost9intrusive9list_implINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEEmLb1EvEE", !13, i64 0}
!13 = !{!"_ZTSN5boost9intrusive9list_implINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEEmLb1EvE6data_tE", !14, i64 0}
!14 = !{!"_ZTSN5boost9intrusive9list_implINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEEmLb1EvE14root_plus_sizeE", !15, i64 0, !16, i64 8}
!15 = !{!"_ZTSN5boost9intrusive6detail11size_holderILb1EmvEE", !7, i64 0}
!16 = !{!"_ZTSN5boost9intrusive6detail21default_header_holderINS0_16list_node_traitsIPvEEEE", !17, i64 0}
!17 = !{!"_ZTSN5boost9intrusive9list_nodeIPvEE", !18, i64 0, !18, i64 8}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"_ZTSN5boost9intrusive13list_iteratorINS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS3_10list_hook_EEEEELb0EEE", !20, i64 0}
!20 = !{!"_ZTSN5boost9intrusive17iiterator_membersIPNS0_9list_nodeIPvEEPKNS0_8mhtraitsI15MethodItemEntryNS0_16list_member_hookIJEEEXadL_ZNS7_10list_hook_EEEEELb0EEE", !18, i64 0}
!21 = !{!"_ZTSSt6vectorIPN3cfg4EdgeESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIPN3cfg4EdgeESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN3cfg4EdgeESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN3cfg4EdgeESaIS2_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!25 = !{!8, !8, i64 0}
!26 = !{!18, !18, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !8, i64 0}


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