; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = 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.93 = 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.94 = type { ptr }
%class.anon.95 = type { i8 }
%class.anon.96 = type { ptr }
%class.anon.97 = type { ptr }

@__dso_handle = external hidden global i8
@_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp = external hidden global %struct.Span, align 8
@_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp = external hidden global i64, align 8
@__func__._Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b = external hidden unnamed_addr constant [13 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #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: 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)) #5

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

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

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

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

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local 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 %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 i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %class.TraceLog, align 8
  %16 = alloca %"class.std::function", align 8
  %17 = alloca %class.anon.93, align 8
  %18 = alloca %"class.MIR::TypeResolve", align 8
  %19 = alloca %struct.FmtLambda, align 8
  %20 = alloca %"class.std::function", align 8
  %21 = alloca %class.anon.94, align 8
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::function", align 8
  %25 = alloca %class.anon.95, align 1
  %26 = alloca %class.TraceLog, align 8
  %27 = alloca %"class.std::function", align 8
  %28 = alloca %class.anon.96, align 8
  %29 = alloca %"class.std::function", align 8
  %30 = alloca %class.anon.97, 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
  %31 = zext i1 %5 to i8
  store i8 %31, ptr %12, align 1, !tbaa !9
  %32 = load atomic i8, ptr @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp acquire, align 8
  %33 = icmp eq i8 %32, 0
  br i1 %33, label %34, label %40, !prof !11

34:                                               ; preds = %6
  %35 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp) #0
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %34
  invoke void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp)
          to label %38 unwind label %61

38:                                               ; preds = %37
  %39 = call i32 @__cxa_atexit(ptr @_ZN4SpanD1Ev, ptr @_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp) #0
  br label %40

40:                                               ; preds = %38, %34, %6
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #0
  %41 = call noundef zeroext i1 @_Z13debug_enabledv()
  %42 = zext i1 %41 to i64
  %43 = select i1 %41, ptr @__func__._Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #0
  %44 = getelementptr inbounds %class.anon.93, ptr %17, i32 0, i32 0
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %45, ptr %44, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #0
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef %43, ptr noundef %16)
          to label %46 unwind label %65

46:                                               ; preds = %40
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #0
  call void @llvm.lifetime.start.p0(i64 120, ptr %18) #0
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #0
  %48 = getelementptr inbounds %class.anon.94, ptr %21, i32 0, i32 0
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %49, ptr %48, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #0
  invoke void @_ZN9FmtLambdaC2ESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef %20)
          to label %50 unwind label %69

50:                                               ; preds = %46
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZN3MIR11TypeResolveC2ERK4SpanRK18StaticTraitResolve9FmtLambdaRKN3HIR7TypeRefERKSt6vectorISt4pairINS8_7PatternES9_ESaISF_EERKNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(8) @_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp, ptr noundef nonnull align 8 dereferenceable(424) %47, ptr noundef %19, ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(96) %53)
          to label %54 unwind label %73

54:                                               ; preds = %50
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #0
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #0
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #0
  store i32 0, ptr %23, align 4, !tbaa !12
  br label %55

55:                                               ; preds = %372, %54
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %23, align 4, !tbaa !12
  %58 = icmp ult i32 %57, 100
  br i1 %58, label %82, label %59

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #0
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 1 dereferenceable(1) %25) #0
  invoke void @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef %24)
          to label %60 unwind label %78

60:                                               ; preds = %59
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #0
  br label %82

61:                                               ; preds = %37
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %13, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %14, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp) #0
  br label %419

65:                                               ; preds = %40
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %13, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #0
  br label %418

69:                                               ; preds = %46
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %13, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %14, align 4
  br label %77

73:                                               ; preds = %50
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %13, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %14, align 4
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #0
  br label %77

77:                                               ; preds = %73, %69
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #0
  br label %417

78:                                               ; preds = %59
  %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
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #0
  br label %416

82:                                               ; preds = %60, %56
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  store i8 0, ptr %22, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #0
  %85 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %86 unwind label %105

86:                                               ; preds = %84
  %87 = zext i1 %85 to i64
  %88 = select i1 %85, ptr @__func__._Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #0
  %89 = getelementptr inbounds %class.anon.96, ptr %28, i32 0, i32 0
  store ptr %23, ptr %89, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #0
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #0
  %90 = getelementptr inbounds %class.anon.97, ptr %30, i32 0, i32 0
  store ptr %22, ptr %90, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #0
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef %88, ptr noundef %27, ptr noundef %29)
          to label %91 unwind label %109

91:                                               ; preds = %86
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #0
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = invoke noundef zeroext i1 @_Z26MIR_Optimise_BlockSimplifyRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %92)
          to label %94 unwind label %113

94:                                               ; preds = %91
  br i1 %93, label %95, label %118

95:                                               ; preds = %94
  %96 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %97 unwind label %113

97:                                               ; preds = %95
  br i1 %96, label %98, label %117

98:                                               ; preds = %97
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %99, ptr noundef nonnull align 8 dereferenceable(56) %100, ptr noundef nonnull align 8 dereferenceable(96) %101, ptr noundef nonnull align 8 dereferenceable(24) %102, ptr noundef nonnull align 8 dereferenceable(8) %103)
          to label %104 unwind label %113

104:                                              ; preds = %98
  br label %117

105:                                              ; preds = %84
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %13, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %14, align 4
  br label %381

109:                                              ; preds = %86
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %13, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #0
  br label %381

113:                                              ; preds = %361, %358, %354, %346, %342, %339, %336, %324, %321, %315, %311, %297, %294, %290, %282, %279, %275, %267, %264, %260, %252, %249, %245, %237, %234, %230, %222, %219, %215, %207, %204, %199, %194, %186, %183, %179, %171, %168, %164, %156, %153, %145, %142, %138, %133, %125, %122, %118, %98, %95, %91
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %13, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %14, align 4
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #0
  br label %381

117:                                              ; preds = %104, %97
  br label %118

118:                                              ; preds = %117, %94
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = invoke noundef zeroext i1 @_Z27MIR_Optimise_ConstPropagateRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %119)
          to label %121 unwind label %113

121:                                              ; preds = %118
  br i1 %120, label %122, label %133

122:                                              ; preds = %121
  %123 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %124 unwind label %113

124:                                              ; preds = %122
  br i1 %123, label %125, label %132

125:                                              ; preds = %124
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %126, ptr noundef nonnull align 8 dereferenceable(56) %127, ptr noundef nonnull align 8 dereferenceable(96) %128, ptr noundef nonnull align 8 dereferenceable(24) %129, ptr noundef nonnull align 8 dereferenceable(8) %130)
          to label %131 unwind label %113

131:                                              ; preds = %125
  br label %132

132:                                              ; preds = %131, %124
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %133

133:                                              ; preds = %132, %121
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = invoke noundef zeroext i1 @_Z24MIR_Optimise_DeTemporaryRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %134)
          to label %136 unwind label %113

136:                                              ; preds = %133
  br i1 %135, label %137, label %164

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %152, %137
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = invoke noundef zeroext i1 @_Z24MIR_Optimise_DeTemporaryRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %139)
          to label %141 unwind label %113

141:                                              ; preds = %138
  br i1 %140, label %142, label %153

142:                                              ; preds = %141
  %143 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %144 unwind label %113

144:                                              ; preds = %142
  br i1 %143, label %145, label %152

145:                                              ; preds = %144
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %146, ptr noundef nonnull align 8 dereferenceable(56) %147, ptr noundef nonnull align 8 dereferenceable(96) %148, ptr noundef nonnull align 8 dereferenceable(24) %149, ptr noundef nonnull align 8 dereferenceable(8) %150)
          to label %151 unwind label %113

151:                                              ; preds = %145
  br label %152

152:                                              ; preds = %151, %144
  br label %138, !llvm.loop !14

153:                                              ; preds = %141
  %154 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %155 unwind label %113

155:                                              ; preds = %153
  br i1 %154, label %156, label %163

156:                                              ; preds = %155
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %157, ptr noundef nonnull align 8 dereferenceable(56) %158, ptr noundef nonnull align 8 dereferenceable(96) %159, ptr noundef nonnull align 8 dereferenceable(24) %160, ptr noundef nonnull align 8 dereferenceable(8) %161)
          to label %162 unwind label %113

162:                                              ; preds = %156
  br label %163

163:                                              ; preds = %162, %155
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %164

164:                                              ; preds = %163, %136
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = invoke noundef zeroext i1 @_Z28MIR_Optimise_SplitAggregatesRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %165)
          to label %167 unwind label %113

167:                                              ; preds = %164
  br i1 %166, label %168, label %179

168:                                              ; preds = %167
  %169 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %170 unwind label %113

170:                                              ; preds = %168
  br i1 %169, label %171, label %178

171:                                              ; preds = %170
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %172, ptr noundef nonnull align 8 dereferenceable(56) %173, ptr noundef nonnull align 8 dereferenceable(96) %174, ptr noundef nonnull align 8 dereferenceable(24) %175, ptr noundef nonnull align 8 dereferenceable(8) %176)
          to label %177 unwind label %113

177:                                              ; preds = %171
  br label %178

178:                                              ; preds = %177, %170
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %179

179:                                              ; preds = %178, %167
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = invoke noundef zeroext i1 @_Z33MIR_Optimise_PropagateKnownValuesRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %180)
          to label %182 unwind label %113

182:                                              ; preds = %179
  br i1 %181, label %183, label %194

183:                                              ; preds = %182
  %184 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %185 unwind label %113

185:                                              ; preds = %183
  br i1 %184, label %186, label %193

186:                                              ; preds = %185
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = load ptr, ptr %10, align 8, !tbaa !5
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %187, ptr noundef nonnull align 8 dereferenceable(56) %188, ptr noundef nonnull align 8 dereferenceable(96) %189, ptr noundef nonnull align 8 dereferenceable(24) %190, ptr noundef nonnull align 8 dereferenceable(8) %191)
          to label %192 unwind label %113

192:                                              ; preds = %186
  br label %193

193:                                              ; preds = %192, %185
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %194

194:                                              ; preds = %193, %182
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = invoke noundef zeroext i1 @_Z39MIR_Optimise_PropagateSingleAssignmentsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %195)
          to label %197 unwind label %113

197:                                              ; preds = %194
  br i1 %196, label %198, label %215

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %203, %198
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = invoke noundef zeroext i1 @_Z39MIR_Optimise_PropagateSingleAssignmentsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %200)
          to label %202 unwind label %113

202:                                              ; preds = %199
  br i1 %201, label %203, label %204

203:                                              ; preds = %202
  br label %199, !llvm.loop !16

204:                                              ; preds = %202
  %205 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %206 unwind label %113

206:                                              ; preds = %204
  br i1 %205, label %207, label %214

207:                                              ; preds = %206
  %208 = load ptr, ptr %7, align 8, !tbaa !5
  %209 = load ptr, ptr %8, align 8, !tbaa !5
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %208, ptr noundef nonnull align 8 dereferenceable(56) %209, ptr noundef nonnull align 8 dereferenceable(96) %210, ptr noundef nonnull align 8 dereferenceable(24) %211, ptr noundef nonnull align 8 dereferenceable(8) %212)
          to label %213 unwind label %113

213:                                              ; preds = %207
  br label %214

214:                                              ; preds = %213, %206
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %215

215:                                              ; preds = %214, %197
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = invoke noundef zeroext i1 @_Z24MIR_Optimise_UnifyBlocksRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %216)
          to label %218 unwind label %113

218:                                              ; preds = %215
  br i1 %217, label %219, label %230

219:                                              ; preds = %218
  %220 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %221 unwind label %113

221:                                              ; preds = %219
  br i1 %220, label %222, label %229

222:                                              ; preds = %221
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = load ptr, ptr %10, align 8, !tbaa !5
  %227 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %223, ptr noundef nonnull align 8 dereferenceable(56) %224, ptr noundef nonnull align 8 dereferenceable(96) %225, ptr noundef nonnull align 8 dereferenceable(24) %226, ptr noundef nonnull align 8 dereferenceable(8) %227)
          to label %228 unwind label %113

228:                                              ; preds = %222
  br label %229

229:                                              ; preds = %228, %221
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %230

230:                                              ; preds = %229, %218
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = invoke noundef zeroext i1 @_Z26MIR_Optimise_DeadDropFlagsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %231)
          to label %233 unwind label %113

233:                                              ; preds = %230
  br i1 %232, label %234, label %245

234:                                              ; preds = %233
  %235 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %236 unwind label %113

236:                                              ; preds = %234
  br i1 %235, label %237, label %244

237:                                              ; preds = %236
  %238 = load ptr, ptr %7, align 8, !tbaa !5
  %239 = load ptr, ptr %8, align 8, !tbaa !5
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  %242 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %238, ptr noundef nonnull align 8 dereferenceable(56) %239, ptr noundef nonnull align 8 dereferenceable(96) %240, ptr noundef nonnull align 8 dereferenceable(24) %241, ptr noundef nonnull align 8 dereferenceable(8) %242)
          to label %243 unwind label %113

243:                                              ; preds = %237
  br label %244

244:                                              ; preds = %243, %236
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %245

245:                                              ; preds = %244, %233
  %246 = load ptr, ptr %9, align 8, !tbaa !5
  %247 = invoke noundef zeroext i1 @_Z28MIR_Optimise_DeadAssignmentsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %246)
          to label %248 unwind label %113

248:                                              ; preds = %245
  br i1 %247, label %249, label %260

249:                                              ; preds = %248
  %250 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %251 unwind label %113

251:                                              ; preds = %249
  br i1 %250, label %252, label %259

252:                                              ; preds = %251
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = load ptr, ptr %10, align 8, !tbaa !5
  %257 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %253, ptr noundef nonnull align 8 dereferenceable(56) %254, ptr noundef nonnull align 8 dereferenceable(96) %255, ptr noundef nonnull align 8 dereferenceable(24) %256, ptr noundef nonnull align 8 dereferenceable(8) %257)
          to label %258 unwind label %113

258:                                              ; preds = %252
  br label %259

259:                                              ; preds = %258, %251
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %260

260:                                              ; preds = %259, %248
  %261 = load ptr, ptr %9, align 8, !tbaa !5
  %262 = invoke noundef zeroext i1 @_Z24MIR_Optimise_NoopRemovalRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %261)
          to label %263 unwind label %113

263:                                              ; preds = %260
  br i1 %262, label %264, label %275

264:                                              ; preds = %263
  %265 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %266 unwind label %113

266:                                              ; preds = %264
  br i1 %265, label %267, label %274

267:                                              ; preds = %266
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = load ptr, ptr %9, align 8, !tbaa !5
  %271 = load ptr, ptr %10, align 8, !tbaa !5
  %272 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %268, ptr noundef nonnull align 8 dereferenceable(56) %269, ptr noundef nonnull align 8 dereferenceable(96) %270, ptr noundef nonnull align 8 dereferenceable(24) %271, ptr noundef nonnull align 8 dereferenceable(8) %272)
          to label %273 unwind label %113

273:                                              ; preds = %267
  br label %274

274:                                              ; preds = %273, %266
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %275

275:                                              ; preds = %274, %263
  %276 = load ptr, ptr %9, align 8, !tbaa !5
  %277 = invoke noundef zeroext i1 @_Z29MIR_Optimise_UselessReborrowsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %276)
          to label %278 unwind label %113

278:                                              ; preds = %275
  br i1 %277, label %279, label %290

279:                                              ; preds = %278
  %280 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %281 unwind label %113

281:                                              ; preds = %279
  br i1 %280, label %282, label %289

282:                                              ; preds = %281
  %283 = load ptr, ptr %7, align 8, !tbaa !5
  %284 = load ptr, ptr %8, align 8, !tbaa !5
  %285 = load ptr, ptr %9, align 8, !tbaa !5
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %283, ptr noundef nonnull align 8 dereferenceable(56) %284, ptr noundef nonnull align 8 dereferenceable(96) %285, ptr noundef nonnull align 8 dereferenceable(24) %286, ptr noundef nonnull align 8 dereferenceable(8) %287)
          to label %288 unwind label %113

288:                                              ; preds = %282
  br label %289

289:                                              ; preds = %288, %281
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %290

290:                                              ; preds = %289, %278
  %291 = load ptr, ptr %9, align 8, !tbaa !5
  %292 = invoke noundef zeroext i1 @_Z23MIR_Optimise_GotoAssignRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %291)
          to label %293 unwind label %113

293:                                              ; preds = %290
  br i1 %292, label %294, label %305

294:                                              ; preds = %293
  %295 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %296 unwind label %113

296:                                              ; preds = %294
  br i1 %295, label %297, label %304

297:                                              ; preds = %296
  %298 = load ptr, ptr %7, align 8, !tbaa !5
  %299 = load ptr, ptr %8, align 8, !tbaa !5
  %300 = load ptr, ptr %9, align 8, !tbaa !5
  %301 = load ptr, ptr %10, align 8, !tbaa !5
  %302 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %298, ptr noundef nonnull align 8 dereferenceable(56) %299, ptr noundef nonnull align 8 dereferenceable(96) %300, ptr noundef nonnull align 8 dereferenceable(24) %301, ptr noundef nonnull align 8 dereferenceable(8) %302)
          to label %303 unwind label %113

303:                                              ; preds = %297
  br label %304

304:                                              ; preds = %303, %296
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %305

