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

; 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::PathBinding_Type" = type { i32, %"union.AST::PathBinding_Type::DataUnion" }
%"union.AST::PathBinding_Type::DataUnion" = type { %"struct.AST::PathBinding_Type::Data_Module" }
%"struct.AST::PathBinding_Type::Data_Module" = type { ptr, %"struct.AST::PathBinding_Type::(anonymous struct)::Hir" }
%"struct.AST::PathBinding_Type::(anonymous struct)::Hir" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_Unbound" = type { i8 }
%"struct.AST::PathBinding_Type::Data_Crate" = type { ptr }
%"struct.AST::PathBinding_Type::Data_Trait" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_TraitAlias" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_Struct" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_Enum" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_Union" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_TypeAlias" = type { ptr }
%"struct.AST::PathBinding_Type::Data_EnumVar" = type { ptr, i32, ptr }
%"struct.AST::PathBinding_Type::Data_TypeParameter" = type { i32 }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3AST16PathBinding_Type5cloneEv = external hidden unnamed_addr constant [54 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [49 x i8], align 1
@_ZTIPKc = external constant ptr

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3AST16PathBinding_Type5cloneEv(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.AST::PathBinding_Type::Data_Unbound", align 1
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.AST::PathBinding_Type::Data_Module", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.AST::PathBinding_Type::Data_Crate", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.AST::PathBinding_Type::Data_Trait", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.AST::PathBinding_Type::Data_TraitAlias", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.AST::PathBinding_Type::Data_Struct", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.AST::PathBinding_Type::Data_Enum", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.AST::PathBinding_Type::Data_Union", align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.AST::PathBinding_Type::Data_TypeAlias", align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"struct.AST::PathBinding_Type::Data_EnumVar", align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"struct.AST::PathBinding_Type::Data_TypeParameter", align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8
  %28 = call noundef i32 @_ZNK3AST16PathBinding_Type3tagEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  switch i32 %28, label %99 [
    i32 0, label %29
    i32 1, label %30
    i32 3, label %33
    i32 2, label %37
    i32 7, label %43
    i32 8, label %51
    i32 4, label %59
    i32 5, label %67
    i32 6, label %75
    i32 10, label %83
    i32 9, label %89
    i32 11, label %93
  ]

29:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 52, ptr noundef @__PRETTY_FUNCTION__._ZNK3AST16PathBinding_Type5cloneEv) #5
  unreachable

30:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK3AST16PathBinding_Type10as_UnboundEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %31, ptr %5, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3AST16PathBinding_Type12make_UnboundENS0_12Data_UnboundE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %101

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3AST16PathBinding_Type9as_ModuleEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %34, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %36, i64 24, i1 false), !tbaa.struct !9
  call void @_ZN3AST16PathBinding_Type11make_ModuleENS0_11Data_ModuleE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr noundef byval(%"struct.AST::PathBinding_Type::Data_Module") align 8 %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %101

37:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3AST16PathBinding_Type8as_CrateEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %38, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %40, i64 8, i1 false), !tbaa.struct !10
  %41 = getelementptr inbounds %"struct.AST::PathBinding_Type::Data_Crate", ptr %10, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8
  call void @_ZN3AST16PathBinding_TypeC2ENS0_10Data_CrateE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %42)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %101

43:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type8as_TraitEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %44, ptr %11, align 8, !tbaa !5
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %46, i64 16, i1 false), !tbaa.struct !11
  %47 = getelementptr inbounds { ptr, ptr }, ptr %12, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, ptr }, ptr %12, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8
  call void @_ZN3AST16PathBinding_TypeC2ENS0_10Data_TraitE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %48, ptr %50)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %101

51:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type13as_TraitAliasEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %52, ptr %13, align 8, !tbaa !5
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %54, i64 16, i1 false), !tbaa.struct !11
  %55 = getelementptr inbounds { ptr, ptr }, ptr %14, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8
  %57 = getelementptr inbounds { ptr, ptr }, ptr %14, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8
  call void @_ZN3AST16PathBinding_TypeC2ENS0_15Data_TraitAliasE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %56, ptr %58)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %101

59:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type9as_StructEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %60, ptr %15, align 8, !tbaa !5
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %62, i64 16, i1 false), !tbaa.struct !11
  %63 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8
  call void @_ZN3AST16PathBinding_TypeC2ENS0_11Data_StructE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %64, ptr %66)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %101

67:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type7as_EnumEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %68, ptr %17, align 8, !tbaa !5
  %69 = load ptr, ptr %17, align 8, !tbaa !5
  %70 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %70, i64 16, i1 false), !tbaa.struct !11
  %71 = getelementptr inbounds { ptr, ptr }, ptr %18, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, ptr }, ptr %18, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8
  call void @_ZN3AST16PathBinding_TypeC2ENS0_9Data_EnumE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %72, ptr %74)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %101

75:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type8as_UnionEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %76, ptr %19, align 8, !tbaa !5
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %78, i64 16, i1 false), !tbaa.struct !11
  %79 = getelementptr inbounds { ptr, ptr }, ptr %20, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, ptr }, ptr %20, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8
  call void @_ZN3AST16PathBinding_TypeC2ENS0_10Data_UnionE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %80, ptr %82)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %101

83:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3AST16PathBinding_Type12as_TypeAliasEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %84, ptr %21, align 8, !tbaa !5
  %85 = load ptr, ptr %21, align 8, !tbaa !5
  %86 = load ptr, ptr %21, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %86, i64 8, i1 false), !tbaa.struct !10
  %87 = getelementptr inbounds %"struct.AST::PathBinding_Type::Data_TypeAlias", ptr %22, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8
  call void @_ZN3AST16PathBinding_Type14make_TypeAliasENS0_14Data_TypeAliasE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr %88)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %101

89:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3AST16PathBinding_Type10as_EnumVarEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %90, ptr %23, align 8, !tbaa !5
  %91 = load ptr, ptr %23, align 8, !tbaa !5
  %92 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %92, i64 24, i1 false), !tbaa.struct !12
  call void @_ZN3AST16PathBinding_Type12make_EnumVarENS0_12Data_EnumVarE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr noundef byval(%"struct.AST::PathBinding_Type::Data_EnumVar") align 8 %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %101

93:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3AST16PathBinding_Type16as_TypeParameterEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
  store ptr %94, ptr %25, align 8, !tbaa !5
  %95 = load ptr, ptr %25, align 8, !tbaa !5
  %96 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %96, i64 4, i1 false), !tbaa.struct !15
  %97 = getelementptr inbounds %"struct.AST::PathBinding_Type::Data_TypeParameter", ptr %26, i32 0, i32 0
  %98 = load i32, ptr %97, align 4
  call void @_ZN3AST16PathBinding_Type18make_TypeParameterENS0_18Data_TypeParameterE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, i32 %98)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %101

99:                                               ; preds = %2
  %100 = call ptr @__cxa_allocate_exception(i64 8) #6
  store ptr @.str.14, ptr %100, align 16, !tbaa !5
  call void @__cxa_throw(ptr %100, ptr @_ZTIPKc, ptr null) #7
  unreachable

101:                                              ; preds = %93, %89, %83, %75, %67, %59, %51, %43, %37, %33, %30
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type12make_UnboundENS0_12Data_UnboundE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type11make_ModuleENS0_11Data_ModuleE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, ptr noundef byval(%"struct.AST::PathBinding_Type::Data_Module") align 8) #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type14make_TypeAliasENS0_14Data_TypeAliasE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, ptr) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type12make_EnumVarENS0_12Data_EnumVarE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, ptr noundef byval(%"struct.AST::PathBinding_Type::Data_EnumVar") align 8) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type18make_TypeParameterENS0_18Data_TypeParameterE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, i32) #3 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5}
!10 = !{i64 0, i64 8, !5}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!12 = !{i64 0, i64 8, !5, i64 8, i64 4, !13, i64 16, i64 8, !5}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i64 0, i64 4, !13}


; 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::PathBinding_Type" = type { i32, %"union.AST::PathBinding_Type::DataUnion" }
%"union.AST::PathBinding_Type::DataUnion" = type { %"struct.AST::PathBinding_Type::Data_Module" }
%"struct.AST::PathBinding_Type::Data_Module" = type { ptr, %"struct.AST::PathBinding_Type::(anonymous struct)::Hir" }
%"struct.AST::PathBinding_Type::(anonymous struct)::Hir" = type { ptr, ptr }
%"struct.AST::PathBinding_Type::Data_EnumVar" = type { ptr, i32, ptr }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3AST16PathBinding_Type5cloneEv = external hidden unnamed_addr constant [54 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [49 x i8], align 1
@_ZTIPKc = external constant ptr

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3AST16PathBinding_Type5cloneEv(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 align 2 {
  %3 = tail call noundef i32 @_ZNK3AST16PathBinding_Type3tagEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  switch i32 %3, label %27 [
    i32 0, label %4
    i32 1, label %5
    i32 3, label %7
    i32 2, label %9
    i32 7, label %11
    i32 8, label %13
    i32 4, label %15
    i32 5, label %17
    i32 6, label %19
    i32 10, label %21
    i32 9, label %23
    i32 11, label %25
  ]

4:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 52, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3AST16PathBinding_Type5cloneEv) #3
  unreachable

5:                                                ; preds = %2
  %6 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK3AST16PathBinding_Type10as_UnboundEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  tail call void @_ZN3AST16PathBinding_Type12make_UnboundENS0_12Data_UnboundE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0)
  br label %29

7:                                                ; preds = %2
  %8 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3AST16PathBinding_Type9as_ModuleEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  tail call void @_ZN3AST16PathBinding_Type11make_ModuleENS0_11Data_ModuleE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr noundef nonnull byval(%"struct.AST::PathBinding_Type::Data_Module") align 8 %8)
  br label %29

9:                                                ; preds = %2
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3AST16PathBinding_Type8as_CrateEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.026.0.copyload = load ptr, ptr %10, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_TypeC2ENS0_10Data_CrateE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.026.0.copyload)
  br label %29

11:                                               ; preds = %2
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type8as_TraitEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.022.0.copyload = load ptr, ptr %12, align 8, !tbaa !5
  %.sroa.223.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  %.sroa.223.0.copyload = load ptr, ptr %.sroa.223.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_TypeC2ENS0_10Data_TraitE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.022.0.copyload, ptr %.sroa.223.0.copyload)
  br label %29

13:                                               ; preds = %2
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type13as_TraitAliasEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.018.0.copyload = load ptr, ptr %14, align 8, !tbaa !5
  %.sroa.219.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  %.sroa.219.0.copyload = load ptr, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_TypeC2ENS0_15Data_TraitAliasE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.018.0.copyload, ptr %.sroa.219.0.copyload)
  br label %29

15:                                               ; preds = %2
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type9as_StructEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.014.0.copyload = load ptr, ptr %16, align 8, !tbaa !5
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  %.sroa.215.0.copyload = load ptr, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_TypeC2ENS0_11Data_StructE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.014.0.copyload, ptr %.sroa.215.0.copyload)
  br label %29

17:                                               ; preds = %2
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type7as_EnumEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.010.0.copyload = load ptr, ptr %18, align 8, !tbaa !5
  %.sroa.211.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 8
  %.sroa.211.0.copyload = load ptr, ptr %.sroa.211.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_TypeC2ENS0_9Data_EnumE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.010.0.copyload, ptr %.sroa.211.0.copyload)
  br label %29

19:                                               ; preds = %2
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST16PathBinding_Type8as_UnionEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.07.0.copyload = load ptr, ptr %20, align 8, !tbaa !5
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  %.sroa.2.0.copyload = load ptr, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_TypeC2ENS0_10Data_UnionE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.07.0.copyload, ptr %.sroa.2.0.copyload)
  br label %29

21:                                               ; preds = %2
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3AST16PathBinding_Type12as_TypeAliasEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.04.0.copyload = load ptr, ptr %22, align 8, !tbaa !5
  tail call void @_ZN3AST16PathBinding_Type14make_TypeAliasENS0_14Data_TypeAliasE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr %.sroa.04.0.copyload)
  br label %29

23:                                               ; preds = %2
  %24 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3AST16PathBinding_Type10as_EnumVarEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  tail call void @_ZN3AST16PathBinding_Type12make_EnumVarENS0_12Data_EnumVarE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, ptr noundef nonnull byval(%"struct.AST::PathBinding_Type::Data_EnumVar") align 8 %24)
  br label %29

25:                                               ; preds = %2
  %26 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3AST16PathBinding_Type16as_TypeParameterEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.0.0.copyload = load i32, ptr %26, align 4, !tbaa !9
  tail call void @_ZN3AST16PathBinding_Type18make_TypeParameterENS0_18Data_TypeParameterE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Type") align 8 %0, i32 %.sroa.0.0.copyload)
  br label %29

27:                                               ; preds = %2
  %28 = tail call ptr @__cxa_allocate_exception(i64 8) #4
  store ptr @.str.14, ptr %28, align 16, !tbaa !5
  tail call void @__cxa_throw(ptr nonnull %28, ptr nonnull @_ZTIPKc, ptr null) #5
  unreachable

29:                                               ; preds = %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type12make_UnboundENS0_12Data_UnboundE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type11make_ModuleENS0_11Data_ModuleE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, ptr noundef byval(%"struct.AST::PathBinding_Type::Data_Module") align 8) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type14make_TypeAliasENS0_14Data_TypeAliasE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, ptr) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type12make_EnumVarENS0_12Data_EnumVarE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, ptr noundef byval(%"struct.AST::PathBinding_Type::Data_EnumVar") align 8) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST16PathBinding_Type18make_TypeParameterENS0_18Data_TypeParameterE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Type") align 8, i32) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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


; Effective O3 passes: DSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass