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

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

%"class.HIR::Path" = type { %"class.HIR::Path::Data" }
%"class.HIR::Path::Data" = type { i32, %"union.HIR::Path::Data::DataUnion" }
%"union.HIR::Path::Data::DataUnion" = type { %"struct.HIR::Path::Data::Data_UfcsKnown" }
%"struct.HIR::Path::Data::Data_UfcsKnown" = type { %"class.HIR::TypeRef", %"class.HIR::GenericPath", %class.RcString, %"struct.HIR::PathParams", %"class.std::unique_ptr.22" }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%class.RcString = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector.19, %class.ThinVector.20, %class.ThinVector.21 }
%class.ThinVector.19 = type { ptr }
%class.ThinVector.20 = type { ptr }
%class.ThinVector.21 = type { ptr }
%"class.std::unique_ptr.22" = type { %"struct.std::__uniq_ptr_data.23" }
%"struct.std::__uniq_ptr_data.23" = type { %"class.std::__uniq_ptr_impl.24" }
%"class.std::__uniq_ptr_impl.24" = type { %"class.std::tuple.25" }
%"class.std::tuple.25" = type { %"struct.std::_Tuple_impl.26" }
%"struct.std::_Tuple_impl.26" = type { %"struct.std::_Head_base.29" }
%"struct.std::_Head_base.29" = type { ptr }
%struct.EncodedLiteral = type { %"class.std::vector.0", %"class.std::vector.162" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.162" = type { %"struct.std::_Vector_base.163" }
%"struct.std::_Vector_base.163" = type { %"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl" }
%"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl" = type { %"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Reloc = type { i64, i64, %"class.std::unique_ptr.168", %"class.std::__cxx11::basic_string" }
%"class.std::unique_ptr.168" = type { %"struct.std::__uniq_ptr_data.169" }
%"struct.std::__uniq_ptr_data.169" = type { %"class.std::__uniq_ptr_impl.170" }
%"class.std::__uniq_ptr_impl.170" = type { %"class.std::tuple.171" }
%"class.std::tuple.171" = type { %"struct.std::_Tuple_impl.172" }
%"struct.std::_Tuple_impl.172" = type { %"struct.std::_Head_base.175" }
%"struct.std::_Head_base.175" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.179 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.179 = type { i64, [8 x i8] }
%class.HirDeserialiser = type { %class.RcString, %"class.std::vector", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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: mustprogress uwtable
declare dso_local noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser16deserialise_pathEv(ptr dead_on_unwind noalias writable sret(%"class.HIR::Path") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15HirDeserialiser26deserialise_encodedliteralEv(ptr dead_on_unwind noalias writable sret(%struct.EncodedLiteral) align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.Reloc, align 8
  %14 = alloca %"class.HIR::Path", align 8
  %15 = alloca %struct.Reloc, align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZN14EncodedLiteralC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  invoke void @_ZN15HirDeserialiser15deserialise_vecIhEESt6vectorIT_SaIS2_EEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %18 unwind label %33

18:                                               ; preds = %2
  %19 = getelementptr inbounds %struct.EncodedLiteral, ptr %0, i32 0, i32 0
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %21 = getelementptr inbounds %class.HirDeserialiser, ptr %17, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = invoke noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96) %22)
          to label %24 unwind label %37

24:                                               ; preds = %18
  store i64 %23, ptr %9, align 8, !tbaa !16
  %25 = getelementptr inbounds %struct.EncodedLiteral, ptr %0, i32 0, i32 1
  %26 = load i64, ptr %9, align 8, !tbaa !16
  invoke void @_ZNSt6vectorI5RelocSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %26)
          to label %27 unwind label %37

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !16
  br label %28

28:                                               ; preds = %108, %27
  %29 = load i64, ptr %10, align 8, !tbaa !16
  %30 = load i64, ptr %9, align 8, !tbaa !16
  %31 = icmp ult i64 %29, %30
  br i1 %31, label %41, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %113

33:                                               ; preds = %2
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %118

37:                                               ; preds = %24, %18
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  br label %115

41:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %42 = getelementptr inbounds %class.HirDeserialiser, ptr %17, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = invoke noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96) %43)
          to label %45 unwind label %54

45:                                               ; preds = %41
  store i64 %44, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %46 = getelementptr inbounds %class.HirDeserialiser, ptr %17, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = invoke noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96) %47)
          to label %49 unwind label %58

49:                                               ; preds = %45
  store i64 %48, ptr %12, align 8, !tbaa !16
  %50 = getelementptr inbounds %class.HirDeserialiser, ptr %17, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = invoke noundef i32 @_ZN3HIR9serialise6Reader8read_tagEv(ptr noundef nonnull align 8 dereferenceable(96) %51)
          to label %53 unwind label %58

53:                                               ; preds = %49
  switch i32 %52, label %106 [
    i32 0, label %62
    i32 1, label %83
  ]

54:                                               ; preds = %41
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  br label %112

58:                                               ; preds = %49, %45
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  br label %111

62:                                               ; preds = %53
  %63 = getelementptr inbounds %struct.EncodedLiteral, ptr %0, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #5
  %64 = load i64, ptr %11, align 8, !tbaa !16
  %65 = load i64, ptr %12, align 8, !tbaa !16
  invoke void @_ZN15HirDeserialiser16deserialise_pathEv(ptr dead_on_unwind writable sret(%"class.HIR::Path") align 8 %14, ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %66 unwind label %69

66:                                               ; preds = %62
  invoke void @_ZN5Reloc9new_namedEmmN3HIR4PathE(ptr dead_on_unwind writable sret(%struct.Reloc) align 8 %13, i64 noundef %64, i64 noundef %65, ptr noundef %14)
          to label %67 unwind label %73

67:                                               ; preds = %66
  invoke void @_ZNSt6vectorI5RelocSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %63, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %68 unwind label %77

68:                                               ; preds = %67
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  call void @_ZN3HIR4PathD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #5
  br label %107

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %82

73:                                               ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  br label %81

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  br label %81

81:                                               ; preds = %77, %73
  call void @_ZN3HIR4PathD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %14) #5
  br label %82

82:                                               ; preds = %81, %69
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #5
  br label %111

83:                                               ; preds = %53
  %84 = getelementptr inbounds %struct.EncodedLiteral, ptr %0, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #5
  %85 = load i64, ptr %11, align 8, !tbaa !16
  %86 = load i64, ptr %12, align 8, !tbaa !16
  %87 = getelementptr inbounds %class.HirDeserialiser, ptr %17, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  invoke void @_ZN3HIR9serialise6Reader11read_stringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(96) %88)
          to label %89 unwind label %92

89:                                               ; preds = %83
  invoke void @_ZN5Reloc9new_bytesEmmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%struct.Reloc) align 8 %15, i64 noundef %85, i64 noundef %86, ptr noundef %16)
          to label %90 unwind label %96

90:                                               ; preds = %89
  invoke void @_ZNSt6vectorI5RelocSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %91 unwind label %100

91:                                               ; preds = %90
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #5
  br label %107

92:                                               ; preds = %83
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  br label %105

96:                                               ; preds = %89
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  br label %104

100:                                              ; preds = %90
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  br label %104

104:                                              ; preds = %100, %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %105

105:                                              ; preds = %104, %92
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #5
  br label %111

106:                                              ; preds = %53
  call void @abort() #6
  unreachable

107:                                              ; preds = %91, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %108

108:                                              ; preds = %107
  %109 = load i64, ptr %10, align 8, !tbaa !16
  %110 = add i64 %109, 1
  store i64 %110, ptr %10, align 8, !tbaa !16
  br label %28, !llvm.loop !18

111:                                              ; preds = %105, %82, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %112

112:                                              ; preds = %111, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %115

113:                                              ; preds = %32
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %114 = load i1, ptr %5, align 1
  br i1 %114, label %117, label %116

115:                                              ; preds = %112, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %118

116:                                              ; preds = %113
  call void @_ZN14EncodedLiteralD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  br label %117

117:                                              ; preds = %116, %113
  ret void

118:                                              ; preds = %115, %33
  call void @_ZN14EncodedLiteralD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %7, align 8
  %121 = load i32, ptr %8, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Reloc9new_namedEmmN3HIR4PathE(ptr dead_on_unwind noalias writable sret(%struct.Reloc) align 8, i64 noundef, i64 noundef, ptr noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Reloc9new_bytesEmmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%struct.Reloc) align 8, i64 noundef, i64 noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3HIR9serialise6Reader11read_stringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(96)) #1 align 2

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

; Function Attrs: noreturn nounwind
declare void @abort() #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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, !6, i64 32}
!10 = !{!"_ZTS15HirDeserialiser", !11, i64 0, !12, i64 8, !6, i64 32}
!11 = !{!"_ZTS8RcString", !6, i64 0}
!12 = !{!"_ZTSSt6vectorIN3HIR7TypeRefESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.HIR::Path" = type { %"class.HIR::Path::Data" }
%"class.HIR::Path::Data" = type { i32, %"union.HIR::Path::Data::DataUnion" }
%"union.HIR::Path::Data::DataUnion" = type { %"struct.HIR::Path::Data::Data_UfcsKnown" }
%"struct.HIR::Path::Data::Data_UfcsKnown" = type { %"class.HIR::TypeRef", %"class.HIR::GenericPath", %class.RcString, %"struct.HIR::PathParams", %"class.std::unique_ptr.22" }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%class.RcString = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector.19, %class.ThinVector.20, %class.ThinVector.21 }
%class.ThinVector.19 = type { ptr }
%class.ThinVector.20 = type { ptr }
%class.ThinVector.21 = type { ptr }
%"class.std::unique_ptr.22" = type { %"struct.std::__uniq_ptr_data.23" }
%"struct.std::__uniq_ptr_data.23" = type { %"class.std::__uniq_ptr_impl.24" }
%"class.std::__uniq_ptr_impl.24" = type { %"class.std::tuple.25" }
%"class.std::tuple.25" = type { %"struct.std::_Tuple_impl.26" }
%"struct.std::_Tuple_impl.26" = type { %"struct.std::_Head_base.29" }
%"struct.std::_Head_base.29" = type { ptr }
%struct.EncodedLiteral = type { %"class.std::vector.0", %"class.std::vector.162" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.162" = type { %"struct.std::_Vector_base.163" }
%"struct.std::_Vector_base.163" = type { %"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl" }
%"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl" = type { %"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Reloc = type { i64, i64, %"class.std::unique_ptr.168", %"class.std::__cxx11::basic_string" }
%"class.std::unique_ptr.168" = type { %"struct.std::__uniq_ptr_data.169" }
%"struct.std::__uniq_ptr_data.169" = type { %"class.std::__uniq_ptr_impl.170" }
%"class.std::__uniq_ptr_impl.170" = type { %"class.std::tuple.171" }
%"class.std::tuple.171" = type { %"struct.std::_Tuple_impl.172" }
%"struct.std::_Tuple_impl.172" = type { %"struct.std::_Head_base.175" }
%"struct.std::_Head_base.175" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.179 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.179 = type { i64, [8 x i8] }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15HirDeserialiser16deserialise_pathEv(ptr dead_on_unwind noalias writable sret(%"class.HIR::Path") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15HirDeserialiser26deserialise_encodedliteralEv(ptr dead_on_unwind noalias nonnull writable sret(%struct.EncodedLiteral) align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca %struct.Reloc, align 8
  %5 = alloca %"class.HIR::Path", align 8
  %6 = alloca %struct.Reloc, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN14EncodedLiteralC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  invoke void @_ZN15HirDeserialiser15deserialise_vecIhEESt6vectorIT_SaIS2_EEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %3, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %8 unwind label %15

8:                                                ; preds = %2
  %9 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  %10 = getelementptr inbounds i8, ptr %1, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = invoke noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96) %11)
          to label %13 unwind label %17

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  invoke void @_ZNSt6vectorI5RelocSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %12)
          to label %.preheader unwind label %17

.preheader:                                       ; preds = %13
  %.not = icmp eq i64 %12, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

15:                                               ; preds = %2
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %56

17:                                               ; preds = %13, %8
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %56

.lr.ph:                                           ; preds = %.preheader, %54
  %.01127 = phi i64 [ %55, %54 ], [ 0, %.preheader ]
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = invoke noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96) %19)
          to label %21 unwind label %28

21:                                               ; preds = %.lr.ph
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = invoke noundef i64 @_ZN3HIR9serialise6Reader10read_countEv(ptr noundef nonnull align 8 dereferenceable(96) %22)
          to label %24 unwind label %30

24:                                               ; preds = %21
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = invoke noundef i32 @_ZN3HIR9serialise6Reader8read_tagEv(ptr noundef nonnull align 8 dereferenceable(96) %25)
          to label %27 unwind label %30

27:                                               ; preds = %24
  switch i32 %26, label %53 [
    i32 0, label %32
    i32 1, label %44
  ]

28:                                               ; preds = %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %56

30:                                               ; preds = %24, %21
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %56

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #5
  invoke void @_ZN15HirDeserialiser16deserialise_pathEv(ptr dead_on_unwind nonnull writable sret(%"class.HIR::Path") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %33 unwind label %36

33:                                               ; preds = %32
  invoke void @_ZN5Reloc9new_namedEmmN3HIR4PathE(ptr dead_on_unwind nonnull writable sret(%struct.Reloc) align 8 %4, i64 noundef %20, i64 noundef %23, ptr noundef nonnull %5)
          to label %34 unwind label %38

34:                                               ; preds = %33
  invoke void @_ZNSt6vectorI5RelocSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(56) %4)
          to label %35 unwind label %40

35:                                               ; preds = %34
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  call void @_ZN3HIR4PathD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  br label %54

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

38:                                               ; preds = %33
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %34
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn20 = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZN3HIR4PathD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #5
  br label %43

43:                                               ; preds = %42, %36
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %42 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  br label %56

44:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #5
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3HIR9serialise6Reader11read_stringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %45)
          to label %46 unwind label %48

46:                                               ; preds = %44
  call void @_ZN5Reloc9new_bytesEmmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%struct.Reloc) align 8 %6, i64 noundef %20, i64 noundef %23, ptr noundef nonnull %7)
  invoke void @_ZNSt6vectorI5RelocSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %47 unwind label %50

47:                                               ; preds = %46
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #5
  br label %54

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

50:                                               ; preds = %46
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5RelocD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #5
  br label %56

53:                                               ; preds = %27
  call void @abort() #6
  unreachable

54:                                               ; preds = %47, %35
  %55 = add nuw i64 %.01127, 1
  %exitcond.not = icmp eq i64 %55, %12
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %54, %.preheader
  ret void

56:                                               ; preds = %17, %30, %43, %52, %28, %15
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %16, %15 ], [ %18, %17 ], [ %29, %28 ], [ %.pn, %52 ], [ %.pn20.pn, %43 ], [ %31, %30 ]
  call void @_ZN14EncodedLiteralD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Reloc9new_namedEmmN3HIR4PathE(ptr dead_on_unwind noalias writable sret(%struct.Reloc) align 8, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Reloc9new_bytesEmmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%struct.Reloc) align 8, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3HIR9serialise6Reader11read_stringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1 align 2

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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, !8, i64 32}
!6 = !{!"_ZTS15HirDeserialiser", !7, i64 0, !11, i64 8, !8, i64 32}
!7 = !{!"_ZTS8RcString", !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorIN3HIR7TypeRefESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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