; LLVM IR from thepowersgang/mrustc :: src/mir (optimise)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Span = 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.anon = type { ptr }
%"class.MIR::TypeResolve" = type { i32, ptr, ptr, ptr, %struct.FmtLambda, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.FmtLambda = type { %"class.std::function" }
%class.anon.14 = type { ptr }

@__dso_handle = external hidden global i8
@_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp = external hidden global %struct.Span, align 8
@_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp = external hidden global i64, align 8
@__func__._Z15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_ = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.TraceLog, align 8
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon, align 8
  %16 = alloca %"class.MIR::TypeResolve", align 8
  %17 = alloca %struct.FmtLambda, align 8
  %18 = alloca %"class.std::function", align 8
  %19 = alloca %class.anon.14, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %20 = load atomic i8, ptr @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp acquire, align 8
  %21 = icmp eq i8 %20, 0
  br i1 %21, label %22, label %28, !prof !9

22:                                               ; preds = %5
  %23 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp) #0
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %28

25:                                               ; preds = %22
  invoke void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp)
          to label %26 unwind label %63

26:                                               ; preds = %25
  %27 = call i32 @__cxa_atexit(ptr @_ZN4SpanD1Ev, ptr @_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp) #0
  br label %28

28:                                               ; preds = %26, %22, %5
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #0
  %29 = call noundef zeroext i1 @_Z13debug_enabledv()
  %30 = zext i1 %29 to i64
  %31 = select i1 %29, ptr @__func__._Z15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #0
  %32 = getelementptr inbounds %class.anon, ptr %15, i32 0, i32 0
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %33, ptr %32, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #0
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef %31, ptr noundef %14)
          to label %34 unwind label %67

34:                                               ; preds = %28
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #0
  call void @llvm.lifetime.start.p0(i64 120, ptr %16) #0
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #0
  %36 = getelementptr inbounds %class.anon.14, ptr %19, i32 0, i32 0
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %37, ptr %36, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #0
  invoke void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef %18)
          to label %38 unwind label %71

38:                                               ; preds = %34
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3MIR11TypeResolveC2ERK4SpanRK18StaticTraitResolve9FmtLambdaRKN3HIR7TypeRefERKSt6vectorISt4pairINS8_7PatternES9_ESaISF_EERKNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef nonnull align 8 dereferenceable(8) @_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp, ptr noundef nonnull align 8 dereferenceable(424) %35, ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(96) %41)
          to label %42 unwind label %75

42:                                               ; preds = %38
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #0
  br label %43

43:                                               ; preds = %84, %42
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = invoke noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef nonnull align 8 dereferenceable(96) %44, i1 noundef zeroext true, ptr noundef null)
          to label %46 unwind label %80

46:                                               ; preds = %43
  br i1 %45, label %47, label %85

47:                                               ; preds = %46
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_Z11MIR_CleanupRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424) %48, ptr noundef nonnull align 8 dereferenceable(56) %49, ptr noundef nonnull align 8 dereferenceable(96) %50, ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %53 unwind label %80

53:                                               ; preds = %47
  %54 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %55 unwind label %80

55:                                               ; preds = %53
  br i1 %54, label %56, label %84

56:                                               ; preds = %55
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %57, ptr noundef nonnull align 8 dereferenceable(56) %58, ptr noundef nonnull align 8 dereferenceable(96) %59, ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(8) %61)
          to label %62 unwind label %80

62:                                               ; preds = %56
  br label %84

63:                                               ; preds = %25
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %11, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %12, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp) #0
  br label %112

67:                                               ; preds = %28
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %11, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %12, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #0
  br label %111

71:                                               ; preds = %34
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %11, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %12, align 4
  br label %79

75:                                               ; preds = %38
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %11, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %12, align 4
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #0
  br label %79

79:                                               ; preds = %75, %71
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #0
  br label %110

80:                                               ; preds = %102, %98, %94, %91, %88, %85, %56, %53, %47, %43
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %11, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %12, align 4
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %16) #0
  br label %110

84:                                               ; preds = %62, %55
  br label %43, !llvm.loop !10

85:                                               ; preds = %46
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = invoke noundef zeroext i1 @_Z26MIR_Optimise_BlockSimplifyRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef nonnull align 8 dereferenceable(96) %86)
          to label %88 unwind label %80

88:                                               ; preds = %85
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = invoke noundef zeroext i1 @_Z24MIR_Optimise_UnifyBlocksRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef nonnull align 8 dereferenceable(96) %89)
          to label %91 unwind label %80

91:                                               ; preds = %88
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = invoke noundef zeroext i1 @_Z27MIR_Optimise_GarbageCollectRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef nonnull align 8 dereferenceable(96) %92)
          to label %94 unwind label %80

94:                                               ; preds = %91
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_Z14MIR_SortBlocksRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionE(ptr noundef nonnull align 8 dereferenceable(424) %95, ptr noundef nonnull align 8 dereferenceable(56) %96, ptr noundef nonnull align 8 dereferenceable(96) %97)
          to label %98 unwind label %80

98:                                               ; preds = %94
  %99 = invoke noundef i32 @_ZL10check_modev()
          to label %100 unwind label %80

100:                                              ; preds = %98
  %101 = icmp sge i32 %99, 2
  br i1 %101, label %102, label %109

102:                                              ; preds = %100
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %103, ptr noundef nonnull align 8 dereferenceable(56) %104, ptr noundef nonnull align 8 dereferenceable(96) %105, ptr noundef nonnull align 8 dereferenceable(24) %106, ptr noundef nonnull align 8 dereferenceable(8) %107)
          to label %108 unwind label %80

108:                                              ; preds = %102
  br label %109

109:                                              ; preds = %108, %100
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %16) #0
  call void @llvm.lifetime.end.p0(i64 120, ptr %16) #0
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #0
  ret void

110:                                              ; preds = %80, %79
  call void @llvm.lifetime.end.p0(i64 120, ptr %16) #0
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #0
  br label %111

111:                                              ; preds = %110, %67
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #0
  br label %112

112:                                              ; preds = %111, %63
  %113 = load ptr, ptr %11, align 8
  %114 = load i32, ptr %12, align 4
  %115 = insertvalue { ptr, i32 } poison, ptr %113, 0
  %116 = insertvalue { ptr, i32 } %115, i32 %114, 1
  resume { ptr, i32 } %116
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

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

declare noundef zeroext i1 @_Z13debug_enabledv() #5

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

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #5

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96), i1 noundef zeroext, ptr noundef) #1

declare void @_Z11MIR_CleanupRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15check_after_allv() #1

declare void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z26MIR_Optimise_BlockSimplifyRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z24MIR_Optimise_UnifyBlocksRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z27MIR_Optimise_GarbageCollectRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14MIR_SortBlocksRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionE(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(96)) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10check_modev() #1

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

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

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

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

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = distinct !{!10, !11}
!11 = !{!"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"

%struct.Span = 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.anon = type { ptr }
%"class.MIR::TypeResolve" = type { i32, ptr, ptr, ptr, %struct.FmtLambda, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.FmtLambda = type { %"class.std::function" }
%class.anon.14 = type { ptr }

@__dso_handle = external hidden global i8
@_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp = external hidden global %struct.Span, align 8
@_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp = external hidden global i64, align 8
@__func__._Z15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_ = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca %class.TraceLog, align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon, align 8
  %9 = alloca %"class.MIR::TypeResolve", align 8
  %10 = alloca %struct.FmtLambda, align 8
  %11 = alloca %"class.std::function", align 8
  %12 = alloca %class.anon.14, align 8
  %13 = load atomic i8, ptr @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp acquire, align 8
  %14 = icmp eq i8 %13, 0
  br i1 %14, label %15, label %19, !prof !5

15:                                               ; preds = %5
  %16 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp) #7
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %19, label %17

17:                                               ; preds = %15
  tail call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp)
  %18 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN4SpanD1Ev, ptr nonnull @_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp, ptr nonnull @__dso_handle) #7
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp) #7
  br label %19

19:                                               ; preds = %17, %15, %5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #7
  %20 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  %21 = select i1 %20, ptr @__func__._Z15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store ptr %1, ptr %8, align 8, !tbaa !6
  call void @"_ZNSt8functionIFvRSoEEC2IZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef %21, ptr noundef nonnull %7)
          to label %22 unwind label %33

22:                                               ; preds = %19
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  store ptr %1, ptr %12, align 8, !tbaa !6
  call void @"_ZNSt8functionIFvRSoEEC2IZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  invoke void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull %11)
          to label %23 unwind label %35

23:                                               ; preds = %22
  invoke void @_ZN3MIR11TypeResolveC2ERK4SpanRK18StaticTraitResolve9FmtLambdaRKN3HIR7TypeRefERKSt6vectorISt4pairINS8_7PatternES9_ESaISF_EERKNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(8) @_ZZ15MIR_OptimiseMinRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_E2sp, ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull %10, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %24 unwind label %37

24:                                               ; preds = %23
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %25

25:                                               ; preds = %.backedge, %24
  %26 = invoke noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(96) %2, i1 noundef zeroext true, ptr noundef null)
          to label %27 unwind label %.loopexit

27:                                               ; preds = %25
  br i1 %26, label %28, label %41

28:                                               ; preds = %27
  invoke void @_Z11MIR_CleanupRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %29 unwind label %.loopexit

29:                                               ; preds = %28
  %30 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %31 unwind label %.loopexit

31:                                               ; preds = %29
  br i1 %30, label %32, label %.backedge

32:                                               ; preds = %31
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %.backedge unwind label %.loopexit

.backedge:                                        ; preds = %32, %31
  br label %25, !llvm.loop !10

33:                                               ; preds = %19
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %55

35:                                               ; preds = %22
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %39

37:                                               ; preds = %23
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %54

.loopexit:                                        ; preds = %25, %28, %29, %32
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %40

.loopexit.split-lp:                               ; preds = %41, %43, %45, %47, %48, %52
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %40

40:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %9) #7
  br label %54

41:                                               ; preds = %27
  %42 = invoke noundef zeroext i1 @_Z26MIR_Optimise_BlockSimplifyRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %43 unwind label %.loopexit.split-lp

43:                                               ; preds = %41
  %44 = invoke noundef zeroext i1 @_Z24MIR_Optimise_UnifyBlocksRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %45 unwind label %.loopexit.split-lp

45:                                               ; preds = %43
  %46 = invoke noundef zeroext i1 @_Z27MIR_Optimise_GarbageCollectRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %47 unwind label %.loopexit.split-lp

47:                                               ; preds = %45
  invoke void @_Z14MIR_SortBlocksRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %48 unwind label %.loopexit.split-lp

48:                                               ; preds = %47
  %49 = invoke noundef i32 @_ZL10check_modev()
          to label %50 unwind label %.loopexit.split-lp

50:                                               ; preds = %48
  %51 = icmp sgt i32 %49, 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %53 unwind label %.loopexit.split-lp

53:                                               ; preds = %52, %50
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %9) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %9) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #7
  ret void

54:                                               ; preds = %40, %39
  %.pn33 = phi { ptr, i32 } [ %lpad.phi, %40 ], [ %.pn, %39 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %9) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #7
  br label %55

55:                                               ; preds = %54, %33
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %54 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn33.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #5

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

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #5

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96), i1 noundef zeroext, ptr noundef) local_unnamed_addr #1

declare void @_Z11MIR_CleanupRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15check_after_allv() local_unnamed_addr #1

declare void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z26MIR_Optimise_BlockSimplifyRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z24MIR_Optimise_UnifyBlocksRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z27MIR_Optimise_GarbageCollectRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14MIR_SortBlocksRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionE(ptr noundef nonnull align 8 dereferenceable(424), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10check_modev() local_unnamed_addr #1

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

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

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

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


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