; LLVM IR from hoodoer/ENNEoS :: enneosEncoder/Cga.ll (ZN3Cga24TestOldSpeciesForKillingEv)

; 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.48" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.Cga = type <{ %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.0", ptr, i32, i32, i32, i32, double, double, i32, [4 x i8], double, %"class.std::vector.5", %"class.std::vector.5", double, i8, i8, [2 x i8], i32, i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<CGenome, std::allocator<CGenome>>::_Vector_impl" }
%"struct.std::_Vector_base<CGenome, std::allocator<CGenome>>::_Vector_impl" = type { %"struct.std::_Vector_base<CGenome, std::allocator<CGenome>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CGenome, std::allocator<CGenome>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<CSpecies, std::allocator<CSpecies>>::_Vector_impl" }
%"struct.std::_Vector_base<CSpecies, std::allocator<CSpecies>>::_Vector_impl" = type { %"struct.std::_Vector_base<CSpecies, std::allocator<CSpecies>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CSpecies, std::allocator<CSpecies>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<SplitDepth, std::allocator<SplitDepth>>::_Vector_impl" }
%"struct.std::_Vector_base<SplitDepth, std::allocator<SplitDepth>>::_Vector_impl" = type { %"struct.std::_Vector_base<SplitDepth, std::allocator<SplitDepth>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SplitDepth, std::allocator<SplitDepth>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Cga24TestOldSpeciesForKillingEv(ptr noundef nonnull align 8 dereferenceable(265) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.48", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %14 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %15 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %16 = trunc i64 %15 to i32
  store i32 %16, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 0, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %17 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %18 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 0) #4
  %19 = call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %18)
  %20 = fadd double %19, 1.000000e+00
  store double %20, ptr %6, align 8, !tbaa !13
  %21 = load i32, ptr %4, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %24

23:                                               ; preds = %1
  store i32 1, ptr %7, align 4
  br label %86

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %62, %24
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %65

30:                                               ; preds = %25
  %31 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33) #4
  %35 = call noundef i32 @_ZNK8CSpecies3AgeEv(ptr noundef nonnull align 8 dereferenceable(168) %34)
  %36 = icmp sgt i32 %35, 60
  br i1 %36, label %37, label %61

37:                                               ; preds = %30
  %38 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40) #4
  %42 = call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %41)
  %43 = load double, ptr %6, align 8, !tbaa !13
  %44 = fcmp olt double %42, %43
  br i1 %44, label %45, label %61

45:                                               ; preds = %37
  %46 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %48) #4
  %50 = call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %49)
  %51 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 15
  %52 = load double, ptr %51, align 8, !tbaa !15
  %53 = fcmp olt double %50, %52
  br i1 %53, label %54, label %61

54:                                               ; preds = %45
  %55 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #4
  %59 = call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %58)
  store double %59, ptr %6, align 8, !tbaa !13
  %60 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %60, ptr %3, align 4, !tbaa !9
  store i8 1, ptr %5, align 1, !tbaa !11
  br label %61

61:                                               ; preds = %54, %45, %37, %30
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %8, align 4, !tbaa !9
  br label %25, !llvm.loop !30

65:                                               ; preds = %29
  %66 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %67 = trunc i8 %66 to i1
  br i1 %67, label %68, label %85

68:                                               ; preds = %65
  %69 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71) #4
  call void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168) %72)
  %73 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %74 = getelementptr inbounds %class.Cga, ptr %13, i32 0, i32 5
  %75 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #4
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %78) #4
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %79, ptr %80, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK8CSpeciesSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.48", ptr %9, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE(ptr noundef nonnull align 8 dereferenceable(24) %73, ptr %82)
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %85

85:                                               ; preds = %68, %65
  store i32 0, ptr %7, align 4
  br label %86

86:                                               ; preds = %85, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  %87 = load i32, ptr %7, align 4
  switch i32 %87, label %89 [
    i32 0, label %88
    i32 1, label %88
  ]

88:                                               ; preds = %86, %86
  ret void

89:                                               ; preds = %86
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !14, i64 192}
!16 = !{!"_ZTS3Cga", !17, i64 0, !17, i64 24, !17, i64 48, !17, i64 72, !17, i64 96, !21, i64 120, !6, i64 144, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !14, i64 168, !14, i64 176, !10, i64 184, !14, i64 192, !25, i64 200, !25, i64 224, !14, i64 248, !12, i64 256, !12, i64 257, !29, i64 260, !12, i64 264}
!17 = !{!"_ZTSSt6vectorI7CGenomeSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI7CGenomeSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorI8CSpeciesSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseI8CSpeciesSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorI10SplitDepthSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseI10SplitDepthSaIS0_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTS13UnderFlowMode", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{i8 0, i8 2}
!33 = !{}


; 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.48" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

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

declare void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Cga24TestOldSpeciesForKillingEv(ptr noundef nonnull align 8 dereferenceable(265) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.48", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 120
  %6 = tail call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %7 = trunc i64 %6 to i32
  %8 = tail call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #4
  %9 = tail call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %8)
  %or.cond = icmp sgt i32 %7, 1
  br i1 %or.cond, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %1
  %10 = fadd double %9, 1.000000e+00
  %11 = getelementptr inbounds i8, ptr %0, i64 192
  %wide.trip.count = and i64 %6, 2147483647
  br label %.outer

.outer:                                           ; preds = %.thread, %.lr.ph
  %indvars.iv.ph = phi i64 [ %indvars.iv.next29, %.thread ], [ 0, %.lr.ph ]
  %.022.ph = phi i64 [ %indvars.iv, %.thread ], [ 0, %.lr.ph ]
  %.01420.ph = phi double [ %27, %.thread ], [ %10, %.lr.ph ]
  %.01619.ph = phi i1 [ true, %.thread ], [ false, %.lr.ph ]
  br label %12

._crit_edge:                                      ; preds = %25
  br i1 %.01619.ph, label %._crit_edge.thread33, label %._crit_edge.thread

12:                                               ; preds = %.outer, %25
  %indvars.iv = phi i64 [ %indvars.iv.next, %25 ], [ %indvars.iv.ph, %.outer ]
  %13 = tail call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  %14 = tail call noundef i32 @_ZNK8CSpecies3AgeEv(ptr noundef nonnull align 8 dereferenceable(168) %13)
  %15 = icmp sgt i32 %14, 60
  br i1 %15, label %16, label %25

16:                                               ; preds = %12
  %17 = tail call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  %18 = tail call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %17)
  %19 = fcmp olt double %18, %.01420.ph
  br i1 %19, label %20, label %25

20:                                               ; preds = %16
  %21 = tail call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  %22 = tail call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %21)
  %23 = load double, ptr %11, align 8, !tbaa !5
  %24 = fcmp olt double %22, %23
  br i1 %24, label %.thread, label %25

25:                                               ; preds = %12, %16, %20
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %12, !llvm.loop !26

.thread:                                          ; preds = %20
  %26 = tail call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  %27 = tail call noundef double @_ZNK8CSpecies11BestFitnessEv(ptr noundef nonnull align 8 dereferenceable(168) %26)
  %indvars.iv.next29 = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not30 = icmp eq i64 %indvars.iv.next29, %wide.trip.count
  br i1 %exitcond.not30, label %._crit_edge.thread33, label %.outer, !llvm.loop !26

._crit_edge.thread33:                             ; preds = %.thread, %._crit_edge
  %.in.in = phi i64 [ %.022.ph, %._crit_edge ], [ %indvars.iv, %.thread ]
  %.in = shl i64 %.in.in, 32
  %28 = ashr exact i64 %.in, 32
  %29 = tail call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %28) #4
  tail call void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168) %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %30 = tail call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  store ptr %30, ptr %4, align 8
  %31 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %28) #4
  store ptr %31, ptr %3, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK8CSpeciesSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %32 = load ptr, ptr %2, align 8
  %33 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %._crit_edge, %._crit_edge.thread33, %1
  ret void
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !19, i64 192}
!6 = !{!"_ZTS3Cga", !7, i64 0, !7, i64 24, !7, i64 48, !7, i64 72, !7, i64 96, !14, i64 120, !11, i64 144, !18, i64 152, !18, i64 156, !18, i64 160, !18, i64 164, !19, i64 168, !19, i64 176, !18, i64 184, !19, i64 192, !20, i64 200, !20, i64 224, !19, i64 248, !24, i64 256, !24, i64 257, !25, i64 260, !24, i64 264}
!7 = !{!"_ZTSSt6vectorI7CGenomeSaIS0_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseI7CGenomeSaIS0_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt6vectorI8CSpeciesSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI8CSpeciesSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"int", !12, i64 0}
!19 = !{!"double", !12, i64 0}
!20 = !{!"_ZTSSt6vectorI10SplitDepthSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI10SplitDepthSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!24 = !{!"bool", !12, i64 0}
!25 = !{!"_ZTS13UnderFlowMode", !12, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass