; LLVM IR from thepowersgang/mrustc :: src/hir_conv/constant_evaluation.ll (ZN3MIR4eval8RelocPtraSERKS1_)

; 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.MIR::eval::AllocationPtr" = type { %"class.MIR::eval::RefCountPtr" }
%"class.MIR::eval::RefCountPtr" = type { ptr }
%"class.MIR::eval::ConstantPtr" = type { %"class.MIR::eval::RefCountPtr.0" }
%"class.MIR::eval::RefCountPtr.0" = type { ptr }
%"class.MIR::eval::StaticRefPtr" = type { %"class.MIR::eval::RefCountPtr.25" }
%"class.MIR::eval::RefCountPtr.25" = type { ptr }
%"class.MIR::eval::RelocPtr" = type { i64 }

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3MIR4eval8RelocPtraSERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.MIR::eval::AllocationPtr", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.MIR::eval::AllocationPtr", align 8
  %9 = alloca %"class.MIR::eval::ConstantPtr", align 8
  %10 = alloca %"class.MIR::eval::ConstantPtr", align 8
  %11 = alloca %"class.MIR::eval::StaticRefPtr", align 8
  %12 = alloca %"class.MIR::eval::StaticRefPtr", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %"class.MIR::eval::RelocPtr", ptr %14, i32 0, i32 0
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = and i64 %16, 3
  switch i64 %17, label %70 [
    i64 0, label %18
    i64 1, label %35
    i64 2, label %52
    i64 3, label %69
  ]

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @_ZN3MIR4eval13AllocationPtrC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = invoke noundef ptr @_ZNK3MIR4eval8RelocPtr13as_allocationEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %21 unwind label %26

21:                                               ; preds = %18
  %22 = getelementptr inbounds %"class.MIR::eval::RefCountPtr", ptr %5, i32 0, i32 0
  store ptr %20, ptr %22, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  invoke void @_ZN3MIR4eval13AllocationPtrC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %23 unwind label %30

23:                                               ; preds = %21
  %24 = getelementptr inbounds %"class.MIR::eval::RefCountPtr", ptr %5, i32 0, i32 0
  store ptr null, ptr %24, align 8, !tbaa !12
  %25 = getelementptr inbounds %"class.MIR::eval::RefCountPtr", ptr %8, i32 0, i32 0
  store ptr null, ptr %25, align 8, !tbaa !12
  call void @_ZN3MIR4eval11RefCountPtrINS0_10AllocationEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_10AllocationEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %70

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %6, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %7, align 4
  br label %34

30:                                               ; preds = %21
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %34

34:                                               ; preds = %30, %26
  call void @_ZN3MIR4eval11RefCountPtrINS0_10AllocationEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %75

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @_ZN3MIR4eval11ConstantPtrC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = invoke noundef ptr @_ZNK3MIR4eval8RelocPtr11as_constantEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %38 unwind label %43

38:                                               ; preds = %35
  %39 = getelementptr inbounds %"class.MIR::eval::RefCountPtr.0", ptr %9, i32 0, i32 0
  store ptr %37, ptr %39, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  invoke void @_ZN3MIR4eval11ConstantPtrC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %40 unwind label %47

40:                                               ; preds = %38
  %41 = getelementptr inbounds %"class.MIR::eval::RefCountPtr.0", ptr %9, i32 0, i32 0
  store ptr null, ptr %41, align 8, !tbaa !14
  %42 = getelementptr inbounds %"class.MIR::eval::RefCountPtr.0", ptr %10, i32 0, i32 0
  store ptr null, ptr %42, align 8, !tbaa !14
  call void @_ZN3MIR4eval11RefCountPtrINS0_8ConstantEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_8ConstantEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %70

43:                                               ; preds = %35
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %7, align 4
  br label %51

47:                                               ; preds = %38
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %6, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %51

51:                                               ; preds = %47, %43
  call void @_ZN3MIR4eval11RefCountPtrINS0_8ConstantEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %75

52:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @_ZN3MIR4eval12StaticRefPtrC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZNK3MIR4eval8RelocPtr12as_staticrefEv(ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %55 unwind label %60

55:                                               ; preds = %52
  %56 = getelementptr inbounds %"class.MIR::eval::RefCountPtr.25", ptr %11, i32 0, i32 0
  store ptr %54, ptr %56, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  invoke void @_ZN3MIR4eval12StaticRefPtrC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %57 unwind label %64

57:                                               ; preds = %55
  %58 = getelementptr inbounds %"class.MIR::eval::RefCountPtr.25", ptr %11, i32 0, i32 0
  store ptr null, ptr %58, align 8, !tbaa !16
  %59 = getelementptr inbounds %"class.MIR::eval::RefCountPtr.25", ptr %12, i32 0, i32 0
  store ptr null, ptr %59, align 8, !tbaa !16
  call void @_ZN3MIR4eval11RefCountPtrINS0_9StaticRefEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_9StaticRefEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %70

60:                                               ; preds = %52
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %6, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %7, align 4
  br label %68

64:                                               ; preds = %55
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %6, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %68

68:                                               ; preds = %64, %60
  call void @_ZN3MIR4eval11RefCountPtrINS0_9StaticRefEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %75

69:                                               ; preds = %2
  br label %70

70:                                               ; preds = %69, %57, %40, %23, %2
  call void @_ZN3MIR4eval8RelocPtrD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %"class.MIR::eval::RelocPtr", ptr %71, i32 0, i32 0
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %"class.MIR::eval::RelocPtr", ptr %13, i32 0, i32 0
  store i64 %73, ptr %74, align 8, !tbaa !9
  ret ptr %13

75:                                               ; preds = %68, %51, %34
  %76 = load ptr, ptr %6, align 8
  %77 = load i32, ptr %7, align 4
  %78 = insertvalue { ptr, i32 } poison, ptr %76, 0
  %79 = insertvalue { ptr, i32 } %78, i32 %77, 1
  resume { ptr, i32 } %79
}

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

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

declare void @_ZN3MIR4eval8RelocPtrD1Ev(ptr)

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN3MIR4eval8RelocPtrE", !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSN3MIR4eval11RefCountPtrINS0_10AllocationEEE", !6, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN3MIR4eval11RefCountPtrINS0_8ConstantEEE", !6, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSN3MIR4eval11RefCountPtrINS0_9StaticRefEEE", !6, i64 0}


; 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.MIR::eval::AllocationPtr" = type { %"class.MIR::eval::RefCountPtr" }
%"class.MIR::eval::RefCountPtr" = type { ptr }
%"class.MIR::eval::ConstantPtr" = type { %"class.MIR::eval::RefCountPtr.0" }
%"class.MIR::eval::RefCountPtr.0" = type { ptr }
%"class.MIR::eval::StaticRefPtr" = type { %"class.MIR::eval::RefCountPtr.25" }
%"class.MIR::eval::RefCountPtr.25" = type { ptr }

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3MIR4eval8RelocPtraSERKS1_(ptr noundef nonnull returned align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.MIR::eval::AllocationPtr", align 8
  %4 = alloca %"class.MIR::eval::AllocationPtr", align 8
  %5 = alloca %"class.MIR::eval::ConstantPtr", align 8
  %6 = alloca %"class.MIR::eval::ConstantPtr", align 8
  %7 = alloca %"class.MIR::eval::StaticRefPtr", align 8
  %8 = alloca %"class.MIR::eval::StaticRefPtr", align 8
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = and i64 %9, 3
  switch i64 %10, label %default.unreachable9 [
    i64 0, label %11
    i64 1, label %16
    i64 2, label %21
    i64 3, label %26
  ]

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN3MIR4eval13AllocationPtrC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %12 = call noundef ptr @_ZNK3MIR4eval8RelocPtr13as_allocationEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  store ptr %12, ptr %3, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  invoke void @_ZN3MIR4eval13AllocationPtrC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %13 unwind label %14

13:                                               ; preds = %11
  store ptr null, ptr %3, align 8, !tbaa !10
  store ptr null, ptr %4, align 8, !tbaa !10
  call void @_ZN3MIR4eval11RefCountPtrINS0_10AllocationEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_10AllocationEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %26

14:                                               ; preds = %11
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_10AllocationEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %28

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN3MIR4eval11ConstantPtrC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %17 = call noundef ptr @_ZNK3MIR4eval8RelocPtr11as_constantEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  store ptr %17, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  invoke void @_ZN3MIR4eval11ConstantPtrC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %18 unwind label %19

18:                                               ; preds = %16
  store ptr null, ptr %5, align 8, !tbaa !13
  store ptr null, ptr %6, align 8, !tbaa !13
  call void @_ZN3MIR4eval11RefCountPtrINS0_8ConstantEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_8ConstantEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %26

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_8ConstantEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %28

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN3MIR4eval12StaticRefPtrC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %22 = call noundef ptr @_ZNK3MIR4eval8RelocPtr12as_staticrefEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  store ptr %22, ptr %7, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  invoke void @_ZN3MIR4eval12StaticRefPtrC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %23 unwind label %24

23:                                               ; preds = %21
  store ptr null, ptr %7, align 8, !tbaa !15
  store ptr null, ptr %8, align 8, !tbaa !15
  call void @_ZN3MIR4eval11RefCountPtrINS0_9StaticRefEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_9StaticRefEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %26

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @_ZN3MIR4eval11RefCountPtrINS0_9StaticRefEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %28

default.unreachable9:                             ; preds = %2
  unreachable

26:                                               ; preds = %2, %23, %18, %13
  call void @_ZN3MIR4eval8RelocPtrD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  %27 = load i64, ptr %1, align 8, !tbaa !5
  store i64 %27, ptr %0, align 8, !tbaa !5
  ret ptr %0

28:                                               ; preds = %24, %19, %14
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %20, %19 ], [ %15, %14 ]
  resume { ptr, i32 } %.pn
}

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

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

declare void @_ZN3MIR4eval8RelocPtrD1Ev(ptr) local_unnamed_addr

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN3MIR4eval8RelocPtrE", !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSN3MIR4eval11RefCountPtrINS0_10AllocationEEE", !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN3MIR4eval11RefCountPtrINS0_8ConstantEEE", !12, i64 0}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSN3MIR4eval11RefCountPtrINS0_9StaticRefEEE", !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass