; LLVM IR from thepowersgang/mrustc :: src/hir/path.ll (ZNK3HIR10SimplePathplERK8RcString)

; 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::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%class.RcString = type { ptr }
%"class.std::allocator.46" = type { i8 }

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

; 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 void @_ZN3HIR10SimplePathC2E10ThinVectorI8RcStringE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3HIR10SimplePathplERK8RcString(ptr dead_on_unwind noalias writable sret(%"struct.HIR::SimplePath") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %class.ThinVector, align 8
  %8 = alloca %"class.std::vector.44", align 8
  %9 = alloca %"class.std::initializer_list", align 8
  %10 = alloca [2 x %class.RcString], align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::allocator.46", align 1
  %15 = alloca i1, align 1
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %class.RcString, align 8
  %21 = alloca %class.RcString, align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  %23 = getelementptr inbounds %"struct.HIR::SimplePath", ptr %22, i32 0, i32 0
  %24 = call noundef zeroext i1 @_ZNK10ThinVectorI8RcStringE5emptyEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  br i1 %24, label %25, label %79

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  store ptr %10, ptr %11, align 8
  invoke void @_ZN8RcStringC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %26 unwind label %46

26:                                               ; preds = %25
  %27 = getelementptr inbounds %class.RcString, ptr %10, i64 1
  store ptr %27, ptr %11, align 8
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN8RcStringC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %29 unwind label %46

29:                                               ; preds = %26
  %30 = getelementptr inbounds %"class.std::initializer_list", ptr %9, i32 0, i32 0
  store ptr %10, ptr %30, align 8, !tbaa !9
  %31 = getelementptr inbounds %"class.std::initializer_list", ptr %9, i32 0, i32 1
  store i64 2, ptr %31, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaI8RcStringEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  %32 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8
  %34 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %35 = load i64, ptr %34, align 8
  invoke void @_ZNSt6vectorI8RcStringSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr %33, i64 %35, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %36 unwind label %57

36:                                               ; preds = %29
  invoke void @_ZN10ThinVectorI8RcStringEC2ERKSt6vectorIS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %37 unwind label %61

37:                                               ; preds = %36
  invoke void @_ZN3HIR10SimplePathC2E10ThinVectorI8RcStringE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %7)
          to label %38 unwind label %65

38:                                               ; preds = %37
  call void @_ZN10ThinVectorI8RcStringED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @_ZNSt6vectorI8RcStringSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @_ZNSt15__new_allocatorI8RcStringED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  %39 = getelementptr inbounds [2 x %class.RcString], ptr %10, i32 0, i32 0
  %40 = getelementptr inbounds %class.RcString, ptr %39, i64 2
  br label %41

41:                                               ; preds = %41, %38
  %42 = phi ptr [ %40, %38 ], [ %43, %41 ]
  %43 = getelementptr inbounds %class.RcString, ptr %42, i64 -1
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %43) #5
  %44 = icmp eq ptr %43, %39
  br i1 %44, label %45, label %41

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  br label %142

46:                                               ; preds = %26, %25
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %12, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %13, align 4
  %50 = load ptr, ptr %11, align 8
  %51 = icmp eq ptr %10, %50
  br i1 %51, label %56, label %52

52:                                               ; preds = %52, %46
  %53 = phi ptr [ %50, %46 ], [ %54, %52 ]
  %54 = getelementptr inbounds %class.RcString, ptr %53, i64 -1
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %54) #5
  %55 = icmp eq ptr %54, %10
  br i1 %55, label %56, label %52

56:                                               ; preds = %52, %46
  br label %78

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

61:                                               ; preds = %36
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %12, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %13, align 4
  br label %69

65:                                               ; preds = %37
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %12, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %13, align 4
  call void @_ZN10ThinVectorI8RcStringED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br label %69

69:                                               ; preds = %65, %61
  call void @_ZNSt6vectorI8RcStringSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %70

70:                                               ; preds = %69, %57
  call void @_ZNSt15__new_allocatorI8RcStringED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  %71 = getelementptr inbounds [2 x %class.RcString], ptr %10, i32 0, i32 0
  %72 = getelementptr inbounds %class.RcString, ptr %71, i64 2
  br label %73

