; LLVM IR from mbrenman/TetrisPlayground :: Train.ll (Z16evolvePopulationP15playerWithScore)

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 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

; 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) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16evolvePopulationP15playerWithScore(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca double, align 8
  %11 = alloca %struct.playerWithScore, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  call void @qsort(ptr noundef %14, i64 noundef 10, i64 noundef 24, ptr noundef @_Z10playerCompPKvS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %33, %1
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = icmp slt i32 %16, 5
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %36

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds %struct.playerWithScore, ptr %20, i64 %22
  %24 = getelementptr inbounds %struct.playerWithScore, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  store ptr %25, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %26)
  store double %27, ptr %5, align 8, !tbaa !14
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %struct.playerWithScore, ptr %28, i64 %30
  %32 = load double, ptr %5, align 8, !tbaa !14
  call void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20) %31, double noundef %32, i32 noundef 5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %33

33:                                               ; preds = %19
  %34 = load i32, ptr %3, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %3, align 4, !tbaa !9
  br label %15, !llvm.loop !15

36:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 5, ptr %6, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %93, %36
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = icmp slt i32 %38, 10
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %96

41:                                               ; preds = %37
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds %struct.playerWithScore, ptr %42, i64 %44
  %46 = getelementptr inbounds %struct.playerWithScore, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = icmp eq ptr %47, null
  br i1 %48, label %53, label %49

49:                                               ; preds = %41
  %50 = load ptr, ptr %47, align 8, !tbaa !17
  %51 = getelementptr inbounds ptr, ptr %50, i64 2
  %52 = load ptr, ptr %51, align 8
  call void %52(ptr noundef nonnull align 8 dereferenceable(56) %47) #7
  br label %53

53:                                               ; preds = %49, %41
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.playerWithScore, ptr %54, i64 %56
  %58 = getelementptr inbounds %struct.playerWithScore, ptr %57, i32 0, i32 0
  store ptr null, ptr %58, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %59 = call i32 @rand() #7
  %60 = srem i32 %59, 100
  %61 = icmp slt i32 %60, 15
  %62 = zext i1 %61 to i8
  store i8 %62, ptr %8, align 1, !tbaa !19
  %63 = load i8, ptr %8, align 1, !tbaa !19, !range !21, !noundef !22
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %70

65:                                               ; preds = %53
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = call noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef %66)
  store ptr %67, ptr %7, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %84

70:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  %71 = call i32 @rand() #7
  %72 = srem i32 %71, 2
  %73 = icmp ne i32 %72, 0
  %74 = zext i1 %73 to i8
  store i8 %74, ptr %9, align 1, !tbaa !19
  %75 = load i8, ptr %9, align 1, !tbaa !19, !range !21, !noundef !22
  %76 = trunc i8 %75 to i1
  br i1 %76, label %77, label %80

77:                                               ; preds = %70
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = call noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef %78)
  store ptr %79, ptr %7, align 8, !tbaa !5
  br label %83

80:                                               ; preds = %70
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = call noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef %81)
  store ptr %82, ptr %7, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %80, %77
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  br label %84

84:                                               ; preds = %83, %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %85)
  store double %86, ptr %10, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load double, ptr %10, align 8, !tbaa !14
  call void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20) %11, ptr noundef %87, double noundef %88, i32 noundef 5)
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %struct.playerWithScore, ptr %89, i64 %91
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %92, ptr align 8 %11, i64 20, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %93

93:                                               ; preds = %84
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %6, align 4, !tbaa !9
  br label %37, !llvm.loop !24

96:                                               ; preds = %40
  ret void
}

; 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 noundef double @_Z14evaluatePlayerP5Agent(ptr noundef) #2

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z10playerCompPKvS0_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20), double noundef, i32 noundef) #4 align 2

; Function Attrs: nounwind
declare i32 @rand() #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, double noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 "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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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, !6, i64 0}
!12 = !{!"_ZTS15playerWithScore", !6, i64 0, !13, i64 8, !10, i64 16}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{i64 0, i64 8, !5, i64 8, i64 8, !14, i64 16, i64 4, !9}
!24 = distinct !{!24, !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"

%"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 }
%struct.playerWithScore = type <{ ptr, double, i32, [4 x i8] }>

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 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

; 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 #1

; 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 #2 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)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16evolvePopulationP15playerWithScore(ptr noundef %0) local_unnamed_addr #2 {
.preheader.preheader:
  %1 = alloca %struct.playerWithScore, align 8
  %2 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
  %3 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  tail call void @qsort(ptr noundef %0, i64 noundef 10, i64 noundef 24, ptr noundef nonnull @_Z10playerCompPKvS0_)
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = tail call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %4)
  tail call void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20) %0, double noundef %5, i32 noundef 5)
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = tail call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %7)
  tail call void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20) %6, double noundef %8, i32 noundef 5)
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = tail call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %10)
  tail call void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20) %9, double noundef %11, i32 noundef 5)
  %12 = getelementptr inbounds i8, ptr %0, i64 72
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %13)
  tail call void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20) %12, double noundef %14, i32 noundef 5)
  %15 = getelementptr inbounds i8, ptr %0, i64 96
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = tail call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %16)
  tail call void @_ZN15playerWithScore13addMoreTrialsEdi(ptr noundef nonnull align 8 dereferenceable(20) %15, double noundef %17, i32 noundef 5)
  %18 = getelementptr inbounds i8, ptr %0, i64 120
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %25, label %21

21:                                               ; preds = %.preheader.preheader
  %22 = load ptr, ptr %19, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load ptr, ptr %23, align 8
  tail call void %24(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  br label %25

25:                                               ; preds = %21, %.preheader.preheader
  store ptr null, ptr %18, align 8, !tbaa !5
  %26 = tail call i32 @rand() #7
  %27 = srem i32 %26, 100
  %28 = icmp slt i32 %27, 15
  br i1 %28, label %29, label %33

29:                                               ; preds = %25
  %30 = tail call noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.preheader.1

33:                                               ; preds = %25
  %34 = tail call i32 @rand() #7
  %35 = and i32 %34, 1
  %.not = icmp eq i32 %35, 0
  br i1 %.not, label %38, label %36

36:                                               ; preds = %33
  %37 = tail call noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.1

38:                                               ; preds = %33
  %39 = tail call noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.1

.preheader.1:                                     ; preds = %36, %38, %29
  %.1 = phi ptr [ %30, %29 ], [ %37, %36 ], [ %39, %38 ]
  %40 = tail call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %.1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20) %1, ptr noundef %.1, double noundef %40, i32 noundef 5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %18, ptr noundef nonnull align 8 dereferenceable(20) %1, i64 20, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  %41 = getelementptr inbounds i8, ptr %0, i64 144
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %48, label %44

44:                                               ; preds = %.preheader.1
  %45 = load ptr, ptr %42, align 8, !tbaa !12
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = load ptr, ptr %46, align 8
  call void %47(ptr noundef nonnull align 8 dereferenceable(56) %42) #7
  br label %48

48:                                               ; preds = %44, %.preheader.1
  store ptr null, ptr %41, align 8, !tbaa !5
  %49 = call i32 @rand() #7
  %50 = srem i32 %49, 100
  %51 = icmp slt i32 %50, 15
  br i1 %51, label %59, label %52

52:                                               ; preds = %48
  %53 = call i32 @rand() #7
  %54 = and i32 %53, 1
  %.not.1 = icmp eq i32 %54, 0
  br i1 %.not.1, label %57, label %55

55:                                               ; preds = %52
  %56 = call noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.2

57:                                               ; preds = %52
  %58 = call noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.2

59:                                               ; preds = %48
  %60 = call noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.preheader.2

.preheader.2:                                     ; preds = %59, %57, %55
  %.1.1 = phi ptr [ %60, %59 ], [ %56, %55 ], [ %58, %57 ]
  %63 = call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %.1.1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20) %1, ptr noundef %.1.1, double noundef %63, i32 noundef 5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %41, ptr noundef nonnull align 8 dereferenceable(20) %1, i64 20, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  %64 = getelementptr inbounds i8, ptr %0, i64 168
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = icmp eq ptr %65, null
  br i1 %66, label %71, label %67

67:                                               ; preds = %.preheader.2
  %68 = load ptr, ptr %65, align 8, !tbaa !12
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %70 = load ptr, ptr %69, align 8
  call void %70(ptr noundef nonnull align 8 dereferenceable(56) %65) #7
  br label %71

71:                                               ; preds = %67, %.preheader.2
  store ptr null, ptr %64, align 8, !tbaa !5
  %72 = call i32 @rand() #7
  %73 = srem i32 %72, 100
  %74 = icmp slt i32 %73, 15
  br i1 %74, label %82, label %75

75:                                               ; preds = %71
  %76 = call i32 @rand() #7
  %77 = and i32 %76, 1
  %.not.2 = icmp eq i32 %77, 0
  br i1 %.not.2, label %80, label %78

78:                                               ; preds = %75
  %79 = call noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.3

80:                                               ; preds = %75
  %81 = call noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.3

82:                                               ; preds = %71
  %83 = call noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.preheader.3

.preheader.3:                                     ; preds = %82, %80, %78
  %.1.2 = phi ptr [ %83, %82 ], [ %79, %78 ], [ %81, %80 ]
  %86 = call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %.1.2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20) %1, ptr noundef %.1.2, double noundef %86, i32 noundef 5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %64, ptr noundef nonnull align 8 dereferenceable(20) %1, i64 20, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  %87 = getelementptr inbounds i8, ptr %0, i64 192
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = icmp eq ptr %88, null
  br i1 %89, label %94, label %90

90:                                               ; preds = %.preheader.3
  %91 = load ptr, ptr %88, align 8, !tbaa !12
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  %93 = load ptr, ptr %92, align 8
  call void %93(ptr noundef nonnull align 8 dereferenceable(56) %88) #7
  br label %94

94:                                               ; preds = %90, %.preheader.3
  store ptr null, ptr %87, align 8, !tbaa !5
  %95 = call i32 @rand() #7
  %96 = srem i32 %95, 100
  %97 = icmp slt i32 %96, 15
  br i1 %97, label %105, label %98

98:                                               ; preds = %94
  %99 = call i32 @rand() #7
  %100 = and i32 %99, 1
  %.not.3 = icmp eq i32 %100, 0
  br i1 %.not.3, label %103, label %101

101:                                              ; preds = %98
  %102 = call noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.4

103:                                              ; preds = %98
  %104 = call noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %.preheader.4

105:                                              ; preds = %94
  %106 = call noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.preheader.4

.preheader.4:                                     ; preds = %105, %103, %101
  %.1.3 = phi ptr [ %106, %105 ], [ %102, %101 ], [ %104, %103 ]
  %109 = call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %.1.3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20) %1, ptr noundef %.1.3, double noundef %109, i32 noundef 5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %87, ptr noundef nonnull align 8 dereferenceable(20) %1, i64 20, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  %110 = getelementptr inbounds i8, ptr %0, i64 216
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = icmp eq ptr %111, null
  br i1 %112, label %117, label %113

113:                                              ; preds = %.preheader.4
  %114 = load ptr, ptr %111, align 8, !tbaa !12
  %115 = getelementptr inbounds i8, ptr %114, i64 16
  %116 = load ptr, ptr %115, align 8
  call void %116(ptr noundef nonnull align 8 dereferenceable(56) %111) #7
  br label %117

117:                                              ; preds = %113, %.preheader.4
  store ptr null, ptr %110, align 8, !tbaa !5
  %118 = call i32 @rand() #7
  %119 = srem i32 %118, 100
  %120 = icmp slt i32 %119, 15
  br i1 %120, label %128, label %121

121:                                              ; preds = %117
  %122 = call i32 @rand() #7
  %123 = and i32 %122, 1
  %.not.4 = icmp eq i32 %123, 0
  br i1 %.not.4, label %126, label %124

124:                                              ; preds = %121
  %125 = call noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %132

126:                                              ; preds = %121
  %127 = call noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef nonnull %0)
  br label %132

128:                                              ; preds = %117
  %129 = call noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef nonnull %0)
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %132

132:                                              ; preds = %128, %126, %124
  %.1.4 = phi ptr [ %129, %128 ], [ %125, %124 ], [ %127, %126 ]
  %133 = call noundef double @_Z14evaluatePlayerP5Agent(ptr noundef %.1.4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20) %1, ptr noundef %.1.4, double noundef %133, i32 noundef 5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %110, ptr noundef nonnull align 8 dereferenceable(20) %1, i64 20, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  ret void
}

; 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 noundef double @_Z14evaluatePlayerP5Agent(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z10playerCompPKvS0_(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z19randomMutatedPlayerP15playerWithScore(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z16getMutatedPlayerP15playerWithScore(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18getCrossoverPlayerP15playerWithScore(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15playerWithScoreC2EP14HeuristicAgentdi(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, double noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nofree "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 "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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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, !7, i64 0}
!6 = !{!"_ZTS15playerWithScore", !7, i64 0, !10, i64 8, !11, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !9, i64 0}
!14 = !{i64 0, i64 8, !15, i64 8, i64 8, !16, i64 16, i64 4, !17}
!15 = !{!7, !7, i64 0}
!16 = !{!10, !10, i64 0}
!17 = !{!11, !11, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass