; 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.34 = type { ptr }
%class.anon.35 = 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.36 = type { ptr }

@__dso_handle = external hidden global i8
@_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp = external hidden global %struct.Span, align 8
@_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp = external hidden global i64, align 8
@__func__._Z18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransList = external hidden unnamed_addr constant [19 x i8], align 1

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

; 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 #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #5 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 #5 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) #5

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)) #4

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

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)) #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransList(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, ptr noundef nonnull align 8 dereferenceable(576) %5) #5 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca %class.TraceLog, align 8
  %17 = alloca %"class.std::function", align 8
  %18 = alloca %class.anon.34, align 8
  %19 = alloca %"class.std::function", align 8
  %20 = alloca %class.anon.35, align 8
  %21 = alloca %"class.MIR::TypeResolve", align 8
  %22 = alloca %struct.FmtLambda, align 8
  %23 = alloca %"class.std::function", align 8
  %24 = alloca %class.anon.36, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %25 = load atomic i8, ptr @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp acquire, align 8
  %26 = icmp eq i8 %25, 0
  br i1 %26, label %27, label %33, !prof !9

27:                                               ; preds = %6
  %28 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp) #0
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  invoke void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp)
          to label %31 unwind label %70

31:                                               ; preds = %30
  %32 = call i32 @__cxa_atexit(ptr @_ZN4SpanD1Ev, ptr @_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp) #0
  br label %33

33:                                               ; preds = %31, %27, %6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #0
  store i8 0, ptr %15, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #0
  %34 = call noundef zeroext i1 @_Z13debug_enabledv()
  %35 = zext i1 %34 to i64
  %36 = select i1 %34, ptr @__func__._Z18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransList, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #0
  %37 = getelementptr inbounds %class.anon.34, ptr %18, i32 0, i32 0
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %38, ptr %37, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_RK9TransListE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #0
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #0
  %39 = getelementptr inbounds %class.anon.35, ptr %20, i32 0, i32 0
  store ptr %15, ptr %39, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_RK9TransListE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #0
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef %36, ptr noundef %17, ptr noundef %19)
          to label %40 unwind label %74

40:                                               ; preds = %33
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #0
  call void @llvm.lifetime.start.p0(i64 120, ptr %21) #0
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #0
  %42 = getelementptr inbounds %class.anon.36, ptr %24, i32 0, i32 0
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %43, ptr %42, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_RK9TransListE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #0
  invoke void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %23)
          to label %44 unwind label %78

44:                                               ; preds = %40
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZN3MIR11TypeResolveC2ERK4SpanRK18StaticTraitResolve9FmtLambdaRKN3HIR7TypeRefERKSt6vectorISt4pairINS8_7PatternES9_ESaISF_EERKNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %21, ptr noundef nonnull align 8 dereferenceable(8) @_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp, ptr noundef nonnull align 8 dereferenceable(424) %41, ptr noundef %22, ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(96) %47)
          to label %48 unwind label %82

48:                                               ; preds = %44
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #0
  br label %49

49:                                               ; preds = %91, %48
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = invoke noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120) %21, ptr noundef nonnull align 8 dereferenceable(96) %50, i1 noundef zeroext false, ptr noundef %51)
          to label %53 unwind label %87

53:                                               ; preds = %49
  br i1 %52, label %54, label %92

54:                                               ; preds = %53
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z11MIR_CleanupRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424) %55, ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef nonnull align 8 dereferenceable(96) %57, ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(8) %59)
          to label %60 unwind label %87

60:                                               ; preds = %54
  %61 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %62 unwind label %87

62:                                               ; preds = %60
  br i1 %61, label %63, label %91

63:                                               ; preds = %62
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %64, ptr noundef nonnull align 8 dereferenceable(56) %65, ptr noundef nonnull align 8 dereferenceable(96) %66, ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %69 unwind label %87

69:                                               ; preds = %63
  br label %91

70:                                               ; preds = %30
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %13, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %14, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp) #0
  br label %107

74:                                               ; preds = %33
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %13, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #0
  br label %106

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

82:                                               ; preds = %44
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %13, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %14, align 4
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #0
  br label %86

86:                                               ; preds = %82, %78
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #0
  br label %105

87:                                               ; preds = %95, %63, %60, %54, %49
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %21) #0
  br label %105

91:                                               ; preds = %69, %62
  store i8 1, ptr %15, align 1, !tbaa !10
  br label %49, !llvm.loop !12

92:                                               ; preds = %53
  %93 = load i8, ptr %15, align 1, !tbaa !10, !range !14, !noundef !15
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %102

95:                                               ; preds = %92
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b(ptr noundef nonnull align 8 dereferenceable(424) %96, ptr noundef nonnull align 8 dereferenceable(56) %97, ptr noundef nonnull align 8 dereferenceable(96) %98, ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 8 dereferenceable(8) %100, i1 noundef zeroext false)
          to label %101 unwind label %87

101:                                              ; preds = %95
  br label %102

102:                                              ; preds = %101, %92
  %103 = load i8, ptr %15, align 1, !tbaa !10, !range !14, !noundef !15
  %104 = trunc i8 %103 to i1
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %21) #0
  call void @llvm.lifetime.end.p0(i64 120, ptr %21) #0
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #0
  ret i1 %104

105:                                              ; preds = %87, %86
  call void @llvm.lifetime.end.p0(i64 120, ptr %21) #0
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #0
  br label %106

106:                                              ; preds = %105, %74
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #0
  br label %107

107:                                              ; preds = %106, %70
  %108 = load ptr, ptr %13, align 8
  %109 = load i32, ptr %14, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111
}

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

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

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b(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), i1 noundef zeroext) #5

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

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


; 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.34 = type { ptr }
%class.anon.35 = 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.36 = type { ptr }

@__dso_handle = external hidden global i8
@_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp = external hidden global %struct.Span, align 8
@_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp = external hidden global i64, align 8
@__func__._Z18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransList = external hidden unnamed_addr constant [19 x i8], align 1

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

; 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 #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #5 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 #5 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 #5

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 #4

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

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 #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransList(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, ptr noundef nonnull align 8 dereferenceable(576) %5) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %7 = alloca i8, align 1
  %8 = alloca %class.TraceLog, align 8
  %9 = alloca %"class.std::function", align 8
  %10 = alloca %class.anon.34, align 8
  %11 = alloca %"class.std::function", align 8
  %12 = alloca %class.anon.35, align 8
  %13 = alloca %"class.MIR::TypeResolve", align 8
  %14 = alloca %struct.FmtLambda, align 8
  %15 = alloca %"class.std::function", align 8
  %16 = alloca %class.anon.36, align 8
  %17 = load atomic i8, ptr @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp acquire, align 8
  %18 = icmp eq i8 %17, 0
  br i1 %18, label %19, label %23, !prof !5

19:                                               ; preds = %6
  %20 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp) #7
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %23, label %21

21:                                               ; preds = %19
  tail call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp)
  %22 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN4SpanD1Ev, ptr nonnull @_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp, ptr nonnull @__dso_handle) #7
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp) #7
  br label %23

23:                                               ; preds = %21, %19, %6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  store i8 0, ptr %7, align 1, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #7
  %24 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  %25 = select i1 %24, ptr @__func__._Z18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransList, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  store ptr %1, ptr %10, align 8, !tbaa !10
  call void @"_ZNSt8functionIFvRSoEEC2IZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_RK9TransListE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  store ptr %7, ptr %12, align 8, !tbaa !10
  call void @"_ZNSt8functionIFvRSoEEC2IZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_RK9TransListE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef %25, ptr noundef nonnull %9, ptr noundef nonnull %11)
          to label %26 unwind label %37

26:                                               ; preds = %23
  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
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  store ptr %1, ptr %16, align 8, !tbaa !10
  call void @"_ZNSt8functionIFvRSoEEC2IZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_RK9TransListE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  invoke void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull %15)
          to label %27 unwind label %39

27:                                               ; preds = %26
  invoke void @_ZN3MIR11TypeResolveC2ERK4SpanRK18StaticTraitResolve9FmtLambdaRKN3HIR7TypeRefERKSt6vectorISt4pairINS8_7PatternES9_ESaISF_EERKNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef nonnull align 8 dereferenceable(8) @_ZZ18MIR_OptimiseInlineRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_RK9TransListE2sp, ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull %14, 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 %28 unwind label %41

28:                                               ; preds = %27
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %29

29:                                               ; preds = %45, %28
  %30 = invoke noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef nonnull align 8 dereferenceable(96) %2, i1 noundef zeroext false, ptr noundef nonnull %5)
          to label %31 unwind label %.loopexit

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

32:                                               ; preds = %31
  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 %33 unwind label %.loopexit

33:                                               ; preds = %32
  %34 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %35 unwind label %.loopexit

35:                                               ; preds = %33
  br i1 %34, label %36, label %45

36:                                               ; preds = %35
  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 %45 unwind label %.loopexit

37:                                               ; preds = %23
  %38 = landingpad { ptr, i32 }
          cleanup
  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
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %52

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

41:                                               ; preds = %27
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %43

43:                                               ; preds = %41, %39
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %51

.loopexit:                                        ; preds = %29, %32, %33, %36
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %44

.loopexit.split-lp:                               ; preds = %49
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %44

44:                                               ; 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) %13) #7
  br label %51

45:                                               ; preds = %36, %35
  store i8 1, ptr %7, align 1, !tbaa !6
  br label %29, !llvm.loop !12

46:                                               ; preds = %31
  %47 = load i8, ptr %7, align 1, !tbaa !6, !range !14, !noundef !15
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  invoke void @_Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b(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, i1 noundef zeroext false)
          to label %._crit_edge unwind label %.loopexit.split-lp

._crit_edge:                                      ; preds = %49
  %.pre = load i8, ptr %7, align 1, !tbaa !6, !range !14
  %.pre31 = trunc nuw i8 %.pre to i1
  br label %50

50:                                               ; preds = %._crit_edge, %46
  %.pre-phi = phi i1 [ %.pre31, %._crit_edge ], [ false, %46 ]
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %13) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  ret i1 %.pre-phi

51:                                               ; preds = %44, %43
  %.pn28 = phi { ptr, i32 } [ %lpad.phi, %44 ], [ %.pn, %43 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %13) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  br label %52

52:                                               ; preds = %51, %37
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %51 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  resume { ptr, i32 } %.pn28.pn
}

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

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

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b(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), i1 noundef zeroext) local_unnamed_addr #5

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass