; LLVM IR from hoodoer/ENNEoS :: enneosEncoder/genotype.ll (ZN7CGenomeC2Eiii)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.SNeuronGene = type { i32, i32, i8, double, double, double }
%struct.SLinkGene = type <{ i8, [3 x i8], i32, i32, i32, double, i8, [7 x i8] }>
%class.CGenome = type <{ i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", ptr, i32, [4 x i8], double, double, double, i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7CGenomeC2Eiii(ptr noundef nonnull align 8 dereferenceable(108) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.SNeuronGene, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.SNeuronGene, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.SNeuronGene, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.SLinkGene, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %22 = load ptr, ptr %5, align 8
  %23 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %24, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 2
  call void @_ZNSt6vectorI11SNeuronGeneSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %26 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 3
  call void @_ZNSt6vectorI9SLinkGeneSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  %27 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 4
  store ptr null, ptr %27, align 8, !tbaa !22
  %28 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 5
  store i32 -1, ptr %28, align 8, !tbaa !23
  %29 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 7
  store double 0.000000e+00, ptr %29, align 8, !tbaa !24
  %30 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 8
  store double 0.000000e+00, ptr %30, align 8, !tbaa !25
  %31 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 9
  store double 0.000000e+00, ptr %31, align 8, !tbaa !26
  %32 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 10
  %33 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %33, ptr %32, align 8, !tbaa !27
  %34 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 11
  %35 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %35, ptr %34, align 4, !tbaa !28
  %36 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 12
  store i32 0, ptr %36, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = add nsw i32 %37, 2
  %39 = sitofp i32 %38 to double
  %40 = fdiv double 1.000000e+00, %39
  store double %40, ptr %9, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %56, %4
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %63

46:                                               ; preds = %41
  %47 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = add nsw i32 %49, 2
  %51 = sitofp i32 %50 to double
  %52 = load double, ptr %9, align 8, !tbaa !30
  %53 = fmul double %51, %52
  invoke void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40) %11, i32 noundef 0, i32 noundef %48, double noundef 0.000000e+00, double noundef %53, i1 noundef zeroext false)
          to label %54 unwind label %59

54:                                               ; preds = %46
  invoke void @_ZNSt6vectorI11SNeuronGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %55 unwind label %59

55:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %10, align 4, !tbaa !9
  br label %41, !llvm.loop !31

59:                                               ; preds = %54, %46
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %12, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %156

63:                                               ; preds = %45
  %64 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #4
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = load double, ptr %9, align 8, !tbaa !30
  invoke void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40) %14, i32 noundef 3, i32 noundef %65, double noundef 0.000000e+00, double noundef %66, i1 noundef zeroext false)
          to label %67 unwind label %78

67:                                               ; preds = %63
  invoke void @_ZNSt6vectorI11SNeuronGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %68 unwind label %78

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  %71 = sitofp i32 %70 to double
  %72 = fdiv double 1.000000e+00, %71
  store double %72, ptr %15, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %95, %68
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %82, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %102

78:                                               ; preds = %67, %63
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %12, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  br label %156

82:                                               ; preds = %73
  %83 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #4
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = load i32, ptr %7, align 4, !tbaa !9
  %86 = add nsw i32 %84, %85
  %87 = add nsw i32 %86, 1
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  %90 = sitofp i32 %89 to double
  %91 = load double, ptr %15, align 8, !tbaa !30
  %92 = fmul double %90, %91
  invoke void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40) %17, i32 noundef 2, i32 noundef %87, double noundef 1.000000e+00, double noundef %92, i1 noundef zeroext false)
          to label %93 unwind label %98

93:                                               ; preds = %82
  invoke void @_ZNSt6vectorI11SNeuronGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %83, ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %94 unwind label %98

94:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %16, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %16, align 4, !tbaa !9
  br label %73, !llvm.loop !33

98:                                               ; preds = %93, %82
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %12, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %155

102:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %151, %102
  %104 = load i32, ptr %18, align 4, !tbaa !9
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  %107 = icmp slt i32 %104, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %103
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %154

109:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %143, %109
  %111 = load i32, ptr %20, align 4, !tbaa !9
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %150

115:                                              ; preds = %110
  %116 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  %117 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 2
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %119) #4
  %121 = getelementptr inbounds %struct.SNeuronGene, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !34
  %123 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 2
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = load i32, ptr %20, align 4, !tbaa !9
  %126 = add nsw i32 %124, %125
  %127 = add nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %128) #4
  %130 = getelementptr inbounds %struct.SNeuronGene, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 8, !tbaa !34
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = load i32, ptr %8, align 4, !tbaa !9
  %134 = add nsw i32 %132, %133
  %135 = add nsw i32 %134, 1
  %136 = invoke noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %22)
          to label %137 unwind label %146

137:                                              ; preds = %115
  %138 = add nsw i32 %135, %136
  %139 = invoke noundef double @_Z13RandomClampedv()
          to label %140 unwind label %146

140:                                              ; preds = %137
  invoke void @_ZN9SLinkGeneC2Eiibidb(ptr noundef nonnull align 8 dereferenceable(25) %21, i32 noundef %122, i32 noundef %131, i1 noundef zeroext true, i32 noundef %138, double noundef %139, i1 noundef zeroext false)
          to label %141 unwind label %146

141:                                              ; preds = %140
  invoke void @_ZNSt6vectorI9SLinkGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %116, ptr noundef nonnull align 8 dereferenceable(25) %21)
          to label %142 unwind label %146

142:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %20, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %20, align 4, !tbaa !9
  br label %110, !llvm.loop !38

146:                                              ; preds = %141, %140, %137, %115
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %12, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %155

150:                                              ; preds = %114
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %18, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %18, align 4, !tbaa !9
  br label %103, !llvm.loop !39

154:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void

155:                                              ; preds = %146, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %156

156:                                              ; preds = %155, %78, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @_ZNSt6vectorI9SLinkGeneSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  call void @_ZNSt6vectorI11SNeuronGeneSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  br label %157

157:                                              ; preds = %156
  %158 = load ptr, ptr %12, align 8
  %159 = load i32, ptr %13, align 4
  %160 = insertvalue { ptr, i32 } poison, ptr %158, 0
  %161 = insertvalue { ptr, i32 } %160, i32 %159, 1
  resume { ptr, i32 } %161
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef, double noundef, double noundef, i1 noundef zeroext) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z13RandomClampedv() #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9SLinkGeneC2Eiibidb(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef, double noundef, i1 noundef zeroext) unnamed_addr #0 align 2

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

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !10, i64 0}
!12 = !{!"_ZTS7CGenome", !10, i64 0, !13, i64 8, !17, i64 32, !6, i64 56, !10, i64 64, !21, i64 72, !21, i64 80, !21, i64 88, !10, i64 96, !10, i64 100, !10, i64 104}
!13 = !{!"_ZTSSt6vectorI11SNeuronGeneSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseI11SNeuronGeneSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI11SNeuronGeneSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI11SNeuronGeneSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorI9SLinkGeneSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI9SLinkGeneSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI9SLinkGeneSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI9SLinkGeneSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!12, !6, i64 56}
!23 = !{!12, !10, i64 64}
!24 = !{!12, !21, i64 72}
!25 = !{!12, !21, i64 80}
!26 = !{!12, !21, i64 88}
!27 = !{!12, !10, i64 96}
!28 = !{!12, !10, i64 100}
!29 = !{!12, !10, i64 104}
!30 = !{!21, !21, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!35, !10, i64 0}
!35 = !{!"_ZTS11SNeuronGene", !10, i64 0, !36, i64 4, !37, i64 8, !21, i64 16, !21, i64 24, !21, i64 32}
!36 = !{!"_ZTS11neuron_type", !7, i64 0}
!37 = !{!"bool", !7, i64 0}
!38 = distinct !{!38, !32}
!39 = distinct !{!39, !32}


; 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"

%struct.SNeuronGene = type { i32, i32, i8, double, double, double }
%struct.SLinkGene = type <{ i8, [3 x i8], i32, i32, i32, double, i8, [7 x i8] }>

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7CGenomeC2Eiii(ptr noundef nonnull align 8 dereferenceable(108) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.SNeuronGene, align 8
  %6 = alloca %struct.SNeuronGene, align 8
  %7 = alloca %struct.SNeuronGene, align 8
  %8 = alloca %struct.SLinkGene, align 8
  store i32 %1, ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt6vectorI11SNeuronGeneSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZNSt6vectorI9SLinkGeneSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr null, ptr %11, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 -1, ptr %12, align 8, !tbaa !21
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %13, i8 0, i64 24, i1 false)
  store i32 %2, ptr %14, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 100
  store i32 %3, ptr %15, align 4, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 0, ptr %16, align 8, !tbaa !24
  %17 = add nsw i32 %2, 2
  %18 = sitofp i32 %17 to double
  %19 = fdiv double 1.000000e+00, %18
  %20 = icmp sgt i32 %2, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %24, %4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #5
  call void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 3, i32 noundef %2, double noundef 0.000000e+00, double noundef %19, i1 noundef zeroext false)
  invoke void @_ZNSt6vectorI11SNeuronGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %28 unwind label %50

.lr.ph:                                           ; preds = %4, %24
  %.03545 = phi i32 [ %25, %24 ], [ 0, %4 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  %21 = add nuw nsw i32 %.03545, 2
  %22 = uitofp nneg i32 %21 to double
  %23 = fmul double %19, %22
  call void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef 0, i32 noundef %.03545, double noundef 0.000000e+00, double noundef %23, i1 noundef zeroext false)
  invoke void @_ZNSt6vectorI11SNeuronGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %24 unwind label %26

24:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  %25 = add nuw nsw i32 %.03545, 1
  %exitcond.not = icmp eq i32 %25, %2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !25

26:                                               ; preds = %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br label %60

28:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  %29 = add nsw i32 %3, 1
  %30 = sitofp i32 %29 to double
  %31 = fdiv double 1.000000e+00, %30
  %32 = icmp sgt i32 %3, 0
  br i1 %32, label %.lr.ph48, label %._crit_edge54

.lr.ph48:                                         ; preds = %28
  %33 = add i32 %2, 1
  br label %52

.preheader44:                                     ; preds = %57
  %.not52 = icmp slt i32 %2, 0
  br i1 %.not52, label %._crit_edge54, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader44
  %34 = add nuw i32 %2, 1
  %35 = add i32 %34, %3
  br i1 %32, label %.preheader.us.preheader, label %._crit_edge54

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count62 = zext i32 %34 to i64
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge51.us
  %indvars.iv59 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next60, %._crit_edge51.us ]
  br label %36

36:                                               ; preds = %.preheader.us, %48
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %48 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  %37 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv59) #5
  %38 = load i32, ptr %37, align 8, !tbaa !27
  %39 = trunc nuw nsw i64 %indvars.iv to i32
  %40 = add i32 %34, %39
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %41) #5
  %43 = load i32, ptr %42, align 8, !tbaa !27
  %44 = call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %0)
  %45 = invoke noundef double @_Z13RandomClampedv()
          to label %46 unwind label %.split.us

46:                                               ; preds = %36
  %47 = add nsw i32 %35, %44
  call void @_ZN9SLinkGeneC2Eiibidb(ptr noundef nonnull align 8 dereferenceable(25) %8, i32 noundef %38, i32 noundef %43, i1 noundef zeroext true, i32 noundef %47, double noundef %45, i1 noundef zeroext false)
  invoke void @_ZNSt6vectorI9SLinkGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %48 unwind label %.split.us

48:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond58.not, label %._crit_edge51.us, label %36, !llvm.loop !31

._crit_edge51.us:                                 ; preds = %48
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count62
  br i1 %exitcond63.not, label %._crit_edge54, label %.preheader.us, !llvm.loop !32

.split.us:                                        ; preds = %46, %36
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %60

50:                                               ; preds = %._crit_edge
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  br label %60

52:                                               ; preds = %.lr.ph48, %57
  %.03446 = phi i32 [ 0, %.lr.ph48 ], [ %54, %57 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  %53 = add i32 %33, %.03446
  %54 = add nuw nsw i32 %.03446, 1
  %55 = uitofp nneg i32 %54 to double
  %56 = fmul double %31, %55
  call void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef 2, i32 noundef %53, double noundef 1.000000e+00, double noundef %56, i1 noundef zeroext false)
  invoke void @_ZNSt6vectorI11SNeuronGeneSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %57 unwind label %58

57:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  %exitcond56.not = icmp eq i32 %54, %3
  br i1 %exitcond56.not, label %.preheader44, label %52, !llvm.loop !33

58:                                               ; preds = %52
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  br label %60

._crit_edge54:                                    ; preds = %._crit_edge51.us, %28, %.preheader.lr.ph, %.preheader44
  ret void

60:                                               ; preds = %58, %.split.us, %50, %26
  %.pn42 = phi { ptr, i32 } [ %27, %26 ], [ %51, %50 ], [ %59, %58 ], [ %49, %.split.us ]
  call void @_ZNSt6vectorI9SLinkGeneSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @_ZNSt6vectorI11SNeuronGeneSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  resume { ptr, i32 } %.pn42
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11SNeuronGeneC2E11neuron_typeiddb(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef, double noundef, double noundef, i1 noundef zeroext) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z13RandomClampedv() local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9SLinkGeneC2Eiibidb(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, i32 noundef, i1 noundef zeroext, i32 noundef, double noundef, i1 noundef zeroext) unnamed_addr #0 align 2

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS7CGenome", !7, i64 0, !10, i64 8, !15, i64 32, !14, i64 56, !7, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !7, i64 96, !7, i64 100, !7, i64 104}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorI11SNeuronGeneSaIS0_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseI11SNeuronGeneSaIS0_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseI11SNeuronGeneSaIS0_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseI11SNeuronGeneSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorI9SLinkGeneSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseI9SLinkGeneSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI9SLinkGeneSaIS0_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI9SLinkGeneSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"double", !8, i64 0}
!20 = !{!6, !14, i64 56}
!21 = !{!6, !7, i64 64}
!22 = !{!6, !7, i64 96}
!23 = !{!6, !7, i64 100}
!24 = !{!6, !7, i64 104}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !7, i64 0}
!28 = !{!"_ZTS11SNeuronGene", !7, i64 0, !29, i64 4, !30, i64 8, !19, i64 16, !19, i64 24, !19, i64 32}
!29 = !{!"_ZTS11neuron_type", !8, i64 0}
!30 = !{!"bool", !8, i64 0}
!31 = distinct !{!31, !26}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass