; LLVM IR from flashlight/flashlight :: flashlight/fl/tensor/backend/jit/ir (Node)

; 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.std::nullopt_t" = type { i8 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.fl::Node" = type { ptr, %"class.std::vector", %"class.std::vector.4", %"class.std::__cxx11::list", %"class.std::__cxx11::list.12", %"class.fl::Shape", %"class.std::optional" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<fl::Node>, std::allocator<std::shared_ptr<fl::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<fl::Node>, std::allocator<std::shared_ptr<fl::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<fl::Node>, std::allocator<std::shared_ptr<fl::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<fl::Node>, std::allocator<std::shared_ptr<fl::Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::_List_iterator<std::unique_ptr<fl::Use>>, std::allocator<std::_List_iterator<std::unique_ptr<fl::Use>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::_List_iterator<std::unique_ptr<fl::Use>>, std::allocator<std::_List_iterator<std::unique_ptr<fl::Use>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::_List_iterator<std::unique_ptr<fl::Use>>, std::allocator<std::_List_iterator<std::unique_ptr<fl::Use>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::_List_iterator<std::unique_ptr<fl::Use>>, std::allocator<std::_List_iterator<std::unique_ptr<fl::Use>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::unique_ptr<fl::Use>, std::allocator<std::unique_ptr<fl::Use>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::unique_ptr<fl::Use>, std::allocator<std::unique_ptr<fl::Use>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::__cxx11::list.12" = type { %"class.std::__cxx11::_List_base.13" }
%"class.std::__cxx11::_List_base.13" = type { %"struct.std::__cxx11::_List_base<fl::ExternalUse *, std::allocator<fl::ExternalUse *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<fl::ExternalUse *, std::allocator<fl::ExternalUse *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"class.fl::Shape" = type { %"class.std::vector.17" }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<fl::Tensor>::_Storage", i8 }>
%"union.std::_Optional_payload_base<fl::Tensor>::_Storage" = type { %"class.fl::Tensor" }
%"class.fl::Tensor" = type { ptr, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.24" }
%"struct.std::_Head_base.24" = type { ptr }

@_ZTVN2fl4NodeE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl4Node9linkInputEjSt10shared_ptrIS0_E(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef, ptr noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl4NodeC2EOSt6vectorISt10shared_ptrIS0_ESaIS3_EERKNS_5ShapeE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #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 ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::nullopt_t", align 1
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  store ptr getelementptr inbounds inrange(-16, 24) ({ [5 x ptr] }, ptr @_ZTVN2fl4NodeE, i32 0, i32 0, i32 2), ptr %12, align 8, !tbaa !9
  %13 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %14)
  %15 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 2
  call void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %16 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 3
  call void @_ZNSt7__cxx114listISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EESaIS6_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  %17 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 4
  call void @_ZNSt7__cxx114listIPN2fl11ExternalUseESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %18 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN2fl5ShapeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %20 unwind label %37

20:                                               ; preds = %3
  %21 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 6
  call void @_ZNSt8optionalIN2fl6TensorEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %22 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 1
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %24)
          to label %25 unwind label %41

25:                                               ; preds = %20
  %26 = getelementptr inbounds %"class.fl::Node", ptr %12, i32 0, i32 2
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  invoke void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %28)
          to label %29 unwind label %41

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %30

30:                                               ; preds = %52, %29
  %31 = load i32, ptr %10, align 4, !tbaa !11
  %32 = zext i32 %31 to i64
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #5
  %35 = icmp ult i64 %32, %34
  br i1 %35, label %45, label %36

36:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %59

37:                                               ; preds = %3
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  br label %61

41:                                               ; preds = %25, %20
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  br label %60

45:                                               ; preds = %30
  %46 = load i32, ptr %10, align 4, !tbaa !11
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = load i32, ptr %10, align 4, !tbaa !11
  %49 = zext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #5
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %50) #5
  invoke void @_ZN2fl4Node9linkInputEjSt10shared_ptrIS0_E(ptr noundef nonnull align 8 dereferenceable(152) %12, i32 noundef %46, ptr noundef %11)
          to label %51 unwind label %55

51:                                               ; preds = %45
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %10, align 4, !tbaa !11
  %54 = add i32 %53, 1
  store i32 %54, ptr %10, align 4, !tbaa !11
  br label %30, !llvm.loop !13

55:                                               ; preds = %45
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %60

59:                                               ; preds = %36
  ret void

60:                                               ; preds = %55, %41
  call void @_ZNSt14_Optional_baseIN2fl6TensorELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @_ZN2fl5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  br label %61

61:                                               ; preds = %60, %37
  call void @_ZNSt7__cxx1110_List_baseIPN2fl11ExternalUseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @_ZNSt7__cxx1110_List_baseISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EESaIS6_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %7, align 8
  %64 = load i32, ptr %8, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 = { 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 #4 = { inlinehint 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 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@_ZTVN2fl4NodeE = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl4Node9linkInputEjSt10shared_ptrIS0_E(ptr noundef nonnull align 8 dereferenceable(152), i32 noundef, ptr noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl4NodeC2EOSt6vectorISt10shared_ptrIS0_ESaIS3_EERKNS_5ShapeE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::shared_ptr", align 8
  store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN2fl4NodeE, i64 16), ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZNSt7__cxx114listISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EESaIS6_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZNSt7__cxx114listIPN2fl11ExternalUseESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %9 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN2fl5ShapeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %10 unwind label %16

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @_ZNSt8optionalIN2fl6TensorEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %12 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %12)
          to label %13 unwind label %18

13:                                               ; preds = %10
  %14 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  invoke void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %14)
          to label %.preheader unwind label %18

.preheader:                                       ; preds = %13
  %15 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %22, %.preheader
  ret void

16:                                               ; preds = %3
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %30

18:                                               ; preds = %13, %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %29

.lr.ph:                                           ; preds = %.preheader, %22
  %20 = phi i64 [ %24, %22 ], [ 0, %.preheader ]
  %.018 = phi i32 [ %23, %22 ], [ 0, %.preheader ]
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %20) #4
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  invoke void @_ZN2fl4Node9linkInputEjSt10shared_ptrIS0_E(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 noundef %.018, ptr noundef nonnull %4)
          to label %22 unwind label %27

22:                                               ; preds = %.lr.ph
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  %23 = add i32 %.018, 1
  %24 = zext i32 %23 to i64
  %25 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %26 = icmp ugt i64 %25, %24
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !8

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  br label %29

29:                                               ; preds = %27, %18
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %19, %18 ]
  call void @_ZNSt14_Optional_baseIN2fl6TensorELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @_ZN2fl5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %30

30:                                               ; preds = %29, %16
  %.pn.pn = phi { ptr, i32 } [ %.pn, %29 ], [ %17, %16 ]
  call void @_ZNSt7__cxx1110_List_baseIPN2fl11ExternalUseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @_ZNSt7__cxx1110_List_baseISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EESaIS6_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN2fl4NodeEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt14_List_iteratorISt10unique_ptrIN2fl3UseESt14default_deleteIS3_EEESaIS7_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

attributes #0 = { 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 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 = { 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 #3 = { inlinehint 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass