; LLVM IR from SoloGameDevGitHub/AIEngine :: AdversarialSearch/Minimax/TicTacToeMinimax.ll (ZN16TicTacToeMinimax19predictMaxDecisionsEi)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; 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
define dso_local void @_ZN16TicTacToeMinimax19predictMaxDecisionsEi(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i1, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 -2147483648, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 3, ptr %7, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %45, %2
  %13 = load i32, ptr %7, align 4, !tbaa !5
  %14 = icmp slt i32 %13, 262144
  br i1 %14, label %15, label %48

15:                                               ; preds = %12
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr %7, align 4, !tbaa !5
  %18 = and i32 %16, %17
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %45

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = or i32 %21, %22
  store i32 %23, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %24, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %26 unwind label %33

26:                                               ; preds = %20
  store i32 %25, ptr %9, align 4, !tbaa !5
  %27 = load i32, ptr %9, align 4, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = icmp sgt i32 %27, %28
  br i1 %29, label %30, label %37

30:                                               ; preds = %26
  %31 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %31, ptr %6, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %32 unwind label %33

32:                                               ; preds = %30
  br label %44

33:                                               ; preds = %41, %30, %20
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %10, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %52

37:                                               ; preds = %26
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = icmp eq i32 %38, %39
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %42 unwind label %33

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42, %37
  br label %44

44:                                               ; preds = %43, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %45

45:                                               ; preds = %44, %15
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = shl i32 %46, 2
  store i32 %47, ptr %7, align 4, !tbaa !5
  br label %12, !llvm.loop !9

48:                                               ; preds = %12
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %49 = load i1, ptr %5, align 1
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %51

51:                                               ; preds = %50, %48
  ret void

52:                                               ; preds = %33
  %53 = load ptr, ptr %10, align 8
  %54 = load i32, ptr %11, align 4
  %55 = insertvalue { ptr, i32 } poison, ptr %53, 0
  %56 = insertvalue { ptr, i32 } %55, i32 %54, 1
  resume { ptr, i32 } %56
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; 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
define dso_local void @_ZN16TicTacToeMinimax19predictMaxDecisionsEi(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0, i32 noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  tail call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %4 = and i32 %1, 3
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %6, label %14

6:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %7 = or disjoint i32 %1, 3
  store i32 %7, ptr %3, align 4, !tbaa !5
  %8 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %7, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %9 unwind label %11

9:                                                ; preds = %6
  %.not = icmp eq i32 %8, -2147483648
  br i1 %.not, label %.invoke18, label %10

10:                                               ; preds = %9
  tail call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %.invoke18

11:                                               ; preds = %.invoke18, %.invoke, %108, %103, %102, %95, %90, %89, %82, %77, %76, %69, %64, %63, %56, %51, %50, %43, %38, %37, %30, %25, %24, %17, %6
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  resume { ptr, i32 } %12

.invoke18:                                        ; preds = %9, %10
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %13 unwind label %11

13:                                               ; preds = %.invoke18
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %14

14:                                               ; preds = %13, %2
  %.2 = phi i32 [ %8, %13 ], [ -2147483648, %2 ]
  %15 = and i32 %1, 12
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %27

17:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %18 = or disjoint i32 %1, 12
  store i32 %18, ptr %3, align 4, !tbaa !5
  %19 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %18, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %20 unwind label %11

20:                                               ; preds = %17
  %21 = icmp sgt i32 %19, %.2
  br i1 %21, label %25, label %22

22:                                               ; preds = %20
  %23 = icmp eq i32 %19, %.2
  br i1 %23, label %24, label %26

24:                                               ; preds = %22
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %26 unwind label %11

25:                                               ; preds = %20
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %26 unwind label %11

26:                                               ; preds = %25, %24, %22
  %.1.1 = phi i32 [ %19, %25 ], [ %.2, %24 ], [ %.2, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %27

27:                                               ; preds = %26, %14
  %.2.1 = phi i32 [ %.1.1, %26 ], [ %.2, %14 ]
  %28 = and i32 %1, 48
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %40

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %31 = or disjoint i32 %1, 48
  store i32 %31, ptr %3, align 4, !tbaa !5
  %32 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %31, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %33 unwind label %11

33:                                               ; preds = %30
  %34 = icmp sgt i32 %32, %.2.1
  br i1 %34, label %38, label %35

35:                                               ; preds = %33
  %36 = icmp eq i32 %32, %.2.1
  br i1 %36, label %37, label %39

37:                                               ; preds = %35
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %39 unwind label %11

38:                                               ; preds = %33
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %39 unwind label %11

39:                                               ; preds = %38, %37, %35
  %.1.2 = phi i32 [ %32, %38 ], [ %.2.1, %37 ], [ %.2.1, %35 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %40

40:                                               ; preds = %39, %27
  %.2.2 = phi i32 [ %.1.2, %39 ], [ %.2.1, %27 ]
  %41 = and i32 %1, 192
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %53

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %44 = or disjoint i32 %1, 192
  store i32 %44, ptr %3, align 4, !tbaa !5
  %45 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %44, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %46 unwind label %11

46:                                               ; preds = %43
  %47 = icmp sgt i32 %45, %.2.2
  br i1 %47, label %51, label %48

48:                                               ; preds = %46
  %49 = icmp eq i32 %45, %.2.2
  br i1 %49, label %50, label %52

50:                                               ; preds = %48
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %52 unwind label %11

51:                                               ; preds = %46
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %52 unwind label %11

52:                                               ; preds = %51, %50, %48
  %.1.3 = phi i32 [ %45, %51 ], [ %.2.2, %50 ], [ %.2.2, %48 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %53

53:                                               ; preds = %52, %40
  %.2.3 = phi i32 [ %.1.3, %52 ], [ %.2.2, %40 ]
  %54 = and i32 %1, 768
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %66

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %57 = or disjoint i32 %1, 768
  store i32 %57, ptr %3, align 4, !tbaa !5
  %58 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %57, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %59 unwind label %11

59:                                               ; preds = %56
  %60 = icmp sgt i32 %58, %.2.3
  br i1 %60, label %64, label %61

61:                                               ; preds = %59
  %62 = icmp eq i32 %58, %.2.3
  br i1 %62, label %63, label %65

63:                                               ; preds = %61
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %65 unwind label %11

64:                                               ; preds = %59
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %65 unwind label %11

65:                                               ; preds = %64, %63, %61
  %.1.4 = phi i32 [ %58, %64 ], [ %.2.3, %63 ], [ %.2.3, %61 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %66

66:                                               ; preds = %65, %53
  %.2.4 = phi i32 [ %.1.4, %65 ], [ %.2.3, %53 ]
  %67 = and i32 %1, 3072
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %79

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %70 = or disjoint i32 %1, 3072
  store i32 %70, ptr %3, align 4, !tbaa !5
  %71 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %70, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %72 unwind label %11

72:                                               ; preds = %69
  %73 = icmp sgt i32 %71, %.2.4
  br i1 %73, label %77, label %74

74:                                               ; preds = %72
  %75 = icmp eq i32 %71, %.2.4
  br i1 %75, label %76, label %78

76:                                               ; preds = %74
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %78 unwind label %11

77:                                               ; preds = %72
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %78 unwind label %11

78:                                               ; preds = %77, %76, %74
  %.1.5 = phi i32 [ %71, %77 ], [ %.2.4, %76 ], [ %.2.4, %74 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %79

79:                                               ; preds = %78, %66
  %.2.5 = phi i32 [ %.1.5, %78 ], [ %.2.4, %66 ]
  %80 = and i32 %1, 12288
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %92

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %83 = or disjoint i32 %1, 12288
  store i32 %83, ptr %3, align 4, !tbaa !5
  %84 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %83, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %85 unwind label %11

85:                                               ; preds = %82
  %86 = icmp sgt i32 %84, %.2.5
  br i1 %86, label %90, label %87

87:                                               ; preds = %85
  %88 = icmp eq i32 %84, %.2.5
  br i1 %88, label %89, label %91

89:                                               ; preds = %87
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %91 unwind label %11

90:                                               ; preds = %85
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %91 unwind label %11

91:                                               ; preds = %90, %89, %87
  %.1.6 = phi i32 [ %84, %90 ], [ %.2.5, %89 ], [ %.2.5, %87 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %92

92:                                               ; preds = %91, %79
  %.2.6 = phi i32 [ %.1.6, %91 ], [ %.2.5, %79 ]
  %93 = and i32 %1, 49152
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %105

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %96 = or disjoint i32 %1, 49152
  store i32 %96, ptr %3, align 4, !tbaa !5
  %97 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %96, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %98 unwind label %11

98:                                               ; preds = %95
  %99 = icmp sgt i32 %97, %.2.6
  br i1 %99, label %103, label %100

100:                                              ; preds = %98
  %101 = icmp eq i32 %97, %.2.6
  br i1 %101, label %102, label %104

102:                                              ; preds = %100
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %104 unwind label %11

103:                                              ; preds = %98
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %104 unwind label %11

104:                                              ; preds = %103, %102, %100
  %.1.7 = phi i32 [ %97, %103 ], [ %.2.6, %102 ], [ %.2.6, %100 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %105

105:                                              ; preds = %104, %92
  %.2.7 = phi i32 [ %.1.7, %104 ], [ %.2.6, %92 ]
  %106 = and i32 %1, 196608
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %117

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %109 = or disjoint i32 %1, 196608
  store i32 %109, ptr %3, align 4, !tbaa !5
  %110 = invoke noundef i32 @_ZN16TicTacToeMinimax19predictMinTreeScoreEiiii(i32 noundef %109, i32 noundef -2147483648, i32 noundef 2147483647, i32 noundef 1)
          to label %111 unwind label %11

111:                                              ; preds = %108
  %112 = icmp sgt i32 %110, %.2.7
  br i1 %112, label %115, label %113

113:                                              ; preds = %111
  %114 = icmp eq i32 %110, %.2.7
  br i1 %114, label %.invoke, label %116

115:                                              ; preds = %111
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %.invoke

.invoke:                                          ; preds = %113, %115
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %116 unwind label %11

116:                                              ; preds = %.invoke, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %117

117:                                              ; preds = %116, %105
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass