; LLVM IR from jorgemf/c-evolutionary-library :: examples/tsp/TSPFitness.ll (ZN10TSPFitness8evaluateEP10Individual)

; 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.TSPFitness = type <{ %class.FitnessFunction, ptr, ptr, i32, [4 x i8] }>
%class.FitnessFunction = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN10TSPFitness8evaluateEP10Individual(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = call noundef i32 @_ZN13TSPIndividual15getNumberCitiesEv(ptr noundef nonnull align 8 dereferenceable(64) %10)
  store i32 %11, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds ptr, ptr %13, i64 3
  %15 = load ptr, ptr %14, align 8
  %16 = call noundef ptr %15(ptr noundef nonnull align 8 dereferenceable(64) %12)
  store ptr %16, ptr %7, align 8, !tbaa !5
  %17 = load i32, ptr %6, align 4, !tbaa !11
  %18 = icmp sle i32 %17, 1024
  br i1 %18, label %35, label %19

19:                                               ; preds = %2
  %20 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !15
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %91

23:                                               ; preds = %19
  %24 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 3
  %25 = load i32, ptr %24, align 8, !tbaa !15
  %26 = icmp ne i32 %25, 1
  br i1 %26, label %27, label %91

27:                                               ; preds = %23
  %28 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 3
  %29 = load i32, ptr %28, align 8, !tbaa !15
  %30 = icmp ne i32 %29, 2
  br i1 %30, label %31, label %91

31:                                               ; preds = %27
  %32 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 3
  %33 = load i32, ptr %32, align 8, !tbaa !15
  %34 = icmp ne i32 %33, 3
  br i1 %34, label %35, label %91

35:                                               ; preds = %31, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %66, %35
  %37 = load i32, ptr %8, align 4, !tbaa !11
  %38 = load i32, ptr %6, align 4, !tbaa !11
  %39 = sub nsw i32 %38, 1
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %69

42:                                               ; preds = %36
  %43 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = load i32, ptr %8, align 4, !tbaa !11
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds ptr, ptr %44, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !11
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %54, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds double, ptr %53, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = load double, ptr %5, align 8, !tbaa !9
  %65 = fadd double %64, %63
  store double %65, ptr %5, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %42
  %67 = load i32, ptr %8, align 4, !tbaa !11
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !11
  br label %36, !llvm.loop !20

69:                                               ; preds = %41
  %70 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !11
  %74 = sub nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %72, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %71, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds i32, ptr %82, i64 0
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %81, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !9
  %89 = load double, ptr %5, align 8, !tbaa !9
  %90 = fadd double %89, %88
  store double %90, ptr %5, align 8, !tbaa !9
  br label %114

91:                                               ; preds = %31, %27, %23, %19
  %92 = getelementptr inbounds %class.TSPFitness, ptr %9, i32 0, i32 3
  %93 = load i32, ptr %92, align 8, !tbaa !15
  switch i32 %93, label %110 [
    i32 0, label %94
    i32 1, label %98
    i32 2, label %102
    i32 3, label %106
  ]

94:                                               ; preds = %91
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !11
  %97 = call noundef double @_ZN10TSPFitness25evaluateEuclideanDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef %95, i32 noundef %96)
  store double %97, ptr %5, align 8, !tbaa !9
  br label %113

98:                                               ; preds = %91
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load i32, ptr %6, align 4, !tbaa !11
  %101 = call noundef double @_ZN10TSPFitness30evaluateEuclideanDistanceCeilsEPii(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef %99, i32 noundef %100)
  store double %101, ptr %5, align 8, !tbaa !9
  br label %113

102:                                              ; preds = %91
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load i32, ptr %6, align 4, !tbaa !11
  %105 = call noundef double @_ZN10TSPFitness19evaluateATTDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef %103, i32 noundef %104)
  store double %105, ptr %5, align 8, !tbaa !9
  br label %113

106:                                              ; preds = %91
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = load i32, ptr %6, align 4, !tbaa !11
  %109 = call noundef double @_ZN10TSPFitness28evaluateGeographicalDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef %107, i32 noundef %108)
  store double %109, ptr %5, align 8, !tbaa !9
  br label %113

110:                                              ; preds = %91
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %113

113:                                              ; preds = %110, %106, %102, %98, %94
  br label %114

114:                                              ; preds = %113, %69
  %115 = load double, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret double %115
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10TSPFitness28evaluateGeographicalDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i32 noundef) #3 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) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #4

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" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #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, !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 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !18, i64 24}
!16 = !{!"_ZTS10TSPFitness", !17, i64 0, !6, i64 8, !6, i64 16, !18, i64 24}
!17 = !{!"_ZTS15FitnessFunction"}
!18 = !{!"_ZTSN12AlgorithmTSP9DATA_TYPEE", !7, i64 0}
!19 = !{!16, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; 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
define dso_local noundef double @_ZN10TSPFitness8evaluateEP10Individual(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef nonnull %1) unnamed_addr #0 align 2 {
  %3 = tail call noundef i32 @_ZN13TSPIndividual15getNumberCitiesEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 24
  %6 = load ptr, ptr %5, align 8
  %7 = tail call noundef ptr %6(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %8 = icmp slt i32 %3, 1025
  br i1 %8, label %13, label %9

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load i32, ptr %10, align 8, !tbaa !8
  %switch = icmp ult i32 %11, 4
  br i1 %switch, label %84, label %.thread

.thread:                                          ; preds = %9
  %12 = add nsw i32 %3, -1
  br label %.lr.ph

13:                                               ; preds = %2
  %14 = add i32 %3, -1
  %15 = icmp sgt i32 %3, 1
  br i1 %15, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %13
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 8
  %.pre35 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !14
  %.pre36 = load i32, ptr %7, align 4, !tbaa !15
  br label %._crit_edge

.lr.ph:                                           ; preds = %.thread, %13
  %16 = phi i32 [ %12, %.thread ], [ %14, %13 ]
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %invariant.gep = getelementptr i8, ptr %18, i64 -8
  %wide.trip.count = zext nneg i32 %16 to i64
  %.pre = load i32, ptr %7, align 4, !tbaa !15
  %19 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 3
  %20 = icmp ult i64 %19, 3
  br i1 %20, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %46

._crit_edge.loopexit.unr-lcssa:                   ; preds = %46, %.lr.ph
  %.lcssa.ph = phi double [ poison, %.lr.ph ], [ %83, %46 ]
  %.unr = phi i32 [ %.pre, %.lr.ph ], [ %78, %46 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %46 ]
  %.02431.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %83, %46 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %21 = phi i32 [ %25, %.epil.preheader ], [ %.unr, %._crit_edge.loopexit.unr-lcssa ]
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.02431.epil = phi double [ %30, %.epil.preheader ], [ %.02431.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %22 = sext i32 %21 to i64
  %gep.epil = getelementptr ptr, ptr %invariant.gep, i64 %22
  %23 = load ptr, ptr %gep.epil, align 8, !tbaa !17
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %24 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next.epil
  %25 = load i32, ptr %24, align 4, !tbaa !15
  %26 = sext i32 %25 to i64
  %27 = getelementptr double, ptr %23, i64 %26
  %28 = getelementptr i8, ptr %27, i64 -8
  %29 = load double, ptr %28, align 8, !tbaa !18
  %30 = fadd double %.02431.epil, %29
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !20

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.._crit_edge_crit_edge
  %31 = phi i32 [ %14, %.._crit_edge_crit_edge ], [ %16, %.epil.preheader ], [ %16, %._crit_edge.loopexit.unr-lcssa ]
  %32 = phi i32 [ %.pre36, %.._crit_edge_crit_edge ], [ %.pre, %.epil.preheader ], [ %.pre, %._crit_edge.loopexit.unr-lcssa ]
  %33 = phi ptr [ %.pre35, %.._crit_edge_crit_edge ], [ %18, %.epil.preheader ], [ %18, %._crit_edge.loopexit.unr-lcssa ]
  %.024.lcssa = phi double [ 0.000000e+00, %.._crit_edge_crit_edge ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %30, %.epil.preheader ]
  %34 = sext i32 %31 to i64
  %35 = getelementptr inbounds i32, ptr %7, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !15
  %37 = sext i32 %36 to i64
  %38 = getelementptr ptr, ptr %33, i64 %37
  %39 = getelementptr i8, ptr %38, i64 -8
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = sext i32 %32 to i64
  %42 = getelementptr double, ptr %40, i64 %41
  %43 = getelementptr i8, ptr %42, i64 -8
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = fadd double %.024.lcssa, %44
  br label %93

46:                                               ; preds = %46, %.lr.ph.new
  %47 = phi i32 [ %.pre, %.lr.ph.new ], [ %78, %46 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %46 ]
  %.02431 = phi double [ 0.000000e+00, %.lr.ph.new ], [ %83, %46 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %46 ]
  %48 = sext i32 %47 to i64
  %gep = getelementptr ptr, ptr %invariant.gep, i64 %48
  %49 = load ptr, ptr %gep, align 8, !tbaa !17
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %50 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next
  %51 = load i32, ptr %50, align 4, !tbaa !15
  %52 = sext i32 %51 to i64
  %53 = getelementptr double, ptr %49, i64 %52
  %54 = getelementptr i8, ptr %53, i64 -8
  %55 = load double, ptr %54, align 8, !tbaa !18
  %56 = fadd double %.02431, %55
  %57 = sext i32 %51 to i64
  %gep.1 = getelementptr ptr, ptr %invariant.gep, i64 %57
  %58 = load ptr, ptr %gep.1, align 8, !tbaa !17
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %59 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next.1
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = sext i32 %60 to i64
  %62 = getelementptr double, ptr %58, i64 %61
  %63 = getelementptr i8, ptr %62, i64 -8
  %64 = load double, ptr %63, align 8, !tbaa !18
  %65 = fadd double %56, %64
  %66 = sext i32 %60 to i64
  %gep.2 = getelementptr ptr, ptr %invariant.gep, i64 %66
  %67 = load ptr, ptr %gep.2, align 8, !tbaa !17
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %68 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next.2
  %69 = load i32, ptr %68, align 4, !tbaa !15
  %70 = sext i32 %69 to i64
  %71 = getelementptr double, ptr %67, i64 %70
  %72 = getelementptr i8, ptr %71, i64 -8
  %73 = load double, ptr %72, align 8, !tbaa !18
  %74 = fadd double %65, %73
  %75 = sext i32 %69 to i64
  %gep.3 = getelementptr ptr, ptr %invariant.gep, i64 %75
  %76 = load ptr, ptr %gep.3, align 8, !tbaa !17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %77 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.next.3
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = sext i32 %78 to i64
  %80 = getelementptr double, ptr %76, i64 %79
  %81 = getelementptr i8, ptr %80, i64 -8
  %82 = load double, ptr %81, align 8, !tbaa !18
  %83 = fadd double %74, %82
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %46, !llvm.loop !22

84:                                               ; preds = %9
  switch i32 %11, label %default.unreachable [
    i32 0, label %85
    i32 1, label %87
    i32 2, label %89
    i32 3, label %91
  ]

85:                                               ; preds = %84
  %86 = tail call noundef double @_ZN10TSPFitness25evaluateEuclideanDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %7, i32 noundef %3)
  br label %93

87:                                               ; preds = %84
  %88 = tail call noundef double @_ZN10TSPFitness30evaluateEuclideanDistanceCeilsEPii(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %7, i32 noundef %3)
  br label %93

89:                                               ; preds = %84
  %90 = tail call noundef double @_ZN10TSPFitness19evaluateATTDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %7, i32 noundef %3)
  br label %93

91:                                               ; preds = %84
  %92 = tail call noundef double @_ZN10TSPFitness28evaluateGeographicalDistanceEPii(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %7, i32 noundef %3)
  br label %93

default.unreachable:                              ; preds = %84
  unreachable

93:                                               ; preds = %85, %87, %89, %91, %._crit_edge
  %.1 = phi double [ %45, %._crit_edge ], [ %92, %91 ], [ %90, %89 ], [ %88, %87 ], [ %86, %85 ]
  ret double %.1
}

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

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

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

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

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

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" }
attributes #1 = { 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 #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" }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 24}
!9 = !{!"_ZTS10TSPFitness", !10, i64 0, !11, i64 8, !11, i64 16, !13, i64 24}
!10 = !{!"_ZTS15FitnessFunction"}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"_ZTSN12AlgorithmTSP9DATA_TYPEE", !12, i64 0}
!14 = !{!9, !11, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !12, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !12, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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