73:                                               ; preds = %73, %70
  %74 = phi ptr [ %72, %70 ], [ %75, %73 ]
  %75 = getelementptr inbounds %class.RcString, ptr %74, i64 -1
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %75) #5
  %76 = icmp eq ptr %75, %71
  br i1 %76, label %77, label %73

77:                                               ; preds = %73
  br label %78

78:                                               ; preds = %77, %56
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  br label %143

79:                                               ; preds = %3
  store i1 false, ptr %15, align 1
  call void @_ZN3HIR10SimplePathC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %80 = getelementptr inbounds %"struct.HIR::SimplePath", ptr %0, i32 0, i32 0
  %81 = getelementptr inbounds %"struct.HIR::SimplePath", ptr %22, i32 0, i32 0
  %82 = invoke noundef i64 @_ZNK10ThinVectorI8RcStringE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %81)
          to label %83 unwind label %97

83:                                               ; preds = %79
  invoke void @_ZN10ThinVectorI8RcStringE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %80, i64 noundef %82)
          to label %84 unwind label %97

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %85 = getelementptr inbounds %"struct.HIR::SimplePath", ptr %22, i32 0, i32 0
  store ptr %85, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = invoke noundef ptr @_ZNK10ThinVectorI8RcStringE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %86)
          to label %88 unwind label %101

88:                                               ; preds = %84
  store ptr %87, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = invoke noundef ptr @_ZNK10ThinVectorI8RcStringE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %91 unwind label %105

91:                                               ; preds = %88
  store ptr %90, ptr %18, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %115, %91
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = icmp ne ptr %93, %94
  br i1 %95, label %109, label %96

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %129

97:                                               ; preds = %129, %83, %79
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %12, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %13, align 4
  br label %141

101:                                              ; preds = %84
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %12, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %13, align 4
  br label %128

105:                                              ; preds = %88
  %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 %127

109:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %110, ptr %19, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.HIR::SimplePath", ptr %0, i32 0, i32 0
  %112 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZN8RcStringC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %113 unwind label %118

113:                                              ; preds = %109
  invoke void @_ZN10ThinVectorI8RcStringE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef %20)
          to label %114 unwind label %122

114:                                              ; preds = %113
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  %117 = getelementptr inbounds %class.RcString, ptr %116, i32 1
  store ptr %117, ptr %17, align 8, !tbaa !5
  br label %92

118:                                              ; preds = %109
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %12, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %13, align 4
  br label %126

122:                                              ; preds = %113
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %12, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %13, align 4
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  br label %126

126:                                              ; preds = %122, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %127

127:                                              ; preds = %126, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %128

128:                                              ; preds = %127, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %141

129:                                              ; preds = %96
  %130 = getelementptr inbounds %"struct.HIR::SimplePath", ptr %0, i32 0, i32 0
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN8RcStringC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %131)
          to label %132 unwind label %97

132:                                              ; preds = %129
  invoke void @_ZN10ThinVectorI8RcStringE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef %21)
          to label %133 unwind label %135

133:                                              ; preds = %132
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  store i1 true, ptr %15, align 1
  %134 = load i1, ptr %15, align 1
  br i1 %134, label %140, label %139

135:                                              ; preds = %132
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %12, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %13, align 4
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  br label %141

139:                                              ; preds = %133
  call void @_ZN3HIR10SimplePathD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %140

140:                                              ; preds = %139, %133
  br label %142

141:                                              ; preds = %135, %128, %97
  call void @_ZN3HIR10SimplePathD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %143

142:                                              ; preds = %140, %45
  ret void

143:                                              ; preds = %141, %78
  %144 = load ptr, ptr %12, align 8
  %145 = load i32, ptr %13, align 4
  %146 = insertvalue { ptr, i32 } poison, ptr %144, 0
  %147 = insertvalue { ptr, i32 } %146, i32 %145, 1
  resume { ptr, i32 } %147
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.RcString = type { ptr }
%"class.std::allocator.46" = type { i8 }

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

; 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 void @_ZN3HIR10SimplePathC2E10ThinVectorI8RcStringE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3HIR10SimplePathplERK8RcString(ptr dead_on_unwind noalias writable sret(%"struct.HIR::SimplePath") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.ThinVector, align 8
  %5 = alloca %"class.std::vector.44", align 8
  %6 = alloca [2 x %class.RcString], align 8
  %7 = alloca %"class.std::allocator.46", align 1
  %8 = alloca %class.RcString, align 8
  %9 = alloca %class.RcString, align 8
  %10 = tail call noundef zeroext i1 @_ZNK10ThinVectorI8RcStringE5emptyEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %10, label %11, label %26

11:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN8RcStringC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  call void @_ZN8RcStringC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaI8RcStringEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorI8RcStringSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr nonnull %6, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %13 unwind label %17

13:                                               ; preds = %11
  invoke void @_ZN10ThinVectorI8RcStringEC2ERKSt6vectorIS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %14 unwind label %19

14:                                               ; preds = %13
  invoke void @_ZN3HIR10SimplePathC2E10ThinVectorI8RcStringE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %4)
          to label %15 unwind label %21

15:                                               ; preds = %14
  call void @_ZN10ThinVectorI8RcStringED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @_ZNSt6vectorI8RcStringSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @_ZNSt15__new_allocatorI8RcStringED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %43

17:                                               ; preds = %11
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %24

19:                                               ; preds = %13
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %23

21:                                               ; preds = %14
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10ThinVectorI8RcStringED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %23

23:                                               ; preds = %21, %19
  %.pn22 = phi { ptr, i32 } [ %22, %21 ], [ %20, %19 ]
  call void @_ZNSt6vectorI8RcStringSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %24

24:                                               ; preds = %23, %17
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %23 ], [ %18, %17 ]
  call void @_ZNSt15__new_allocatorI8RcStringED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %25 = getelementptr inbounds i8, ptr %6, i64 8
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #5
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %44

26:                                               ; preds = %3
  tail call void @_ZN3HIR10SimplePathC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %27 = tail call noundef i64 @_ZNK10ThinVectorI8RcStringE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  invoke void @_ZN10ThinVectorI8RcStringE7reserveEm(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef %27)
          to label %28 unwind label %31

28:                                               ; preds = %26
  %29 = tail call noundef ptr @_ZNK10ThinVectorI8RcStringE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %30 = invoke noundef ptr @_ZNK10ThinVectorI8RcStringE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader unwind label %33

.preheader:                                       ; preds = %28
  %.not26 = icmp eq ptr %29, %30
  br i1 %.not26, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %35, %.preheader
  call void @_ZN8RcStringC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  invoke void @_ZN10ThinVectorI8RcStringE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %9)
          to label %39 unwind label %40

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

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

.lr.ph:                                           ; preds = %.preheader, %35
  %.01727 = phi ptr [ %36, %35 ], [ %29, %.preheader ]
  call void @_ZN8RcStringC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %.01727)
  invoke void @_ZN10ThinVectorI8RcStringE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %8)
          to label %35 unwind label %37

35:                                               ; preds = %.lr.ph
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %36 = getelementptr inbounds i8, ptr %.01727, i64 8
  %.not = icmp eq ptr %36, %30
  br i1 %.not, label %._crit_edge, label %.lr.ph

37:                                               ; preds = %.lr.ph
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %42

39:                                               ; preds = %._crit_edge
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %43

40:                                               ; preds = %._crit_edge
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %42

42:                                               ; preds = %33, %37, %40, %31
  %.pn.pn = phi { ptr, i32 } [ %41, %40 ], [ %32, %31 ], [ %38, %37 ], [ %34, %33 ]
  call void @_ZN3HIR10SimplePathD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %44

43:                                               ; preds = %39, %15
  ret void

44:                                               ; preds = %42, %24
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %24 ], [ %.pn.pn, %42 ]
  resume { ptr, i32 } %.pn22.pn.pn
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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