; LLVM IR from thepowersgang/mrustc :: src/hir/deserialise.ll (ZN15HirDeserialiser15deserialise_mirEv)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::FunctionPointer" = type { ptr }
%class.TraceLog = type { ptr, %"class.std::function" }
%"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.MIR::Function" = type { %"class.std::vector", %"class.std::vector.180", %"class.std::vector.184", %"class.MIR::EnumCachePtr" }
%"class.std::vector.180" = 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 }>
%"class.std::vector.184" = type { %"struct.std::_Vector_base.185" }
%"struct.std::_Vector_base.185" = type { %"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::EnumCachePtr" = type { ptr }

@__func__._ZN15HirDeserialiser15deserialise_mirEv = external hidden unnamed_addr constant [16 x i8], align 1

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv() #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser15deserialise_vecIN3HIR7TypeRefEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

; Function Attrs: nounwind
declare void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15HirDeserialiser15deserialise_mirEv(ptr dead_on_unwind noalias writable sret(%"class.MIR::FunctionPointer") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.TraceLog, align 8
  %6 = alloca %"class.MIR::Function", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector.180", align 8
  %11 = alloca %"class.std::vector.184", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #9
  %13 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %13, label %14, label %16

14:                                               ; preds = %2
  %15 = call noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv()
  br label %16

16:                                               ; preds = %14, %2
  %17 = phi i1 [ false, %2 ], [ %15, %14 ]
  %18 = zext i1 %17 to i64
  %19 = select i1 %17, ptr @__func__._ZN15HirDeserialiser15deserialise_mirEv, ptr null
  call void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 96, ptr %6) #9
  invoke void @_ZN3MIR8FunctionC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %20 unwind label %34

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #9
  invoke void @_ZN15HirDeserialiser15deserialise_vecIN3HIR7TypeRefEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %21 unwind label %38

21:                                               ; preds = %20
  %22 = getelementptr inbounds %"class.MIR::Function", ptr %6, i32 0, i32 0
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3HIR7TypeRefESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @_ZNSt6vectorIN3HIR7TypeRefESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #9
  invoke void @_ZN15HirDeserialiser15deserialise_vecIbEESt6vectorIT_SaIS2_EEv(ptr dead_on_unwind writable sret(%"class.std::vector.180") align 8 %10, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %24 unwind label %42

24:                                               ; preds = %21
  %25 = getelementptr inbounds %"class.MIR::Function", ptr %6, i32 0, i32 1
  %26 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIbSaIbEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef nonnull align 8 dereferenceable(40) %10) #9
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #9
  invoke void @_ZN15HirDeserialiser15deserialise_vecIN3MIR10BasicBlockEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind writable sret(%"class.std::vector.184") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %27 unwind label %46

27:                                               ; preds = %24
  %28 = getelementptr inbounds %"class.MIR::Function", ptr %6, i32 0, i32 2
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3MIR10BasicBlockESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @_ZNSt6vectorIN3MIR10BasicBlockESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  %30 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #10
          to label %31 unwind label %50

31:                                               ; preds = %27
  invoke void @_ZN3MIR8FunctionC2EOS0_(ptr noundef nonnull align 8 dereferenceable(96) %30, ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %32 unwind label %54

32:                                               ; preds = %31
  invoke void @_ZN3MIR15FunctionPointerC2EPNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %30)
          to label %33 unwind label %50

33:                                               ; preds = %32
  call void @_ZN3MIR8FunctionD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %6) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr %6) #9
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #9
  ret void

34:                                               ; preds = %16
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %7, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %8, align 4
  br label %59

38:                                               ; preds = %20
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  br label %58

42:                                               ; preds = %21
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #9
  br label %58

46:                                               ; preds = %24
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  br label %58

50:                                               ; preds = %32, %27
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  br label %58

54:                                               ; preds = %31
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %30, i64 noundef 96) #11
  br label %58

58:                                               ; preds = %54, %50, %46, %42, %38
  call void @_ZN3MIR8FunctionD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %6) #9
  br label %59

