; LLVM IR from thepowersgang/mrustc :: src/mir/mir_builder.ll (ZN10MirBuilder16new_scope_freezeERK4Span)

; 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.ScopeHandle = type <{ ptr, i32, [4 x i8] }>
%"struct.MirBuilder::ScopeDef" = type { ptr, i8, %class.ScopeType }
%class.ScopeType = type { i32, %"union.ScopeType::DataUnion" }
%"union.ScopeType::DataUnion" = type { %"struct.ScopeType::Data_Loop" }
%"struct.ScopeType::Data_Loop" = type { %"class.std::map.252", %"class.std::map.252", i8, %struct.SplitEnd, i32, %"class.std::vector.47" }
%"class.std::map.252" = type { %"class.std::_Rb_tree.253" }
%"class.std::_Rb_tree.253" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, VarState>, std::_Select1st<std::pair<const unsigned int, VarState>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, VarState>, std::_Select1st<std::pair<const unsigned int, VarState>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%struct.SplitEnd = type { %"class.std::map.252", %"class.std::map.252" }
%"class.std::vector.47" = type { %"struct.std::_Vector_base.48" }
%"struct.std::_Vector_base.48" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ScopeType::Data_Freeze" = type { %"class.std::map.252", %"class.std::vector.89" }
%"class.std::vector.89" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"struct.MIR::LValue" = type { %"class.MIR::LValue::Storage", %"class.std::vector" }
%"class.MIR::LValue::Storage" = type { i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%class.MirBuilder = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, %"class.MIR::RValue", i8, [7 x i8], %class.VarState, %"class.std::vector.26", %"class.std::vector.26", i64, %"class.std::map", %"class.std::vector.42", %"class.std::vector.47", %class.ScopeHandle, %"class.std::vector.52", %"struct.MIR::LValue" }
%"class.MIR::RValue" = type { i32, %"union.MIR::RValue::DataUnion" }
%"union.MIR::RValue::DataUnion" = type { %"struct.MIR::RValue::Data_BinOp" }
%"struct.MIR::RValue::Data_BinOp" = type { %"class.MIR::Param", i32, %"class.MIR::Param" }
%"class.MIR::Param" = type { i32, %"union.MIR::Param::DataUnion" }
%"union.MIR::Param::DataUnion" = type { %"struct.MIR::Param::Data_Borrow" }
%"struct.MIR::Param::Data_Borrow" = type { i32, %"struct.MIR::LValue" }
%class.VarState = type { i32, [4 x i8], %"union.VarState::DataUnion" }
%"union.VarState::DataUnion" = type { i32, [28 x i8] }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl" }
%"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl" = type { %"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned int>, std::_Select1st<std::pair<const unsigned int, unsigned int>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned int>, std::_Select1st<std::pair<const unsigned int, unsigned int>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<MirBuilder::ScopeDef, std::allocator<MirBuilder::ScopeDef>>::_Vector_impl" }
%"struct.std::_Vector_base<MirBuilder::ScopeDef, std::allocator<MirBuilder::ScopeDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<MirBuilder::ScopeDef, std::allocator<MirBuilder::ScopeDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MirBuilder::ScopeDef, std::allocator<MirBuilder::ScopeDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.52" = type { %"struct.std::_Vector_base.53" }
%"struct.std::_Vector_base.53" = type { %"struct.std::_Vector_base<std::pair<HIR::PatternBinding::Type, MIR::LValue>, std::allocator<std::pair<HIR::PatternBinding::Type, MIR::LValue>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<HIR::PatternBinding::Type, MIR::LValue>, std::allocator<std::pair<HIR::PatternBinding::Type, MIR::LValue>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<HIR::PatternBinding::Type, MIR::LValue>, std::allocator<std::pair<HIR::PatternBinding::Type, MIR::LValue>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<HIR::PatternBinding::Type, MIR::LValue>, std::allocator<std::pair<HIR::PatternBinding::Type, MIR::LValue>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.429" = type { i32, %"struct.MIR::LValue" }

@g_debug_indent_level = external global i32, align 4
@__FUNCTION__._ZN10MirBuilder16new_scope_freezeERK4Span = external hidden unnamed_addr constant [17 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [22 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11ScopeHandleC2ERK10MirBuilderj(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(440), i32 noundef) unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10MirBuilder8ScopeDefC2ERK4Span9ScopeType(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9ScopeTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(240)) unnamed_addr #0 align 2

declare noundef zeroext i1 @_Z13debug_enabledv() #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIj8VarStateSt4lessIjESaISt4pairIKjS0_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10MirBuilder16new_scope_freezeERK4Span(ptr dead_on_unwind noalias writable sret(%class.ScopeHandle) align 8 %0, ptr noundef nonnull align 8 dereferenceable(440) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.MirBuilder::ScopeDef", align 8
  %9 = alloca %class.ScopeType, align 8
  %10 = alloca %"struct.ScopeType::Data_Freeze", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca %"struct.MIR::LValue", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %17 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 16
  %18 = call noundef i64 @_ZNKSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 16
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #7
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.ScopeType::Data_Freeze", ptr %10, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapIj8VarStateSt4lessIjESaISt4pairIKjS0_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %22) #7
  %23 = getelementptr inbounds %"struct.ScopeType::Data_Freeze", ptr %10, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 40, i1 false)
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #7
  invoke void @_ZN9ScopeType11make_FreezeENS_11Data_FreezeE(ptr dead_on_unwind writable sret(%class.ScopeType) align 8 %9, ptr noundef %10)
          to label %24 unwind label %40

24:                                               ; preds = %3
  invoke void @_ZN10MirBuilder8ScopeDefC2ERK4Span9ScopeType(ptr noundef nonnull align 8 dereferenceable(256) %8, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef %9)
          to label %25 unwind label %44

25:                                               ; preds = %24
  invoke void @_ZNSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(256) %8)
          to label %26 unwind label %48

26:                                               ; preds = %25
  call void @_ZN10MirBuilder8ScopeDefD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %8) #7
  call void @_ZN9ScopeTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %9) #7
  call void @_ZN9ScopeType11Data_FreezeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %10) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #7
  %27 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 16
  %28 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  %29 = getelementptr inbounds %"struct.MirBuilder::ScopeDef", ptr %28, i32 0, i32 2
  %30 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZN9ScopeType9as_FreezeEv(ptr noundef nonnull align 8 dereferenceable(240) %29)
  %31 = getelementptr inbounds %"struct.ScopeType::Data_Freeze", ptr %30, i32 0, i32 1
  %32 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 19
  %33 = call noundef i64 @_ZNKSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  call void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %31, i64 noundef %33, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !11
  br label %34

34:                                               ; preds = %75, %26
  %35 = load i64, ptr %13, align 8, !tbaa !11
  %36 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 19
  %37 = call noundef i64 @_ZNKSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %38 = icmp ult i64 %35, %37
  br i1 %38, label %54, label %39

39:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %87

40:                                               ; preds = %3
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %11, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %12, align 4
  br label %53

44:                                               ; preds = %24
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %11, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %12, align 4
  br label %52

48:                                               ; preds = %25
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %11, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %12, align 4
  call void @_ZN10MirBuilder8ScopeDefD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %8) #7
  br label %52

52:                                               ; preds = %48, %44
  call void @_ZN9ScopeTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %9) #7
  br label %53

53:                                               ; preds = %52, %40
  call void @_ZN9ScopeType11Data_FreezeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %10) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #7
  br label %103

54:                                               ; preds = %34
  %55 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 19
  %56 = load i64, ptr %13, align 8, !tbaa !11
  %57 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56) #7
  %58 = getelementptr inbounds %"struct.std::pair.429", ptr %57, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @_ZN3MIR6LValueC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %59 = invoke noundef zeroext i1 @_ZN3MIRneERKNS_6LValueES2_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %60 unwind label %78

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %61 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 16
  %62 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #7
  %63 = getelementptr inbounds %"struct.MirBuilder::ScopeDef", ptr %62, i32 0, i32 2
  %64 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZN9ScopeType9as_FreezeEv(ptr noundef nonnull align 8 dereferenceable(240) %63)
          to label %65 unwind label %82

65:                                               ; preds = %60
  %66 = getelementptr inbounds %"struct.ScopeType::Data_Freeze", ptr %64, i32 0, i32 1
  %67 = load i64, ptr %13, align 8, !tbaa !11
  %68 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %66, i64 noundef %67)
          to label %69 unwind label %82

69:                                               ; preds = %65
  %70 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %71 = extractvalue { ptr, i64 } %68, 0
  store ptr %71, ptr %70, align 8
  %72 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %73 = extractvalue { ptr, i64 } %68, 1
  store i64 %73, ptr %72, align 8
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext %59) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @_ZN3MIR6LValueD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %75

75:                                               ; preds = %69
  %76 = load i64, ptr %13, align 8, !tbaa !11
  %77 = add i64 %76, 1
  store i64 %77, ptr %13, align 8, !tbaa !11
  br label %34, !llvm.loop !13

78:                                               ; preds = %54
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  br label %86

82:                                               ; preds = %65, %60
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  br label %86

86:                                               ; preds = %82, %78
  call void @_ZN3MIR6LValueD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %103

87:                                               ; preds = %39
  %88 = getelementptr inbounds %class.MirBuilder, ptr %16, i32 0, i32 17
  call void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %89

89:                                               ; preds = %87
  %90 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %90, label %91, label %99

91:                                               ; preds = %89
  %92 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %92, ptr noundef @__FUNCTION__._ZN10MirBuilder16new_scope_freezeERK4Span)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @.str.43)
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef @_ZSt3decRSt8ios_base)
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %99

99:                                               ; preds = %91, %89
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN11ScopeHandleC2ERK10MirBuilderj(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef nonnull align 8 dereferenceable(440) %16, i32 noundef %102)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret void

103:                                              ; preds = %86, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %11, align 8
  %106 = load i32, ptr %12, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ScopeType11make_FreezeENS_11Data_FreezeE(ptr dead_on_unwind noalias writable sret(%class.ScopeType) align 8, ptr noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZN9ScopeType9as_FreezeEv(ptr noundef nonnull align 8 dereferenceable(240)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3MIRneERKNS_6LValueES2_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #0 align 2

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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.ScopeHandle = type <{ ptr, i32, [4 x i8] }>
%"struct.MirBuilder::ScopeDef" = type { ptr, i8, %class.ScopeType }
%class.ScopeType = type { i32, %"union.ScopeType::DataUnion" }
%"union.ScopeType::DataUnion" = type { %"struct.ScopeType::Data_Loop" }
%"struct.ScopeType::Data_Loop" = type { %"class.std::map.252", %"class.std::map.252", i8, %struct.SplitEnd, i32, %"class.std::vector.47" }
%"class.std::map.252" = type { %"class.std::_Rb_tree.253" }
%"class.std::_Rb_tree.253" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, VarState>, std::_Select1st<std::pair<const unsigned int, VarState>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, VarState>, std::_Select1st<std::pair<const unsigned int, VarState>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%struct.SplitEnd = type { %"class.std::map.252", %"class.std::map.252" }
%"class.std::vector.47" = type { %"struct.std::_Vector_base.48" }
%"struct.std::_Vector_base.48" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ScopeType::Data_Freeze" = type { %"class.std::map.252", %"class.std::vector.89" }
%"class.std::vector.89" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"struct.MIR::LValue" = type { %"class.MIR::LValue::Storage", %"class.std::vector" }
%"class.MIR::LValue::Storage" = type { i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__FUNCTION__._ZN10MirBuilder16new_scope_freezeERK4Span = external hidden unnamed_addr constant [17 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [22 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11ScopeHandleC2ERK10MirBuilderj(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(440), i32 noundef) unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10MirBuilder8ScopeDefC2ERK4Span9ScopeType(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9ScopeTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(240)) unnamed_addr #0 align 2

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIj8VarStateSt4lessIjESaISt4pairIKjS0_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10MirBuilder16new_scope_freezeERK4Span(ptr dead_on_unwind noalias writable sret(%class.ScopeHandle) align 8 %0, ptr noundef nonnull align 8 dereferenceable(440) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca %"struct.MirBuilder::ScopeDef", align 8
  %6 = alloca %class.ScopeType, align 8
  %7 = alloca %"struct.ScopeType::Data_Freeze", align 8
  %8 = alloca %"struct.MIR::LValue", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %10 = getelementptr inbounds i8, ptr %1, i64 320
  %11 = tail call noundef i64 @_ZNKSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %12 = trunc i64 %11 to i32
  store i32 %12, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %7, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapIj8VarStateSt4lessIjESaISt4pairIKjS0_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  %13 = getelementptr inbounds i8, ptr %7, i64 48
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %13, i8 0, i64 40, i1 false)
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #7
  invoke void @_ZN9ScopeType11make_FreezeENS_11Data_FreezeE(ptr dead_on_unwind nonnull writable sret(%class.ScopeType) align 8 %6, ptr noundef nonnull %7)
          to label %14 unwind label %26

14:                                               ; preds = %3
  call void @_ZN10MirBuilder8ScopeDefC2ERK4Span9ScopeType(ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %6)
  invoke void @_ZNSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(256) %5)
          to label %15 unwind label %28

15:                                               ; preds = %14
  call void @_ZN10MirBuilder8ScopeDefD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #7
  call void @_ZN9ScopeTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %6) #7
  call void @_ZN9ScopeType11Data_FreezeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #7
  %16 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %18 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZN9ScopeType9as_FreezeEv(ptr noundef nonnull align 8 dereferenceable(240) %17)
  %19 = getelementptr inbounds i8, ptr %18, i64 48
  %20 = getelementptr inbounds i8, ptr %1, i64 384
  %21 = call noundef i64 @_ZNKSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %19, i64 noundef %21, i1 noundef zeroext false)
  %22 = call noundef i64 @_ZNKSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  %.not = icmp eq i64 %22, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %15
  %23 = getelementptr inbounds i8, ptr %9, i64 8
  br label %31

._crit_edge:                                      ; preds = %41, %15
  %24 = getelementptr inbounds i8, ptr %1, i64 344
  call void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %25, label %53, label %61

26:                                               ; preds = %3
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %30

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10MirBuilder8ScopeDefD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #7
  call void @_ZN9ScopeTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %6) #7
  br label %30

30:                                               ; preds = %28, %26
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @_ZN9ScopeType11Data_FreezeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #7
  br label %63

31:                                               ; preds = %.lr.ph, %41
  %.015 = phi i64 [ 0, %.lr.ph ], [ %45, %41 ]
  %32 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %.015) #7
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_ZN3MIR6LValueC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8)
  %34 = invoke noundef zeroext i1 @_ZN3MIRneERKNS_6LValueES2_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %35 unwind label %48

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %36 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZN9ScopeType9as_FreezeEv(ptr noundef nonnull align 8 dereferenceable(240) %37)
  %39 = getelementptr inbounds i8, ptr %38, i64 48
  %40 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %39, i64 noundef %.015)
          to label %41 unwind label %50

41:                                               ; preds = %35
  %42 = extractvalue { ptr, i64 } %40, 0
  store ptr %42, ptr %9, align 8
  %43 = extractvalue { ptr, i64 } %40, 1
  store i64 %43, ptr %23, align 8
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @_ZN3MIR6LValueD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %45 = add nuw i64 %.015, 1
  %46 = call noundef i64 @_ZNKSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  %47 = icmp ult i64 %45, %46
  br i1 %47, label %31, label %._crit_edge, !llvm.loop !9

48:                                               ; preds = %31
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %35
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %52

52:                                               ; preds = %50, %48
  %.pn12 = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZN3MIR6LValueD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %63

53:                                               ; preds = %._crit_edge
  %54 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %54, ptr noundef nonnull @__FUNCTION__._ZN10MirBuilder16new_scope_freezeERK4Span)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @.str.43)
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %56, i32 noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %61

61:                                               ; preds = %53, %._crit_edge
  %62 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN11ScopeHandleC2ERK10MirBuilderj(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef nonnull align 8 dereferenceable(440) %1, i32 noundef %62)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  ret void

63:                                               ; preds = %52, %30
  %.pn12.pn = phi { ptr, i32 } [ %.pn12, %52 ], [ %.pn, %30 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn12.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ScopeType11make_FreezeENS_11Data_FreezeE(ptr dead_on_unwind noalias writable sret(%class.ScopeType) align 8, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZN9ScopeType9as_FreezeEv(ptr noundef nonnull align 8 dereferenceable(240)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3MIRneERKNS_6LValueES2_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #0 align 2

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


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