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

; 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::VirtualRegistersFile" = type { %"class.boost::dynamic_bitset" }
%"class.boost::dynamic_bitset" = type { %"class.std::vector.207", i64 }
%"class.std::vector.207" = type { %"struct.std::_Vector_base.208" }
%"struct.std::_Vector_base.208" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"class.UnorderedMap<unsigned int, unsigned int>::FixedIterator", i8, [7 x i8] }>
%"class.UnorderedMap<unsigned int, unsigned int>::FixedIterator" = type { %"struct.std::__detail::_Node_iterator" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair.250" = type <{ %"class.UnorderedMap<unsigned int, unsigned short>::FixedIterator", i8, [7 x i8] }>
%"class.UnorderedMap<unsigned int, unsigned short>::FixedIterator" = type { %"struct.std::__detail::_Node_iterator.252" }
%"struct.std::__detail::_Node_iterator.252" = type { %"struct.std::__detail::_Node_iterator_base.253" }
%"struct.std::__detail::_Node_iterator_base.253" = type { ptr }
%"struct.regalloc::graph_coloring::RegisterTransform" = type <{ %class.UnorderedMap.74, i16, [6 x i8] }>
%class.UnorderedMap.74 = type { %"class.std::unordered_map.76" }
%"class.std::unordered_map.76" = type { %"class.std::_Hashtable.77" }
%"class.std::_Hashtable.77" = 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 }
%"struct.regalloc::graph_coloring::SpillPlan" = type { %class.UnorderedMap.212, %class.UnorderedSet.173, %class.UnorderedMap.228 }
%class.UnorderedMap.212 = type { %"class.std::unordered_map.214" }
%"class.std::unordered_map.214" = type { %"class.std::_Hashtable.215" }
%"class.std::_Hashtable.215" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%class.UnorderedSet.173 = type { %"class.std::unordered_set.175" }
%"class.std::unordered_set.175" = type { %"class.std::_Hashtable.176" }
%"class.std::_Hashtable.176" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%class.UnorderedMap.228 = type { %"class.std::unordered_map.230" }
%"class.std::unordered_map.230" = type { %"class.std::_Hashtable.231" }
%"class.std::_Hashtable.231" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", 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

declare noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8regalloc12interference5Graph8get_nodeEj(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8regalloc14graph_coloring9Allocator6selectERKN3cfg16ControlFlowGraphERKNS_12interference5GraphEPSt5stackIjSt5dequeIjSaIjEEEPNS0_17RegisterTransformEPNS0_9SpillPlanE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(160) %1, ptr noundef nonnull align 8 dereferenceable(168) %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i16, align 2
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.regalloc::VirtualRegistersFile", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i16, align 2
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca %"struct.std::pair.250", align 8
  %22 = alloca i16, align 2
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #6
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.regalloc::graph_coloring::RegisterTransform", ptr %24, i32 0, i32 1
  %26 = load i16, ptr %25, align 8, !tbaa !9
  store i16 %26, ptr %13, align 2, !tbaa !19
  br label %27

27:                                               ; preds = %87, %6
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZNKSt5stackIjSt5dequeIjSaIjEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %28)
  %30 = xor i1 %29, true
  br i1 %30, label %31, label %95

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIjSt5dequeIjSaIjEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %32)
  %34 = load i32, ptr %33, align 4, !tbaa !20
  store i32 %34, ptr %14, align 4, !tbaa !20
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNSt5stackIjSt5dequeIjSaIjEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = load i32, ptr %14, align 4, !tbaa !20
  %38 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8regalloc12interference5Graph8get_nodeEj(ptr noundef nonnull align 8 dereferenceable(168) %36, i32 noundef %37)
  store ptr %38, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @_ZN8regalloc20VirtualRegistersFileC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16)
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load i32, ptr %14, align 4, !tbaa !20
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.regalloc::graph_coloring::RegisterTransform", ptr %41, i32 0, i32 0
  invoke void @_ZN8regalloc14graph_coloring12_GLOBAL__N_113mark_adjacentERKNS_12interference5GraphEjRK12UnorderedMapIjjSt4hashIjESt8equal_toIjEEPNS_20VirtualRegistersFileE(ptr noundef nonnull align 8 dereferenceable(168) %39, i32 noundef %40, ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef %16)
          to label %43 unwind label %66

43:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #6
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  %45 = invoke noundef zeroext i8 @_ZNK8regalloc12interference4Node5widthEv(ptr noundef nonnull align 8 dereferenceable(56) %44)
          to label %46 unwind label %70

46:                                               ; preds = %43
  %47 = zext i8 %45 to i64
  %48 = invoke noundef zeroext i16 @_ZN8regalloc20VirtualRegistersFile5allocEm(ptr noundef nonnull align 8 dereferenceable(32) %16, i64 noundef %47)
          to label %49 unwind label %70

49:                                               ; preds = %46
  store i16 %48, ptr %19, align 2, !tbaa !19
  %50 = load i16, ptr %19, align 2, !tbaa !19
  %51 = zext i16 %50 to i32
  %52 = load ptr, ptr %15, align 8, !tbaa !5
  %53 = invoke noundef zeroext i16 @_ZNK8regalloc12interference4Node8max_vregEv(ptr noundef nonnull align 8 dereferenceable(56) %52)
          to label %54 unwind label %70

54:                                               ; preds = %49
  %55 = zext i16 %53 to i32
  %56 = icmp sle i32 %51, %55
  br i1 %56, label %57, label %74

57:                                               ; preds = %54
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.regalloc::graph_coloring::RegisterTransform", ptr %58, i32 0, i32 0
  %60 = invoke { ptr, i8 } @_ZN12UnorderedMapIjjSt4hashIjESt8equal_toIjEE7emplaceIJRjRtEEESt4pairINS4_13FixedIteratorEbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %59, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 2 dereferenceable(2) %19)
          to label %61 unwind label %70

61:                                               ; preds = %57
  %62 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 0
  %63 = extractvalue { ptr, i8 } %60, 0
  store ptr %63, ptr %62, align 8
  %64 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 1
  %65 = extractvalue { ptr, i8 } %60, 1
  store i8 %65, ptr %64, align 8
  br label %83

66:                                               ; preds = %31
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %17, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %18, align 4
  br label %94

70:                                               ; preds = %74, %57, %49, %46, %43
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %17, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %18, align 4
  br label %93

74:                                               ; preds = %54
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.regalloc::graph_coloring::SpillPlan", ptr %75, i32 0, i32 0
  %77 = invoke { ptr, i8 } @_ZN12UnorderedMapIjtSt4hashIjESt8equal_toIjEE7emplaceIJRjRtEEESt4pairINS4_13FixedIteratorEbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %76, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 2 dereferenceable(2) %19)
          to label %78 unwind label %70

78:                                               ; preds = %74
  %79 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 0
  %80 = extractvalue { ptr, i8 } %77, 0
  store ptr %80, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 1
  %82 = extractvalue { ptr, i8 } %77, 1
  store i8 %82, ptr %81, align 8
  br label %83

83:                                               ; preds = %78, %61
  call void @llvm.lifetime.start.p0(i64 2, ptr %22) #6
  %84 = invoke noundef zeroext i16 @_ZNK8regalloc20VirtualRegistersFile4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %85 unwind label %89

85:                                               ; preds = %83
  store i16 %84, ptr %22, align 2, !tbaa !19
  %86 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %13, ptr noundef nonnull align 2 dereferenceable(2) %22)
          to label %87 unwind label %89

87:                                               ; preds = %85
  %88 = load i16, ptr %86, align 2, !tbaa !19
  store i16 %88, ptr %13, align 2, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 2, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #6
  call void @_ZN8regalloc20VirtualRegistersFileD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %27, !llvm.loop !22

89:                                               ; preds = %85, %83
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %17, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %22) #6
  br label %93

93:                                               ; preds = %89, %70
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #6
  br label %94

94:                                               ; preds = %93, %66
  call void @_ZN8regalloc20VirtualRegistersFileD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #6
  br label %99

95:                                               ; preds = %27
  %96 = load i16, ptr %13, align 2, !tbaa !19
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.regalloc::graph_coloring::RegisterTransform", ptr %97, i32 0, i32 1
  store i16 %96, ptr %98, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #6
  ret void

99:                                               ; preds = %94
  %100 = load ptr, ptr %17, align 8
  %101 = load i32, ptr %18, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8regalloc14graph_coloring12_GLOBAL__N_113mark_adjacentERKNS_12interference5GraphEjRK12UnorderedMapIjjSt4hashIjESt8equal_toIjEEPNS_20VirtualRegistersFileE(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #3

declare noundef zeroext i16 @_ZN8regalloc20VirtualRegistersFile5allocEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 2 dereferenceable(2)) #5

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 = !{!10, !18, i64 56}
!10 = !{!"_ZTSN8regalloc14graph_coloring17RegisterTransformE", !11, i64 0, !18, i64 56}
!11 = !{!"_ZTS12UnorderedMapIjjSt4hashIjESt8equal_toIjEE", !12, i64 0}
!12 = !{!"_ZTSSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE", !13, i64 0}
!13 = !{!"_ZTSSt10_HashtableIjSt4pairIKjjESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !14, i64 8, !15, i64 16, !14, i64 24, !16, i64 32, !6, i64 48}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!16 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !17, i64 0, !14, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"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.regalloc::VirtualRegistersFile" = type { %"class.boost::dynamic_bitset" }
%"class.boost::dynamic_bitset" = type { %"class.std::vector.207", i64 }
%"class.std::vector.207" = type { %"struct.std::_Vector_base.208" }
%"struct.std::_Vector_base.208" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8regalloc12interference5Graph8get_nodeEj(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8regalloc14graph_coloring9Allocator6selectERKN3cfg16ControlFlowGraphERKNS_12interference5GraphEPSt5stackIjSt5dequeIjSaIjEEEPNS0_17RegisterTransformEPNS0_9SpillPlanE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(64) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(160) %1, ptr noundef nonnull align 8 dereferenceable(168) %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i16, align 2
  %8 = alloca i32, align 4
  %9 = alloca %"class.regalloc::VirtualRegistersFile", align 8
  %10 = alloca i16, align 2
  %11 = alloca i16, align 2
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %7) #6
  %12 = getelementptr inbounds i8, ptr %4, i64 56
  %13 = load i16, ptr %12, align 8, !tbaa !5
  store i16 %13, ptr %7, align 2, !tbaa !18
  %14 = tail call noundef zeroext i1 @_ZNKSt5stackIjSt5dequeIjSaIjEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %14, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIjSt5dequeIjSaIjEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %16 = load i32, ptr %15, align 4, !tbaa !19
  store i32 %16, ptr %8, align 4, !tbaa !19
  call void @_ZNSt5stackIjSt5dequeIjSaIjEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %17 = load i32, ptr %8, align 4, !tbaa !19
  %18 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8regalloc12interference5Graph8get_nodeEj(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef %17)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @_ZN8regalloc20VirtualRegistersFileC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9)
  %19 = load i32, ptr %8, align 4, !tbaa !19
  invoke void @_ZN8regalloc14graph_coloring12_GLOBAL__N_113mark_adjacentERKNS_12interference5GraphEjRK12UnorderedMapIjjSt4hashIjESt8equal_toIjEEPNS_20VirtualRegistersFileE(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef %19, ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull %9)
          to label %20 unwind label %28

20:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #6
  %21 = call noundef zeroext i8 @_ZNK8regalloc12interference4Node5widthEv(ptr noundef nonnull align 8 dereferenceable(56) %18)
  %22 = zext i8 %21 to i64
  %23 = invoke noundef zeroext i16 @_ZN8regalloc20VirtualRegistersFile5allocEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %22)
          to label %24 unwind label %30

24:                                               ; preds = %20
  store i16 %23, ptr %10, align 2, !tbaa !18
  %25 = call noundef zeroext i16 @_ZNK8regalloc12interference4Node8max_vregEv(ptr noundef nonnull align 8 dereferenceable(56) %18)
  %.not = icmp ugt i16 %23, %25
  br i1 %.not, label %32, label %26

26:                                               ; preds = %24
  %27 = invoke { ptr, i8 } @_ZN12UnorderedMapIjjSt4hashIjESt8equal_toIjEE7emplaceIJRjRtEEESt4pairINS4_13FixedIteratorEbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 2 dereferenceable(2) %10)
          to label %34 unwind label %30

28:                                               ; preds = %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %39

30:                                               ; preds = %32, %26, %20
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #6
  br label %39

32:                                               ; preds = %24
  %33 = invoke { ptr, i8 } @_ZN12UnorderedMapIjtSt4hashIjESt8equal_toIjEE7emplaceIJRjRtEEESt4pairINS4_13FixedIteratorEbEDpOT_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 2 dereferenceable(2) %10)
          to label %34 unwind label %30

34:                                               ; preds = %32, %26
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %11) #6
  %35 = call noundef zeroext i16 @_ZNK8regalloc20VirtualRegistersFile4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
  store i16 %35, ptr %11, align 2, !tbaa !18
  %36 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %7, ptr noundef nonnull align 2 dereferenceable(2) %11)
  %37 = load i16, ptr %36, align 2, !tbaa !18
  store i16 %37, ptr %7, align 2, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #6
  call void @_ZN8regalloc20VirtualRegistersFileD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %38 = call noundef zeroext i1 @_ZNKSt5stackIjSt5dequeIjSaIjEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %38, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !21

39:                                               ; preds = %30, %28
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @_ZN8regalloc20VirtualRegistersFileD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn

._crit_edge.loopexit:                             ; preds = %34
  %.pre = load i16, ptr %7, align 2, !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %6
  %40 = phi i16 [ %.pre, %._crit_edge.loopexit ], [ %13, %6 ]
  store i16 %40, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #6
  ret void
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8regalloc14graph_coloring12_GLOBAL__N_113mark_adjacentERKNS_12interference5GraphEjRK12UnorderedMapIjjSt4hashIjESt8equal_toIjEEPNS_20VirtualRegistersFileE(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #3

declare noundef zeroext i16 @_ZN8regalloc20VirtualRegistersFile5allocEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 2 dereferenceable(2)) local_unnamed_addr #5

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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, !17, i64 56}
!6 = !{!"_ZTSN8regalloc14graph_coloring17RegisterTransformE", !7, i64 0, !17, i64 56}
!7 = !{!"_ZTS12UnorderedMapIjjSt4hashIjESt8equal_toIjEE", !8, i64 0}
!8 = !{!"_ZTSSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE", !9, i64 0}
!9 = !{!"_ZTSSt10_HashtableIjSt4pairIKjjESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !10, i64 0, !13, i64 8, !14, i64 16, !13, i64 24, !15, i64 32, !10, i64 48}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !13, i64 8}
!16 = !{!"float", !11, i64 0}
!17 = !{!"short", !11, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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