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

; 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.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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(108) ptr @_ZN7CGenomeaSERKS_(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef nonnull align 8 dereferenceable(108) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = icmp ne ptr %5, %6
  br i1 %7, label %8, label %42

8:                                                ; preds = %2
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %class.CGenome, ptr %9, i32 0, i32 0
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 0
  store i32 %11, ptr %12, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %class.CGenome, ptr %13, i32 0, i32 2
  %15 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 2
  %16 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %14)
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %class.CGenome, ptr %17, i32 0, i32 3
  %19 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 3
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI9SLinkGeneSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %18)
  %21 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 4
  store ptr null, ptr %21, align 8, !tbaa !21
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %class.CGenome, ptr %22, i32 0, i32 7
  %24 = load double, ptr %23, align 8, !tbaa !22
  %25 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 7
  store double %24, ptr %25, align 8, !tbaa !22
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.CGenome, ptr %26, i32 0, i32 8
  %28 = load double, ptr %27, align 8, !tbaa !23
  %29 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 8
  store double %28, ptr %29, align 8, !tbaa !23
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.CGenome, ptr %30, i32 0, i32 10
  %32 = load i32, ptr %31, align 8, !tbaa !24
  %33 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 10
  store i32 %32, ptr %33, align 8, !tbaa !24
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.CGenome, ptr %34, i32 0, i32 11
  %36 = load i32, ptr %35, align 4, !tbaa !25
  %37 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 11
  store i32 %36, ptr %37, align 4, !tbaa !25
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.CGenome, ptr %38, i32 0, i32 9
  %40 = load double, ptr %39, align 8, !tbaa !26
  %41 = getelementptr inbounds %class.CGenome, ptr %5, i32 0, i32 9
  store double %40, ptr %41, align 8, !tbaa !26
  br label %42

42:                                               ; preds = %8, %2
  ret ptr %5
}

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !11, i64 0}
!10 = !{!"_ZTS7CGenome", !11, i64 0, !12, i64 8, !16, i64 32, !6, i64 56, !11, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !11, i64 96, !11, i64 100, !11, i64 104}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorI11SNeuronGeneSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI11SNeuronGeneSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI11SNeuronGeneSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI11SNeuronGeneSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorI9SLinkGeneSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI9SLinkGeneSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI9SLinkGeneSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI9SLinkGeneSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"double", !7, i64 0}
!21 = !{!10, !6, i64 56}
!22 = !{!10, !20, i64 72}
!23 = !{!10, !20, i64 80}
!24 = !{!10, !11, i64 96}
!25 = !{!10, !11, i64 100}
!26 = !{!10, !20, i64 88}


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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(108) ptr @_ZN7CGenomeaSERKS_(ptr noundef nonnull returned align 8 dereferenceable(108) %0, ptr noundef nonnull align 8 dereferenceable(108) %1) local_unnamed_addr #0 align 2 {
  %.not = icmp eq ptr %0, %1
  br i1 %.not, label %21, label %3

3:                                                ; preds = %2
  %4 = load i32, ptr %1, align 8, !tbaa !5
  store i32 %4, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI11SNeuronGeneSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %5)
  %8 = getelementptr inbounds i8, ptr %1, i64 32
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI9SLinkGeneSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr null, ptr %11, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %1, i64 72
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = load <2 x double>, ptr %12, align 8, !tbaa !21
  store <2 x double> %14, ptr %13, align 8, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %1, i64 96
  %16 = getelementptr inbounds i8, ptr %0, i64 96
  %17 = load <2 x i32>, ptr %15, align 8, !tbaa !22
  store <2 x i32> %17, ptr %16, align 8, !tbaa !22
  %18 = getelementptr inbounds i8, ptr %1, i64 88
  %19 = load double, ptr %18, align 8, !tbaa !23
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  store double %19, ptr %20, align 8, !tbaa !23
  br label %21

21:                                               ; preds = %3, %2
  ret ptr %0
}

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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 = !{!19, !19, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!6, !19, i64 88}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass