; LLVM IR from HenryRLee/PokerHandEvaluator :: cpp/test (evaluation7_standalone)

; 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.phevaluator::Rank" = type { i32 }
%"class.phevaluator::Card" = type { i32 }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [97 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.7 = 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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.phevaluator::Rank", align 4
  %15 = alloca %"class.phevaluator::Card", align 4
  %16 = alloca %"class.phevaluator::Card", align 4
  %17 = alloca %"class.phevaluator::Card", align 4
  %18 = alloca %"class.phevaluator::Card", align 4
  %19 = alloca %"class.phevaluator::Card", align 4
  %20 = alloca %"class.phevaluator::Card", align 4
  %21 = alloca %"class.phevaluator::Card", align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 133784560, ptr %4, align 4, !tbaa !5
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %140, %0
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 46
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %143

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %7, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %136, %28
  %32 = load i32, ptr %7, align 4, !tbaa !5
  %33 = icmp slt i32 %32, 47
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %139

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %8, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %132, %35
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 48
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %135

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %128, %42
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = icmp slt i32 %46, 49
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %131

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %10, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %124, %49
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 50
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %127

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %11, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %120, %56
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = icmp slt i32 %60, 51
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %123

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %12, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %116, %63
  %67 = load i32, ptr %12, align 4, !tbaa !5
  %68 = icmp slt i32 %67, 52
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %119

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 noundef %71)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %72 = load i32, ptr %7, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef %72)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %73 = load i32, ptr %8, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 noundef %73)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %74 = load i32, ptr %9, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef %74)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %75 = load i32, ptr %10, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef %75)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %76 = load i32, ptr %11, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef %76)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %77 = load i32, ptr %12, align 4, !tbaa !5
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef %77)
  %78 = call i32 @_ZN11phevaluator13EvaluateCardsERKNS_4CardES2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %79 = getelementptr inbounds %"class.phevaluator::Rank", ptr %14, i32 0, i32 0
  store i32 %78, ptr %79, align 4
  %80 = call noundef i32 @_ZNK11phevaluator4Rank5valueEv(ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  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 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  store i32 %80, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = call signext i16 @kev_eval_7cards(i32 noundef %81, i32 noundef %82, i32 noundef %83, i32 noundef %84, i32 noundef %85, i32 noundef %86, i32 noundef %87)
  %89 = sext i16 %88 to i32
  store i32 %89, ptr %22, align 4, !tbaa !5
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = load i32, ptr %22, align 4, !tbaa !5
  %92 = icmp eq i32 %90, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %70
  br label %96

94:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 32, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

95:                                               ; No predecessors!
  br label %96

96:                                               ; preds = %95, %93
  %97 = load i32, ptr %2, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %2, align 4, !tbaa !5
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef i32 @_Z10percentagexx(i64 noundef %100, i64 noundef 133784560)
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = icmp sgt i32 %101, %102
  br i1 %103, label %104, label %115

104:                                              ; preds = %96
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef i32 @_Z10percentagexx(i64 noundef %106, i64 noundef 133784560)
  store i32 %107, ptr %3, align 4, !tbaa !5
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = srem i32 %108, 10
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %114

111:                                              ; preds = %104
  %112 = load i32, ptr %3, align 4, !tbaa !5
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %112)
  br label %114

114:                                              ; preds = %111, %104
  br label %115

115:                                              ; preds = %114, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %12, align 4, !tbaa !5
  br label %66, !llvm.loop !9

119:                                              ; preds = %69
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %11, align 4, !tbaa !5
  br label %59, !llvm.loop !11

123:                                              ; preds = %62
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %10, align 4, !tbaa !5
  br label %52, !llvm.loop !12

127:                                              ; preds = %55
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %9, align 4, !tbaa !5
  br label %45, !llvm.loop !13

131:                                              ; preds = %48
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %8, align 4, !tbaa !5
  br label %38, !llvm.loop !14

135:                                              ; preds = %41
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %7, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %7, align 4, !tbaa !5
  br label %31, !llvm.loop !15

139:                                              ; preds = %34
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %5, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %5, align 4, !tbaa !5
  br label %24, !llvm.loop !16

143:                                              ; preds = %27
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %145 = load i32, ptr %2, align 4, !tbaa !5
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %145)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %147 = load i32, ptr %1, align 4
  ret i32 %147
}

declare i32 @printf(ptr noundef, ...) #3

declare i32 @_ZN11phevaluator13EvaluateCardsERKNS_4CardES2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11phevaluator4Rank5valueEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare signext i16 @kev_eval_7cards(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress norecurse 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 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; 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.phevaluator::Rank" = type { i32 }
%"class.phevaluator::Card" = type { i32 }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [97 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.7 = 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

; 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 nounwind uwtable
declare dso_local noundef i32 @_Z10percentagexx(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %"class.phevaluator::Rank", align 4
  %2 = alloca %"class.phevaluator::Card", align 4
  %3 = alloca %"class.phevaluator::Card", align 4
  %4 = alloca %"class.phevaluator::Card", align 4
  %5 = alloca %"class.phevaluator::Card", align 4
  %6 = alloca %"class.phevaluator::Card", align 4
  %7 = alloca %"class.phevaluator::Card", align 4
  %8 = alloca %"class.phevaluator::Card", align 4
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %.lr.ph107.preheader

.loopexit62:                                      ; preds = %.loopexit61
  %exitcond114.not = icmp eq i32 %13, 46
  br i1 %exitcond114.not, label %10, label %.lr.ph107.preheader, !llvm.loop !5

10:                                               ; preds = %.loopexit62
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.2.lcssa)
  ret i32 0

.lr.ph107.preheader:                              ; preds = %.loopexit62, %0
  %.0112 = phi i32 [ 0, %0 ], [ %.2.lcssa, %.loopexit62 ]
  %.044111 = phi i32 [ 0, %0 ], [ %.246.lcssa, %.loopexit62 ]
  %.057110 = phi i32 [ 0, %0 ], [ %13, %.loopexit62 ]
  %13 = add nuw nsw i32 %.057110, 1
  br label %.lr.ph107

.loopexit61:                                      ; preds = %.loopexit60, %.lr.ph107
  %.246.lcssa = phi i32 [ %.145105, %.lr.ph107 ], [ %.7, %.loopexit60 ]
  %.2.lcssa = phi i32 [ %.1106, %.lr.ph107 ], [ %22, %.loopexit60 ]
  %exitcond.not = icmp eq i32 %14, 47
  br i1 %exitcond.not, label %.loopexit62, label %.lr.ph107, !llvm.loop !7

.lr.ph107:                                        ; preds = %.lr.ph107.preheader, %.loopexit61
  %.1106 = phi i32 [ %.2.lcssa, %.loopexit61 ], [ %.0112, %.lr.ph107.preheader ]
  %.145105 = phi i32 [ %.246.lcssa, %.loopexit61 ], [ %.044111, %.lr.ph107.preheader ]
  %.056104 = phi i32 [ %14, %.loopexit61 ], [ %13, %.lr.ph107.preheader ]
  %14 = add nuw nsw i32 %.056104, 1
  %15 = icmp ult i32 %.056104, 47
  br i1 %15, label %.lr.ph95.preheader, label %.loopexit61

.loopexit60:                                      ; preds = %.loopexit59
  %16 = icmp ult i32 %.05598, 47
  br i1 %16, label %.lr.ph95.preheader, label %.loopexit61, !llvm.loop !8

.lr.ph95.preheader:                               ; preds = %.lr.ph107, %.loopexit60
  %.2100 = phi i32 [ %22, %.loopexit60 ], [ %.1106, %.lr.ph107 ]
  %.24699 = phi i32 [ %.7, %.loopexit60 ], [ %.145105, %.lr.ph107 ]
  %.05598 = phi i32 [ %17, %.loopexit60 ], [ %14, %.lr.ph107 ]
  %17 = add nuw nsw i32 %.05598, 1
  br label %.lr.ph89.preheader

.loopexit59:                                      ; preds = %.loopexit58
  %18 = icmp ult i32 %.05492, 48
  br i1 %18, label %.lr.ph89.preheader, label %.loopexit60, !llvm.loop !9

.lr.ph89.preheader:                               ; preds = %.loopexit59, %.lr.ph95.preheader
  %.394 = phi i32 [ %22, %.loopexit59 ], [ %.2100, %.lr.ph95.preheader ]
  %.34793 = phi i32 [ %.7, %.loopexit59 ], [ %.24699, %.lr.ph95.preheader ]
  %.05492 = phi i32 [ %19, %.loopexit59 ], [ %17, %.lr.ph95.preheader ]
  %19 = add nuw nsw i32 %.05492, 1
  br label %.lr.ph83.preheader

.loopexit58:                                      ; preds = %.loopexit
  %20 = icmp ult i32 %.05386, 49
  br i1 %20, label %.lr.ph83.preheader, label %.loopexit59, !llvm.loop !10

.lr.ph83.preheader:                               ; preds = %.loopexit58, %.lr.ph89.preheader
  %.488 = phi i32 [ %22, %.loopexit58 ], [ %.394, %.lr.ph89.preheader ]
  %.44887 = phi i32 [ %.7, %.loopexit58 ], [ %.34793, %.lr.ph89.preheader ]
  %.05386 = phi i32 [ %21, %.loopexit58 ], [ %19, %.lr.ph89.preheader ]
  %21 = add nuw nsw i32 %.05386, 1
  br label %.lr.ph.preheader

.loopexit:                                        ; preds = %41
  %22 = trunc nsw i64 %indvars.iv.next to i32
  %23 = icmp ult i32 %.05280, 50
  br i1 %23, label %.lr.ph.preheader, label %.loopexit58, !llvm.loop !11

.lr.ph.preheader:                                 ; preds = %.loopexit, %.lr.ph83.preheader
  %.582 = phi i32 [ %22, %.loopexit ], [ %.488, %.lr.ph83.preheader ]
  %.54981 = phi i32 [ %.7, %.loopexit ], [ %.44887, %.lr.ph83.preheader ]
  %.05280 = phi i32 [ %24, %.loopexit ], [ %21, %.lr.ph83.preheader ]
  %24 = add nuw nsw i32 %.05280, 1
  %25 = sext i32 %.582 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %41
  %indvars.iv = phi i64 [ %25, %.lr.ph.preheader ], [ %indvars.iv.next, %41 ]
  %.65077 = phi i32 [ %.54981, %.lr.ph.preheader ], [ %.7, %41 ]
  %.05176 = phi i32 [ %24, %.lr.ph.preheader ], [ %42, %41 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef %.057110)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %.056104)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %.05598)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %.05492)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %.05386)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef %.05280)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @_ZN11phevaluator4CardC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %.05176)
  %26 = call i32 @_ZN11phevaluator13EvaluateCardsERKNS_4CardES2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i32 %26, ptr %1, align 4
  %27 = call noundef i32 @_ZNK11phevaluator4Rank5valueEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %28 = call signext i16 @kev_eval_7cards(i32 noundef %.057110, i32 noundef %.056104, i32 noundef %.05598, i32 noundef %.05492, i32 noundef %.05386, i32 noundef %.05280, i32 noundef %.05176)
  %29 = sext i16 %28 to i32
  %30 = icmp eq i32 %27, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 32, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

32:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %33 = call noundef i32 @_Z10percentagexx(i64 noundef %indvars.iv.next, i64 noundef 133784560)
  %34 = icmp sgt i32 %33, %.65077
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = call noundef i32 @_Z10percentagexx(i64 noundef %indvars.iv.next, i64 noundef 133784560)
  %37 = srem i32 %36, 10
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %35
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %36)
  br label %41

41:                                               ; preds = %35, %39, %32
  %.7 = phi i32 [ %36, %39 ], [ %36, %35 ], [ %.65077, %32 ]
  %42 = add nuw nsw i32 %.05176, 1
  %43 = icmp ult i32 %.05176, 51
  br i1 %43, label %.lr.ph, label %.loopexit, !llvm.loop !12
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare i32 @_ZN11phevaluator13EvaluateCardsERKNS_4CardES2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11phevaluator4Rank5valueEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare signext i16 @kev_eval_7cards(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress norecurse 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 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 #4 = { "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 = { noreturn 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 = { nounwind }
attributes #7 = { noreturn 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}


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