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

; 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.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" }
%"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.Span = type { 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.362 = type { i8 }
%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.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" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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.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 }
%class.ScopeHandle = type <{ ptr, i32, [4 x i8] }>
%"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 }

@g_debug_indent_level = external global i32, align 4
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__FUNCTION__._ZN10MirBuilder10get_resultERK4Span = external hidden unnamed_addr constant [11 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10MirBuilder10get_resultERK4Span(ptr dead_on_unwind noalias writable sret(%"class.MIR::RValue") align 8 %0, ptr noundef nonnull align 8 dereferenceable(440) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.Span, align 8
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %class.anon.362, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i1, align 1
  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
  %13 = load ptr, ptr %5, align 8
  %14 = getelementptr inbounds %class.MirBuilder, ptr %13, i32 0, i32 9
  %15 = load i8, ptr %14, align 8, !tbaa !9, !range !49, !noundef !50
  %16 = trunc i8 %15 to i1
  br i1 %16, label %32, label %17

17:                                               ; preds = %3
  br label %18

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @"_ZNSt8functionIFvRSoEEC2IZN10MirBuilder10get_resultERK4SpanE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %8)
          to label %20 unwind label %23

20:                                               ; preds = %18
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %21 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef @.str.9)
          to label %22 unwind label %27

22:                                               ; preds = %20
  call void @__cxa_throw(ptr %21, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
  unreachable

23:                                               ; preds = %18
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %10, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %11, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %58

27:                                               ; preds = %20
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %10, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %11, align 4
  call void @__cxa_free_exception(ptr %21) #6
  br label %58

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %3
  store i1 false, ptr %12, align 1
  %33 = getelementptr inbounds %class.MirBuilder, ptr %13, i32 0, i32 8
  call void @_ZN3MIR6RValueC2EOS0_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(112) %33) #6
  %34 = getelementptr inbounds %class.MirBuilder, ptr %13, i32 0, i32 9
  store i8 0, ptr %34, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %32
  %36 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %37 unwind label %48

37:                                               ; preds = %35
  br i1 %36, label %38, label %52

38:                                               ; preds = %37
  %39 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !51
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %39, ptr noundef @__FUNCTION__._ZN10MirBuilder10get_resultERK4Span)
          to label %41 unwind label %48

41:                                               ; preds = %38
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3MIRlsERSoRKNS_6RValueE(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(112) %0)
          to label %43 unwind label %48

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @_ZSt3decRSt8ios_base)
          to label %45 unwind label %48

45:                                               ; preds = %43
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %47 unwind label %48

47:                                               ; preds = %45
  br label %52

48:                                               ; preds = %45, %43, %41, %38, %35
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  call void @_ZN3MIR6RValueD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %0) #6
  br label %58

52:                                               ; preds = %47, %37
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  store i1 true, ptr %12, align 1
  %55 = load i1, ptr %12, align 1
  br i1 %55, label %57, label %56

56:                                               ; preds = %54
  call void @_ZN3MIR6RValueD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %0) #6
  br label %57

57:                                               ; preds = %56, %54
  ret void

58:                                               ; preds = %48, %27, %23
  %59 = load ptr, ptr %10, align 8
  %60 = load i32, ptr %11, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

; Function Attrs: nounwind
declare void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3MIR6RValueC2EOS0_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #4 align 2

declare void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3MIRlsERSoRKNS_6RValueE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(112)) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { 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, !12, i64 168}
!10 = !{!"_ZTS10MirBuilder", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !12, i64 52, !13, i64 56, !12, i64 168, !15, i64 176, !17, i64 216, !17, i64 240, !21, i64 264, !22, i64 272, !30, i64 320, !34, i64 344, !38, i64 368, !39, i64 384, !43, i64 408}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN3MIR6RValueE", !14, i64 0, !7, i64 8}
!14 = !{!"_ZTSN3MIR6RValue3TagE", !7, i64 0}
!15 = !{!"_ZTS8VarState", !16, i64 0, !7, i64 8}
!16 = !{!"_ZTSN8VarState3TagE", !7, i64 0}
!17 = !{!"_ZTSSt6vectorI8VarStateSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI8VarStateSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI8VarStateSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI8VarStateSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt3mapIjjSt4lessIjESaISt4pairIKjjEEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIjE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !21, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"_ZTSSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN10MirBuilder8ScopeDefESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN10MirBuilder8ScopeDefESaIS1_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN10MirBuilder8ScopeDefESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIjSaIjEE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTS11ScopeHandle", !6, i64 0, !11, i64 8}
!39 = !{!"_ZTSSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSN3MIR6LValueE", !44, i64 0, !45, i64 8}
!44 = !{!"_ZTSN3MIR6LValue7StorageE", !21, i64 0}
!45 = !{!"_ZTSSt6vectorIN3MIR6LValue7WrapperESaIS2_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIN3MIR6LValue7WrapperESaIS2_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN3MIR6LValue7WrapperESaIS2_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIN3MIR6LValue7WrapperESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!11, !11, 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"

%"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" }
%"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.Span = type { 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.362 = type { i8 }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__FUNCTION__._ZN10MirBuilder10get_resultERK4Span = external hidden unnamed_addr constant [11 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

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

; 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 #2 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)) #3

; 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 #2 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)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10MirBuilder10get_resultERK4Span(ptr dead_on_unwind noalias writable sret(%"class.MIR::RValue") align 8 %0, ptr noundef nonnull align 8 dereferenceable(440) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.Span, align 8
  %5 = alloca %"class.std::function", align 8
  %6 = alloca %class.anon.362, align 1
  %7 = getelementptr inbounds i8, ptr %1, i64 168
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !48, !noundef !49
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %18, label %10

10:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @"_ZNSt8functionIFvRSoEEC2IZN10MirBuilder10get_resultERK4SpanE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %5)
          to label %11 unwind label %14

11:                                               ; preds = %10
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %12 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull @.str.9)
          to label %13 unwind label %16

