; LLVM IR from thepowersgang/mrustc :: src/ast/ast.ll (ZNK3AST12GenericParam5cloneEv)

; 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.AST::GenericParam" = type { i32, %"union.AST::GenericParam::DataUnion", i64, i64 }
%"union.AST::GenericParam::DataUnion" = type { %"class.AST::ValueParam" }
%"class.AST::ValueParam" = type { %"class.AST::AttributeList", %struct.Span, %struct.Ident, %class.TypeRef, %"class.AST::Expr" }
%"class.AST::AttributeList" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Span = type { ptr }
%struct.Ident = type { %"class.Ident::Hygiene", %class.RcString }
%"class.Ident::Hygiene" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }
%class.RcString = type { ptr }
%class.TypeRef = type { %struct.Span, %class.TypeData }
%class.TypeData = type { i32, %"union.TypeData::DataUnion" }
%"union.TypeData::DataUnion" = type { %"struct.TypeData::Data_ErasedType", [32 x i8] }
%"struct.TypeData::Data_ErasedType" = type { %"class.std::vector.141", %"class.std::vector.141", %"class.std::vector.146" }
%"class.std::vector.141" = type { %"struct.std::_Vector_base.142" }
%"struct.std::_Vector_base.142" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.146" = type { %"struct.std::_Vector_base.147" }
%"struct.std::_Vector_base.147" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.AST::Expr" = type { %"class.std::shared_ptr.138" }
%"class.std::shared_ptr.138" = type { %"class.std::__shared_ptr.139" }
%"class.std::__shared_ptr.139" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.AST::GenericParam::Data_None" = type { i8 }
%"class.AST::LifetimeParam" = type { %"class.AST::AttributeList", %struct.Span, %struct.Ident }
%"class.AST::TypeParam" = type { %"class.AST::AttributeList", %struct.Span, %class.RcString, %class.TypeRef }

@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZNK3AST12GenericParam5cloneEv = external hidden unnamed_addr constant [46 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3AST12GenericParam5cloneEv(ptr dead_on_unwind noalias writable sret(%"class.AST::GenericParam") align 8 %0, ptr noundef nonnull align 8 dereferenceable(208) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.AST::GenericParam::Data_None", align 1
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca %"class.AST::LifetimeParam", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca %"class.AST::TypeParam", align 8
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca %"class.AST::ValueParam", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 1, ptr %5, align 1, !tbaa !9
  br label %23

23:                                               ; preds = %149, %2
  %24 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %25 = trunc i8 %24 to i1
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 2, ptr %6, align 4
  br label %150

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

28:                                               ; preds = %144, %27
  %29 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %30 = trunc i8 %29 to i1
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  store i32 5, ptr %6, align 4
  br label %145

32:                                               ; preds = %28
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNK3AST12GenericParam3tagEv(ptr noundef nonnull align 8 dereferenceable(208) %33)
  switch i32 %34, label %143 [
    i32 0, label %35
    i32 1, label %36
    i32 2, label %59
    i32 3, label %87
    i32 4, label %115
  ]

35:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.14, i32 noundef 569, ptr noundef @__PRETTY_FUNCTION__._ZNK3AST12GenericParam5cloneEv) #6
  unreachable

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 1, ptr %8, align 1, !tbaa !9
  br label %37

37:                                               ; preds = %55, %36
  %38 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %39 = trunc i8 %38 to i1
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  store i32 9, ptr %6, align 4
  br label %56

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK3AST12GenericParam7as_NoneEv(ptr noundef nonnull align 8 dereferenceable(208) %42)
  store ptr %43, ptr %9, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %51, %41
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %47 = trunc i8 %46 to i1
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 12, ptr %6, align 4
  br label %52

49:                                               ; preds = %44
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN3AST12GenericParamC2ENS0_9Data_NoneE(ptr noundef nonnull align 8 dereferenceable(208) %0)
  store i32 1, ptr %6, align 4
  br label %52

51:                                               ; No predecessors!
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %44, !llvm.loop !13

52:                                               ; preds = %49, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %53 = load i32, ptr %6, align 4
  switch i32 %53, label %56 [
    i32 12, label %54
  ]

54:                                               ; preds = %52
  br label %55

55:                                               ; preds = %54
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %37, !llvm.loop !15

56:                                               ; preds = %52, %40
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  %57 = load i32, ptr %6, align 4
  switch i32 %57, label %145 [
    i32 9, label %58
  ]

58:                                               ; preds = %56
  br label %143

59:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  store i8 1, ptr %11, align 1, !tbaa !9
  br label %60

60:                                               ; preds = %83, %59
  %61 = load i8, ptr %11, align 1, !tbaa !9, !range !11, !noundef !12
  %62 = trunc i8 %61 to i1
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 15, ptr %6, align 4
  br label %84

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3AST12GenericParam11as_LifetimeEv(ptr noundef nonnull align 8 dereferenceable(208) %65)
  store ptr %66, ptr %12, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %79, %64
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load i8, ptr %11, align 1, !tbaa !9, !range !11, !noundef !12
  %70 = trunc i8 %69 to i1
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 18, ptr %6, align 4
  br label %80

72:                                               ; preds = %67
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN3AST13LifetimeParamC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %73)
  invoke void @_ZN3AST12GenericParamC2ENS_13LifetimeParamE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %13)
          to label %74 unwind label %75

74:                                               ; preds = %72
  call void @_ZN3AST13LifetimeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #5
  store i32 1, ptr %6, align 4
  br label %80

75:                                               ; preds = %72
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %14, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %15, align 4
  call void @_ZN3AST13LifetimeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %147

79:                                               ; No predecessors!
  store i8 0, ptr %11, align 1, !tbaa !9
  br label %67, !llvm.loop !16

80:                                               ; preds = %74, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %81 = load i32, ptr %6, align 4
  switch i32 %81, label %84 [
    i32 18, label %82
  ]

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %82
  store i8 0, ptr %11, align 1, !tbaa !9
  br label %60, !llvm.loop !17

84:                                               ; preds = %80, %63
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  %85 = load i32, ptr %6, align 4
  switch i32 %85, label %145 [
    i32 15, label %86
  ]

86:                                               ; preds = %84
  br label %143

87:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  store i8 1, ptr %16, align 1, !tbaa !9
  br label %88

88:                                               ; preds = %111, %87
  %89 = load i8, ptr %16, align 1, !tbaa !9, !range !11, !noundef !12
  %90 = trunc i8 %89 to i1
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 21, ptr %6, align 4
  br label %112

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK3AST12GenericParam7as_TypeEv(ptr noundef nonnull align 8 dereferenceable(208) %93)
  store ptr %94, ptr %17, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %107, %92
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = load i8, ptr %16, align 1, !tbaa !9, !range !11, !noundef !12
  %98 = trunc i8 %97 to i1
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 24, ptr %6, align 4
  br label %108

100:                                              ; preds = %95
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN3AST9TypeParamC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(160) %18, ptr noundef nonnull align 8 dereferenceable(160) %101)
  invoke void @_ZN3AST12GenericParamC2ENS_9TypeParamE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %18)
          to label %102 unwind label %103

102:                                              ; preds = %100
  call void @_ZN3AST9TypeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %18) #5
  store i32 1, ptr %6, align 4
  br label %108

103:                                              ; preds = %100
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %14, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %15, align 4
  call void @_ZN3AST9TypeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %147

107:                                              ; No predecessors!
  store i8 0, ptr %16, align 1, !tbaa !9
  br label %95, !llvm.loop !18

108:                                              ; preds = %102, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %109 = load i32, ptr %6, align 4
  switch i32 %109, label %112 [
    i32 24, label %110
  ]

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110
  store i8 0, ptr %16, align 1, !tbaa !9
  br label %88, !llvm.loop !19

112:                                              ; preds = %108, %91
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %113 = load i32, ptr %6, align 4
  switch i32 %113, label %145 [
    i32 21, label %114
  ]

114:                                              ; preds = %112
  br label %143

115:                                              ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 1, ptr %19, align 1, !tbaa !9
  br label %116

116:                                              ; preds = %139, %115
  %117 = load i8, ptr %19, align 1, !tbaa !9, !range !11, !noundef !12
  %118 = trunc i8 %117 to i1
  br i1 %118, label %120, label %119

119:                                              ; preds = %116
  store i32 27, ptr %6, align 4
  br label %140

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3AST12GenericParam8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(208) %121)
  store ptr %122, ptr %20, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %135, %120
  %124 = load ptr, ptr %20, align 8, !tbaa !5
  %125 = load i8, ptr %19, align 1, !tbaa !9, !range !11, !noundef !12
  %126 = trunc i8 %125 to i1
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 30, ptr %6, align 4
  br label %136

128:                                              ; preds = %123
  %129 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN3AST10ValueParamC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(184) %21, ptr noundef nonnull align 8 dereferenceable(184) %129)
  invoke void @_ZN3AST12GenericParamC2ENS_10ValueParamE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %21)
          to label %130 unwind label %131

130:                                              ; preds = %128
  call void @_ZN3AST10ValueParamD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %21) #5
  store i32 1, ptr %6, align 4
  br label %136

131:                                              ; preds = %128
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %14, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %15, align 4
  call void @_ZN3AST10ValueParamD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  br label %147

135:                                              ; No predecessors!
  store i8 0, ptr %19, align 1, !tbaa !9
  br label %123, !llvm.loop !20

136:                                              ; preds = %130, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %137 = load i32, ptr %6, align 4
  switch i32 %137, label %140 [
    i32 30, label %138
  ]

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138
  store i8 0, ptr %19, align 1, !tbaa !9
  br label %116, !llvm.loop !21

140:                                              ; preds = %136, %119
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  %141 = load i32, ptr %6, align 4
  switch i32 %141, label %145 [
    i32 27, label %142
  ]

142:                                              ; preds = %140
  br label %143

143:                                              ; preds = %142, %114, %86, %58, %32
  br label %144

144:                                              ; preds = %143
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %28, !llvm.loop !22

145:                                              ; preds = %140, %112, %84, %56, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %146 = load i32, ptr %6, align 4
  switch i32 %146, label %150 [
    i32 5, label %148
  ]

147:                                              ; preds = %131, %103, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %155

148:                                              ; preds = %145
  br label %149

149:                                              ; preds = %148
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %23, !llvm.loop !23

150:                                              ; preds = %145, %26
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  %151 = load i32, ptr %6, align 4
  switch i32 %151, label %160 [
    i32 2, label %152
    i32 1, label %154
  ]

152:                                              ; preds = %150
  %153 = call ptr @__cxa_allocate_exception(i64 8) #5
  store ptr @.str.15, ptr %153, align 16, !tbaa !5
  call void @__cxa_throw(ptr %153, ptr @_ZTIPKc, ptr null) #7
  unreachable

154:                                              ; preds = %150
  ret void

155:                                              ; preds = %147
  %156 = load ptr, ptr %14, align 8
  %157 = load i32, ptr %15, align 4
  %158 = insertvalue { ptr, i32 } poison, ptr %156, 0
  %159 = insertvalue { ptr, i32 } %158, i32 %157, 1
  resume { ptr, i32 } %159

160:                                              ; preds = %150
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 }
attributes #6 = { noreturn nounwind }
attributes #7 = { noreturn }

!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 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !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"

%"class.AST::GenericParam" = type { i32, %"union.AST::GenericParam::DataUnion", i64, i64 }
%"union.AST::GenericParam::DataUnion" = type { %"class.AST::ValueParam" }
%"class.AST::ValueParam" = type { %"class.AST::AttributeList", %struct.Span, %struct.Ident, %class.TypeRef, %"class.AST::Expr" }
%"class.AST::AttributeList" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Span = type { ptr }
%struct.Ident = type { %"class.Ident::Hygiene", %class.RcString }
%"class.Ident::Hygiene" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }
%class.RcString = type { ptr }
%class.TypeRef = type { %struct.Span, %class.TypeData }
%class.TypeData = type { i32, %"union.TypeData::DataUnion" }
%"union.TypeData::DataUnion" = type { %"struct.TypeData::Data_ErasedType", [32 x i8] }
%"struct.TypeData::Data_ErasedType" = type { %"class.std::vector.141", %"class.std::vector.141", %"class.std::vector.146" }
%"class.std::vector.141" = type { %"struct.std::_Vector_base.142" }
%"struct.std::_Vector_base.142" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl" = type { %"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Type_TraitPath, std::allocator<Type_TraitPath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.146" = type { %"struct.std::_Vector_base.147" }
%"struct.std::_Vector_base.147" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::LifetimeRef, std::allocator<AST::LifetimeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.AST::Expr" = type { %"class.std::shared_ptr.138" }
%"class.std::shared_ptr.138" = type { %"class.std::__shared_ptr.139" }
%"class.std::__shared_ptr.139" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.AST::LifetimeParam" = type { %"class.AST::AttributeList", %struct.Span, %struct.Ident }
%"class.AST::TypeParam" = type { %"class.AST::AttributeList", %struct.Span, %class.RcString, %class.TypeRef }

@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZNK3AST12GenericParam5cloneEv = external hidden unnamed_addr constant [46 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3AST12GenericParam5cloneEv(ptr dead_on_unwind noalias writable sret(%"class.AST::GenericParam") align 8 %0, ptr noundef nonnull align 8 dereferenceable(208) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
.preheader.preheader:
  %2 = alloca %"class.AST::LifetimeParam", align 8
  %3 = alloca %"class.AST::TypeParam", align 8
  %4 = alloca %"class.AST::ValueParam", align 8
  %5 = tail call noundef i32 @_ZNK3AST12GenericParam3tagEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  switch i32 %5, label %.loopexit [
    i32 0, label %.split59.us
    i32 1, label %.split61.us
    i32 2, label %.split63.us
    i32 3, label %.split65.us
    i32 4, label %.split67.us
  ], !llvm.loop !5

.split59.us:                                      ; preds = %.preheader.preheader
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.14, i32 noundef 569, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3AST12GenericParam5cloneEv) #4
  unreachable

.split61.us:                                      ; preds = %.preheader.preheader
  %6 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK3AST12GenericParam7as_NoneEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  tail call void @_ZN3AST12GenericParamC2ENS0_9Data_NoneE(ptr noundef nonnull align 8 dereferenceable(208) %0)
  br label %21

.split63.us:                                      ; preds = %.preheader.preheader
  %7 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3AST12GenericParam11as_LifetimeEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  call void @_ZN3AST13LifetimeParamC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %7)
  invoke void @_ZN3AST12GenericParamC2ENS_13LifetimeParamE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull %2)
          to label %8 unwind label %9

8:                                                ; preds = %.split63.us
  call void @_ZN3AST13LifetimeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  br label %21

9:                                                ; preds = %.split63.us
  %10 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST13LifetimeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  br label %19

.split65.us:                                      ; preds = %.preheader.preheader
  %11 = tail call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK3AST12GenericParam7as_TypeEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  call void @_ZN3AST9TypeParamC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(160) %3, ptr noundef nonnull align 8 dereferenceable(160) %11)
  invoke void @_ZN3AST12GenericParamC2ENS_9TypeParamE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull %3)
          to label %12 unwind label %13

12:                                               ; preds = %.split65.us
  call void @_ZN3AST9TypeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %3) #5
  br label %21

13:                                               ; preds = %.split65.us
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST9TypeParamD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %3) #5
  br label %19

.split67.us:                                      ; preds = %.preheader.preheader
  %15 = tail call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3AST12GenericParam8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  call void @_ZN3AST10ValueParamC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(184) %4, ptr noundef nonnull align 8 dereferenceable(184) %15)
  invoke void @_ZN3AST12GenericParamC2ENS_10ValueParamE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull %4)
          to label %16 unwind label %17

16:                                               ; preds = %.split67.us
  call void @_ZN3AST10ValueParamD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %4) #5
  br label %21

17:                                               ; preds = %.split67.us
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST10ValueParamD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %4) #5
  br label %19

19:                                               ; preds = %17, %13, %9
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %14, %13 ], [ %10, %9 ]
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %.preheader.preheader
  %20 = tail call ptr @__cxa_allocate_exception(i64 8) #5
  store ptr @.str.15, ptr %20, align 16, !tbaa !7
  tail call void @__cxa_throw(ptr nonnull %20, ptr nonnull @_ZTIPKc, ptr null) #6
  unreachable

21:                                               ; preds = %.split61.us, %8, %12, %16
  ret void
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #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 = { 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 #4 = { noreturn nounwind }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}


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