; LLVM IR from facebook/redex :: service/regalloc-fast (LinearScan)

; 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"

%"struct.fastregalloc::IRInstructionShape" = type { i16, %union.anon.147 }
%union.anon.147 = type { i64 }
%"struct.std::pair.155" = type <{ %"struct.std::_Rb_tree_const_iterator.154", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator.154" = type { ptr }
%"class.fastregalloc::LinearScanAllocator" = type <{ %"class.cfg::ScopedCFG", i8, [7 x i8], %"class.std::vector", %class.UnorderedMap, %class.UnorderedSet, %class.UnorderedMap.19, %"class.std::vector.39", %"class.std::optional", %"class.std::priority_queue", i32, [4 x i8] }>
%"class.cfg::ScopedCFG" = type <{ ptr, i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<fastregalloc::VRegLiveInterval, std::allocator<fastregalloc::VRegLiveInterval>>::_Vector_impl" }
%"struct.std::_Vector_base<fastregalloc::VRegLiveInterval, std::allocator<fastregalloc::VRegLiveInterval>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastregalloc::VRegLiveInterval, std::allocator<fastregalloc::VRegLiveInterval>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastregalloc::VRegLiveInterval, std::allocator<fastregalloc::VRegLiveInterval>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.UnorderedMap = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = 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.UnorderedSet = type { %"class.std::unordered_set" }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%class.UnorderedMap.19 = type { %"class.std::unordered_map.21" }
%"class.std::unordered_map.21" = type { %"class.std::_Hashtable.22" }
%"class.std::_Hashtable.22" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<fastregalloc::LiveIntervalPoint, std::allocator<fastregalloc::LiveIntervalPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<fastregalloc::LiveIntervalPoint, std::allocator<fastregalloc::LiveIntervalPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastregalloc::LiveIntervalPoint, std::allocator<fastregalloc::LiveIntervalPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastregalloc::LiveIntervalPoint, std::allocator<fastregalloc::LiveIntervalPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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<unsigned int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<unsigned int>::_Storage" = type { i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector.44", [8 x i8] }>
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = type { %"struct.std::_Vector_base<fastregalloc::ActiveInterval, std::allocator<fastregalloc::ActiveInterval>>::_Vector_impl" }
%"struct.std::_Vector_base<fastregalloc::ActiveInterval, std::allocator<fastregalloc::ActiveInterval>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastregalloc::ActiveInterval, std::allocator<fastregalloc::ActiveInterval>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastregalloc::ActiveInterval, std::allocator<fastregalloc::ActiveInterval>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.fastregalloc::ActiveInterval" = type { i32, i32 }
%"struct.fastregalloc::VRegLiveInterval" = type { i32, i32, i16, [2 x i8], %"class.std::optional" }

@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj = external hidden unnamed_addr constant [71 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 uwtable
define dso_local void @_ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.fastregalloc::IRInstructionShape", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca %"struct.std::pair.155", align 8
  %12 = alloca { ptr, i8 }, align 8
  %13 = alloca %"struct.std::pair.155", align 8
  %14 = alloca i32, align 4
  %15 = alloca { ptr, i8 }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %16 = load ptr, ptr %3, align 8
  br label %17

17:                                               ; preds = %103, %101, %2
  %18 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 9
  %19 = call noundef zeroext i1 @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %18)
  br i1 %19, label %27, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 9
  %22 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %21)
  %23 = getelementptr inbounds %"struct.fastregalloc::ActiveInterval", ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = icmp ugt i32 %24, %25
  br label %27

27:                                               ; preds = %20, %17
  %28 = phi i1 [ false, %17 ], [ %26, %20 ]
  br i1 %28, label %29, label %104

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %30 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 3
  %31 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 9
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %31)
  %33 = getelementptr inbounds %"struct.fastregalloc::ActiveInterval", ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN12fastregalloc16VRegLiveIntervalESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %35)
  store ptr %36, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 9
  call void @_ZNSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %37)
  %38 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 8
  %39 = call noundef zeroext i1 @_ZNKSt8optionalIjEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %38) #5
  br i1 %39, label %40, label %50

40:                                               ; preds = %29
  %41 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 8
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalIjEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %41) #5
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.fastregalloc::VRegLiveInterval", ptr %44, i32 0, i32 2
  %46 = load i16, ptr %45, align 4, !tbaa !14
  %47 = zext i16 %46 to i32
  %48 = icmp eq i32 %43, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %40
  store i32 2, ptr %6, align 4
  br label %101, !llvm.loop !22

50:                                               ; preds = %40, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.fastregalloc::VRegLiveInterval", ptr %51, i32 0, i32 4
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalIjE5valueEv(ptr noundef nonnull align 4 dereferenceable(8) %52)
  %54 = load i32, ptr %53, align 4, !tbaa !9
  store i32 %54, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %55 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 7
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.fastregalloc::VRegLiveInterval", ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !24
  %59 = zext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN12fastregalloc17LiveIntervalPointESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %59)
  %61 = call { i16, i64 } @_ZN12fastregalloc18IRInstructionShape3getERKNS_17LiveIntervalPointE(ptr noundef nonnull align 8 dereferenceable(16) %60)
  %62 = getelementptr inbounds { i16, i64 }, ptr %8, i32 0, i32 0
  %63 = extractvalue { i16, i64 } %61, 0
  store i16 %63, ptr %62, align 8
  %64 = getelementptr inbounds { i16, i64 }, ptr %8, i32 0, i32 1
  %65 = extractvalue { i16, i64 } %61, 1
  store i64 %65, ptr %64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %66 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 6
  %67 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN12UnorderedMapIN12fastregalloc18IRInstructionShapeESt3setIjSt4lessIjESaIjEENS0_24IRInstructionShapeHasherESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %66, ptr noundef nonnull align 8 dereferenceable(16) %8)
  store ptr %67, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = call { ptr, i8 } @_ZNSt3setIjSt4lessIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(48) %68, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store { ptr, i8 } %69, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %12, i64 9, i1 false)
  %70 = getelementptr inbounds %"struct.std::pair.155", ptr %11, i32 0, i32 1
  %71 = load i8, ptr %70, align 8, !tbaa !25, !range !28, !noundef !29
  %72 = trunc i8 %71 to i1
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  %73 = zext i1 %72 to i8
  store i8 %73, ptr %10, align 1, !tbaa !30
  %74 = load i8, ptr %10, align 1, !tbaa !30, !range !28, !noundef !29
  %75 = trunc i8 %74 to i1
  br i1 %75, label %76, label %77

76:                                               ; preds = %50
  br label %79

77:                                               ; preds = %50
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.11, ptr noundef @.str.6, i32 noundef 159, ptr noundef @__PRETTY_FUNCTION__._ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj, i32 noundef 2, ptr noundef @.str.7) #6
  unreachable

78:                                               ; No predecessors!
  br label %79

79:                                               ; preds = %78, %76
  %80 = getelementptr inbounds %"class.fastregalloc::LinearScanAllocator", ptr %16, i32 0, i32 5
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.fastregalloc::VRegLiveInterval", ptr %81, i32 0, i32 2
  %83 = call noundef i64 @_ZNK12UnorderedSetItSt4hashItESt8equal_toItEE5countERKt(ptr noundef nonnull align 8 dereferenceable(56) %80, ptr noundef nonnull align 2 dereferenceable(2) %82)
  %84 = icmp ne i64 %83, 0
  br i1 %84, label %85, label %100

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = add i32 %87, 1
  store i32 %88, ptr %14, align 4, !tbaa !9
  %89 = call { ptr, i8 } @_ZNSt3setIjSt4lessIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(48) %86, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store { ptr, i8 } %89, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %15, i64 9, i1 false)
  %90 = getelementptr inbounds %"struct.std::pair.155", ptr %13, i32 0, i32 1
  %91 = load i8, ptr %90, align 8, !tbaa !25, !range !28, !noundef !29
  %92 = trunc i8 %91 to i1
  %93 = zext i1 %92 to i8
  store i8 %93, ptr %10, align 1, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  %94 = load i8, ptr %10, align 1, !tbaa !30, !range !28, !noundef !29
  %95 = trunc i8 %94 to i1
  br i1 %95, label %96, label %97

96:                                               ; preds = %85
  br label %99

97:                                               ; preds = %85
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.11, ptr noundef @.str.6, i32 noundef 162, ptr noundef @__PRETTY_FUNCTION__._ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj, i32 noundef 2, ptr noundef @.str.7) #6
  unreachable

98:                                               ; No predecessors!
  br label %99

99:                                               ; preds = %98, %96
  br label %100

100:                                              ; preds = %99, %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  store i32 0, ptr %6, align 4
  br label %101

101:                                              ; preds = %100, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %102 = load i32, ptr %6, align 4
  switch i32 %102, label %105 [
    i32 0, label %103
    i32 2, label %17
  ]

103:                                              ; preds = %101
  br label %17, !llvm.loop !22

104:                                              ; preds = %27
  ret void

105:                                              ; preds = %101
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i16, i64 } @_ZN12fastregalloc18IRInstructionShape3getERKNS_17LiveIntervalPointE(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN12fastregalloc17LiveIntervalPointESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN12UnorderedMapIN12fastregalloc18IRInstructionShapeESt3setIjSt4lessIjESaIjEENS0_24IRInstructionShapeHasherESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN12fastregalloc16VRegLiveIntervalESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_ZTSN12fastregalloc14ActiveIntervalE", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 0}
!14 = !{!15, !16, i64 8}
!15 = !{!"_ZTSN12fastregalloc16VRegLiveIntervalE", !10, i64 0, !10, i64 4, !16, i64 8, !17, i64 12}
!16 = !{!"short", !7, i64 0}
!17 = !{!"_ZTSSt8optionalIjE", !18, i64 0}
!18 = !{!"_ZTSSt14_Optional_baseIjLb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt17_Optional_payloadIjLb1ELb1ELb1EE", !20, i64 0}
!20 = !{!"_ZTSSt22_Optional_payload_baseIjE", !7, i64 0, !21, i64 4}
!21 = !{!"bool", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!15, !10, i64 4}
!25 = !{!26, !21, i64 8}
!26 = !{!"_ZTSSt4pairISt23_Rb_tree_const_iteratorIjEbE", !27, i64 0, !21, i64 8}
!27 = !{!"_ZTSSt23_Rb_tree_const_iteratorIjE", !6, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!21, !21, 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"

%"struct.fastregalloc::IRInstructionShape" = type { i16, %union.anon.147 }
%union.anon.147 = type { i64 }

@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj = external hidden unnamed_addr constant [71 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 uwtable
define dso_local void @_ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca %"struct.fastregalloc::IRInstructionShape", align 8
  %5 = alloca i32, align 4
  %6 = getelementptr inbounds i8, ptr %0, i64 248
  %7 = tail call noundef zeroext i1 @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %7, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = getelementptr inbounds i8, ptr %0, i64 240
  %10 = getelementptr inbounds i8, ptr %0, i64 216
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = getelementptr inbounds i8, ptr %0, i64 160
  %13 = getelementptr inbounds i8, ptr %0, i64 104
  br label %14

14:                                               ; preds = %.lr.ph, %57
  %15 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = icmp ugt i32 %17, %1
  br i1 %18, label %19, label %.critedge

19:                                               ; preds = %14
  %20 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %21 = load i32, ptr %20, align 4, !tbaa !10
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN12fastregalloc16VRegLiveIntervalESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %22)
  call void @_ZNSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %24 = call noundef zeroext i1 @_ZNKSt8optionalIjEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %9) #4
  br i1 %24, label %25, label %32

25:                                               ; preds = %19
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalIjEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %9) #4
  %27 = load i32, ptr %26, align 4, !tbaa !11
  %28 = getelementptr inbounds i8, ptr %23, i64 8
  %29 = load i16, ptr %28, align 4, !tbaa !12
  %30 = zext i16 %29 to i32
  %31 = icmp eq i32 %27, %30
  br i1 %31, label %57, label %32, !llvm.loop !20

32:                                               ; preds = %25, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %33 = getelementptr inbounds i8, ptr %23, i64 12
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalIjE5valueEv(ptr noundef nonnull align 4 dereferenceable(8) %33)
  %35 = load i32, ptr %34, align 4, !tbaa !11
  store i32 %35, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %36 = getelementptr inbounds i8, ptr %23, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !22
  %38 = zext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN12fastregalloc17LiveIntervalPointESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %38)
  %40 = call { i16, i64 } @_ZN12fastregalloc18IRInstructionShape3getERKNS_17LiveIntervalPointE(ptr noundef nonnull align 8 dereferenceable(16) %39)
  %41 = extractvalue { i16, i64 } %40, 0
  store i16 %41, ptr %4, align 8
  %42 = extractvalue { i16, i64 } %40, 1
  store i64 %42, ptr %11, align 8
  %43 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN12UnorderedMapIN12fastregalloc18IRInstructionShapeESt3setIjSt4lessIjESaIjEENS0_24IRInstructionShapeHasherESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %44 = call { ptr, i8 } @_ZNSt3setIjSt4lessIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(48) %43, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %.fca.1.extract3 = extractvalue { ptr, i8 } %44, 1
  %45 = trunc i8 %.fca.1.extract3 to i1
  br i1 %45, label %47, label %46

46:                                               ; preds = %32
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.6, i32 noundef 159, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj, i32 noundef 2, ptr noundef nonnull @.str.7) #5
  unreachable

47:                                               ; preds = %32
  %48 = getelementptr inbounds i8, ptr %23, i64 8
  %49 = call noundef i64 @_ZNK12UnorderedSetItSt4hashItESt8equal_toItEE5countERKt(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 2 dereferenceable(2) %48)
  %.not = icmp eq i64 %49, 0
  br i1 %.not, label %56, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %51 = load i32, ptr %3, align 4, !tbaa !11
  %52 = add i32 %51, 1
  store i32 %52, ptr %5, align 4, !tbaa !11
  %53 = call { ptr, i8 } @_ZNSt3setIjSt4lessIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(48) %43, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %.fca.1.extract = extractvalue { ptr, i8 } %53, 1
  %54 = trunc i8 %.fca.1.extract to i1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  call void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.6, i32 noundef 162, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12fastregalloc19LinearScanAllocator20expire_old_intervalsEj, i32 noundef 2, ptr noundef nonnull @.str.7) #5
  unreachable

56:                                               ; preds = %50, %47
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %57

57:                                               ; preds = %25, %56
  %58 = call noundef zeroext i1 @_ZNKSt14priority_queueIN12fastregalloc14ActiveIntervalESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %58, label %.critedge, label %14

.critedge:                                        ; preds = %14, %57, %2
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIjEcvbEv(ptr noundef nonnull align 4 dereferenceable(8)) 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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalIjE5valueEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i16, i64 } @_ZN12fastregalloc18IRInstructionShape3getERKNS_17LiveIntervalPointE(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN12fastregalloc17LiveIntervalPointESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN12UnorderedMapIN12fastregalloc18IRInstructionShapeESt3setIjSt4lessIjESaIjEENS0_24IRInstructionShapeHasherESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN12fastregalloc16VRegLiveIntervalESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn }

!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, !7, i64 4}
!6 = !{!"_ZTSN12fastregalloc14ActiveIntervalE", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 8}
!13 = !{!"_ZTSN12fastregalloc16VRegLiveIntervalE", !7, i64 0, !7, i64 4, !14, i64 8, !15, i64 12}
!14 = !{!"short", !8, i64 0}
!15 = !{!"_ZTSSt8optionalIjE", !16, i64 0}
!16 = !{!"_ZTSSt14_Optional_baseIjLb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt17_Optional_payloadIjLb1ELb1ELb1EE", !18, i64 0}
!18 = !{!"_ZTSSt22_Optional_payload_baseIjE", !8, i64 0, !19, i64 4}
!19 = !{!"bool", !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!13, !7, i64 4}


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