; LLVM IR from ral99/knuckleball :: src (instance)

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.IntegerInstance = type <{ %class.Instance, i32, [4 x i8] }>
%class.Instance = type { ptr, %"class.std::enable_shared_from_this", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.30" = type { ptr }
%"class.std::allocator.16" = type { i8 }
%class.VectorInstance = type { %class.Instance, %"class.std::__cxx11::basic_string", %"class.std::vector" }

@_ZTIPKc = external constant ptr
@.str.14 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [41 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21vector_representationB5cxx11RKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #1

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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14VectorInstance25op_sliceFromIndex_toIndexERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.IntegerInstance, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.IntegerInstance, align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %16 = alloca %"class.std::allocator.16", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  %22 = icmp ne i64 %21, 2
  br i1 %22, label %23, label %25

23:                                               ; preds = %3
  %24 = call ptr @__cxa_allocate_exception(i64 8) #3
  store ptr @.str.18, ptr %24, align 16, !tbaa !5
  call void @__cxa_throw(ptr %24, ptr @_ZTIPKc, ptr null) #4
  unreachable

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr %8) #3
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef 0) #3
  call void @_ZN15IntegerInstanceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(92) %8, ptr noundef nonnull align 8 dereferenceable(32) %27)
  %28 = call noundef i32 @_ZNK15IntegerInstance5valueEv(ptr noundef nonnull align 8 dereferenceable(92) %8)
  call void @_ZN15IntegerInstanceD1Ev(ptr noundef nonnull align 8 dereferenceable(92) %8) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #3
  store i32 %28, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr %10) #3
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 1) #3
  call void @_ZN15IntegerInstanceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(92) %10, ptr noundef nonnull align 8 dereferenceable(32) %30)
  %31 = call noundef i32 @_ZNK15IntegerInstance5valueEv(ptr noundef nonnull align 8 dereferenceable(92) %10)
  call void @_ZN15IntegerInstanceD1Ev(ptr noundef nonnull align 8 dereferenceable(92) %10) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %10) #3
  store i32 %31, ptr %9, align 4, !tbaa !9
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %40, label %34

34:                                               ; preds = %25
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = getelementptr inbounds %class.VectorInstance, ptr %19, i32 0, i32 2
  %37 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #3
  %38 = trunc i64 %37 to i32
  %39 = icmp sgt i32 %35, %38
  br i1 %39, label %40, label %42

40:                                               ; preds = %34, %25
  %41 = call ptr @__cxa_allocate_exception(i64 8) #3
  store ptr @.str.14, ptr %41, align 16, !tbaa !5
  call void @__cxa_throw(ptr %41, ptr @_ZTIPKc, ptr null) #4
  unreachable

42:                                               ; preds = %34
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %51, label %45

45:                                               ; preds = %42
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = getelementptr inbounds %class.VectorInstance, ptr %19, i32 0, i32 2
  %48 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #3
  %49 = trunc i64 %48 to i32
  %50 = icmp sgt i32 %46, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %45, %42
  %52 = call ptr @__cxa_allocate_exception(i64 8) #3
  store ptr @.str.14, ptr %52, align 16, !tbaa !5
  call void @__cxa_throw(ptr %52, ptr @_ZTIPKc, ptr null) #4
  unreachable

53:                                               ; preds = %45
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sub nsw i32 %54, %55
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %58, label %60

58:                                               ; preds = %53
  %59 = call ptr @__cxa_allocate_exception(i64 8) #3
  store ptr @.str.14, ptr %59, align 16, !tbaa !5
  call void @__cxa_throw(ptr %59, ptr @_ZTIPKc, ptr null) #4
  unreachable

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %61 = getelementptr inbounds %class.VectorInstance, ptr %19, i32 0, i32 2
  %62 = call ptr @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #3
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %13, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI8InstanceESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %65) #3
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %12, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %68 = getelementptr inbounds %class.VectorInstance, ptr %19, i32 0, i32 2
  %69 = call ptr @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #3
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %15, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI8InstanceESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %72) #3
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %14, i32 0, i32 0
  store ptr %73, ptr %74, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  call void @_ZNSaISt10shared_ptrI8InstanceEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #3
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %12, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %14, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  invoke void @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPS2_S4_EEvEET_SA_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %76, ptr %78, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %79 unwind label %81

79:                                               ; preds = %60
  invoke void @_Z21vector_representationB5cxx11RKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %80 unwind label %85

80:                                               ; preds = %79
  call void @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  call void @_ZNSt15__new_allocatorISt10shared_ptrI8InstanceEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void

81:                                               ; preds = %60
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %17, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %18, align 4
  br label %89

85:                                               ; preds = %79
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %17, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %18, align 4
  call void @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  br label %89

89:                                               ; preds = %85, %81
  call void @_ZNSt15__new_allocatorISt10shared_ptrI8InstanceEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %17, align 8
  %92 = load i32, ptr %18, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

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

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

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

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

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

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

declare void @_ZN15IntegerInstanceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr, ptr)

declare void @_ZN15IntegerInstanceD1Ev(ptr)

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


; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.IntegerInstance = type <{ %class.Instance, i32, [4 x i8] }>
%class.Instance = type { ptr, %"class.std::enable_shared_from_this", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Instance>, std::allocator<std::shared_ptr<Instance>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.30" = type { ptr }
%"class.std::allocator.16" = type { i8 }

@_ZTIPKc = external constant ptr
@.str.14 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [41 x i8], align 1

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21vector_representationB5cxx11RKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK15IntegerInstance5valueEv(ptr noundef nonnull align 8 dereferenceable(92)) 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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14VectorInstance25op_sliceFromIndex_toIndexERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.IntegerInstance, align 8
  %5 = alloca %class.IntegerInstance, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %9 = alloca %"class.std::allocator.16", align 1
  %10 = tail call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %.not = icmp eq i64 %10, 2
  br i1 %.not, label %13, label %11

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

13:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #3
  %14 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  call void @_ZN15IntegerInstanceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(92) %4, ptr noundef nonnull align 8 dereferenceable(32) %14)
  %15 = call noundef i32 @_ZNK15IntegerInstance5valueEv(ptr noundef nonnull align 8 dereferenceable(92) %4)
  call void @_ZN15IntegerInstanceD1Ev(ptr noundef nonnull align 8 dereferenceable(92) %4) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #3
  %16 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #3
  call void @_ZN15IntegerInstanceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(92) %5, ptr noundef nonnull align 8 dereferenceable(32) %16)
  %17 = call noundef i32 @_ZNK15IntegerInstance5valueEv(ptr noundef nonnull align 8 dereferenceable(92) %5)
  call void @_ZN15IntegerInstanceD1Ev(ptr noundef nonnull align 8 dereferenceable(92) %5) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #3
  %18 = icmp slt i32 %15, 0
  br i1 %18, label %24, label %19

19:                                               ; preds = %13
  %20 = getelementptr inbounds i8, ptr %1, i64 120
  %21 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  %22 = trunc i64 %21 to i32
  %23 = icmp sgt i32 %15, %22
  br i1 %23, label %24, label %26

24:                                               ; preds = %19, %13
  %25 = call ptr @__cxa_allocate_exception(i64 8) #3
  store ptr @.str.14, ptr %25, align 16, !tbaa !5
  call void @__cxa_throw(ptr nonnull %25, ptr nonnull @_ZTIPKc, ptr null) #4
  unreachable

26:                                               ; preds = %19
  %27 = icmp slt i32 %17, 0
  br i1 %27, label %32, label %28

28:                                               ; preds = %26
  %29 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  %30 = trunc i64 %29 to i32
  %31 = icmp sgt i32 %17, %30
  br i1 %31, label %32, label %34

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

34:                                               ; preds = %28
  %35 = icmp ult i32 %17, %15
  br i1 %35, label %36, label %38

36:                                               ; preds = %34
  %37 = call ptr @__cxa_allocate_exception(i64 8) #3
  store ptr @.str.14, ptr %37, align 16, !tbaa !5
  call void @__cxa_throw(ptr nonnull %37, ptr nonnull @_ZTIPKc, ptr null) #4
  unreachable

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %39 = call ptr @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  store ptr %39, ptr %7, align 8
  %40 = zext nneg i32 %15 to i64
  %41 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI8InstanceESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %40) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %42 = call ptr @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  store ptr %42, ptr %8, align 8
  %43 = zext nneg i32 %17 to i64
  %44 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI8InstanceESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %43) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #3
  call void @_ZNSaISt10shared_ptrI8InstanceEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #3
  invoke void @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EEC2IN9__gnu_cxx17__normal_iteratorIPS2_S4_EEvEET_SA_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %41, ptr %44, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %45 unwind label %47

45:                                               ; preds = %38
  invoke void @_Z21vector_representationB5cxx11RKSt6vectorISt10shared_ptrI8InstanceESaIS2_EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %46 unwind label %49

46:                                               ; preds = %45
  call void @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @_ZNSt15__new_allocatorISt10shared_ptrI8InstanceEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  ret void

47:                                               ; preds = %38
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %45
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt10shared_ptrI8InstanceESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @_ZNSt15__new_allocatorISt10shared_ptrI8InstanceEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

declare void @_ZN15IntegerInstanceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr, ptr) local_unnamed_addr

declare void @_ZN15IntegerInstanceD1Ev(ptr) local_unnamed_addr

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


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