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

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.CGenome = type <{ i32, [4 x i8], %"class.std::vector.10", %"class.std::vector.15", ptr, i32, [4 x i8], double, double, double, i32, i32, i32, [4 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl" }
%"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl" = type { %"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl" }
%"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl" = type { %"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CSpecies = type { %class.CGenome, %"class.std::vector.40", i32, double, i32, i32, double }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = 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.__gnu_cxx::__normal_iterator.48" = 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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.23 = external hidden unnamed_addr constant [84 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN7CGenomeD1Ev(ptr noundef nonnull align 8 dereferenceable(108)) unnamed_addr #1

; 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(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Cga31SpeciateAndCalculateSpawnLevelsEv(ptr noundef nonnull align 8 dereferenceable(265) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca %class.CGenome, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %class.CSpecies, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.48", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 1, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #9
  %27 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 11
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  %28 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 12
  store double 0.000000e+00, ptr %28, align 8, !tbaa !28
  br label %29

29:                                               ; preds = %142, %1
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !29
  store i8 0, ptr %5, align 1, !tbaa !29
  store i8 0, ptr %6, align 1, !tbaa !29
  %32 = load i32, ptr %3, align 4, !tbaa !9
  %33 = icmp sge i32 %32, 500
  br i1 %33, label %34, label %39

34:                                               ; preds = %29
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.23)
  %36 = load i32, ptr %3, align 4, !tbaa !9
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef %36)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @exit(i32 noundef 1) #10
  unreachable

39:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %40 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %41 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #9
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  br label %43

43:                                               ; preds = %48, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %44 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %45 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #9
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br i1 %47, label %48, label %52

48:                                               ; preds = %43
  %49 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168) %49)
  %50 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #9
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  br label %43, !llvm.loop !30

52:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %137, %52
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %57 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #9
  %58 = icmp ult i64 %55, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  store i32 6, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %141

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %115, %60
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %65 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #9
  %66 = icmp ult i64 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %61
  store i32 9, ptr %11, align 4
  br label %118

68:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %69 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71) #9
  call void @llvm.lifetime.start.p0(i64 112, ptr %14) #9
  %73 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #9
  call void @_ZNK8CSpecies6LeaderEv(ptr dead_on_unwind writable sret(%class.CGenome) align 8 %14, ptr noundef nonnull align 8 dereferenceable(168) %76)
  %77 = invoke noundef double @_ZN7CGenome21GetCompatibilityScoreERKS_(ptr noundef nonnull align 8 dereferenceable(108) %72, ptr noundef nonnull align 8 dereferenceable(108) %14)
          to label %78 unwind label %97

78:                                               ; preds = %68
  call void @_ZN7CGenomeD1Ev(ptr noundef nonnull align 8 dereferenceable(108) %14) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %14) #9
  store double %77, ptr %13, align 8, !tbaa !32
  %79 = load double, ptr %13, align 8, !tbaa !32
  %80 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 18
  %81 = load double, ptr %80, align 8, !tbaa !33
  %82 = fcmp ole double %79, %81
  br i1 %82, label %83, label %111

83:                                               ; preds = %78
  %84 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #9
  %88 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #9
  %92 = call noundef zeroext i1 @_ZN8CSpecies9AddMemberER7CGenome(ptr noundef nonnull align 8 dereferenceable(168) %87, ptr noundef nonnull align 8 dereferenceable(108) %91)
  %93 = zext i1 %92 to i8
  store i8 %93, ptr %4, align 1, !tbaa !29
  %94 = load i8, ptr %4, align 1, !tbaa !29, !range !34, !noundef !35
  %95 = trunc i8 %94 to i1
  br i1 %95, label %96, label %101

96:                                               ; preds = %83
  store i8 1, ptr %5, align 1, !tbaa !29
  br label %101

97:                                               ; preds = %68
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %15, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %16, align 4
  call void @_ZN7CGenomeD1Ev(ptr noundef nonnull align 8 dereferenceable(108) %14) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %140

101:                                              ; preds = %96, %83
  %102 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %104) #9
  %106 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #9
  %110 = call noundef i32 @_ZNK8CSpecies2IDEv(ptr noundef nonnull align 8 dereferenceable(168) %109)
  call void @_ZN7CGenome10SetSpeciesEi(ptr noundef nonnull align 8 dereferenceable(108) %105, i32 noundef %110)
  store i8 1, ptr %6, align 1, !tbaa !29
  store i32 9, ptr %11, align 4
  br label %112

111:                                              ; preds = %78
  store i32 0, ptr %11, align 4
  br label %112

112:                                              ; preds = %111, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  %113 = load i32, ptr %11, align 4
  switch i32 %113, label %118 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %12, align 4, !tbaa !9
  br label %61, !llvm.loop !36

118:                                              ; preds = %112, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %119

119:                                              ; preds = %118
  %120 = load i8, ptr %6, align 1, !tbaa !29, !range !34, !noundef !35
  %121 = trunc i8 %120 to i1
  br i1 %121, label %136, label %122

122:                                              ; preds = %119
  %123 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 168, ptr %17) #9
  %124 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126) #9
  %128 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 9
  %129 = load i32, ptr %128, align 8, !tbaa !37
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %128, align 8, !tbaa !37
  call void @_ZN8CSpeciesC1ER7CGenomei(ptr noundef nonnull align 8 dereferenceable(168) %17, ptr noundef nonnull align 8 dereferenceable(108) %127, i32 noundef %129)
  invoke void @_ZNSt6vectorI8CSpeciesSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 8 dereferenceable(168) %17)
          to label %131 unwind label %132

131:                                              ; preds = %122
  call void @_ZN8CSpeciesD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %17) #9
  call void @llvm.lifetime.end.p0(i64 168, ptr %17) #9
  store i8 1, ptr %5, align 1, !tbaa !29
  br label %136

132:                                              ; preds = %122
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %15, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %16, align 4
  call void @_ZN8CSpeciesD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %17) #9
  call void @llvm.lifetime.end.p0(i64 168, ptr %17) #9
  br label %140

136:                                              ; preds = %131, %119
  store i8 0, ptr %6, align 1, !tbaa !29
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %10, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %10, align 4, !tbaa !9
  br label %53, !llvm.loop !38

140:                                              ; preds = %132, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %237

141:                                              ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %142

142:                                              ; preds = %141
  %143 = load i8, ptr %5, align 1, !tbaa !29, !range !34, !noundef !35
  %144 = trunc i8 %143 to i1
  br i1 %144, label %29, label %145, !llvm.loop !39

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %146 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %147 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %146) #9
  %148 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  br label %149

149:                                              ; preds = %167, %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %150 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %151 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %150) #9
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br i1 %153, label %154, label %168

154:                                              ; preds = %149
  %155 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  %156 = call noundef i32 @_ZNK8CSpecies10NumMembersEv(ptr noundef nonnull align 8 dereferenceable(168) %155)
  %157 = icmp eq i32 %156, 0
  br i1 %157, label %158, label %165

158:                                              ; preds = %154
  %159 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  call void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168) %159)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %160 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK8CSpeciesSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.48", ptr %21, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE(ptr noundef nonnull align 8 dereferenceable(24) %160, ptr %162)
  %164 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %163, ptr %164, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %20, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %167

165:                                              ; preds = %154
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %167

167:                                              ; preds = %165, %158
  br label %149, !llvm.loop !41

168:                                              ; preds = %149
  call void @_ZN3Cga22AdjustSpeciesFitnessesEv(ptr noundef nonnull align 8 dereferenceable(265) %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %185, %168
  %170 = load i32, ptr %22, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %173 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %172) #9
  %174 = icmp ult i64 %171, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %169
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %188

176:                                              ; preds = %169
  %177 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %178 = load i32, ptr %22, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %177, i64 noundef %179) #9
  %181 = call noundef double @_ZNK7CGenome13GetAdjFitnessEv(ptr noundef nonnull align 8 dereferenceable(108) %180)
  %182 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 11
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = fadd double %183, %181
  store double %184, ptr %182, align 8, !tbaa !11
  br label %185

185:                                              ; preds = %176
  %186 = load i32, ptr %22, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %22, align 4, !tbaa !9
  br label %169, !llvm.loop !42

188:                                              ; preds = %175
  %189 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 11
  %190 = load double, ptr %189, align 8, !tbaa !11
  %191 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %192 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %191) #9
  %193 = uitofp i64 %192 to double
  %194 = fdiv double %190, %193
  %195 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 12
  store double %194, ptr %195, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %217, %188
  %197 = load i32, ptr %23, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %200 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %199) #9
  %201 = icmp ult i64 %198, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %196
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %220

203:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %204 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %205 = load i32, ptr %23, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %204, i64 noundef %206) #9
  %208 = call noundef double @_ZNK7CGenome13GetAdjFitnessEv(ptr noundef nonnull align 8 dereferenceable(108) %207)
  %209 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 12
  %210 = load double, ptr %209, align 8, !tbaa !28
  %211 = fdiv double %208, %210
  store double %211, ptr %24, align 8, !tbaa !32
  %212 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 0
  %213 = load i32, ptr %23, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %212, i64 noundef %214) #9
  %216 = load double, ptr %24, align 8, !tbaa !32
  call void @_ZN7CGenome16SetAmountToSpawnEd(ptr noundef nonnull align 8 dereferenceable(108) %215, double noundef %216)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %217

217:                                              ; preds = %203
  %218 = load i32, ptr %23, align 4, !tbaa !9
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %23, align 4, !tbaa !9
  br label %196, !llvm.loop !43

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

221:                                              ; preds = %233, %220
  %222 = load i32, ptr %25, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %225 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %224) #9
  %226 = icmp ult i64 %223, %225
  br i1 %226, label %228, label %227

227:                                              ; preds = %221
  store i32 20, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %236

228:                                              ; preds = %221
  %229 = getelementptr inbounds %class.Cga, ptr %26, i32 0, i32 5
  %230 = load i32, ptr %25, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %229, i64 noundef %231) #9
  call void @_ZN8CSpecies20CalculateSpawnAmountEv(ptr noundef nonnull align 8 dereferenceable(168) %232)
  br label %233

233:                                              ; preds = %228
  %234 = load i32, ptr %25, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %25, align 4, !tbaa !9
  br label %221, !llvm.loop !44

236:                                              ; preds = %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  ret void

237:                                              ; preds = %140
  %238 = load ptr, ptr %15, align 8
  %239 = load i32, ptr %16, align 4
  %240 = insertvalue { ptr, i32 } poison, ptr %238, 0
  %241 = insertvalue { ptr, i32 } %240, i32 %239, 1
  resume { ptr, i32 } %241
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8CSpecies6LeaderEv(ptr dead_on_unwind noalias writable sret(%class.CGenome) align 8, ptr noundef nonnull align 8 dereferenceable(168)) #4 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #7

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Cga22AdjustSpeciesFitnessesEv(ptr noundef nonnull align 8 dereferenceable(265)) #4 align 2

declare noundef double @_ZN7CGenome21GetCompatibilityScoreERKS_(ptr noundef nonnull align 8 dereferenceable(108), ptr noundef nonnull align 8 dereferenceable(108)) #7

declare noundef zeroext i1 @_ZN8CSpecies9AddMemberER7CGenome(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(108)) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7CGenome10SetSpeciesEi(ptr noundef nonnull align 8 dereferenceable(108), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI8CSpeciesSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(168)) #4 align 2

declare void @_ZN8CSpeciesC1ER7CGenomei(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(108), i32 noundef) unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8CSpeciesD2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #6 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) #4 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 #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7CGenome16SetAmountToSpawnEd(ptr noundef nonnull align 8 dereferenceable(108), double noundef) #2 align 2

