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

; 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 }
%struct.SLinkGene = type <{ i8, [3 x i8], i32, i32, i32, double, i8, [7 x i8] }>

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7CGenome21GetCompatibilityScoreERKS_(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef nonnull align 8 dereferenceable(108) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %16

16:                                               ; preds = %117, %53, %40, %2
  %17 = load i32, ptr %9, align 4, !tbaa !11
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds %class.CGenome, ptr %15, i32 0, i32 3
  %20 = call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  %21 = sub i64 %20, 1
  %22 = icmp ult i64 %18, %21
  br i1 %22, label %31, label %23

23:                                               ; preds = %16
  %24 = load i32, ptr %10, align 4, !tbaa !11
  %25 = zext i32 %24 to i64
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.CGenome, ptr %26, i32 0, i32 3
  %28 = call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = sub i64 %28, 1
  %30 = icmp ult i64 %25, %29
  br label %31

31:                                               ; preds = %23, %16
  %32 = phi i1 [ true, %16 ], [ %30, %23 ]
  br i1 %32, label %33, label %118

33:                                               ; preds = %31
  %34 = load i32, ptr %9, align 4, !tbaa !11
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds %class.CGenome, ptr %15, i32 0, i32 3
  %37 = call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %38 = sub i64 %37, 1
  %39 = icmp eq i64 %35, %38
  br i1 %39, label %40, label %45

40:                                               ; preds = %33
  %41 = load i32, ptr %10, align 4, !tbaa !11
  %42 = add i32 %41, 1
  store i32 %42, ptr %10, align 4, !tbaa !11
  %43 = load double, ptr %6, align 8, !tbaa !9
  %44 = fadd double %43, 1.000000e+00
  store double %44, ptr %6, align 8, !tbaa !9
  br label %16, !llvm.loop !13

45:                                               ; preds = %33
  %46 = load i32, ptr %10, align 4, !tbaa !11
  %47 = zext i32 %46 to i64
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %class.CGenome, ptr %48, i32 0, i32 3
  %50 = call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #4
  %51 = sub i64 %50, 1
  %52 = icmp eq i64 %47, %51
  br i1 %52, label %53, label %58

53:                                               ; preds = %45
  %54 = load i32, ptr %9, align 4, !tbaa !11
  %55 = add i32 %54, 1
  store i32 %55, ptr %9, align 4, !tbaa !11
  %56 = load double, ptr %6, align 8, !tbaa !9
  %57 = fadd double %56, 1.000000e+00
  store double %57, ptr %6, align 8, !tbaa !9
  br label %16, !llvm.loop !13

58:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %59 = getelementptr inbounds %class.CGenome, ptr %15, i32 0, i32 3
  %60 = load i32, ptr %9, align 4, !tbaa !11
  %61 = zext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %61) #4
  %63 = getelementptr inbounds %struct.SLinkGene, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !15
  store i32 %64, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %class.CGenome, ptr %65, i32 0, i32 3
  %67 = load i32, ptr %10, align 4, !tbaa !11
  %68 = zext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZNKSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #4
  %70 = getelementptr inbounds %struct.SLinkGene, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !15
  store i32 %71, ptr %12, align 4, !tbaa !11
  %72 = load i32, ptr %11, align 4, !tbaa !11
  %73 = load i32, ptr %12, align 4, !tbaa !11
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %99

75:                                               ; preds = %58
  %76 = load i32, ptr %9, align 4, !tbaa !11
  %77 = add i32 %76, 1
  store i32 %77, ptr %9, align 4, !tbaa !11
  %78 = load i32, ptr %10, align 4, !tbaa !11
  %79 = add i32 %78, 1
  store i32 %79, ptr %10, align 4, !tbaa !11
  %80 = load double, ptr %7, align 8, !tbaa !9
  %81 = fadd double %80, 1.000000e+00
  store double %81, ptr %7, align 8, !tbaa !9
  %82 = getelementptr inbounds %class.CGenome, ptr %15, i32 0, i32 3
  %83 = load i32, ptr %9, align 4, !tbaa !11
  %84 = zext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #4
  %86 = getelementptr inbounds %struct.SLinkGene, ptr %85, i32 0, i32 5
  %87 = load double, ptr %86, align 8, !tbaa !18
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.CGenome, ptr %88, i32 0, i32 3
  %90 = load i32, ptr %10, align 4, !tbaa !11
  %91 = zext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZNKSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91) #4
  %93 = getelementptr inbounds %struct.SLinkGene, ptr %92, i32 0, i32 5
  %94 = load double, ptr %93, align 8, !tbaa !18
  %95 = fsub double %87, %94
  %96 = call double @llvm.fabs.f64(double %95)
  %97 = load double, ptr %8, align 8, !tbaa !9
  %98 = fadd double %97, %96
  store double %98, ptr %8, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %75, %58
  %100 = load i32, ptr %11, align 4, !tbaa !11
  %101 = load i32, ptr %12, align 4, !tbaa !11
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %103, label %108

103:                                              ; preds = %99
  %104 = load double, ptr %5, align 8, !tbaa !9
  %105 = fadd double %104, 1.000000e+00
  store double %105, ptr %5, align 8, !tbaa !9
  %106 = load i32, ptr %9, align 4, !tbaa !11
  %107 = add i32 %106, 1
  store i32 %107, ptr %9, align 4, !tbaa !11
  br label %108

108:                                              ; preds = %103, %99
  %109 = load i32, ptr %11, align 4, !tbaa !11
  %110 = load i32, ptr %12, align 4, !tbaa !11
  %111 = icmp sgt i32 %109, %110
  br i1 %111, label %112, label %117

112:                                              ; preds = %108
  %113 = load double, ptr %5, align 8, !tbaa !9
  %114 = fadd double %113, 1.000000e+00
  store double %114, ptr %5, align 8, !tbaa !9
  %115 = load i32, ptr %10, align 4, !tbaa !11
  %116 = add i32 %115, 1
  store i32 %116, ptr %10, align 4, !tbaa !11
  br label %117

117:                                              ; preds = %112, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %16, !llvm.loop !13

118:                                              ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %119)
  store i32 %120, ptr %13, align 4, !tbaa !11
  %121 = call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %15)
  %122 = load i32, ptr %13, align 4, !tbaa !11
  %123 = icmp sgt i32 %121, %122
  br i1 %123, label %124, label %126

124:                                              ; preds = %118
  %125 = call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %15)
  store i32 %125, ptr %13, align 4, !tbaa !11
  br label %126

126:                                              ; preds = %124, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %127 = load double, ptr %6, align 8, !tbaa !9
  %128 = fmul double 1.000000e+00, %127
  %129 = load i32, ptr %13, align 4, !tbaa !11
  %130 = sitofp i32 %129 to double
  %131 = fdiv double %128, %130
  %132 = load double, ptr %5, align 8, !tbaa !9
  %133 = fmul double 1.000000e+00, %132
  %134 = load i32, ptr %13, align 4, !tbaa !11
  %135 = sitofp i32 %134 to double
  %136 = fdiv double %133, %135
  %137 = fadd double %131, %136
  %138 = load double, ptr %8, align 8, !tbaa !9
  %139 = fmul double 3.000000e+00, %138
  %140 = load double, ptr %7, align 8, !tbaa !9
  %141 = fdiv double %139, %140
  %142 = fadd double %137, %141
  store double %142, ptr %14, align 8, !tbaa !9
  %143 = load double, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret double %143
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 4}
!16 = !{!"_ZTS9SLinkGene", !17, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !10, i64 16, !17, i64 24}
!17 = !{!"bool", !7, i64 0}
!18 = !{!16, !10, i64 16}


; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN7CGenome21GetCompatibilityScoreERKS_(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef nonnull align 8 dereferenceable(108) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = getelementptr inbounds i8, ptr %1, i64 32
  br label %.outer

.outer:                                           ; preds = %52, %2
  %.049.ph = phi double [ %.150, %52 ], [ 0.000000e+00, %2 ]
  %.046.ph = phi i32 [ %.248, %52 ], [ 0, %2 ]
  %.043.ph = phi i32 [ %.245, %52 ], [ 0, %2 ]
  %.041.ph = phi double [ %.142, %52 ], [ 0.000000e+00, %2 ]
  %.040.ph = phi double [ %.040, %52 ], [ 0.000000e+00, %2 ]
  %.0.ph = phi double [ %.2, %52 ], [ 0.000000e+00, %2 ]
  br label %.outer54

.outer54:                                         ; preds = %.outer, %26
  %.046.ph55 = phi i32 [ %.046.ph, %.outer ], [ %27, %26 ]
  %.043.ph56 = phi i32 [ %.043.ph, %.outer ], [ %.043, %26 ]
  %.040.ph58 = phi double [ %.040.ph, %.outer ], [ %28, %26 ]
  %5 = zext i32 %.046.ph55 to i64
  br label %6

6:                                                ; preds = %.outer54, %18
  %.043 = phi i32 [ %19, %18 ], [ %.043.ph56, %.outer54 ]
  %.040 = phi double [ %20, %18 ], [ %.040.ph58, %.outer54 ]
  %7 = tail call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #2
  %8 = add i64 %7, -1
  %9 = icmp ugt i64 %8, %5
  br i1 %9, label %.critedge, label %10

10:                                               ; preds = %6
  %11 = zext i32 %.043 to i64
  %12 = tail call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #2
  %13 = add i64 %12, -1
  %14 = icmp ugt i64 %13, %11
  br i1 %14, label %.critedge, label %59

.critedge:                                        ; preds = %6, %10
  %15 = tail call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #2
  %16 = add i64 %15, -1
  %17 = icmp eq i64 %16, %5
  br i1 %17, label %18, label %21

18:                                               ; preds = %.critedge
  %19 = add i32 %.043, 1
  %20 = fadd double %.040, 1.000000e+00
  br label %6, !llvm.loop !5

21:                                               ; preds = %.critedge
  %22 = zext i32 %.043 to i64
  %23 = tail call noundef i64 @_ZNKSt6vectorI9SLinkGeneSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #2
  %24 = add i64 %23, -1
  %25 = icmp eq i64 %24, %22
  br i1 %25, label %26, label %29

26:                                               ; preds = %21
  %27 = add i32 %.046.ph55, 1
  %28 = fadd double %.040, 1.000000e+00
  br label %.outer54, !llvm.loop !5

29:                                               ; preds = %21
  %30 = tail call noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %5) #2
  %31 = getelementptr inbounds i8, ptr %30, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !7
  %33 = tail call noundef nonnull align 8 dereferenceable(25) ptr @_ZNKSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %22) #2
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !7
  %36 = icmp eq i32 %32, %35
  br i1 %36, label %37, label %52

37:                                               ; preds = %29
  %38 = add i32 %.046.ph55, 1
  %39 = add i32 %.043, 1
  %40 = fadd double %.041.ph, 1.000000e+00
  %41 = zext i32 %38 to i64
  %42 = tail call noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %41) #2
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load double, ptr %43, align 8, !tbaa !14
  %45 = zext i32 %39 to i64
  %46 = tail call noundef nonnull align 8 dereferenceable(25) ptr @_ZNKSt6vectorI9SLinkGeneSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %45) #2
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load double, ptr %47, align 8, !tbaa !14
  %49 = fsub double %44, %48
  %50 = tail call double @llvm.fabs.f64(double %49)
  %51 = fadd double %.049.ph, %50
  br label %52

52:                                               ; preds = %37, %29
  %.150 = phi double [ %51, %37 ], [ %.049.ph, %29 ]
  %.147 = phi i32 [ %38, %37 ], [ %.046.ph55, %29 ]
  %.144 = phi i32 [ %39, %37 ], [ %.043, %29 ]
  %.142 = phi double [ %40, %37 ], [ %.041.ph, %29 ]
  %53 = icmp slt i32 %32, %35
  %54 = fadd double %.0.ph, 1.000000e+00
  %55 = zext i1 %53 to i32
  %.248 = add i32 %.147, %55
  %.1 = select i1 %53, double %54, double %.0.ph
  %56 = icmp sgt i32 %32, %35
  %57 = fadd double %.1, 1.000000e+00
  %58 = zext i1 %56 to i32
  %.245 = add i32 %.144, %58
  %.2 = select i1 %56, double %57, double %.1
  br label %.outer, !llvm.loop !5

59:                                               ; preds = %10
  %60 = tail call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %1)
  %61 = tail call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %0)
  %62 = icmp sgt i32 %61, %60
  br i1 %62, label %63, label %65

63:                                               ; preds = %59
  %64 = tail call noundef i32 @_ZNK7CGenome8NumGenesEv(ptr noundef nonnull align 8 dereferenceable(108) %0)
  br label %65

65:                                               ; preds = %63, %59
  %.039 = phi i32 [ %64, %63 ], [ %60, %59 ]
  %66 = sitofp i32 %.039 to double
  %67 = insertelement <2 x double> poison, double %.040, i64 0
  %68 = insertelement <2 x double> %67, double %.0.ph, i64 1
  %69 = insertelement <2 x double> poison, double %66, i64 0
  %70 = shufflevector <2 x double> %69, <2 x double> poison, <2 x i32> zeroinitializer
  %71 = fdiv <2 x double> %68, %70
  %shift = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %72 = fadd <2 x double> %71, %shift
  %73 = extractelement <2 x double> %72, i64 0
  %74 = fmul double %.049.ph, 3.000000e+00
  %75 = fdiv double %74, %.041.ph
  %76 = fadd double %75, %73
  ret double %76
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 = !{!8, !12, i64 4}
!8 = !{!"_ZTS9SLinkGene", !9, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !13, i64 16, !9, i64 24}
!9 = !{!"bool", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"double", !10, i64 0}
!14 = !{!8, !13, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass