; LLVM IR from facebook/redex :: service/regalloc/GraphColoring.ll (ZN8regalloc14init_range_setERN3cfg16ControlFlowGraphE)

; 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.regalloc::RangeSet" = type { %"class.std::vector", %class.UnorderedSet }
%"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 }
%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.cfg::InstructionIterableImpl" = type { ptr }
%"class.cfg::InstructionIteratorImpl" = type { ptr, %"struct.std::_Rb_tree_const_iterator", %"class.ir_list::InstructionIteratorImpl" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%struct.MethodItemEntry = type { %"class.boost::intrusive::list_member_hook", i32, %union.anon.33 }
%"class.boost::intrusive::list_member_hook" = type { %"class.boost::intrusive::generic_hook" }
%"class.boost::intrusive::generic_hook" = type { %"struct.boost::intrusive::list_node" }
%"struct.boost::intrusive::list_node" = type { ptr, ptr }
%union.anon.33 = type { ptr }

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
define dso_local void @_ZN8regalloc14init_range_setERN3cfg16ControlFlowGraphE(ptr dead_on_unwind noalias writable sret(%"class.regalloc::RangeSet") align 8 %0, ptr noundef nonnull align 8 dereferenceable(160) %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca %"class.cfg::InstructionIterableImpl", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %11 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i16, align 2
  %15 = alloca i8, align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZN8regalloc8RangeSetC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = invoke ptr @_Z19InstructionIterableRN3cfg16ControlFlowGraphE(ptr noundef nonnull align 8 dereferenceable(160) %16)
          to label %18 unwind label %28

18:                                               ; preds = %2
  %19 = getelementptr inbounds %"class.cfg::InstructionIterableImpl", ptr %7, i32 0, i32 0
  store ptr %17, ptr %19, align 8
  store ptr %7, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %21 unwind label %32

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %23 unwind label %36

23:                                               ; preds = %21
  br label %24

24:                                               ; preds = %90, %23
  %25 = invoke noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %26 unwind label %36

26:                                               ; preds = %24
  br i1 %25, label %40, label %27

27:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %96

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  br label %95

32:                                               ; preds = %18
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  br label %94

36:                                               ; preds = %88, %24, %21
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %93

40:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %41 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3cfg23InstructionIteratorImplILb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %42 unwind label %58

42:                                               ; preds = %40
  store ptr %41, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.MethodItemEntry, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  store ptr %45, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #6
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = invoke noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32) %46)
          to label %48 unwind label %62

48:                                               ; preds = %42
  store i16 %47, ptr %14, align 2, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 0, ptr %15, align 1, !tbaa !12
  %49 = load i16, ptr %14, align 2, !tbaa !10
  %50 = zext i16 %49 to i32
  %51 = icmp eq i32 %50, 23
  br i1 %51, label %52, label %70

52:                                               ; preds = %48
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = invoke noundef i64 @_ZNK13IRInstruction9srcs_sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %53)
          to label %55 unwind label %66

55:                                               ; preds = %52
  %56 = icmp ugt i64 %54, 5
  %57 = zext i1 %56 to i8
  store i8 %57, ptr %15, align 1, !tbaa !12
  br label %81

58:                                               ; preds = %40
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %8, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %9, align 4
  br label %92

62:                                               ; preds = %42
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %8, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %9, align 4
  br label %91

66:                                               ; preds = %84, %74, %70, %52
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %8, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %91

70:                                               ; preds = %48
  %71 = load i16, ptr %14, align 2, !tbaa !10
  %72 = invoke noundef zeroext i1 @_ZN6opcode12is_an_invokeE8IROpcode(i16 noundef zeroext %71)
          to label %73 unwind label %66

73:                                               ; preds = %70
  br i1 %72, label %74, label %80

74:                                               ; preds = %73
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = invoke noundef i64 @_ZN8regallocL13sum_src_sizesEPK13IRInstruction(ptr noundef %75)
          to label %77 unwind label %66

77:                                               ; preds = %74
  %78 = icmp ugt i64 %76, 5
  %79 = zext i1 %78 to i8
  store i8 %79, ptr %15, align 1, !tbaa !12
  br label %80

80:                                               ; preds = %77, %73
  br label %81

81:                                               ; preds = %80, %55
  %82 = load i8, ptr %15, align 1, !tbaa !12, !range !14, !noundef !15
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %87

84:                                               ; preds = %81
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN8regalloc8RangeSet7emplaceEPK13IRInstruction(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %85)
          to label %86 unwind label %66

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %86, %81
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %88

88:                                               ; preds = %87
  %89 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %90 unwind label %36

90:                                               ; preds = %88
  br label %24

91:                                               ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %92

92:                                               ; preds = %91, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %93

93:                                               ; preds = %92, %36
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  br label %94

94:                                               ; preds = %93, %32
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %95

95:                                               ; preds = %94, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZN8regalloc8RangeSetD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0) #6
  br label %100

96:                                               ; preds = %27
  store i1 true, ptr %5, align 1
  %97 = load i1, ptr %5, align 1
  br i1 %97, label %99, label %98

98:                                               ; preds = %96
  call void @_ZN8regalloc8RangeSetD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0) #6
  br label %99

99:                                               ; preds = %98, %96
  ret void

100:                                              ; preds = %95
  %101 = load ptr, ptr %8, align 8
  %102 = load i32, ptr %9, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

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

declare noundef i64 @_ZNK13IRInstruction9srcs_sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN8regallocL13sum_src_sizesEPK13IRInstruction(ptr noundef) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8regalloc8RangeSetD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) 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 = { 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 #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 = { "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 = { 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 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTS8IROpcode", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}


; 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.regalloc::RangeSet" = type { %"class.std::vector", %class.UnorderedSet }
%"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 }
%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.cfg::InstructionIterableImpl" = type { ptr }
%"class.cfg::InstructionIteratorImpl" = type { ptr, %"struct.std::_Rb_tree_const_iterator", %"class.ir_list::InstructionIteratorImpl" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }

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
define dso_local void @_ZN8regalloc14init_range_setERN3cfg16ControlFlowGraphE(ptr dead_on_unwind noalias nonnull writable sret(%"class.regalloc::RangeSet") align 8 %0, ptr noundef nonnull align 8 dereferenceable(160) %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.cfg::InstructionIterableImpl", align 8
  %4 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  %5 = alloca %"class.cfg::InstructionIteratorImpl", align 8
  tail call void @_ZN8regalloc8RangeSetC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %6 = invoke ptr @_Z19InstructionIterableRN3cfg16ControlFlowGraphE(ptr noundef nonnull align 8 dereferenceable(160) %1)
          to label %7 unwind label %12

7:                                                ; preds = %2
  store ptr %6, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  invoke void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %8 unwind label %14

8:                                                ; preds = %7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  invoke void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.cfg::InstructionIteratorImpl") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %8, %.critedge
  %9 = invoke noundef zeroext i1 @_ZNK3cfg23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %10 unwind label %.loopexit

10:                                               ; preds = %.preheader
  br i1 %9, label %16, label %11

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret void

12:                                               ; preds = %2
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %41

14:                                               ; preds = %7
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %40

.loopexit:                                        ; preds = %.preheader, %.critedge
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %39

.loopexit.split-lp:                               ; preds = %8
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %39

16:                                               ; preds = %10
  %17 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3cfg23InstructionIteratorImplILb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %18 unwind label %27

18:                                               ; preds = %16
  %19 = getelementptr inbounds i8, ptr %17, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = call noundef zeroext i16 @_ZNK13IRInstruction6opcodeEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  %22 = icmp eq i16 %21, 23
  br i1 %22, label %23, label %31

23:                                               ; preds = %18
  %24 = invoke noundef i64 @_ZNK13IRInstruction9srcs_sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %25 unwind label %29

25:                                               ; preds = %23
  %26 = icmp ugt i64 %24, 5
  br i1 %26, label %37, label %.critedge

27:                                               ; preds = %16
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %39

29:                                               ; preds = %37, %33, %23
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %39

31:                                               ; preds = %18
  %32 = call noundef zeroext i1 @_ZN6opcode12is_an_invokeE8IROpcode(i16 noundef zeroext %21)
  br i1 %32, label %33, label %.critedge

33:                                               ; preds = %31
  %34 = invoke noundef i64 @_ZN8regallocL13sum_src_sizesEPK13IRInstruction(ptr noundef nonnull %20)
          to label %35 unwind label %29

35:                                               ; preds = %33
  %36 = icmp ugt i64 %34, 5
  br i1 %36, label %37, label %.critedge

37:                                               ; preds = %25, %35
  invoke void @_ZN8regalloc8RangeSet7emplaceEPK13IRInstruction(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull %20)
          to label %.critedge unwind label %29

.critedge:                                        ; preds = %25, %31, %37, %35
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN3cfg23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %.preheader unwind label %.loopexit

39:                                               ; preds = %.loopexit, %.loopexit.split-lp, %27, %29
  %.pn19 = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %40

40:                                               ; preds = %39, %14
  %.pn19.pn = phi { ptr, i32 } [ %.pn19, %39 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %41

41:                                               ; preds = %40, %12
  %.pn19.pn.pn = phi { ptr, i32 } [ %.pn19.pn, %40 ], [ %13, %12 ]
  call void @_ZN8regalloc8RangeSetD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0) #6
  resume { ptr, i32 } %.pn19.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cfg23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.cfg::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

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

declare noundef i64 @_ZNK13IRInstruction9srcs_sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN8regallocL13sum_src_sizesEPK13IRInstruction(ptr noundef) local_unnamed_addr #1

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { "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 = { 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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