59:                                               ; preds = %58, %34
  call void @llvm.lifetime.end.p0(i64 96, ptr %6) #9
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #9
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %7, align 8
  %62 = load i32, ptr %8, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser15deserialise_vecIbEESt6vectorIT_SaIS2_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.180") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser15deserialise_vecIN3MIR10BasicBlockEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.184") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3MIR8FunctionC2EOS0_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #5 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

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

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

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


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::FunctionPointer" = type { ptr }
%class.TraceLog = type { ptr, %"class.std::function" }
%"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.MIR::Function" = type { %"class.std::vector", %"class.std::vector.180", %"class.std::vector.184", %"class.MIR::EnumCachePtr" }
%"class.std::vector.180" = 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 }>
%"class.std::vector.184" = type { %"struct.std::_Vector_base.185" }
%"struct.std::_Vector_base.185" = type { %"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::EnumCachePtr" = type { ptr }

@__func__._ZN15HirDeserialiser15deserialise_mirEv = external hidden unnamed_addr constant [16 x i8], align 1

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser15deserialise_vecIN3HIR7TypeRefEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

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

; Function Attrs: nounwind
declare void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15HirDeserialiser15deserialise_mirEv(ptr dead_on_unwind noalias writable sret(%"class.MIR::FunctionPointer") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.TraceLog, align 8
  %4 = alloca %"class.MIR::Function", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector.180", align 8
  %7 = alloca %"class.std::vector.184", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #9
  %8 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %8, label %9, label %12

9:                                                ; preds = %2
  %10 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv()
  %11 = select i1 %10, ptr @__func__._ZN15HirDeserialiser15deserialise_mirEv, ptr null
  br label %12

12:                                               ; preds = %9, %2
  %13 = phi ptr [ null, %2 ], [ %11, %9 ]
  call void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef %13)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #9
  invoke void @_ZN3MIR8FunctionC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %4)
          to label %14 unwind label %26

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  invoke void @_ZN15HirDeserialiser15deserialise_vecIN3HIR7TypeRefEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %15 unwind label %28

15:                                               ; preds = %14
  %16 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3HIR7TypeRefESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @_ZNSt6vectorIN3HIR7TypeRefESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #9
  invoke void @_ZN15HirDeserialiser15deserialise_vecIbEESt6vectorIT_SaIS2_EEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.180") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %17 unwind label %30

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %4, i64 24
  %19 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIbSaIbEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(40) %6) #9
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  invoke void @_ZN15HirDeserialiser15deserialise_vecIN3MIR10BasicBlockEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.184") align 8 %7, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %20 unwind label %32

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %4, i64 64
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3MIR10BasicBlockESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @_ZNSt6vectorIN3MIR10BasicBlockESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  %23 = invoke noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #10
          to label %24 unwind label %34

24:                                               ; preds = %20
  invoke void @_ZN3MIR8FunctionC2EOS0_(ptr noundef nonnull align 8 dereferenceable(96) %23, ptr noundef nonnull align 8 dereferenceable(96) %4)
          to label %25 unwind label %36

25:                                               ; preds = %24
  call void @_ZN3MIR15FunctionPointerC2EPNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %23)
  call void @_ZN3MIR8FunctionD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %4) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #9
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #9
  ret void

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

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  br label %38

30:                                               ; preds = %15
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #9
  br label %38

32:                                               ; preds = %17
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br label %38

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %24
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %23, i64 noundef 96) #11
  br label %38

38:                                               ; preds = %36, %34, %32, %30, %28
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ], [ %33, %32 ], [ %31, %30 ], [ %29, %28 ]
  call void @_ZN3MIR8FunctionD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %4) #9
  br label %39

39:                                               ; preds = %38, %26
  %.pn.pn = phi { ptr, i32 } [ %.pn, %38 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #9
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser15deserialise_vecIbEESt6vectorIT_SaIS2_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.180") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser15deserialise_vecIN3MIR10BasicBlockEEESt6vectorIT_SaIS4_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.184") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3MIR8FunctionC2EOS0_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #5 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

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

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

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


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