declare void @_ZN8CSpecies20CalculateSpawnAmountEv(ptr noundef nonnull align 8 dereferenceable(168)) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }
attributes #10 = { noreturn 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, !21, i64 168}
!12 = !{!"_ZTS3Cga", !13, i64 0, !13, i64 24, !13, i64 48, !13, i64 72, !13, i64 96, !17, i64 120, !6, i64 144, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !21, i64 168, !21, i64 176, !10, i64 184, !21, i64 192, !22, i64 200, !22, i64 224, !21, i64 248, !26, i64 256, !26, i64 257, !27, i64 260, !26, i64 264}
!13 = !{!"_ZTSSt6vectorI7CGenomeSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseI7CGenomeSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorI8CSpeciesSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI8CSpeciesSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSSt6vectorI10SplitDepthSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI10SplitDepthSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTS13UnderFlowMode", !7, i64 0}
!28 = !{!12, !21, i64 176}
!29 = !{!26, !26, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!21, !21, i64 0}
!33 = !{!12, !21, i64 248}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !31}
!37 = !{!12, !10, i64 160}
!38 = distinct !{!38, !31}
!39 = distinct !{!39, !31}
!40 = !{i64 0, i64 8, !5}
!41 = distinct !{!41, !31}
!42 = distinct !{!42, !31}
!43 = distinct !{!43, !31}
!44 = distinct !{!44, !31}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.CGenome = type <{ i32, [4 x i8], %"class.std::vector.10", %"class.std::vector.15", ptr, i32, [4 x i8], double, double, double, i32, i32, i32, [4 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl" }
%"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl" = type { %"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SNeuronGene, std::allocator<SNeuronGene>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl" }
%"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl" = type { %"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SLinkGene, std::allocator<SLinkGene>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CSpecies = type { %class.CGenome, %"class.std::vector.40", i32, double, i32, i32, double }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = 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.__gnu_cxx::__normal_iterator.48" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.23 = external hidden unnamed_addr constant [84 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN7CGenomeD1Ev(ptr noundef nonnull align 8 dereferenceable(108)) unnamed_addr #1

; 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(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Cga31SpeciateAndCalculateSpawnLevelsEv(ptr noundef nonnull align 8 dereferenceable(265) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %class.CGenome, align 8
  %5 = alloca %class.CSpecies, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.48", align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 168
  %10 = getelementptr inbounds i8, ptr %0, i64 176
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  %12 = getelementptr inbounds i8, ptr %0, i64 248
  %13 = getelementptr inbounds i8, ptr %0, i64 160
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  br label %14

14:                                               ; preds = %._crit_edge77, %1
  %.033 = phi i32 [ 1, %1 ], [ %15, %._crit_edge77 ]
  %15 = add nuw nsw i32 %.033, 1
  %exitcond = icmp eq i32 %.033, 499
  br i1 %exitcond, label %16, label %20

16:                                               ; preds = %14
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.23)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %17, i32 noundef 500)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @exit(i32 noundef 1) #9
  unreachable

20:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #10
  %21 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  store ptr %21, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  %22 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  store ptr %22, ptr %3, align 8
  %23 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  br i1 %23, label %.lr.ph, label %.preheader62

.preheader62:                                     ; preds = %.lr.ph, %20
  %24 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %.not = icmp eq i64 %24, 0
  br i1 %.not, label %.critedge, label %.preheader61

.lr.ph:                                           ; preds = %20, %.lr.ph
  %25 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  call void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168) %25)
  %26 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  %27 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  store ptr %27, ptr %3, align 8
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  br i1 %28, label %.lr.ph, label %.preheader62, !llvm.loop !5

.preheader61:                                     ; preds = %.preheader62, %53
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %53 ], [ 0, %.preheader62 ]
  %.03876 = phi i1 [ %.5, %53 ], [ false, %.preheader62 ]
  %29 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  %.not91 = icmp eq i64 %29, 0
  br i1 %.not91, label %._crit_edge, label %.lr.ph74

._crit_edge77:                                    ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  br i1 %.5, label %14, label %.loopexit, !llvm.loop !7

30:                                               ; preds = %36
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  %32 = icmp ugt i64 %31, %indvars.iv.next
  br i1 %32, label %.lr.ph74, label %._crit_edge, !llvm.loop !8

.lr.ph74:                                         ; preds = %.preheader61, %30
  %indvars.iv = phi i64 [ %indvars.iv.next, %30 ], [ 0, %.preheader61 ]
  %33 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv102) #10
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %4) #10
  %34 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #10
  call void @_ZNK8CSpecies6LeaderEv(ptr dead_on_unwind nonnull writable sret(%class.CGenome) align 8 %4, ptr noundef nonnull align 8 dereferenceable(168) %34)
  %35 = invoke noundef double @_ZN7CGenome21GetCompatibilityScoreERKS_(ptr noundef nonnull align 8 dereferenceable(108) %33, ptr noundef nonnull align 8 dereferenceable(108) %4)
          to label %36 unwind label %39

36:                                               ; preds = %.lr.ph74
  call void @_ZN7CGenomeD1Ev(ptr noundef nonnull align 8 dereferenceable(108) %4) #10
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #10
  %37 = load double, ptr %12, align 8, !tbaa !9
  %38 = fcmp ugt double %35, %37
  br i1 %38, label %30, label %.thread58

39:                                               ; preds = %.lr.ph74
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7CGenomeD1Ev(ptr noundef nonnull align 8 dereferenceable(108) %4) #10
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #10
  br label %56

.thread58:                                        ; preds = %36
  %41 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #10
  %42 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv102) #10
  %43 = call noundef zeroext i1 @_ZN8CSpecies9AddMemberER7CGenome(ptr noundef nonnull align 8 dereferenceable(168) %41, ptr noundef nonnull align 8 dereferenceable(108) %42)
  %spec.select = select i1 %43, i1 true, i1 %.03876
  %44 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv102) #10
  %45 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #10
  %46 = call noundef i32 @_ZNK8CSpecies2IDEv(ptr noundef nonnull align 8 dereferenceable(168) %45)
  call void @_ZN7CGenome10SetSpeciesEi(ptr noundef nonnull align 8 dereferenceable(108) %44, i32 noundef %46)
  br label %53

._crit_edge:                                      ; preds = %30, %.preheader61
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %5) #10
  %47 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv102) #10
  %48 = load i32, ptr %13, align 8, !tbaa !30
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %13, align 8, !tbaa !30
  call void @_ZN8CSpeciesC1ER7CGenomei(ptr noundef nonnull align 8 dereferenceable(168) %5, ptr noundef nonnull align 8 dereferenceable(108) %47, i32 noundef %48)
  invoke void @_ZNSt6vectorI8CSpeciesSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(168) %5)
          to label %50 unwind label %51

50:                                               ; preds = %._crit_edge
  call void @_ZN8CSpeciesD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %5) #10
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %5) #10
  br label %53

51:                                               ; preds = %._crit_edge
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8CSpeciesD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %5) #10
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %5) #10
  br label %56

53:                                               ; preds = %.thread58, %50
  %.5 = phi i1 [ true, %50 ], [ %spec.select, %.thread58 ]
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %54 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %55 = icmp ugt i64 %54, %indvars.iv.next103
  br i1 %55, label %.preheader61, label %._crit_edge77, !llvm.loop !31

56:                                               ; preds = %51, %39
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn

.critedge:                                        ; preds = %.preheader62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge77, %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %57 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  store ptr %57, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %58 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  store ptr %58, ptr %7, align 8
  %59 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br i1 %59, label %.lr.ph79, label %._crit_edge80

.lr.ph79:                                         ; preds = %.loopexit, %69
  %60 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  %61 = call noundef i32 @_ZNK8CSpecies10NumMembersEv(ptr noundef nonnull align 8 dereferenceable(168) %60)
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %67

63:                                               ; preds = %.lr.ph79
  %64 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @_ZN8CSpecies5PurgeEv(ptr noundef nonnull align 8 dereferenceable(168) %64)
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK8CSpeciesSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  %65 = load ptr, ptr %8, align 8
  %66 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %65)
  store ptr %66, ptr %6, align 8, !tbaa !32
  br label %69

67:                                               ; preds = %.lr.ph79
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8CSpeciesSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  br label %69

69:                                               ; preds = %67, %63
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %70 = call ptr @_ZNSt6vectorI8CSpeciesSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  store ptr %70, ptr %7, align 8
  %71 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8CSpeciesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br i1 %71, label %.lr.ph79, label %._crit_edge80, !llvm.loop !33

._crit_edge80:                                    ; preds = %69, %.loopexit
  call void @_ZN3Cga22AdjustSpeciesFitnessesEv(ptr noundef nonnull align 8 dereferenceable(265) %0)
  %72 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %.not92 = icmp eq i64 %72, 0
  br i1 %.not92, label %._crit_edge84, label %.lr.ph83

._crit_edge84:                                    ; preds = %.lr.ph83, %._crit_edge80
  %73 = load double, ptr %9, align 8, !tbaa !34
  %74 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %75 = uitofp i64 %74 to double
  %76 = fdiv double %73, %75
  store double %76, ptr %10, align 8, !tbaa !35
  %77 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %.not93 = icmp eq i64 %77, 0
  br i1 %.not93, label %.preheader, label %.lr.ph87

.lr.ph83:                                         ; preds = %._crit_edge80, %.lr.ph83
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %.lr.ph83 ], [ 0, %._crit_edge80 ]
  %78 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv104) #10
  %79 = call noundef double @_ZNK7CGenome13GetAdjFitnessEv(ptr noundef nonnull align 8 dereferenceable(108) %78)
  %80 = load double, ptr %9, align 8, !tbaa !34
  %81 = fadd double %79, %80
  store double %81, ptr %9, align 8, !tbaa !34
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %82 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %83 = icmp ugt i64 %82, %indvars.iv.next105
  br i1 %83, label %.lr.ph83, label %._crit_edge84, !llvm.loop !36

.preheader:                                       ; preds = %.lr.ph87, %._crit_edge84
  %84 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  %.not94 = icmp eq i64 %84, 0
  br i1 %.not94, label %._crit_edge90, label %.lr.ph89

.lr.ph87:                                         ; preds = %._crit_edge84, %.lr.ph87
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph87 ], [ 0, %._crit_edge84 ]
  %85 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv107) #10
  %86 = call noundef double @_ZNK7CGenome13GetAdjFitnessEv(ptr noundef nonnull align 8 dereferenceable(108) %85)
  %87 = load double, ptr %10, align 8, !tbaa !35
  %88 = fdiv double %86, %87
  %89 = call noundef nonnull align 8 dereferenceable(108) ptr @_ZNSt6vectorI7CGenomeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv107) #10
  call void @_ZN7CGenome16SetAmountToSpawnEd(ptr noundef nonnull align 8 dereferenceable(108) %89, double noundef %88)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %90 = call noundef i64 @_ZNKSt6vectorI7CGenomeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %91 = icmp ugt i64 %90, %indvars.iv.next108
  br i1 %91, label %.lr.ph87, label %.preheader, !llvm.loop !37

._crit_edge90:                                    ; preds = %.lr.ph89, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  ret void

.lr.ph89:                                         ; preds = %.preheader, %.lr.ph89
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.lr.ph89 ], [ 0, %.preheader ]
  %92 = call noundef nonnull align 8 dereferenceable(168) ptr @_ZNSt6vectorI8CSpeciesSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv110) #10
  call void @_ZN8CSpecies20CalculateSpawnAmountEv(ptr noundef nonnull align 8 dereferenceable(168) %92)
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %93 = call noundef i64 @_ZNKSt6vectorI8CSpeciesSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #10
  %94 = icmp ugt i64 %93, %indvars.iv.next111
  br i1 %94, label %.lr.ph89, label %._crit_edge90, !llvm.loop !38
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8CSpecies6LeaderEv(ptr dead_on_unwind noalias writable sret(%class.CGenome) align 8, ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #4 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Cga22AdjustSpeciesFitnessesEv(ptr noundef nonnull align 8 dereferenceable(265)) local_unnamed_addr #4 align 2

declare noundef double @_ZN7CGenome21GetCompatibilityScoreERKS_(ptr noundef nonnull align 8 dereferenceable(108), ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #7

declare noundef zeroext i1 @_ZN8CSpecies9AddMemberER7CGenome(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7CGenome10SetSpeciesEi(ptr noundef nonnull align 8 dereferenceable(108), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI8CSpeciesSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #4 align 2

declare void @_ZN8CSpeciesC1ER7CGenomei(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(108), i32 noundef) unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8CSpeciesD2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #6 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 #4 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 #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7CGenome16SetAmountToSpawnEd(ptr noundef nonnull align 8 dereferenceable(108), double noundef) local_unnamed_addr #2 align 2

declare void @_ZN8CSpecies20CalculateSpawnAmountEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #7

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = !{!10, !23, i64 248}
!10 = !{!"_ZTS3Cga", !11, i64 0, !11, i64 24, !11, i64 48, !11, i64 72, !11, i64 96, !18, i64 120, !15, i64 144, !22, i64 152, !22, i64 156, !22, i64 160, !22, i64 164, !23, i64 168, !23, i64 176, !22, i64 184, !23, i64 192, !24, i64 200, !24, i64 224, !23, i64 248, !28, i64 256, !28, i64 257, !29, i64 260, !28, i64 264}
!11 = !{!"_ZTSSt6vectorI7CGenomeSaIS0_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseI7CGenomeSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI7CGenomeSaIS0_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !16, i64 0}
!16 = !{!"omnipotent char", !17, i64 0}
!17 = !{!"Simple C++ TBAA"}
!18 = !{!"_ZTSSt6vectorI8CSpeciesSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI8CSpeciesSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI8CSpeciesSaIS0_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!22 = !{!"int", !16, i64 0}
!23 = !{!"double", !16, i64 0}
!24 = !{!"_ZTSSt6vectorI10SplitDepthSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI10SplitDepthSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI10SplitDepthSaIS0_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!28 = !{!"bool", !16, i64 0}
!29 = !{!"_ZTS13UnderFlowMode", !16, i64 0}
!30 = !{!10, !22, i64 160}
!31 = distinct !{!31, !6}
!32 = !{!15, !15, i64 0}
!33 = distinct !{!33, !6}
!34 = !{!10, !23, i64 168}
!35 = !{!10, !23, i64 176}
!36 = distinct !{!36, !6}
!37 = distinct !{!37, !6}
!38 = distinct !{!38, !6}


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