305:                                              ; preds = %304, %293
  %306 = load i8, ptr %12, align 1, !tbaa !9, !range !17, !noundef !18
  %307 = trunc i8 %306 to i1
  br i1 %307, label %308, label %333

308:                                              ; preds = %305
  %309 = load i8, ptr %22, align 1, !tbaa !9, !range !17, !noundef !18
  %310 = trunc i8 %309 to i1
  br i1 %310, label %333, label %311

311:                                              ; preds = %308
  %312 = load ptr, ptr %9, align 8, !tbaa !5
  %313 = invoke noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %312, i1 noundef zeroext false, ptr noundef null)
          to label %314 unwind label %113

314:                                              ; preds = %311
  br i1 %313, label %315, label %332

315:                                              ; preds = %314
  %316 = load ptr, ptr %7, align 8, !tbaa !5
  %317 = load ptr, ptr %8, align 8, !tbaa !5
  %318 = load ptr, ptr %9, align 8, !tbaa !5
  %319 = load ptr, ptr %10, align 8, !tbaa !5
  %320 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z11MIR_CleanupRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_(ptr noundef nonnull align 8 dereferenceable(424) %316, ptr noundef nonnull align 8 dereferenceable(56) %317, ptr noundef nonnull align 8 dereferenceable(96) %318, ptr noundef nonnull align 8 dereferenceable(24) %319, ptr noundef nonnull align 8 dereferenceable(8) %320)
          to label %321 unwind label %113

321:                                              ; preds = %315
  %322 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %323 unwind label %113

323:                                              ; preds = %321
  br i1 %322, label %324, label %331

324:                                              ; preds = %323
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = load ptr, ptr %8, align 8, !tbaa !5
  %327 = load ptr, ptr %9, align 8, !tbaa !5
  %328 = load ptr, ptr %10, align 8, !tbaa !5
  %329 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %325, ptr noundef nonnull align 8 dereferenceable(56) %326, ptr noundef nonnull align 8 dereferenceable(96) %327, ptr noundef nonnull align 8 dereferenceable(24) %328, ptr noundef nonnull align 8 dereferenceable(8) %329)
          to label %330 unwind label %113

330:                                              ; preds = %324
  br label %331

331:                                              ; preds = %330, %323
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %332

332:                                              ; preds = %331, %314
  br label %333

333:                                              ; preds = %332, %308, %305
  %334 = load i8, ptr %22, align 1, !tbaa !9, !range !17, !noundef !18
  %335 = trunc i8 %334 to i1
  br i1 %335, label %336, label %354

336:                                              ; preds = %333
  %337 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %338 unwind label %113

338:                                              ; preds = %336
  br i1 %337, label %339, label %342

339:                                              ; preds = %338
  %340 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_Z12MIR_Dump_FcnRSoRKN3MIR8FunctionEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(96) %340, i32 noundef 0)
          to label %341 unwind label %113

341:                                              ; preds = %339
  br label %342

342:                                              ; preds = %341, %338
  %343 = invoke noundef i32 @_ZL10check_modev()
          to label %344 unwind label %113

344:                                              ; preds = %342
  %345 = icmp eq i32 %343, 3
  br i1 %345, label %346, label %353

346:                                              ; preds = %344
  %347 = load ptr, ptr %7, align 8, !tbaa !5
  %348 = load ptr, ptr %8, align 8, !tbaa !5
  %349 = load ptr, ptr %9, align 8, !tbaa !5
  %350 = load ptr, ptr %10, align 8, !tbaa !5
  %351 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %347, ptr noundef nonnull align 8 dereferenceable(56) %348, ptr noundef nonnull align 8 dereferenceable(96) %349, ptr noundef nonnull align 8 dereferenceable(24) %350, ptr noundef nonnull align 8 dereferenceable(8) %351)
          to label %352 unwind label %113

352:                                              ; preds = %346
  br label %353

353:                                              ; preds = %352, %344
  br label %354

354:                                              ; preds = %353, %333
  %355 = load ptr, ptr %9, align 8, !tbaa !5
  %356 = invoke noundef zeroext i1 @_Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %355)
          to label %357 unwind label %113

357:                                              ; preds = %354
  br i1 %356, label %358, label %369

358:                                              ; preds = %357
  store i8 1, ptr %22, align 1, !tbaa !9
  %359 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %360 unwind label %113

360:                                              ; preds = %358
  br i1 %359, label %361, label %368

361:                                              ; preds = %360
  %362 = load ptr, ptr %7, align 8, !tbaa !5
  %363 = load ptr, ptr %8, align 8, !tbaa !5
  %364 = load ptr, ptr %9, align 8, !tbaa !5
  %365 = load ptr, ptr %10, align 8, !tbaa !5
  %366 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %362, ptr noundef nonnull align 8 dereferenceable(56) %363, ptr noundef nonnull align 8 dereferenceable(96) %364, ptr noundef nonnull align 8 dereferenceable(24) %365, ptr noundef nonnull align 8 dereferenceable(8) %366)
          to label %367 unwind label %113

367:                                              ; preds = %361
  br label %368

368:                                              ; preds = %367, %360
  br label %369

369:                                              ; preds = %368, %357
  %370 = load i32, ptr %23, align 4, !tbaa !12
  %371 = add i32 %370, 1
  store i32 %371, ptr %23, align 4, !tbaa !12
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #0
  br label %372

372:                                              ; preds = %369
  %373 = load i8, ptr %22, align 1, !tbaa !9, !range !17, !noundef !18
  %374 = trunc i8 %373 to i1
  br i1 %374, label %55, label %375, !llvm.loop !19

375:                                              ; preds = %372
  %376 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %377 unwind label %382

377:                                              ; preds = %375
  br i1 %376, label %378, label %386

378:                                              ; preds = %377
  %379 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_Z12MIR_Dump_FcnRSoRKN3MIR8FunctionEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(96) %379, i32 noundef 0)
          to label %380 unwind label %382

380:                                              ; preds = %378
  br label %386

381:                                              ; preds = %113, %109, %105
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #0
  br label %416

382:                                              ; preds = %408, %404, %400, %397, %390, %386, %378, %375
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %13, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %14, align 4
  br label %416

386:                                              ; preds = %380, %377
  %387 = invoke noundef i32 @_ZL10check_modev()
          to label %388 unwind label %382

388:                                              ; preds = %386
  %389 = icmp sge i32 %387, 2
  br i1 %389, label %390, label %397

390:                                              ; preds = %388
  %391 = load ptr, ptr %7, align 8, !tbaa !5
  %392 = load ptr, ptr %8, align 8, !tbaa !5
  %393 = load ptr, ptr %9, align 8, !tbaa !5
  %394 = load ptr, ptr %10, align 8, !tbaa !5
  %395 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %391, ptr noundef nonnull align 8 dereferenceable(56) %392, ptr noundef nonnull align 8 dereferenceable(96) %393, ptr noundef nonnull align 8 dereferenceable(24) %394, ptr noundef nonnull align 8 dereferenceable(8) %395)
          to label %396 unwind label %382

396:                                              ; preds = %390
  br label %397

397:                                              ; preds = %396, %388
  %398 = load ptr, ptr %9, align 8, !tbaa !5
  %399 = invoke noundef zeroext i1 @_Z27MIR_Optimise_GarbageCollectRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef nonnull align 8 dereferenceable(96) %398)
          to label %400 unwind label %382

400:                                              ; preds = %397
  %401 = load ptr, ptr %7, align 8, !tbaa !5
  %402 = load ptr, ptr %8, align 8, !tbaa !5
  %403 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_Z14MIR_SortBlocksRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionE(ptr noundef nonnull align 8 dereferenceable(424) %401, ptr noundef nonnull align 8 dereferenceable(56) %402, ptr noundef nonnull align 8 dereferenceable(96) %403)
          to label %404 unwind label %382

404:                                              ; preds = %400
  %405 = invoke noundef i32 @_ZL10check_modev()
          to label %406 unwind label %382

406:                                              ; preds = %404
  %407 = icmp sge i32 %405, 2
  br i1 %407, label %408, label %415

408:                                              ; preds = %406
  %409 = load ptr, ptr %7, align 8, !tbaa !5
  %410 = load ptr, ptr %8, align 8, !tbaa !5
  %411 = load ptr, ptr %9, align 8, !tbaa !5
  %412 = load ptr, ptr %10, align 8, !tbaa !5
  %413 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_Z12MIR_ValidateRK18StaticTraitResolveRKN3HIR8ItemPathERKN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISE_EERKSD_(ptr noundef nonnull align 8 dereferenceable(424) %409, ptr noundef nonnull align 8 dereferenceable(56) %410, ptr noundef nonnull align 8 dereferenceable(96) %411, ptr noundef nonnull align 8 dereferenceable(24) %412, ptr noundef nonnull align 8 dereferenceable(8) %413)
          to label %414 unwind label %382

414:                                              ; preds = %408
  br label %415

415:                                              ; preds = %414, %406
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #0
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %18) #0
  call void @llvm.lifetime.end.p0(i64 120, ptr %18) #0
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #0
  ret void

416:                                              ; preds = %382, %381, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #0
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %18) #0
  br label %417

417:                                              ; preds = %416, %77
  call void @llvm.lifetime.end.p0(i64 120, ptr %18) #0
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #0
  br label %418

418:                                              ; preds = %417, %65
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #0
  br label %419

419:                                              ; preds = %418, %61
  %420 = load ptr, ptr %13, align 8
  %421 = load i32, ptr %14, align 4
  %422 = insertvalue { ptr, i32 } poison, ptr %420, 0
  %423 = insertvalue { ptr, i32 } %422, i32 %421, 1
  resume { ptr, i32 } %423
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_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 @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_1vEEOT_"(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 @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_3vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_4vEEOT_"(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 noundef zeroext i1 @_Z27MIR_Optimise_ConstPropagateRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) #5

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

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

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

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

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

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

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

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

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

declare void @_Z12MIR_Dump_FcnRSoRKN3MIR8FunctionEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) #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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!"branch_weights", i32 1, i32 1048575}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = 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.93 = 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.94 = type { ptr }
%class.anon.95 = type { i8 }
%class.anon.96 = type { ptr }
%class.anon.97 = type { ptr }

@__dso_handle = external hidden global i8
@_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp = external hidden global %struct.Span, align 8
@_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp = external hidden global i64, align 8
@__func__._Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b = external hidden unnamed_addr constant [13 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) 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: 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 #5

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

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

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

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

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local 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 %5) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %7 = alloca %class.TraceLog, align 8
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %class.anon.93, align 8
  %10 = alloca %"class.MIR::TypeResolve", align 8
  %11 = alloca %struct.FmtLambda, align 8
  %12 = alloca %"class.std::function", align 8
  %13 = alloca %class.anon.94, align 8
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::function", align 8
  %17 = alloca %class.anon.95, align 1
  %18 = alloca %class.TraceLog, align 8
  %19 = alloca %"class.std::function", align 8
  %20 = alloca %class.anon.96, align 8
  %21 = alloca %"class.std::function", align 8
  %22 = alloca %class.anon.97, align 8
  %23 = load atomic i8, ptr @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp acquire, align 8
  %24 = icmp eq i8 %23, 0
  br i1 %24, label %25, label %29, !prof !5

25:                                               ; preds = %6
  %26 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp) #7
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %29, label %27

27:                                               ; preds = %25
  tail call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp)
  %28 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN4SpanD1Ev, ptr nonnull @_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp, ptr nonnull @__dso_handle) #7
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp) #7
  br label %29

29:                                               ; preds = %27, %25, %6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #7
  %30 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  %31 = select i1 %30, ptr @__func__._Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store ptr %1, ptr %9, align 8, !tbaa !6
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef %31, ptr noundef nonnull %8)
          to label %32 unwind label %40

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

33:                                               ; preds = %32
  invoke void @_ZN3MIR11TypeResolveC2ERK4SpanRK18StaticTraitResolve9FmtLambdaRKN3HIR7TypeRefERKSt6vectorISt4pairINS8_7PatternES9_ESaISF_EERKNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(8) @_ZZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_bE2sp, ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull %11, 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 %34 unwind label %44

34:                                               ; preds = %33
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  store i32 0, ptr %15, align 4, !tbaa !10
  br label %35

thread-pre-split:                                 ; preds = %190
  %.pr = load i32, ptr %15, align 4, !tbaa !10
  br label %35

35:                                               ; preds = %thread-pre-split, %34
  %36 = phi i32 [ %.pr, %thread-pre-split ], [ 0, %34 ]
  %37 = icmp ult i32 %36, 100
  br i1 %37, label %49, label %38

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #7
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull %16)
          to label %39 unwind label %47

39:                                               ; preds = %38
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  br label %49

40:                                               ; preds = %29
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %218

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %33
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9FmtLambdaD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %46

46:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %217

47:                                               ; preds = %38
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  br label %216

49:                                               ; preds = %39, %35
  store i8 0, ptr %14, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #7
  %50 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %51 unwind label %60

51:                                               ; preds = %49
  %52 = select i1 %50, ptr @__func__._Z12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS2_7PatternENS2_7TypeRefEESaISD_EERKSC_b, ptr null
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  store ptr %15, ptr %20, align 8, !tbaa !6
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  store ptr %14, ptr %22, align 8, !tbaa !6
  call void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef %52, ptr noundef nonnull %19, ptr noundef nonnull %21)
          to label %53 unwind label %62

53:                                               ; preds = %51
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  %54 = invoke noundef zeroext i1 @_Z26MIR_Optimise_BlockSimplifyRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %55 unwind label %.loopexit.split-lp.loopexit.split-lp

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

56:                                               ; preds = %55
  %57 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %58 unwind label %.loopexit.split-lp.loopexit.split-lp

58:                                               ; preds = %56
  br i1 %57, label %59, label %64

59:                                               ; preds = %58
  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 %64 unwind label %.loopexit.split-lp.loopexit.split-lp

60:                                               ; preds = %49
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %199

62:                                               ; preds = %51
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %199

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

.loopexit.split-lp.loopexit:                      ; preds = %80, %77, %.preheader136
  %lpad.loopexit137 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %189, %186, %183, %182, %178, %177, %174, %170, %167, %166, %163, %158, %155, %152, %150, %147, %144, %142, %139, %136, %134, %131, %128, %126, %123, %120, %118, %115, %112, %110, %107, %102, %100, %97, %94, %92, %89, %86, %84, %81, %72, %70, %67, %64, %59, %56, %53
  %lpad.loopexit.split-lp138 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit137, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp138, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #7
  br label %199

64:                                               ; preds = %58, %59, %55
  %65 = invoke noundef zeroext i1 @_Z27MIR_Optimise_ConstPropagateRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %66 unwind label %.loopexit.split-lp.loopexit.split-lp

66:                                               ; preds = %64
  br i1 %65, label %67, label %72

67:                                               ; preds = %66
  %68 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %69 unwind label %.loopexit.split-lp.loopexit.split-lp

69:                                               ; preds = %67
  br i1 %68, label %70, label %71

70:                                               ; preds = %69
  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 %71 unwind label %.loopexit.split-lp.loopexit.split-lp

71:                                               ; preds = %70, %69
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %72

72:                                               ; preds = %71, %66
  %73 = invoke noundef zeroext i1 @_Z24MIR_Optimise_DeTemporaryRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %74 unwind label %.loopexit.split-lp.loopexit.split-lp

74:                                               ; preds = %72
  br i1 %73, label %.preheader136, label %86

.preheader136:                                    ; preds = %74, %.preheader136.backedge
  %75 = invoke noundef zeroext i1 @_Z24MIR_Optimise_DeTemporaryRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %76 unwind label %.loopexit.split-lp.loopexit

76:                                               ; preds = %.preheader136
  br i1 %75, label %77, label %81

77:                                               ; preds = %76
  %78 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %79 unwind label %.loopexit.split-lp.loopexit

79:                                               ; preds = %77
  br i1 %78, label %80, label %.preheader136.backedge

80:                                               ; preds = %79
  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 %.preheader136.backedge unwind label %.loopexit.split-lp.loopexit

.preheader136.backedge:                           ; preds = %80, %79
  br label %.preheader136, !llvm.loop !14

81:                                               ; preds = %76
  %82 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %83 unwind label %.loopexit.split-lp.loopexit.split-lp

83:                                               ; preds = %81
  br i1 %82, label %84, label %85

84:                                               ; preds = %83
  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 %85 unwind label %.loopexit.split-lp.loopexit.split-lp

85:                                               ; preds = %84, %83
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %86

86:                                               ; preds = %85, %74
  %87 = invoke noundef zeroext i1 @_Z28MIR_Optimise_SplitAggregatesRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %88 unwind label %.loopexit.split-lp.loopexit.split-lp

88:                                               ; preds = %86
  br i1 %87, label %89, label %94

89:                                               ; preds = %88
  %90 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %91 unwind label %.loopexit.split-lp.loopexit.split-lp

91:                                               ; preds = %89
  br i1 %90, label %92, label %93

92:                                               ; preds = %91
  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 %93 unwind label %.loopexit.split-lp.loopexit.split-lp

93:                                               ; preds = %92, %91
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %94

94:                                               ; preds = %93, %88
  %95 = invoke noundef zeroext i1 @_Z33MIR_Optimise_PropagateKnownValuesRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %96 unwind label %.loopexit.split-lp.loopexit.split-lp

96:                                               ; preds = %94
  br i1 %95, label %97, label %102

97:                                               ; preds = %96
  %98 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %99 unwind label %.loopexit.split-lp.loopexit.split-lp

99:                                               ; preds = %97
  br i1 %98, label %100, label %101

100:                                              ; preds = %99
  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 %101 unwind label %.loopexit.split-lp.loopexit.split-lp

101:                                              ; preds = %100, %99
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %102

102:                                              ; preds = %101, %96
  %103 = invoke noundef zeroext i1 @_Z39MIR_Optimise_PropagateSingleAssignmentsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %104 unwind label %.loopexit.split-lp.loopexit.split-lp

104:                                              ; preds = %102
  br i1 %103, label %.preheader, label %112

.preheader:                                       ; preds = %104, %106
  %105 = invoke noundef zeroext i1 @_Z39MIR_Optimise_PropagateSingleAssignmentsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %106 unwind label %.loopexit

106:                                              ; preds = %.preheader
  br i1 %105, label %.preheader, label %107, !llvm.loop !16

107:                                              ; preds = %106
  %108 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %109 unwind label %.loopexit.split-lp.loopexit.split-lp

109:                                              ; preds = %107
  br i1 %108, label %110, label %111

110:                                              ; preds = %109
  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 %111 unwind label %.loopexit.split-lp.loopexit.split-lp

111:                                              ; preds = %110, %109
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %112

112:                                              ; preds = %111, %104
  %113 = invoke noundef zeroext i1 @_Z24MIR_Optimise_UnifyBlocksRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %114 unwind label %.loopexit.split-lp.loopexit.split-lp

114:                                              ; preds = %112
  br i1 %113, label %115, label %120

115:                                              ; preds = %114
  %116 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %117 unwind label %.loopexit.split-lp.loopexit.split-lp

117:                                              ; preds = %115
  br i1 %116, label %118, label %119

118:                                              ; preds = %117
  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 %119 unwind label %.loopexit.split-lp.loopexit.split-lp

119:                                              ; preds = %118, %117
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %120

120:                                              ; preds = %119, %114
  %121 = invoke noundef zeroext i1 @_Z26MIR_Optimise_DeadDropFlagsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %122 unwind label %.loopexit.split-lp.loopexit.split-lp

122:                                              ; preds = %120
  br i1 %121, label %123, label %128

123:                                              ; preds = %122
  %124 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %125 unwind label %.loopexit.split-lp.loopexit.split-lp

125:                                              ; preds = %123
  br i1 %124, label %126, label %127

126:                                              ; preds = %125
  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 %127 unwind label %.loopexit.split-lp.loopexit.split-lp

127:                                              ; preds = %126, %125
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %128

128:                                              ; preds = %127, %122
  %129 = invoke noundef zeroext i1 @_Z28MIR_Optimise_DeadAssignmentsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %130 unwind label %.loopexit.split-lp.loopexit.split-lp

130:                                              ; preds = %128
  br i1 %129, label %131, label %136

131:                                              ; preds = %130
  %132 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %133 unwind label %.loopexit.split-lp.loopexit.split-lp

133:                                              ; preds = %131
  br i1 %132, label %134, label %135

134:                                              ; preds = %133
  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 %135 unwind label %.loopexit.split-lp.loopexit.split-lp

135:                                              ; preds = %134, %133
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %136

136:                                              ; preds = %135, %130
  %137 = invoke noundef zeroext i1 @_Z24MIR_Optimise_NoopRemovalRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %138 unwind label %.loopexit.split-lp.loopexit.split-lp

138:                                              ; preds = %136
  br i1 %137, label %139, label %144

139:                                              ; preds = %138
  %140 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %141 unwind label %.loopexit.split-lp.loopexit.split-lp

141:                                              ; preds = %139
  br i1 %140, label %142, label %143

142:                                              ; preds = %141
  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 %143 unwind label %.loopexit.split-lp.loopexit.split-lp

143:                                              ; preds = %142, %141
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %144

144:                                              ; preds = %143, %138
  %145 = invoke noundef zeroext i1 @_Z29MIR_Optimise_UselessReborrowsRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %146 unwind label %.loopexit.split-lp.loopexit.split-lp

146:                                              ; preds = %144
  br i1 %145, label %147, label %152

147:                                              ; preds = %146
  %148 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %149 unwind label %.loopexit.split-lp.loopexit.split-lp

149:                                              ; preds = %147
  br i1 %148, label %150, label %151

150:                                              ; preds = %149
  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 %151 unwind label %.loopexit.split-lp.loopexit.split-lp

151:                                              ; preds = %150, %149
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %152

152:                                              ; preds = %151, %146
  %153 = invoke noundef zeroext i1 @_Z23MIR_Optimise_GotoAssignRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %154 unwind label %.loopexit.split-lp.loopexit.split-lp

154:                                              ; preds = %152
  br i1 %153, label %155, label %._crit_edge141

._crit_edge141:                                   ; preds = %154
  %.pre140.pre = load i8, ptr %14, align 1, !tbaa !12, !range !17
  br label %160

155:                                              ; preds = %154
  %156 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %157 unwind label %.loopexit.split-lp.loopexit.split-lp

157:                                              ; preds = %155
  br i1 %156, label %158, label %159

158:                                              ; preds = %157
  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 %159 unwind label %.loopexit.split-lp.loopexit.split-lp

159:                                              ; preds = %158, %157
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %160

160:                                              ; preds = %._crit_edge141, %159
  %.pre140 = phi i8 [ %.pre140.pre, %._crit_edge141 ], [ 1, %159 ]
  br i1 %5, label %161, label %171

161:                                              ; preds = %160
  %162 = trunc nuw i8 %.pre140 to i1
  br i1 %162, label %171, label %163

163:                                              ; preds = %161
  %164 = invoke noundef zeroext i1 @_Z21MIR_Optimise_InliningRN3MIR11TypeResolveERNS_8FunctionEbPK9TransList(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2, i1 noundef zeroext false, ptr noundef null)
          to label %165 unwind label %.loopexit.split-lp.loopexit.split-lp

165:                                              ; preds = %163
  br i1 %164, label %166, label %._crit_edge

._crit_edge:                                      ; preds = %165
  %.pre = load i8, ptr %14, align 1, !tbaa !12, !range !17
  br label %171

166:                                              ; preds = %165
  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 %167 unwind label %.loopexit.split-lp.loopexit.split-lp

167:                                              ; preds = %166
  %168 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %169 unwind label %.loopexit.split-lp.loopexit.split-lp

169:                                              ; preds = %167
  br i1 %168, label %170, label %.thread

170:                                              ; preds = %169
  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 %.thread unwind label %.loopexit.split-lp.loopexit.split-lp

.thread:                                          ; preds = %169, %170
  store i8 1, ptr %14, align 1, !tbaa !12
  br label %174

171:                                              ; preds = %._crit_edge, %161, %160
  %172 = phi i8 [ %.pre, %._crit_edge ], [ %.pre140, %161 ], [ %.pre140, %160 ]
  %173 = trunc nuw i8 %172 to i1
  br i1 %173, label %174, label %183

174:                                              ; preds = %.thread, %171
  %175 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %176 unwind label %.loopexit.split-lp.loopexit.split-lp

176:                                              ; preds = %174
  br i1 %175, label %177, label %178

177:                                              ; preds = %176
  invoke void @_Z12MIR_Dump_FcnRSoRKN3MIR8FunctionEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(96) %2, i32 noundef 0)
          to label %178 unwind label %.loopexit.split-lp.loopexit.split-lp

178:                                              ; preds = %177, %176
  %179 = invoke noundef i32 @_ZL10check_modev()
          to label %180 unwind label %.loopexit.split-lp.loopexit.split-lp

180:                                              ; preds = %178
  %181 = icmp eq i32 %179, 3
  br i1 %181, label %182, label %183

182:                                              ; preds = %180
  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 %183 unwind label %.loopexit.split-lp.loopexit.split-lp

183:                                              ; preds = %180, %182, %171
  %184 = invoke noundef zeroext i1 @_Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %185 unwind label %.loopexit.split-lp.loopexit.split-lp

185:                                              ; preds = %183
  br i1 %184, label %186, label %190

186:                                              ; preds = %185
  store i8 1, ptr %14, align 1, !tbaa !12
  %187 = invoke noundef zeroext i1 @_ZL15check_after_allv()
          to label %188 unwind label %.loopexit.split-lp.loopexit.split-lp

188:                                              ; preds = %186
  br i1 %187, label %189, label %190

189:                                              ; preds = %188
  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 %190 unwind label %.loopexit.split-lp.loopexit.split-lp

190:                                              ; preds = %188, %189, %185
  %191 = load i32, ptr %15, align 4, !tbaa !10
  %192 = add i32 %191, 1
  store i32 %192, ptr %15, align 4, !tbaa !10
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #7
  %193 = load i8, ptr %14, align 1, !tbaa !12, !range !17, !noundef !18
  %194 = trunc nuw i8 %193 to i1
  br i1 %194, label %thread-pre-split, label %195, !llvm.loop !19

195:                                              ; preds = %190
  %196 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %197 unwind label %200

197:                                              ; preds = %195
  br i1 %196, label %198, label %202

198:                                              ; preds = %197
  invoke void @_Z12MIR_Dump_FcnRSoRKN3MIR8FunctionEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(96) %2, i32 noundef 0)
          to label %202 unwind label %200

199:                                              ; preds = %.loopexit.split-lp, %62, %60
  %.pn131 = phi { ptr, i32 } [ %lpad.phi, %.loopexit.split-lp ], [ %63, %62 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #7
  br label %216

200:                                              ; preds = %214, %210, %209, %207, %206, %202, %198, %195
  %201 = landingpad { ptr, i32 }
          cleanup
  br label %216

202:                                              ; preds = %198, %197
  %203 = invoke noundef i32 @_ZL10check_modev()
          to label %204 unwind label %200

204:                                              ; preds = %202
  %205 = icmp sgt i32 %203, 1
  br i1 %205, label %206, label %207

206:                                              ; preds = %204
  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 %207 unwind label %200

207:                                              ; preds = %206, %204
  %208 = invoke noundef zeroext i1 @_Z27MIR_Optimise_GarbageCollectRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
          to label %209 unwind label %200

209:                                              ; preds = %207
  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 %210 unwind label %200

210:                                              ; preds = %209
  %211 = invoke noundef i32 @_ZL10check_modev()
          to label %212 unwind label %200

212:                                              ; preds = %210
  %213 = icmp sgt i32 %211, 1
  br i1 %213, label %214, label %215

214:                                              ; preds = %212
  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 %215 unwind label %200

215:                                              ; preds = %214, %212
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  ret void

216:                                              ; preds = %200, %199, %47
  %.pn131.pn = phi { ptr, i32 } [ %.pn131, %199 ], [ %201, %200 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  call void @_ZN3MIR11TypeResolveD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #7
  br label %217

217:                                              ; preds = %216, %46
  %.pn131.pn.pn = phi { ptr, i32 } [ %.pn131.pn, %216 ], [ %.pn, %46 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #7
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  br label %218

218:                                              ; preds = %217, %40
  %.pn131.pn.pn.pn = phi { ptr, i32 } [ %.pn131.pn.pn, %217 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  resume { ptr, i32 } %.pn131.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_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 @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_1vEEOT_"(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 @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_3vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZ12MIR_OptimiseRK18StaticTraitResolveRKN3HIR8ItemPathERN3MIR8FunctionERKSt6vectorISt4pairINS7_7PatternENS7_7TypeRefEESaISI_EERKSH_bE3$_4vEEOT_"(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 noundef zeroext i1 @_Z27MIR_Optimise_ConstPropagateRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #5

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

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

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

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

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

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

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

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

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

declare void @_Z12MIR_Dump_FcnRSoRKN3MIR8FunctionEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96)) 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 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !15}


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