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

; 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.MTRand = type { i8 }
%class.MTRand_int32 = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13TSPCrossover25crossEP10IndividualS1_S1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %class.MTRand, align 1
  %10 = alloca %class.MTRand_int32, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  call void @_ZN6MTRandC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9)
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  invoke void @_ZN12MTRand_int32C2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %26 unwind label %62

26:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = invoke noundef ptr @_ZN14TSPIndividual214getDoubleRouteEv(ptr noundef nonnull align 8 dereferenceable(80) %27)
          to label %29 unwind label %66

29:                                               ; preds = %26
  store ptr %28, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = invoke noundef ptr @_ZN14TSPIndividual214getDoubleRouteEv(ptr noundef nonnull align 8 dereferenceable(80) %30)
          to label %32 unwind label %70

32:                                               ; preds = %29
  store ptr %31, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = invoke noundef ptr @_ZN14TSPIndividual214getDoubleRouteEv(ptr noundef nonnull align 8 dereferenceable(80) %33)
          to label %35 unwind label %74

35:                                               ; preds = %32
  store ptr %34, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = invoke noundef i32 @_ZN13TSPIndividual15getNumberCitiesEv(ptr noundef nonnull align 8 dereferenceable(64) %36)
          to label %38 unwind label %78

38:                                               ; preds = %35
  store i32 %37, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %39 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %40 unwind label %82

40:                                               ; preds = %38
  %41 = load i32, ptr %16, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = urem i64 %39, %42
  %44 = trunc i64 %43 to i32
  store i32 %44, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %45 = load i32, ptr %17, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %49 unwind label %86

49:                                               ; preds = %40
  %50 = load i32, ptr %16, align 4, !tbaa !9
  %51 = load i32, ptr %17, align 4, !tbaa !9
  %52 = sub nsw i32 %50, %51
  %53 = sext i32 %52 to i64
  %54 = urem i64 %48, %53
  %55 = add i64 %47, %54
  %56 = trunc i64 %55 to i32
  store i32 %56, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %100, %49
  %58 = load i32, ptr %19, align 4, !tbaa !9
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %90, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %103

62:                                               ; preds = %4
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %11, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %12, align 4
  br label %203

66:                                               ; preds = %26
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %11, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %12, align 4
  br label %202

70:                                               ; preds = %29
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %11, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %12, align 4
  br label %201

74:                                               ; preds = %32
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  br label %200

78:                                               ; preds = %35
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  br label %199

82:                                               ; preds = %38
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  br label %198

86:                                               ; preds = %40
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %11, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %12, align 4
  br label %197

90:                                               ; preds = %57
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = load i32, ptr %19, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = load i32, ptr %19, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  store double %95, ptr %99, align 8, !tbaa !11
  br label %100

100:                                              ; preds = %90
  %101 = load i32, ptr %19, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %19, align 4, !tbaa !9
  br label %57, !llvm.loop !13

103:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %104 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %104, ptr %20, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %120, %103
  %106 = load i32, ptr %20, align 4, !tbaa !9
  %107 = load i32, ptr %18, align 4, !tbaa !9
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %123

110:                                              ; preds = %105
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = load i32, ptr %20, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !11
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = load i32, ptr %20, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds double, ptr %116, i64 %118
  store double %115, ptr %119, align 8, !tbaa !11
  br label %120

120:                                              ; preds = %110
  %121 = load i32, ptr %20, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %20, align 4, !tbaa !9
  br label %105, !llvm.loop !15

123:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %124 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %124, ptr %21, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %140, %123
  %126 = load i32, ptr %21, align 4, !tbaa !9
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

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

130:                                              ; preds = %125
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = load i32, ptr %21, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !11
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = load i32, ptr %21, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  store double %135, ptr %139, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %130
  %141 = load i32, ptr %21, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %21, align 4, !tbaa !9
  br label %125, !llvm.loop !16

143:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %144 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %144, ptr %22, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %193, %143
  %146 = load i32, ptr %22, align 4, !tbaa !9
  %147 = load i32, ptr %16, align 4, !tbaa !9
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %196

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %151 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %151, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #5
  store i8 0, ptr %24, align 1, !tbaa !17
  br label %152

152:                                              ; preds = %161, %150
  %153 = load i32, ptr %23, align 4, !tbaa !9
  %154 = icmp sge i32 %153, 0
  br i1 %154, label %155, label %159

155:                                              ; preds = %152
  %156 = load i8, ptr %24, align 1, !tbaa !17, !range !19, !noundef !20
  %157 = trunc i8 %156 to i1
  %158 = xor i1 %157, true
  br label %159

159:                                              ; preds = %155, %152
  %160 = phi i1 [ false, %152 ], [ %158, %155 ]
  br i1 %160, label %161, label %176

161:                                              ; preds = %159
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = load i32, ptr %22, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds double, ptr %162, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !11
  %167 = load ptr, ptr %15, align 8, !tbaa !5
  %168 = load i32, ptr %23, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds double, ptr %167, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !11
  %172 = fcmp oeq double %166, %171
  %173 = zext i1 %172 to i8
  store i8 %173, ptr %24, align 1, !tbaa !17
  %174 = load i32, ptr %23, align 4, !tbaa !9
  %175 = add nsw i32 %174, -1
  store i32 %175, ptr %23, align 4, !tbaa !9
  br label %152, !llvm.loop !21

176:                                              ; preds = %159
  %177 = load i8, ptr %24, align 1, !tbaa !17, !range !19, !noundef !20
  %178 = trunc i8 %177 to i1
  br i1 %178, label %179, label %192

179:                                              ; preds = %176
  %180 = load ptr, ptr %15, align 8, !tbaa !5
  %181 = load i32, ptr %22, align 4, !tbaa !9
  %182 = invoke noundef double @_ZN12AlgorithmTSP30generateRandomNumberNotInArrayEPdi(ptr noundef %180, i32 noundef %181)
          to label %183 unwind label %188

183:                                              ; preds = %179
  %184 = load ptr, ptr %15, align 8, !tbaa !5
  %185 = load i32, ptr %22, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds double, ptr %184, i64 %186
  store double %182, ptr %187, align 8, !tbaa !11
  br label %192

188:                                              ; preds = %179
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %11, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %197

192:                                              ; preds = %183, %176
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %22, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %22, align 4, !tbaa !9
  br label %145, !llvm.loop !22

196:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  ret void

197:                                              ; preds = %188, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %198

198:                                              ; preds = %197, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %199

199:                                              ; preds = %198, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %200

200:                                              ; preds = %199, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %201

201:                                              ; preds = %200, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %202

202:                                              ; preds = %201, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  br label %203

203:                                              ; preds = %202, %62
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  br label %204

204:                                              ; preds = %203
  %205 = load ptr, ptr %11, align 8
  %206 = load i32, ptr %12, align 4
  %207 = insertvalue { ptr, i32 } poison, ptr %205, 0
  %208 = insertvalue { ptr, i32 } %207, i32 %206, 1
  resume { ptr, i32 } %208
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6MTRandC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12MTRand_int32C2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1)) #0 align 2

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

declare noundef double @_ZN12AlgorithmTSP30generateRandomNumberNotInArrayEPdi(ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.MTRand = type { i8 }
%class.MTRand_int32 = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13TSPCrossover25crossEP10IndividualS1_S1_(ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.MTRand, align 1
  %6 = alloca %class.MTRand_int32, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZN6MTRandC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  invoke void @_ZN12MTRand_int32C2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %7 unwind label %46

7:                                                ; preds = %4
  %8 = call noundef ptr @_ZN14TSPIndividual214getDoubleRouteEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %9 = ptrtoint ptr %8 to i64
  %10 = call noundef ptr @_ZN14TSPIndividual214getDoubleRouteEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %11 = ptrtoint ptr %10 to i64
  %12 = call noundef ptr @_ZN14TSPIndividual214getDoubleRouteEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %13 = ptrtoint ptr %12 to i64
  %14 = call noundef i32 @_ZN13TSPIndividual15getNumberCitiesEv(ptr noundef nonnull align 8 dereferenceable(64) %3)
  %15 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %16 unwind label %48

16:                                               ; preds = %7
  %17 = sext i32 %14 to i64
  %18 = urem i64 %15, %17
  %19 = trunc i64 %18 to i32
  %20 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %50

21:                                               ; preds = %16
  %22 = add i64 %18, 1
  %23 = sub nsw i32 %14, %19
  %24 = sext i32 %23 to i64
  %25 = urem i64 %20, %24
  %26 = add i64 %22, %25
  %27 = trunc i64 %26 to i32
  %28 = icmp sgt i32 %19, 0
  br i1 %28, label %.lr.ph.preheader, label %.preheader68

.lr.ph.preheader:                                 ; preds = %21
  %29 = and i64 %18, 2147483647
  %min.iters.check = icmp ult i64 %29, 6
  %30 = sub i64 %13, %9
  %diff.check = icmp ult i64 %30, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %.lr.ph.preheader129, label %vector.ph

.lr.ph.preheader129:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %18, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %31 = getelementptr inbounds double, ptr %8, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %wide.load = load <2 x double>, ptr %31, align 8, !tbaa !5
  %wide.load92 = load <2 x double>, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %12, i64 %index
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  store <2 x double> %wide.load, ptr %33, align 8, !tbaa !5
  store <2 x double> %wide.load92, ptr %34, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %29, %n.vec
  br i1 %cmp.n, label %.preheader68, label %.lr.ph.preheader129

.preheader68:                                     ; preds = %.lr.ph, %middle.block, %21
  %36 = icmp slt i32 %19, %27
  br i1 %36, label %.lr.ph71.preheader, label %.preheader67

.lr.ph71.preheader:                               ; preds = %.preheader68
  %sext = shl i64 %18, 32
  %37 = ashr exact i64 %sext, 32
  %sext90 = shl i64 %26, 32
  %38 = ashr exact i64 %sext90, 32
  %39 = sub nsw i64 %38, %37
  %min.iters.check97 = icmp ult i64 %39, 6
  %40 = sub i64 %13, %11
  %diff.check94 = icmp ult i64 %40, 32
  %or.cond125 = or i1 %min.iters.check97, %diff.check94
  br i1 %or.cond125, label %.lr.ph71.preheader128, label %vector.ph98

.lr.ph71.preheader128:                            ; preds = %middle.block95, %.lr.ph71.preheader
  %indvars.iv80.ph = phi i64 [ %37, %.lr.ph71.preheader ], [ %ind.end, %middle.block95 ]
  br label %.lr.ph71

vector.ph98:                                      ; preds = %.lr.ph71.preheader
  %n.vec100 = and i64 %39, -4
  %ind.end = add nsw i64 %37, %n.vec100
  br label %vector.body102

vector.body102:                                   ; preds = %vector.body102, %vector.ph98
  %index103 = phi i64 [ 0, %vector.ph98 ], [ %index.next106, %vector.body102 ]
  %offset.idx = add i64 %37, %index103
  %41 = getelementptr inbounds double, ptr %10, i64 %offset.idx
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load104 = load <2 x double>, ptr %41, align 8, !tbaa !5
  %wide.load105 = load <2 x double>, ptr %42, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %12, i64 %offset.idx
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  store <2 x double> %wide.load104, ptr %43, align 8, !tbaa !5
  store <2 x double> %wide.load105, ptr %44, align 8, !tbaa !5
  %index.next106 = add nuw i64 %index103, 4
  %45 = icmp eq i64 %index.next106, %n.vec100
  br i1 %45, label %middle.block95, label %vector.body102, !llvm.loop !13

middle.block95:                                   ; preds = %vector.body102
  %cmp.n107 = icmp eq i64 %39, %n.vec100
  br i1 %cmp.n107, label %.preheader67, label %.lr.ph71.preheader128

46:                                               ; preds = %4
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %92

48:                                               ; preds = %7
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %91

50:                                               ; preds = %16
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %91

.lr.ph:                                           ; preds = %.lr.ph.preheader129, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader129 ]
  %52 = getelementptr inbounds double, ptr %8, i64 %indvars.iv
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds double, ptr %12, i64 %indvars.iv
  store double %53, ptr %54, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = icmp ult i64 %indvars.iv.next, %29
  br i1 %55, label %.lr.ph, label %.preheader68, !llvm.loop !14

.preheader67:                                     ; preds = %.lr.ph71, %middle.block95, %.preheader68
  %56 = icmp sgt i32 %14, %27
  br i1 %56, label %.lr.ph73.preheader, label %.preheader66

.lr.ph73.preheader:                               ; preds = %.preheader67
  %sext91 = shl i64 %26, 32
  %57 = ashr exact i64 %sext91, 32
  %58 = sub nsw i64 %17, %57
  %min.iters.check112 = icmp ult i64 %58, 6
  %59 = sub i64 %13, %9
  %diff.check109 = icmp ult i64 %59, 32
  %or.cond126 = or i1 %min.iters.check112, %diff.check109
  br i1 %or.cond126, label %.lr.ph73.preheader127, label %vector.ph113

.lr.ph73.preheader127:                            ; preds = %middle.block110, %.lr.ph73.preheader
  %indvars.iv84.ph = phi i64 [ %57, %.lr.ph73.preheader ], [ %ind.end116, %middle.block110 ]
  br label %.lr.ph73

vector.ph113:                                     ; preds = %.lr.ph73.preheader
  %n.vec115 = and i64 %58, -4
  %ind.end116 = add nsw i64 %57, %n.vec115
  br label %vector.body118

vector.body118:                                   ; preds = %vector.body118, %vector.ph113
  %index119 = phi i64 [ 0, %vector.ph113 ], [ %index.next123, %vector.body118 ]
  %offset.idx120 = add i64 %57, %index119
  %60 = getelementptr inbounds double, ptr %8, i64 %offset.idx120
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %wide.load121 = load <2 x double>, ptr %60, align 8, !tbaa !5
  %wide.load122 = load <2 x double>, ptr %61, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %12, i64 %offset.idx120
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  store <2 x double> %wide.load121, ptr %62, align 8, !tbaa !5
  store <2 x double> %wide.load122, ptr %63, align 8, !tbaa !5
  %index.next123 = add nuw i64 %index119, 4
  %64 = icmp eq i64 %index.next123, %n.vec115
  br i1 %64, label %middle.block110, label %vector.body118, !llvm.loop !15

middle.block110:                                  ; preds = %vector.body118
  %cmp.n124 = icmp eq i64 %58, %n.vec115
  br i1 %cmp.n124, label %.preheader66, label %.lr.ph73.preheader127

.lr.ph71:                                         ; preds = %.lr.ph71.preheader128, %.lr.ph71
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph71 ], [ %indvars.iv80.ph, %.lr.ph71.preheader128 ]
  %65 = getelementptr inbounds double, ptr %10, i64 %indvars.iv80
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %12, i64 %indvars.iv80
  store double %66, ptr %67, align 8, !tbaa !5
  %indvars.iv.next81 = add nsw i64 %indvars.iv80, 1
  %68 = icmp slt i64 %indvars.iv.next81, %38
  br i1 %68, label %.lr.ph71, label %.preheader67, !llvm.loop !16

.preheader66:                                     ; preds = %.lr.ph73, %middle.block110, %.preheader67
  %69 = icmp sgt i32 %14, %19
  br i1 %69, label %.preheader, label %._crit_edge77

.lr.ph73:                                         ; preds = %.lr.ph73.preheader127, %.lr.ph73
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph73 ], [ %indvars.iv84.ph, %.lr.ph73.preheader127 ]
  %70 = getelementptr inbounds double, ptr %8, i64 %indvars.iv84
  %71 = load double, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %12, i64 %indvars.iv84
  store double %71, ptr %72, align 8, !tbaa !5
  %indvars.iv.next85 = add nsw i64 %indvars.iv84, 1
  %73 = icmp slt i64 %indvars.iv.next85, %17
  br i1 %73, label %.lr.ph73, label %.preheader66, !llvm.loop !17

.preheader:                                       ; preds = %.preheader66, %.critedge
  %.05176 = phi i32 [ %89, %.critedge ], [ %19, %.preheader66 ]
  %74 = icmp slt i32 %.05176, 0
  br i1 %74, label %.critedge, label %.lr.ph75

.lr.ph75:                                         ; preds = %.preheader
  %75 = zext nneg i32 %.05176 to i64
  %76 = getelementptr inbounds double, ptr %12, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !5
  br label %78

._crit_edge77:                                    ; preds = %.critedge, %.preheader66
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  ret void

78:                                               ; preds = %.lr.ph75, %78
  %indvars.iv87 = phi i64 [ %75, %.lr.ph75 ], [ %indvars.iv.next88, %78 ]
  %79 = getelementptr inbounds double, ptr %12, i64 %indvars.iv87
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = fcmp oeq double %77, %80
  %indvars.iv.next88 = add nsw i64 %indvars.iv87, -1
  %82 = trunc nuw i64 %indvars.iv87 to i32
  %83 = icmp slt i32 %82, 1
  %.not62 = select i1 %83, i1 true, i1 %81
  br i1 %.not62, label %._crit_edge, label %78, !llvm.loop !18

._crit_edge:                                      ; preds = %78
  br i1 %81, label %84, label %.critedge

84:                                               ; preds = %._crit_edge
  %85 = invoke noundef double @_ZN12AlgorithmTSP30generateRandomNumberNotInArrayEPdi(ptr noundef nonnull %12, i32 noundef %.05176)
          to label %86 unwind label %87

86:                                               ; preds = %84
  store double %85, ptr %76, align 8, !tbaa !5
  br label %.critedge

87:                                               ; preds = %84
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %91

.critedge:                                        ; preds = %.preheader, %86, %._crit_edge
  %89 = add nsw i32 %.05176, 1
  %90 = icmp slt i32 %89, %14
  br i1 %90, label %.preheader, label %._crit_edge77, !llvm.loop !19

91:                                               ; preds = %50, %87, %48
  %.pn.pn = phi { ptr, i32 } [ %49, %48 ], [ %88, %87 ], [ %51, %50 ]
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  br label %92

92:                                               ; preds = %91, %46
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %91 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6MTRandC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12MTRand_int32C2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

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

declare noundef double @_ZN12AlgorithmTSP30generateRandomNumberNotInArrayEPdi(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { mustprogress 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !11}
!15 = distinct !{!15, !10, !11, !12}
!16 = distinct !{!16, !10, !11}
!17 = distinct !{!17, !10, !11}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass