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

; 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_Value" = type { i32, %"union.AST::PathBinding_Value::DataUnion" }
%"union.AST::PathBinding_Value::DataUnion" = type { %"struct.AST::PathBinding_Value::Data_EnumVar" }
%"struct.AST::PathBinding_Value::Data_EnumVar" = type { ptr, i32, ptr }
%"struct.AST::PathBinding_Value::Data_Unbound" = type { i8 }
%"struct.AST::PathBinding_Value::Data_Struct" = type { ptr, ptr }
%"struct.AST::PathBinding_Value::Data_Static" = type { ptr, ptr }
%"struct.AST::PathBinding_Value::Data_Function" = type { ptr }
%"struct.AST::PathBinding_Value::Data_Generic" = type { i32 }
%"struct.AST::PathBinding_Value::Data_Variable" = 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
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZNK3AST17PathBinding_Value5cloneEv = external hidden unnamed_addr constant [56 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [50 x i8], align 1

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

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

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

; 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) #2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3AST17PathBinding_Value5cloneEv(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Value") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.AST::PathBinding_Value::Data_Unbound", align 1
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.AST::PathBinding_Value::Data_Struct", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.AST::PathBinding_Value::Data_Static", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.AST::PathBinding_Value::Data_Function", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.AST::PathBinding_Value::Data_EnumVar", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.AST::PathBinding_Value::Data_Generic", align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.AST::PathBinding_Value::Data_Variable", align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  %20 = call noundef i32 @_ZNK3AST17PathBinding_Value3tagEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  switch i32 %20, label %63 [
    i32 0, label %21
    i32 1, label %22
    i32 2, label %25
    i32 3, label %33
    i32 4, label %41
    i32 5, label %47
    i32 6, label %51
    i32 7, label %57
  ]

21:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 77, ptr noundef @__PRETTY_FUNCTION__._ZNK3AST17PathBinding_Value5cloneEv) #5
  unreachable

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK3AST17PathBinding_Value10as_UnboundEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %23, ptr %5, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3AST17PathBinding_Value12make_UnboundENS0_12Data_UnboundE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %65

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST17PathBinding_Value9as_StructEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %26, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !9
  %29 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8
  %31 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8
  call void @_ZN3AST17PathBinding_ValueC2ENS0_11Data_StructE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %30, ptr %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %65

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST17PathBinding_Value9as_StaticEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %34, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %36, i64 16, i1 false), !tbaa.struct !9
  %37 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8
  %39 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8
  call void @_ZN3AST17PathBinding_ValueC2ENS0_11Data_StaticE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %38, ptr %40)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %65

41:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3AST17PathBinding_Value11as_FunctionEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %42, ptr %11, align 8, !tbaa !5
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %44, i64 8, i1 false), !tbaa.struct !10
  %45 = getelementptr inbounds %"struct.AST::PathBinding_Value::Data_Function", ptr %12, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  call void @_ZN3AST17PathBinding_ValueC2ENS0_13Data_FunctionE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %46)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %65

47:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3AST17PathBinding_Value10as_EnumVarEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %48, ptr %13, align 8, !tbaa !5
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %50, i64 24, i1 false), !tbaa.struct !11
  call void @_ZN3AST17PathBinding_Value12make_EnumVarENS0_12Data_EnumVarE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0, ptr noundef byval(%"struct.AST::PathBinding_Value::Data_EnumVar") align 8 %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %65

51:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3AST17PathBinding_Value10as_GenericEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %52, ptr %15, align 8, !tbaa !5
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %54, i64 4, i1 false), !tbaa.struct !14
  %55 = getelementptr inbounds %"struct.AST::PathBinding_Value::Data_Generic", ptr %16, i32 0, i32 0
  %56 = load i32, ptr %55, align 4
  call void @_ZN3AST17PathBinding_Value12make_GenericENS0_12Data_GenericE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0, i32 %56)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %65

57:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3AST17PathBinding_Value11as_VariableEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  store ptr %58, ptr %17, align 8, !tbaa !5
  %59 = load ptr, ptr %17, align 8, !tbaa !5
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %60, i64 4, i1 false), !tbaa.struct !14
  %61 = getelementptr inbounds %"struct.AST::PathBinding_Value::Data_Variable", ptr %18, i32 0, i32 0
  %62 = load i32, ptr %61, align 4
  call void @_ZN3AST17PathBinding_Value13make_VariableENS0_13Data_VariableE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0, i32 %62)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %65

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

65:                                               ; preds = %57, %51, %47, %41, %33, %25, %22
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST17PathBinding_Value13make_VariableENS0_13Data_VariableE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Value") align 8, i32) #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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}
!10 = !{i64 0, i64 8, !5}
!11 = !{i64 0, i64 8, !5, i64 8, i64 4, !12, i64 16, i64 8, !5}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 4, !12}


; 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_Value" = type { i32, %"union.AST::PathBinding_Value::DataUnion" }
%"union.AST::PathBinding_Value::DataUnion" = type { %"struct.AST::PathBinding_Value::Data_EnumVar" }
%"struct.AST::PathBinding_Value::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
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZNK3AST17PathBinding_Value5cloneEv = external hidden unnamed_addr constant [56 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [50 x i8], align 1

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

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

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

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

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

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

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

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

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

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

7:                                                ; preds = %2
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST17PathBinding_Value9as_StructEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.013.0.copyload = load ptr, ptr %8, align 8, !tbaa !5
  %.sroa.214.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.214.0.copyload = load ptr, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST17PathBinding_ValueC2ENS0_11Data_StructE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.013.0.copyload, ptr %.sroa.214.0.copyload)
  br label %21

9:                                                ; preds = %2
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3AST17PathBinding_Value9as_StaticEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.010.0.copyload = load ptr, ptr %10, align 8, !tbaa !5
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.2.0.copyload = load ptr, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  tail call void @_ZN3AST17PathBinding_ValueC2ENS0_11Data_StaticE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.010.0.copyload, ptr %.sroa.2.0.copyload)
  br label %21

11:                                               ; preds = %2
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3AST17PathBinding_Value11as_FunctionEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.07.0.copyload = load ptr, ptr %12, align 8, !tbaa !5
  tail call void @_ZN3AST17PathBinding_ValueC2ENS0_13Data_FunctionE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr %.sroa.07.0.copyload)
  br label %21

13:                                               ; preds = %2
  %14 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3AST17PathBinding_Value10as_EnumVarEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  tail call void @_ZN3AST17PathBinding_Value12make_EnumVarENS0_12Data_EnumVarE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0, ptr noundef nonnull byval(%"struct.AST::PathBinding_Value::Data_EnumVar") align 8 %14)
  br label %21

15:                                               ; preds = %2
  %16 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3AST17PathBinding_Value10as_GenericEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.02.0.copyload = load i32, ptr %16, align 4, !tbaa !9
  tail call void @_ZN3AST17PathBinding_Value12make_GenericENS0_12Data_GenericE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0, i32 %.sroa.02.0.copyload)
  br label %21

17:                                               ; preds = %2
  %18 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3AST17PathBinding_Value11as_VariableEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.sroa.0.0.copyload = load i32, ptr %18, align 4, !tbaa !9
  tail call void @_ZN3AST17PathBinding_Value13make_VariableENS0_13Data_VariableE(ptr dead_on_unwind writable sret(%"class.AST::PathBinding_Value") align 8 %0, i32 %.sroa.0.0.copyload)
  br label %21

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3AST17PathBinding_Value13make_VariableENS0_13Data_VariableE(ptr dead_on_unwind noalias writable sret(%"class.AST::PathBinding_Value") align 8, i32) local_unnamed_addr #2 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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