; LLVM IR from FidoProject/Fido :: src/NeuralNet.ll (ZN3net9NeuralNet12removeNeuronEjj)

; 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.__gnu_cxx::__normal_iterator.27" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.29" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.28" = type { ptr }
%"class.net::NeuralNet" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<net::Layer, std::allocator<net::Layer>>::_Vector_impl" }
%"struct.std::_Vector_base<net::Layer, std::allocator<net::Layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<net::Layer, std::allocator<net::Layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<net::Layer, std::allocator<net::Layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.net::Layer" = type { ptr, %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<net::Neuron, std::allocator<net::Neuron>>::_Vector_impl" }
%"struct.std::_Vector_base<net::Neuron, std::allocator<net::Neuron>>::_Vector_impl" = type { %"struct.std::_Vector_base<net::Neuron, std::allocator<net::Neuron>>::_Vector_impl_data" }
%"struct.std::_Vector_base<net::Neuron, std::allocator<net::Neuron>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.net::Neuron" = type { %"class.std::vector.8" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__._ZN3net9NeuralNet12removeNeuronEjj = external hidden unnamed_addr constant [62 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [51 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3net9NeuralNet12removeNeuronEjj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.27", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %17 = load ptr, ptr %4, align 8
  %18 = load i32, ptr %5, align 4, !tbaa !9
  %19 = call noundef i32 @_ZN3net9NeuralNet20numberOfHiddenLayersEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %20 = icmp ult i32 %18, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  br label %24

22:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 264, ptr noundef @__PRETTY_FUNCTION__._ZN3net9NeuralNet12removeNeuronEjj) #4
  unreachable

23:                                               ; No predecessors!
  br label %24

24:                                               ; preds = %23, %21
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds %"class.net::NeuralNet", ptr %17, i32 0, i32 0
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29) #5
  %31 = getelementptr inbounds %"class.net::Layer", ptr %30, i32 0, i32 1
  %32 = call noundef i64 @_ZNKSt6vectorIN3net6NeuronESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %33 = icmp ult i64 %26, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %24
  br label %37

35:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 265, ptr noundef @__PRETTY_FUNCTION__._ZN3net9NeuralNet12removeNeuronEjj) #4
  unreachable

36:                                               ; No predecessors!
  br label %37

37:                                               ; preds = %36, %34
  %38 = getelementptr inbounds %"class.net::NeuralNet", ptr %17, i32 0, i32 0
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40) #5
  %42 = getelementptr inbounds %"class.net::Layer", ptr %41, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %43 = getelementptr inbounds %"class.net::NeuralNet", ptr %17, i32 0, i32 0
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #5
  %47 = getelementptr inbounds %"class.net::Layer", ptr %46, i32 0, i32 1
  %48 = call ptr @_ZNSt6vectorIN3net6NeuronESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #5
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3net6NeuronESt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %51) #5
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKN3net6NeuronESt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.27", ptr %7, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = call ptr @_ZNSt6vectorIN3net6NeuronESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr %55)
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %93, %37
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds %"class.net::NeuralNet", ptr %17, i32 0, i32 0
  %62 = load i32, ptr %5, align 4, !tbaa !9
  %63 = add i32 %62, 1
  %64 = zext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %64) #5
  %66 = getelementptr inbounds %"class.net::Layer", ptr %65, i32 0, i32 1
  %67 = call noundef i64 @_ZNKSt6vectorIN3net6NeuronESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #5
  %68 = icmp ult i64 %60, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %96

70:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %71 = getelementptr inbounds %"class.net::NeuralNet", ptr %17, i32 0, i32 0
  %72 = load i32, ptr %5, align 4, !tbaa !9
  %73 = add i32 %72, 1
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %74) #5
  %76 = getelementptr inbounds %"class.net::Layer", ptr %75, i32 0, i32 1
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3net6NeuronESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #5
  %80 = getelementptr inbounds %"class.net::Neuron", ptr %79, i32 0, i32 0
  store ptr %80, ptr %12, align 8, !tbaa !5
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #5
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.28", ptr %15, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %86) #5
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.28", ptr %14, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEC2IPdvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %13, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = call ptr @_ZNSt6vectorIdSaIdEE5eraseEN9__gnu_cxx17__normal_iteratorIPKdS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr %90)
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.28", ptr %16, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %93

93:                                               ; preds = %70
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = add i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !9
  br label %58, !llvm.loop !11

96:                                               ; preds = %69
  ret void
}

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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 = !{!"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}
!11 = distinct !{!11, !12}
!12 = !{!"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.__gnu_cxx::__normal_iterator.27" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.29" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.28" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__._ZN3net9NeuralNet12removeNeuronEjj = external hidden unnamed_addr constant [62 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [51 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 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 i64 @_ZNKSt6vectorIN3net6NeuronESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3net9NeuralNet12removeNeuronEjj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 align 2 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.27", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %10 = tail call noundef i32 @_ZN3net9NeuralNet20numberOfHiddenLayersEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %11 = icmp ugt i32 %10, %1
  br i1 %11, label %13, label %12

12:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 264, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3net9NeuralNet12removeNeuronEjj) #4
  unreachable

13:                                               ; preds = %3
  %14 = zext i32 %2 to i64
  %15 = zext i32 %1 to i64
  %16 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %15) #5
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = tail call noundef i64 @_ZNKSt6vectorIN3net6NeuronESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %19 = icmp ugt i64 %18, %14
  br i1 %19, label %21, label %20

20:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 265, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3net9NeuralNet12removeNeuronEjj) #4
  unreachable

21:                                               ; preds = %13
  %22 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %15) #5
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %24 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %15) #5
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = tail call ptr @_ZNSt6vectorIN3net6NeuronESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  store ptr %26, ptr %6, align 8
  %27 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3net6NeuronESt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %14) #5
  store ptr %27, ptr %5, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKN3net6NeuronESt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %28 = load ptr, ptr %4, align 8
  %29 = call ptr @_ZNSt6vectorIN3net6NeuronESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr %28)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %30 = add nuw i32 %1, 1
  %31 = zext i32 %30 to i64
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %31) #5
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = call noundef i64 @_ZNKSt6vectorIN3net6NeuronESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #5
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %21
  ret void

.lr.ph:                                           ; preds = %21, %.lr.ph
  %35 = phi i64 [ %44, %.lr.ph ], [ 0, %21 ]
  %.018 = phi i32 [ %43, %.lr.ph ], [ 0, %21 ]
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %31) #5
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3net6NeuronESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %35) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %39 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  store ptr %39, ptr %9, align 8
  %40 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %14) #5
  store ptr %40, ptr %8, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKdSt6vectorIdSaIdEEEC2IPdvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %41 = load ptr, ptr %7, align 8
  %42 = call ptr @_ZNSt6vectorIdSaIdEE5eraseEN9__gnu_cxx17__normal_iteratorIPKdS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr %41)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %43 = add i32 %.018, 1
  %44 = zext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3net5LayerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %31) #5
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = call noundef i64 @_ZNKSt6vectorIN3net6NeuronESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #5
  %48 = icmp ugt i64 %47, %44
  br i1 %48, label %.lr.ph, label %._crit_edge, !llvm.loop !5
}

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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