13:                                               ; preds = %11
  call void @__cxa_throw(ptr nonnull %12, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

14:                                               ; preds = %10
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %34

16:                                               ; preds = %11
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %12) #6
  br label %34

18:                                               ; preds = %3
  %19 = getelementptr inbounds i8, ptr %1, i64 56
  tail call void @_ZN3MIR6RValueC2EOS0_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(112) %19) #6
  store i8 0, ptr %7, align 8, !tbaa !5
  %20 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %21 unwind label %31

21:                                               ; preds = %18
  br i1 %20, label %22, label %33

22:                                               ; preds = %21
  %23 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !50
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %23, ptr noundef nonnull @__FUNCTION__._ZN10MirBuilder10get_resultERK4Span)
          to label %25 unwind label %31

25:                                               ; preds = %22
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3MIRlsERSoRKNS_6RValueE(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(112) %0)
          to label %27 unwind label %31

27:                                               ; preds = %25
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %29 unwind label %31

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %33 unwind label %31

31:                                               ; preds = %29, %27, %25, %22, %18
  %32 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3MIR6RValueD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %0) #6
  br label %34

33:                                               ; preds = %21, %29
  ret void

34:                                               ; preds = %31, %16, %14
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %17, %16 ], [ %15, %14 ]
  resume { ptr, i32 } %.pn
}

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3MIR6RValueC2EOS0_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #4 align 2

declare void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3MIRlsERSoRKNS_6RValueE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { 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, !11, i64 168}
!6 = !{!"_ZTS10MirBuilder", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 52, !12, i64 56, !11, i64 168, !14, i64 176, !16, i64 216, !16, i64 240, !20, i64 264, !21, i64 272, !29, i64 320, !33, i64 344, !37, i64 368, !38, i64 384, !42, i64 408}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN3MIR6RValueE", !13, i64 0, !8, i64 8}
!13 = !{!"_ZTSN3MIR6RValue3TagE", !8, i64 0}
!14 = !{!"_ZTS8VarState", !15, i64 0, !8, i64 8}
!15 = !{!"_ZTSN8VarState3TagE", !8, i64 0}
!16 = !{!"_ZTSSt6vectorI8VarStateSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI8VarStateSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI8VarStateSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI8VarStateSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"long", !8, i64 0}
!21 = !{!"_ZTSSt3mapIjjSt4lessIjESaISt4pairIKjjEEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !24, i64 0, !26, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessIjE"}
!26 = !{!"_ZTSSt15_Rb_tree_header", !27, i64 0, !20, i64 32}
!27 = !{!"_ZTSSt18_Rb_tree_node_base", !28, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!28 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!29 = !{!"_ZTSSt6vectorIN10MirBuilder8ScopeDefESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN10MirBuilder8ScopeDefESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN10MirBuilder8ScopeDefESaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN10MirBuilder8ScopeDefESaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!33 = !{!"_ZTSSt6vectorIjSaIjEE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!37 = !{!"_ZTS11ScopeHandle", !7, i64 0, !10, i64 8}
!38 = !{!"_ZTSSt6vectorISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt4pairIN3HIR14PatternBinding4TypeEN3MIR6LValueEESaIS6_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!42 = !{!"_ZTSN3MIR6LValueE", !43, i64 0, !44, i64 8}
!43 = !{!"_ZTSN3MIR6LValue7StorageE", !20, i64 0}
!44 = !{!"_ZTSSt6vectorIN3MIR6LValue7WrapperESaIS2_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseIN3MIR6LValue7WrapperESaIS2_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIN3MIR6LValue7WrapperESaIS2_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN3MIR6LValue7WrapperESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!48 = !{i8 0, i8 2}
!49 = !{}
!50 = !{!10, !10, i64 0}


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