; LLVM IR from thepowersgang/mrustc :: src/hir_typeck (common)

; 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.HIR::PathParams" = type { %class.ThinVector.2, %class.ThinVector.3, %class.ThinVector.4 }
%class.ThinVector.2 = type { ptr }
%class.ThinVector.3 = type { ptr }
%class.ThinVector.4 = type { ptr }
%"struct.HIR::LifetimeRef" = type { i32 }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::ConstGeneric" = type { i32, %"union.HIR::ConstGeneric::DataUnion" }
%"union.HIR::ConstGeneric::DataUnion" = type { %"class.std::unique_ptr.27", [8 x i8] }
%"class.std::unique_ptr.27" = type { %"struct.std::__uniq_ptr_data.28" }
%"struct.std::__uniq_ptr_data.28" = type { %"class.std::__uniq_ptr_impl.29" }
%"class.std::__uniq_ptr_impl.29" = type { %"class.std::tuple.30" }
%"class.std::tuple.30" = type { %"struct.std::_Tuple_impl.31" }
%"struct.std::_Tuple_impl.31" = type { %"struct.std::_Head_base.34" }
%"struct.std::_Head_base.34" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK13Monomorphiser21monomorph_path_paramsERK4SpanRKN3HIR10PathParamsEb(ptr dead_on_unwind noalias writable sret(%"struct.HIR::PathParams") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.HIR::LifetimeRef", align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.HIR::TypeRef", align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"class.HIR::ConstGeneric", align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %29 = zext i1 %4 to i8
  store i8 %29, ptr %10, align 1, !tbaa !9
  %30 = load ptr, ptr %7, align 8
  store i1 false, ptr %11, align 1
  call void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %31 = getelementptr inbounds %"struct.HIR::PathParams", ptr %0, i32 0, i32 0
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.HIR::PathParams", ptr %32, i32 0, i32 0
  %34 = invoke noundef i64 @_ZNK10ThinVectorIN3HIR11LifetimeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %35 unwind label %50

35:                                               ; preds = %5
  invoke void @_ZN10ThinVectorIN3HIR11LifetimeRefEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %31, i64 noundef %34)
          to label %36 unwind label %50

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.HIR::PathParams", ptr %37, i32 0, i32 0
  store ptr %38, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR11LifetimeRefEE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %41 unwind label %54

41:                                               ; preds = %36
  store ptr %40, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  %43 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR11LifetimeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %44 unwind label %58

44:                                               ; preds = %41
  store ptr %43, ptr %16, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %76, %44
  %46 = load ptr, ptr %15, align 8, !tbaa !5
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  %48 = icmp ne ptr %46, %47
  br i1 %48, label %62, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %85

50:                                               ; preds = %144, %139, %90, %85, %35, %5
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %12, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %13, align 4
  br label %194

54:                                               ; preds = %36
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %12, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %13, align 4
  br label %84

58:                                               ; preds = %41
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %12, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %13, align 4
  br label %83

62:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %63 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %63, ptr %17, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.HIR::PathParams", ptr %0, i32 0, i32 0
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %17, align 8, !tbaa !5
  %67 = load ptr, ptr %30, align 8, !tbaa !11
  %68 = getelementptr inbounds ptr, ptr %67, i64 6
  %69 = load ptr, ptr %68, align 8
  %70 = invoke i32 %69(ptr noundef nonnull align 8 dereferenceable(96) %30, ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 4 dereferenceable(4) %66)
          to label %71 unwind label %79

71:                                               ; preds = %62
  %72 = getelementptr inbounds %"struct.HIR::LifetimeRef", ptr %18, i32 0, i32 0
  store i32 %70, ptr %72, align 4
  %73 = getelementptr inbounds %"struct.HIR::LifetimeRef", ptr %18, i32 0, i32 0
  %74 = load i32, ptr %73, align 4
  invoke void @_ZN10ThinVectorIN3HIR11LifetimeRefEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8) %64, i32 %74)
          to label %75 unwind label %79

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.HIR::LifetimeRef", ptr %77, i32 1
  store ptr %78, ptr %15, align 8, !tbaa !5
  br label %45

79:                                               ; preds = %71, %62
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %12, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %83

83:                                               ; preds = %79, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %84

84:                                               ; preds = %83, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %194

85:                                               ; preds = %49
  %86 = getelementptr inbounds %"struct.HIR::PathParams", ptr %0, i32 0, i32 1
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.HIR::PathParams", ptr %87, i32 0, i32 1
  %89 = invoke noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %88)
          to label %90 unwind label %50

90:                                               ; preds = %85
  invoke void @_ZN10ThinVectorIN3HIR7TypeRefEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %86, i64 noundef %89)
          to label %91 unwind label %50

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.HIR::PathParams", ptr %92, i32 0, i32 1
  store ptr %93, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  %95 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR7TypeRefEE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %94)
          to label %96 unwind label %105

96:                                               ; preds = %91
  store ptr %95, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR7TypeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %99 unwind label %109

99:                                               ; preds = %96
  store ptr %98, ptr %21, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %125, %99
  %101 = load ptr, ptr %20, align 8, !tbaa !5
  %102 = load ptr, ptr %21, align 8, !tbaa !5
  %103 = icmp ne ptr %101, %102
  br i1 %103, label %113, label %104

104:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %139

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

109:                                              ; preds = %96
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %12, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %13, align 4
  br label %137

113:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %114 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %114, ptr %22, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.HIR::PathParams", ptr %0, i32 0, i32 1
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = load i8, ptr %10, align 1, !tbaa !9, !range !13, !noundef !14
  %119 = trunc i8 %118 to i1
  %120 = load ptr, ptr %30, align 8, !tbaa !11
  %121 = getelementptr inbounds ptr, ptr %120, i64 5
  %122 = load ptr, ptr %121, align 8
  invoke void %122(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %23, ptr noundef nonnull align 8 dereferenceable(96) %30, ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull align 8 dereferenceable(8) %117, i1 noundef zeroext %119)
          to label %123 unwind label %128

123:                                              ; preds = %113
  invoke void @_ZN10ThinVectorIN3HIR7TypeRefEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef %23)
          to label %124 unwind label %132

124:                                              ; preds = %123
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %20, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.HIR::TypeRef", ptr %126, i32 1
  store ptr %127, ptr %20, align 8, !tbaa !5
  br label %100

128:                                              ; preds = %113
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %12, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %13, align 4
  br label %136

132:                                              ; preds = %123
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %12, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %13, align 4
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br label %136

136:                                              ; preds = %132, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %137

137:                                              ; preds = %136, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %138

138:                                              ; preds = %137, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %194

139:                                              ; preds = %104
  %140 = getelementptr inbounds %"struct.HIR::PathParams", ptr %0, i32 0, i32 2
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.HIR::PathParams", ptr %141, i32 0, i32 2
  %143 = invoke noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %142)
          to label %144 unwind label %50

144:                                              ; preds = %139
  invoke void @_ZN10ThinVectorIN3HIR12ConstGenericEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %140, i64 noundef %143)
          to label %145 unwind label %50

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.HIR::PathParams", ptr %146, i32 0, i32 2
  store ptr %147, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %148 = load ptr, ptr %24, align 8, !tbaa !5
  %149 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %148)
          to label %150 unwind label %159

150:                                              ; preds = %145
  store ptr %149, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %151 = load ptr, ptr %24, align 8, !tbaa !5
  %152 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %151)
          to label %153 unwind label %163

153:                                              ; preds = %150
  store ptr %152, ptr %26, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %176, %153
  %155 = load ptr, ptr %25, align 8, !tbaa !5
  %156 = load ptr, ptr %26, align 8, !tbaa !5
  %157 = icmp ne ptr %155, %156
  br i1 %157, label %167, label %158

158:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %190

159:                                              ; preds = %145
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %12, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %13, align 4
  br label %189

163:                                              ; preds = %150
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %12, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %13, align 4
  br label %188

167:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %168 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %168, ptr %27, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.HIR::PathParams", ptr %0, i32 0, i32 2
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = load ptr, ptr %27, align 8, !tbaa !5
  %172 = load i8, ptr %10, align 1, !tbaa !9, !range !13, !noundef !14
  %173 = trunc i8 %172 to i1
  invoke void @_ZNK13Monomorphiser22monomorph_constgenericERK4SpanRKN3HIR12ConstGenericEb(ptr dead_on_unwind writable sret(%"class.HIR::ConstGeneric") align 8 %28, ptr noundef nonnull align 8 dereferenceable(96) %30, ptr noundef nonnull align 8 dereferenceable(8) %170, ptr noundef nonnull align 8 dereferenceable(24) %171, i1 noundef zeroext %173)
          to label %174 unwind label %179

174:                                              ; preds = %167
  invoke void @_ZN10ThinVectorIN3HIR12ConstGenericEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef %28)
          to label %175 unwind label %183

175:                                              ; preds = %174
  call void @_ZN3HIR12ConstGenericD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %176

176:                                              ; preds = %175
  %177 = load ptr, ptr %25, align 8, !tbaa !5
  %178 = getelementptr inbounds %"class.HIR::ConstGeneric", ptr %177, i32 1
  store ptr %178, ptr %25, align 8, !tbaa !5
  br label %154

179:                                              ; preds = %167
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %12, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %13, align 4
  br label %187

183:                                              ; preds = %174
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %12, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %13, align 4
  call void @_ZN3HIR12ConstGenericD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  br label %187

187:                                              ; preds = %183, %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %188

188:                                              ; preds = %187, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %189

189:                                              ; preds = %188, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %194

190:                                              ; preds = %158
  store i1 true, ptr %11, align 1
  %191 = load i1, ptr %11, align 1
  br i1 %191, label %193, label %192

192:                                              ; preds = %190
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %193

193:                                              ; preds = %192, %190
  ret void

194:                                              ; preds = %189, %138, %84, %50
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %12, align 8
  %197 = load i32, ptr %13, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13Monomorphiser22monomorph_constgenericERK4SpanRKN3HIR12ConstGenericEb(ptr dead_on_unwind noalias writable sret(%"class.HIR::ConstGeneric") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #2 align 2

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

declare void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR11LifetimeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK10ThinVectorIN3HIR11LifetimeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK10ThinVectorIN3HIR7TypeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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.HIR::PathParams" = type { %class.ThinVector.2, %class.ThinVector.3, %class.ThinVector.4 }
%class.ThinVector.2 = type { ptr }
%class.ThinVector.3 = type { ptr }
%class.ThinVector.4 = type { ptr }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::ConstGeneric" = type { i32, %"union.HIR::ConstGeneric::DataUnion" }
%"union.HIR::ConstGeneric::DataUnion" = type { %"class.std::unique_ptr.27", [8 x i8] }
%"class.std::unique_ptr.27" = type { %"struct.std::__uniq_ptr_data.28" }
%"struct.std::__uniq_ptr_data.28" = type { %"class.std::__uniq_ptr_impl.29" }
%"class.std::__uniq_ptr_impl.29" = type { %"class.std::tuple.30" }
%"class.std::tuple.30" = type { %"struct.std::_Tuple_impl.31" }
%"struct.std::_Tuple_impl.31" = type { %"struct.std::_Head_base.34" }
%"struct.std::_Head_base.34" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK13Monomorphiser21monomorph_path_paramsERK4SpanRKN3HIR10PathParamsEb(ptr dead_on_unwind noalias nonnull writable sret(%"struct.HIR::PathParams") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.HIR::TypeRef", align 8
  %7 = alloca %"class.HIR::ConstGeneric", align 8
  tail call void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %8 = invoke noundef i64 @_ZNK10ThinVectorIN3HIR11LifetimeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %9 unwind label %16

9:                                                ; preds = %5
  invoke void @_ZN10ThinVectorIN3HIR11LifetimeRefEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef %8)
          to label %10 unwind label %16

10:                                               ; preds = %9
  %11 = tail call noundef ptr @_ZNK10ThinVectorIN3HIR11LifetimeRefEE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %12 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR11LifetimeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %.preheader55 unwind label %18

.preheader55:                                     ; preds = %10
  %.not56 = icmp eq ptr %11, %12
  br i1 %.not56, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %25, %.preheader55
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = invoke noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %29 unwind label %16

16:                                               ; preds = %48, %._crit_edge61, %29, %._crit_edge, %9, %5
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %61

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %61

.lr.ph:                                           ; preds = %.preheader55, %25
  %.04257 = phi ptr [ %26, %25 ], [ %11, %.preheader55 ]
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 48
  %22 = load ptr, ptr %21, align 8
  %23 = invoke i32 %22(ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %.04257)
          to label %24 unwind label %27

24:                                               ; preds = %.lr.ph
  invoke void @_ZN10ThinVectorIN3HIR11LifetimeRefEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 %23)
          to label %25 unwind label %27

25:                                               ; preds = %24
  %26 = getelementptr inbounds i8, ptr %.04257, i64 4
  %.not = icmp eq ptr %26, %12
  br i1 %.not, label %._crit_edge, label %.lr.ph

27:                                               ; preds = %24, %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %61

29:                                               ; preds = %._crit_edge
  invoke void @_ZN10ThinVectorIN3HIR7TypeRefEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %15)
          to label %30 unwind label %16

30:                                               ; preds = %29
  %31 = tail call noundef ptr @_ZNK10ThinVectorIN3HIR7TypeRefEE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %32 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR7TypeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %.preheader54 unwind label %36

.preheader54:                                     ; preds = %30
  %.not4458 = icmp eq ptr %31, %32
  br i1 %.not4458, label %._crit_edge61, label %.lr.ph60

._crit_edge61:                                    ; preds = %42, %.preheader54
  %33 = getelementptr inbounds i8, ptr %0, i64 16
  %34 = getelementptr inbounds i8, ptr %3, i64 16
  %35 = invoke noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %48 unwind label %16

36:                                               ; preds = %30
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %61

.lr.ph60:                                         ; preds = %.preheader54, %42
  %.04359 = phi ptr [ %43, %42 ], [ %31, %.preheader54 ]
  %38 = load ptr, ptr %1, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 40
  %40 = load ptr, ptr %39, align 8
  invoke void %40(ptr dead_on_unwind nonnull writable sret(%"class.HIR::TypeRef") align 8 %6, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %.04359, i1 noundef zeroext %4)
          to label %41 unwind label %44

41:                                               ; preds = %.lr.ph60
  invoke void @_ZN10ThinVectorIN3HIR7TypeRefEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull %6)
          to label %42 unwind label %46

42:                                               ; preds = %41
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %43 = getelementptr inbounds i8, ptr %.04359, i64 8
  %.not44 = icmp eq ptr %43, %32
  br i1 %.not44, label %._crit_edge61, label %.lr.ph60

44:                                               ; preds = %.lr.ph60
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %61

46:                                               ; preds = %41
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br label %61

48:                                               ; preds = %._crit_edge61
  invoke void @_ZN10ThinVectorIN3HIR12ConstGenericEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %33, i64 noundef %35)
          to label %49 unwind label %16

49:                                               ; preds = %48
  %50 = call noundef ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %51 = invoke noundef ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %.preheader unwind label %52

.preheader:                                       ; preds = %49
  %.not4562 = icmp eq ptr %50, %51
  br i1 %.not4562, label %._crit_edge65, label %.lr.ph64

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

.lr.ph64:                                         ; preds = %.preheader, %55
  %.03563 = phi ptr [ %56, %55 ], [ %50, %.preheader ]
  invoke void @_ZNK13Monomorphiser22monomorph_constgenericERK4SpanRKN3HIR12ConstGenericEb(ptr dead_on_unwind nonnull writable sret(%"class.HIR::ConstGeneric") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(24) %.03563, i1 noundef zeroext %4)
          to label %54 unwind label %57

54:                                               ; preds = %.lr.ph64
  invoke void @_ZN10ThinVectorIN3HIR12ConstGenericEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull %7)
          to label %55 unwind label %59

55:                                               ; preds = %54
  call void @_ZN3HIR12ConstGenericD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %56 = getelementptr inbounds i8, ptr %.03563, i64 24
  %.not45 = icmp eq ptr %56, %51
  br i1 %.not45, label %._crit_edge65, label %.lr.ph64

57:                                               ; preds = %.lr.ph64
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %54
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3HIR12ConstGenericD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %61

._crit_edge65:                                    ; preds = %55, %.preheader
  ret void

61:                                               ; preds = %52, %59, %57, %36, %46, %44, %18, %27, %16
  %.pn51.pn = phi { ptr, i32 } [ %17, %16 ], [ %28, %27 ], [ %19, %18 ], [ %37, %36 ], [ %47, %46 ], [ %45, %44 ], [ %53, %52 ], [ %60, %59 ], [ %58, %57 ]
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %.pn51.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13Monomorphiser22monomorph_constgenericERK4SpanRKN3HIR12ConstGenericEb(ptr dead_on_unwind noalias writable sret(%"class.HIR::ConstGeneric") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #1 align 2

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

declare void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ThinVectorIN3HIR11LifetimeRefEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR11LifetimeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK10ThinVectorIN3HIR11LifetimeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ThinVectorIN3HIR11LifetimeRefEE9push_backES1_(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ThinVectorIN3HIR7TypeRefEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK10ThinVectorIN3HIR7TypeRefEE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ThinVectorIN3HIR12ConstGenericEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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