; LLVM IR from facebook/redex :: libredex/RedexContext.ll (ZN12RedexContext7compactEv)

; 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.anon.491 = type { i8 }
%"class.std::vector.99" = type { %"struct.std::_Vector_base.100" }
%"struct.std::_Vector_base.100" = type { %"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.493 = type { ptr }
%class.anon.494 = type { ptr }
%class.anon.495 = type { ptr }
%class.anon.496 = type { ptr }
%class.anon.497 = type { ptr }
%class.anon.498 = type { ptr }
%class.anon.499 = type { ptr }
%class.anon.500 = type { ptr }
%"class.std::allocator.101" = type { i8 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12RedexContext7compactEv(ptr noundef nonnull align 8 dereferenceable(389504) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.anon.491, align 1
  %4 = alloca %"class.std::vector.99", align 8
  %5 = alloca %"class.std::initializer_list", align 8
  %6 = alloca [8 x %"class.std::function"], align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.anon.493, align 8
  %9 = alloca %class.anon.494, align 8
  %10 = alloca %class.anon.495, align 8
  %11 = alloca %class.anon.496, align 8
  %12 = alloca %class.anon.497, align 8
  %13 = alloca %class.anon.498, align 8
  %14 = alloca %class.anon.499, align 8
  %15 = alloca %class.anon.500, align 8
  %16 = alloca i1, align 1
  %17 = alloca %"class.std::allocator.101", align 1
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %6) #4
  store i1 true, ptr %16, align 1
  store ptr %6, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %21 = getelementptr inbounds %class.anon.493, ptr %8, i32 0, i32 0
  store ptr %20, ptr %21, align 8, !tbaa !9
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %22 = getelementptr inbounds %"class.std::function", ptr %6, i64 1
  store ptr %22, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %23 = getelementptr inbounds %class.anon.494, ptr %9, i32 0, i32 0
  store ptr %20, ptr %23, align 8, !tbaa !11
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %24 = getelementptr inbounds %"class.std::function", ptr %6, i64 2
  store ptr %24, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %25 = getelementptr inbounds %class.anon.495, ptr %10, i32 0, i32 0
  store ptr %20, ptr %25, align 8, !tbaa !13
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %26 = getelementptr inbounds %"class.std::function", ptr %6, i64 3
  store ptr %26, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %27 = getelementptr inbounds %class.anon.496, ptr %11, i32 0, i32 0
  store ptr %20, ptr %27, align 8, !tbaa !15
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %28 = getelementptr inbounds %"class.std::function", ptr %6, i64 4
  store ptr %28, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %29 = getelementptr inbounds %class.anon.497, ptr %12, i32 0, i32 0
  store ptr %20, ptr %29, align 8, !tbaa !17
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_5vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %30 = getelementptr inbounds %"class.std::function", ptr %6, i64 5
  store ptr %30, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %31 = getelementptr inbounds %class.anon.498, ptr %13, i32 0, i32 0
  store ptr %20, ptr %31, align 8, !tbaa !19
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_6vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  %32 = getelementptr inbounds %"class.std::function", ptr %6, i64 6
  store ptr %32, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %33 = getelementptr inbounds %class.anon.499, ptr %14, i32 0, i32 0
  store ptr %20, ptr %33, align 8, !tbaa !21
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_7vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %34 = getelementptr inbounds %"class.std::function", ptr %6, i64 7
  store ptr %34, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %35 = getelementptr inbounds %class.anon.500, ptr %15, i32 0, i32 0
  store ptr %20, ptr %35, align 8, !tbaa !23
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_8vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  store i1 false, ptr %16, align 1
  %36 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 0
  store ptr %6, ptr %36, align 8, !tbaa !25
  %37 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 1
  store i64 8, ptr %37, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaISt8functionIFvvEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  %38 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8
  %40 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %41 = load i64, ptr %40, align 8
  invoke void @_ZNSt6vectorISt8functionIFvvEESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr %39, i64 %41, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %42 unwind label %51

42:                                               ; preds = %1
  invoke void @"_ZZN12RedexContext7compactEvENK3$_0clERKSt6vectorISt8functionIFvvEESaIS4_EE"(ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %43 unwind label %55

43:                                               ; preds = %42
  call void @_ZNSt6vectorISt8functionIFvvEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @_ZNSt15__new_allocatorISt8functionIFvvEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  %44 = getelementptr inbounds [8 x %"class.std::function"], ptr %6, i32 0, i32 0
  %45 = getelementptr inbounds %"class.std::function", ptr %44, i64 8
  br label %46

46:                                               ; preds = %46, %43
  %47 = phi ptr [ %45, %43 ], [ %48, %46 ]
  %48 = getelementptr inbounds %"class.std::function", ptr %47, i64 -1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #4
  %49 = icmp eq ptr %48, %44
  br i1 %49, label %50, label %46

50:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  ret void

51:                                               ; preds = %1
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %18, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %19, align 4
  br label %59

55:                                               ; preds = %42
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %18, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %19, align 4
  call void @_ZNSt6vectorISt8functionIFvvEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %59

59:                                               ; preds = %55, %51
  call void @_ZNSt15__new_allocatorISt8functionIFvvEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  %60 = getelementptr inbounds [8 x %"class.std::function"], ptr %6, i32 0, i32 0
  %61 = getelementptr inbounds %"class.std::function", ptr %60, i64 8
  br label %62

62:                                               ; preds = %62, %59
  %63 = phi ptr [ %61, %59 ], [ %64, %62 ]
  %64 = getelementptr inbounds %"class.std::function", ptr %63, i64 -1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %64) #4
  %65 = icmp eq ptr %64, %60
  br i1 %65, label %66, label %62

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %18, align 8
  %69 = load i32, ptr %19, align 4
  %70 = insertvalue { ptr, i32 } poison, ptr %68, 0
  %71 = insertvalue { ptr, i32 } %70, i32 %69, 1
  resume { ptr, i32 } %71
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN12RedexContext7compactEvENK3$_0clERKSt6vectorISt8functionIFvvEESaIS4_EE"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_5vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_6vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_7vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_8vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSZN12RedexContext7compactEvE3$_1", !6, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSZN12RedexContext7compactEvE3$_2", !6, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSZN12RedexContext7compactEvE3$_3", !6, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSZN12RedexContext7compactEvE3$_4", !6, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSZN12RedexContext7compactEvE3$_5", !6, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSZN12RedexContext7compactEvE3$_6", !6, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTSZN12RedexContext7compactEvE3$_7", !6, i64 0}
!23 = !{!24, !6, i64 0}
!24 = !{!"_ZTSZN12RedexContext7compactEvE3$_8", !6, i64 0}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTSSt16initializer_listISt8functionIFvvEEE", !6, i64 0, !27, i64 8}
!27 = !{!"long", !7, i64 0}
!28 = !{!26, !27, i64 8}


; 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.anon.491 = type { i8 }
%"class.std::vector.99" = type { %"struct.std::_Vector_base.100" }
%"struct.std::_Vector_base.100" = type { %"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<void ()>, std::allocator<std::function<void ()>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.493 = type { ptr }
%class.anon.494 = type { ptr }
%class.anon.495 = type { ptr }
%class.anon.496 = type { ptr }
%class.anon.497 = type { ptr }
%class.anon.498 = type { ptr }
%class.anon.499 = type { ptr }
%class.anon.500 = type { ptr }
%"class.std::allocator.101" = type { i8 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12RedexContext7compactEv(ptr noundef nonnull align 8 dereferenceable(389504) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.anon.491, align 1
  %3 = alloca %"class.std::vector.99", align 8
  %4 = alloca [8 x %"class.std::function"], align 8
  %5 = alloca %class.anon.493, align 8
  %6 = alloca %class.anon.494, align 8
  %7 = alloca %class.anon.495, align 8
  %8 = alloca %class.anon.496, align 8
  %9 = alloca %class.anon.497, align 8
  %10 = alloca %class.anon.498, align 8
  %11 = alloca %class.anon.499, align 8
  %12 = alloca %class.anon.500, align 8
  %13 = alloca %"class.std::allocator.101", align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %0, ptr %5, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %14 = getelementptr inbounds i8, ptr %4, i64 32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store ptr %0, ptr %6, align 8, !tbaa !10
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %15 = getelementptr inbounds i8, ptr %4, i64 64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store ptr %0, ptr %7, align 8, !tbaa !12
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %16 = getelementptr inbounds i8, ptr %4, i64 96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  store ptr %0, ptr %8, align 8, !tbaa !14
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %17 = getelementptr inbounds i8, ptr %4, i64 128
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %0, ptr %9, align 8, !tbaa !16
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_5vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %18 = getelementptr inbounds i8, ptr %4, i64 160
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  store ptr %0, ptr %10, align 8, !tbaa !18
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_6vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %19 = getelementptr inbounds i8, ptr %4, i64 192
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  store ptr %0, ptr %11, align 8, !tbaa !20
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_7vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %20 = getelementptr inbounds i8, ptr %4, i64 224
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %0, ptr %12, align 8, !tbaa !22
  call void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_8vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSaISt8functionIFvvEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt6vectorISt8functionIFvvEESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr nonnull %4, i64 8, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %21 unwind label %30

21:                                               ; preds = %1
  invoke void @"_ZZN12RedexContext7compactEvENK3$_0clERKSt6vectorISt8functionIFvvEESaIS4_EE"(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %22 unwind label %32

22:                                               ; preds = %21
  call void @_ZNSt6vectorISt8functionIFvvEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @_ZNSt15__new_allocatorISt8functionIFvvEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  %23 = getelementptr inbounds i8, ptr %4, i64 224
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #4
  %24 = getelementptr inbounds i8, ptr %4, i64 192
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #4
  %25 = getelementptr inbounds i8, ptr %4, i64 160
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  %26 = getelementptr inbounds i8, ptr %4, i64 128
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #4
  %27 = getelementptr inbounds i8, ptr %4, i64 96
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #4
  %28 = getelementptr inbounds i8, ptr %4, i64 64
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  %29 = getelementptr inbounds i8, ptr %4, i64 32
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  ret void

30:                                               ; preds = %1
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %34

32:                                               ; preds = %21
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt8functionIFvvEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %34

34:                                               ; preds = %32, %30
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @_ZNSt15__new_allocatorISt8functionIFvvEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  %35 = getelementptr inbounds i8, ptr %4, i64 224
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #4
  %36 = getelementptr inbounds i8, ptr %4, i64 192
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #4
  %37 = getelementptr inbounds i8, ptr %4, i64 160
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #4
  %38 = getelementptr inbounds i8, ptr %4, i64 128
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #4
  %39 = getelementptr inbounds i8, ptr %4, i64 96
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #4
  %40 = getelementptr inbounds i8, ptr %4, i64 64
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #4
  %41 = getelementptr inbounds i8, ptr %4, i64 32
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN12RedexContext7compactEvENK3$_0clERKSt6vectorISt8functionIFvvEESaIS4_EE"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_5vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_6vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_7vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN12RedexContext7compactEvE3$_8vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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, !7, i64 0}
!6 = !{!"_ZTSZN12RedexContext7compactEvE3$_1", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"_ZTSZN12RedexContext7compactEvE3$_2", !7, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"_ZTSZN12RedexContext7compactEvE3$_3", !7, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSZN12RedexContext7compactEvE3$_4", !7, i64 0}
!16 = !{!17, !7, i64 0}
!17 = !{!"_ZTSZN12RedexContext7compactEvE3$_5", !7, i64 0}
!18 = !{!19, !7, i64 0}
!19 = !{!"_ZTSZN12RedexContext7compactEvE3$_6", !7, i64 0}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTSZN12RedexContext7compactEvE3$_7", !7, i64 0}
!22 = !{!23, !7, i64 0}
!23 = !{!"_ZTSZN12RedexContext7compactEvE3$_8", !7, i64 0}


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