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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11TSPMutation15exchangeRegionsEP13TSPIndividual(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.MTRand_int32, align 1
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  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 1, ptr %5) #5
  call void @_ZN12MTRand_int32C2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = invoke noundef i32 @_ZN11TSPMutation10regionSizeEP13TSPIndividual(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %16)
          to label %18 unwind label %77

18:                                               ; preds = %2
  store i32 %17, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = invoke noundef i32 @_ZN13TSPIndividual15getNumberCitiesEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
          to label %21 unwind label %81

21:                                               ; preds = %18
  store i32 %20, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds ptr, ptr %23, i64 3
  %25 = load ptr, ptr %24, align 8
  %26 = invoke noundef ptr %25(ptr noundef nonnull align 8 dereferenceable(64) %22)
          to label %27 unwind label %85

27:                                               ; preds = %21
  store ptr %26, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %28 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %29 unwind label %89

29:                                               ; preds = %27
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = mul nsw i32 2, %31
  %33 = sub nsw i32 %30, %32
  %34 = sext i32 %33 to i64
  %35 = urem i64 %28, %34
  %36 = trunc i64 %35 to i32
  store i32 %36, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = add nsw i32 %37, %38
  %40 = sext i32 %39 to i64
  %41 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %42 unwind label %93

42:                                               ; preds = %29
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = mul nsw i32 2, %44
  %46 = sub nsw i32 %43, %45
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = sub nsw i32 %46, %47
  %49 = sext i32 %48 to i64
  %50 = urem i64 %41, %49
  %51 = add i64 %40, %50
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %12, align 4, !tbaa !9
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = mul nsw i32 %54, 2
  %56 = add nsw i32 %53, %55
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %59, label %129

59:                                               ; preds = %42
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = add nsw i32 %60, %61
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %65, label %129

65:                                               ; preds = %59
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = add nsw i32 %66, %67
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %71, label %129

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %125, %71
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %97, label %76

76:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %128

77:                                               ; preds = %2
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %138

81:                                               ; preds = %18
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  br label %137

85:                                               ; preds = %21
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %136

89:                                               ; preds = %27
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  br label %135

93:                                               ; preds = %131, %129, %29
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %135

97:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = add nsw i32 %99, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %98, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !9
  store i32 %104, ptr %14, align 4, !tbaa !9
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = add nsw i32 %106, %107
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %105, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = add nsw i32 %113, %114
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i32, ptr %112, i64 %116
  store i32 %111, ptr %117, align 4, !tbaa !9
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !9
  %121 = load i32, ptr %12, align 4, !tbaa !9
  %122 = add nsw i32 %120, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %119, i64 %123
  store i32 %118, ptr %124, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %125

125:                                              ; preds = %97
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %13, align 4, !tbaa !9
  br label %72, !llvm.loop !13

128:                                              ; preds = %76
  br label %134

129:                                              ; preds = %65, %59, %42
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
          to label %131 unwind label %93

131:                                              ; preds = %129
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %133 unwind label %93

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

135:                                              ; preds = %93, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %136

136:                                              ; preds = %135, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %137

137:                                              ; preds = %136, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %138

138:                                              ; preds = %137, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %7, align 8
  %141 = load i32, ptr %8, align 4
  %142 = insertvalue { ptr, i32 } poison, ptr %140, 0
  %143 = insertvalue { ptr, i32 } %142, i32 %141, 1
  resume { ptr, i32 } %143
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN11TSPMutation10regionSizeEP13TSPIndividual(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1 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 nounwind uwtable
declare dso_local void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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) #1 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11TSPMutation15exchangeRegionsEP13TSPIndividual(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.MTRand_int32, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN12MTRand_int32C2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3)
  %4 = invoke noundef i32 @_ZN11TSPMutation10regionSizeEP13TSPIndividual(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1)
          to label %5 unwind label %45

5:                                                ; preds = %2
  %6 = call noundef i32 @_ZN13TSPIndividual15getNumberCitiesEv(ptr noundef nonnull align 8 dereferenceable(64) %1)
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 24
  %9 = load ptr, ptr %8, align 8
  %10 = invoke noundef ptr %9(ptr noundef nonnull align 8 dereferenceable(64) %1)
          to label %11 unwind label %47

11:                                               ; preds = %5
  %12 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %13 unwind label %49

13:                                               ; preds = %11
  %14 = shl nsw i32 %4, 1
  %15 = sub nsw i32 %6, %14
  %16 = sext i32 %15 to i64
  %17 = urem i64 %12, %16
  %18 = invoke noundef i64 @_ZN12MTRand_int32clEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %19 unwind label %51

19:                                               ; preds = %13
  %20 = trunc i64 %17 to i32
  %21 = add nsw i32 %4, %20
  %22 = sub nsw i32 %15, %20
  %23 = sext i32 %22 to i64
  %24 = urem i64 %18, %23
  %25 = trunc i64 %24 to i32
  %26 = add i32 %21, %25
  %27 = add nsw i32 %14, %20
  %.not = icmp sgt i32 %27, %6
  %28 = add nsw i32 %26, %4
  %.not43 = icmp sgt i32 %28, %6
  %or.cond = select i1 %.not, i1 true, i1 %.not43
  %.not44 = icmp sgt i32 %21, %26
  %or.cond48 = select i1 %or.cond, i1 true, i1 %.not44
  br i1 %or.cond48, label %57, label %.preheader

.preheader:                                       ; preds = %19
  %29 = icmp sgt i32 %4, 0
  br i1 %29, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %.preheader
  %sext = shl i64 %17, 32
  %30 = sext i32 %26 to i64
  %wide.trip.count = zext nneg i32 %4 to i64
  %31 = ashr exact i64 %sext, 30
  %invariant.gep = getelementptr i8, ptr %10, i64 %31
  %invariant.gep51 = getelementptr i32, ptr %10, i64 %30
  %min.iters.check = icmp ult i32 %4, 12
  br i1 %min.iters.check, label %.lr.ph.preheader57, label %vector.memcheck

.lr.ph.preheader57:                               ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader57
  %gep.prol = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.ph
  %32 = load i32, ptr %gep.prol, align 4, !tbaa !8
  %gep52.prol = getelementptr i32, ptr %invariant.gep51, i64 %indvars.iv.ph
  %33 = load i32, ptr %gep52.prol, align 4, !tbaa !8
  store i32 %33, ptr %gep.prol, align 4, !tbaa !8
  store i32 %32, ptr %gep52.prol, align 4, !tbaa !8
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader57
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader57 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %34 = add nsw i64 %wide.trip.count, -1
  %35 = icmp eq i64 %indvars.iv.ph, %34
  br i1 %35, label %.loopexit, label %.lr.ph

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %36 = shl nuw nsw i64 %wide.trip.count, 2
  %37 = getelementptr i8, ptr %10, i64 %36
  %scevgep = getelementptr i8, ptr %37, i64 %31
  %38 = add nsw i64 %30, %wide.trip.count
  %39 = shl nsw i64 %38, 2
  %scevgep53 = getelementptr i8, ptr %10, i64 %39
  %bound0 = icmp ult ptr %invariant.gep, %scevgep53
  %bound1 = icmp ult ptr %invariant.gep51, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader57, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %40 = getelementptr i32, ptr %invariant.gep, i64 %index
  %41 = getelementptr i8, ptr %40, i64 16
  %wide.load = load <4 x i32>, ptr %40, align 4, !tbaa !8, !alias.scope !11, !noalias !14
  %wide.load54 = load <4 x i32>, ptr %41, align 4, !tbaa !8, !alias.scope !11, !noalias !14
  %42 = getelementptr i32, ptr %invariant.gep51, i64 %index
  %43 = getelementptr i8, ptr %42, i64 16
  %wide.load55 = load <4 x i32>, ptr %42, align 4, !tbaa !8, !alias.scope !14
  %wide.load56 = load <4 x i32>, ptr %43, align 4, !tbaa !8, !alias.scope !14
  store <4 x i32> %wide.load55, ptr %40, align 4, !tbaa !8, !alias.scope !11, !noalias !14
  store <4 x i32> %wide.load56, ptr %41, align 4, !tbaa !8, !alias.scope !11, !noalias !14
  store <4 x i32> %wide.load, ptr %42, align 4, !tbaa !8, !alias.scope !14
  store <4 x i32> %wide.load54, ptr %43, align 4, !tbaa !8, !alias.scope !14
  %index.next = add nuw i64 %index, 8
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.preheader57

45:                                               ; preds = %2
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %61

47:                                               ; preds = %5
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %61

49:                                               ; preds = %11
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %61

51:                                               ; preds = %59, %57, %13
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %61

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv
  %53 = load i32, ptr %gep, align 4, !tbaa !8
  %gep52 = getelementptr i32, ptr %invariant.gep51, i64 %indvars.iv
  %54 = load i32, ptr %gep52, align 4, !tbaa !8
  store i32 %54, ptr %gep, align 4, !tbaa !8
  store i32 %53, ptr %gep52, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %gep.1 = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.next
  %55 = load i32, ptr %gep.1, align 4, !tbaa !8
  %gep52.1 = getelementptr i32, ptr %invariant.gep51, i64 %indvars.iv.next
  %56 = load i32, ptr %gep52.1, align 4, !tbaa !8
  store i32 %56, ptr %gep.1, align 4, !tbaa !8
  store i32 %55, ptr %gep52.1, align 4, !tbaa !8
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.loopexit, label %.lr.ph, !llvm.loop !20

57:                                               ; preds = %19
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
          to label %59 unwind label %51

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.loopexit unwind label %51

.loopexit:                                        ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %.preheader, %59
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  ret void

61:                                               ; preds = %47, %51, %49, %45
  %.pn.pn.pn = phi { ptr, i32 } [ %46, %45 ], [ %48, %47 ], [ %52, %51 ], [ %50, %49 ]
  call void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN11TSPMutation10regionSizeEP13TSPIndividual(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #1 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 nounwind uwtable
declare dso_local void @_ZN12MTRand_int32D2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12}
!12 = distinct !{!12, !13}
!13 = distinct !{!13, !"LVerDomain"}
!14 = !{!15}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !17, !18, !19}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !17, !18}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass