; LLVM IR from thepowersgang/mrustc :: src/mir/mir_builder.ll (ZlsRSoRK8VarState)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.VarState::Data_MovedOut" = type <{ %"class.std::unique_ptr.31", i32, [4 x i8] }>
%"class.std::unique_ptr.31" = type { %"struct.std::__uniq_ptr_data.32" }
%"struct.std::__uniq_ptr_data.32" = type { %"class.std::__uniq_ptr_impl.33" }
%"class.std::__uniq_ptr_impl.33" = type { %"class.std::tuple.34" }
%"class.std::tuple.34" = type { %"struct.std::_Tuple_impl.35" }
%"struct.std::_Tuple_impl.35" = type { %"struct.std::_Head_base.38" }
%"struct.std::_Head_base.38" = type { ptr }
%"struct.VarState::Data_Partial" = type <{ %"class.std::vector.26", i32, [4 x i8] }>
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl" }
%"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl" = type { %"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VarState, std::allocator<VarState>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__._ZlsRSoRK8VarState = external hidden unnamed_addr constant [63 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [3 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK8VarState(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = call noundef i32 @_ZNK8VarState3tagEv(ptr noundef nonnull align 8 dereferenceable(40) %10)
  switch i32 %11, label %85 [
    i32 0, label %12
    i32 1, label %13
    i32 5, label %29
    i32 4, label %35
    i32 3, label %45
    i32 2, label %73
  ]

12:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 2421, ptr noundef @__PRETTY_FUNCTION__._ZlsRSoRK8VarState) #5
  unreachable

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8VarState10as_InvalidEv(ptr noundef nonnull align 8 dereferenceable(40) %14)
  store ptr %15, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load i32, ptr %17, align 4, !tbaa !9
  switch i32 %18, label %28 [
    i32 0, label %19
    i32 1, label %22
    i32 2, label %25
  ]

19:                                               ; preds = %13
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef @.str.82)
  br label %28

22:                                               ; preds = %13
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.83)
  br label %28

25:                                               ; preds = %13
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef @.str.84)
  br label %28

28:                                               ; preds = %25, %22, %19, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %85

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK8VarState8as_ValidEv(ptr noundef nonnull align 8 dereferenceable(40) %30)
  store ptr %31, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @.str.85)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %85

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8VarState11as_OptionalEv(ptr noundef nonnull align 8 dereferenceable(40) %36)
  store ptr %37, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef @.str.86)
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %40, i32 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.22)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %85

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK8VarState11as_MovedOutEv(ptr noundef nonnull align 8 dereferenceable(40) %46)
  store ptr %47, ptr %8, align 8, !tbaa !5
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @.str.87)
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.VarState::Data_MovedOut", ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 8, !tbaa !13
  %54 = icmp eq i32 %53, -1
  br i1 %54, label %55, label %58

55:                                               ; preds = %45
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @.str.88)
  br label %65

58:                                               ; preds = %45
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef @.str.89)
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.VarState::Data_MovedOut", ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !13
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %60, i32 noundef %63)
  br label %65

65:                                               ; preds = %58, %55
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @.str.19)
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.VarState::Data_MovedOut", ptr %68, i32 0, i32 0
  %70 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt10unique_ptrI8VarStateSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %69) #6
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK8VarState(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(40) %70)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @.str.22)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %85

73:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZNK8VarState10as_PartialEv(ptr noundef nonnull align 8 dereferenceable(40) %74)
  store ptr %75, ptr %9, align 8, !tbaa !5
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @.str.90)
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @.str.91)
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.VarState::Data_Partial", ptr %81, i32 0, i32 0
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI8VarStateERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull align 8 dereferenceable(24) %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str.92)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %85

85:                                               ; preds = %73, %65, %35, %29, %28, %2
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  ret ptr %86
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI8VarStateERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #1

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 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 "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 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 = { noreturn nounwind }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"_ZTS11InvalidType", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTSN8VarState13Data_MovedOutE", !15, i64 0, !12, i64 8}
!15 = !{!"_ZTSSt10unique_ptrI8VarStateSt14default_deleteIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_dataI8VarStateSt14default_deleteIS0_ELb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_implI8VarStateSt14default_deleteIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt5tupleIJP8VarStateSt14default_deleteIS0_EEE", !19, i64 0}
!19 = !{!"_ZTSSt11_Tuple_implILm0EJP8VarStateSt14default_deleteIS0_EEE", !20, i64 0}
!20 = !{!"_ZTSSt10_Head_baseILm0EP8VarStateLb0EE", !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"

@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__._ZlsRSoRK8VarState = external hidden unnamed_addr constant [63 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK8VarState(ptr noundef nonnull returned align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #1 {
  %3 = tail call noundef i32 @_ZNK8VarState3tagEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  switch i32 %3, label %common.ret29 [
    i32 0, label %4
    i32 1, label %5
    i32 5, label %14
    i32 4, label %17
    i32 3, label %23
    i32 2, label %40
  ]

4:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 2421, ptr noundef nonnull @__PRETTY_FUNCTION__._ZlsRSoRK8VarState) #4
  unreachable

5:                                                ; preds = %2
  %6 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8VarState10as_InvalidEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %7 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %7, label %common.ret29 [
    i32 0, label %8
    i32 1, label %10
    i32 2, label %12
  ]

8:                                                ; preds = %5
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.82)
  br label %common.ret29

10:                                               ; preds = %5
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.83)
  br label %common.ret29

12:                                               ; preds = %5
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.84)
  br label %common.ret29

14:                                               ; preds = %2
  %15 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK8VarState8as_ValidEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.85)
  br label %common.ret29

17:                                               ; preds = %2
  %18 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8VarState11as_OptionalEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.86)
  %20 = load i32, ptr %18, align 4, !tbaa !9
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %19, i32 noundef %20)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.22)
  br label %common.ret29

23:                                               ; preds = %2
  %24 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK8VarState11as_MovedOutEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.87)
  %26 = getelementptr inbounds i8, ptr %24, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = icmp eq i32 %27, -1
  br i1 %28, label %29, label %31

29:                                               ; preds = %23
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.88)
  br label %35

31:                                               ; preds = %23
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.89)
  %33 = load i32, ptr %26, align 8, !tbaa !11
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %33)
  br label %35

common.ret29:                                     ; preds = %5, %8, %10, %12, %40, %17, %14, %2, %35
  %common.ret29.op = phi ptr [ %0, %35 ], [ %0, %2 ], [ %0, %14 ], [ %0, %17 ], [ %0, %40 ], [ %0, %12 ], [ %0, %10 ], [ %0, %8 ], [ %0, %5 ]
  ret ptr %common.ret29.op

35:                                               ; preds = %31, %29
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.19)
  %37 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt10unique_ptrI8VarStateSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK8VarState(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(40) %37)
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.22)
  br label %common.ret29

40:                                               ; preds = %2
  %41 = tail call noundef nonnull align 8 dereferenceable(28) ptr @_ZNK8VarState10as_PartialEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.90)
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.91)
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI8VarStateERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(24) %41)
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.92)
  br label %common.ret29
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI8VarStateERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"_ZTS11InvalidType", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN8VarState13Data_MovedOutE", !13, i64 0, !10, i64 8}
!13 = !{!"_ZTSSt10unique_ptrI8VarStateSt14default_deleteIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_dataI8VarStateSt14default_deleteIS0_ELb1ELb1EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_implI8VarStateSt14default_deleteIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt5tupleIJP8VarStateSt14default_deleteIS0_EEE", !17, i64 0}
!17 = !{!"_ZTSSt11_Tuple_implILm0EJP8VarStateSt14default_deleteIS0_EEE", !18, i64 0}
!18 = !{!"_ZTSSt10_Head_baseILm0EP8VarStateLb0EE", !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}


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