; LLVM IR from upupming/algorithm :: upupming/1003.ll (Z5solvev)

; 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 }

@n = external dso_local global i32, align 4
@c1 = external dso_local global i32, align 4
@c2 = external dso_local global i32, align 4
@teams = external dso_local global [505 x i32], align 16
@adj = external dso_local global [505 x [505 x i32]], align 16
@d = external dso_local global [505 x i32], align 16
@accTeams = external dso_local global [505 x i32], align 16
@cnt = external dso_local global [505 x i32], align 16
@visited = external dso_local global [505 x i8], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5relaxiii(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %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 = load i32, ptr @c1, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %7
  store i32 0, ptr %8, align 4, !tbaa !5
  %9 = load i32, ptr @c1, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [505 x i32], ptr @teams, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = load i32, ptr @c1, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [505 x i32], ptr @accTeams, i64 0, i64 %14
  store i32 %12, ptr %15, align 4, !tbaa !5
  %16 = load i32, ptr @c1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [505 x i32], ptr @cnt, i64 0, i64 %17
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %93, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 -1, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1000000000, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %45, %19
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %48

25:                                               ; preds = %20
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !9, !range !11, !noundef !12
  %30 = trunc i8 %29 to i1
  br i1 %30, label %44, label %31

31:                                               ; preds = %25
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %44

38:                                               ; preds = %31
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  store i32 %42, ptr %2, align 4, !tbaa !5
  %43 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %43, ptr %1, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %38, %31, %25
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %3, align 4, !tbaa !5
  br label %20, !llvm.loop !13

48:                                               ; preds = %24
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = icmp eq i32 %49, -1
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 3, ptr %4, align 4
  br label %91

52:                                               ; preds = %48
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %54
  store i8 1, ptr %55, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %87, %52
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %90

61:                                               ; preds = %56
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !9, !range !11, !noundef !12
  %66 = trunc i8 %65 to i1
  br i1 %66, label %86, label %67

67:                                               ; preds = %61
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [505 x [505 x i32]], ptr @adj, i64 0, i64 %69
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [505 x i32], ptr %70, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = icmp ne i32 %74, 1000000000
  br i1 %75, label %76, label %86

76:                                               ; preds = %67
  %77 = load i32, ptr %1, align 4, !tbaa !5
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = load i32, ptr %1, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [505 x [505 x i32]], ptr @adj, i64 0, i64 %80
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [505 x i32], ptr %81, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  call void @_Z5relaxiii(i32 noundef %77, i32 noundef %78, i32 noundef %85)
  br label %86

86:                                               ; preds = %76, %67, %61
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %56, !llvm.loop !15

90:                                               ; preds = %60
  store i32 0, ptr %4, align 4
  br label %91

91:                                               ; preds = %90, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  %92 = load i32, ptr %4, align 4
  switch i32 %92, label %107 [
    i32 0, label %93
    i32 3, label %94
  ]

93:                                               ; preds = %91
  br label %19, !llvm.loop !16

94:                                               ; preds = %91
  %95 = load i32, ptr @c2, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [505 x i32], ptr @cnt, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %98)
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef @.str)
  %101 = load i32, ptr @c2, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [505 x i32], ptr @accTeams, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %100, i32 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret void

107:                                              ; preds = %91
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

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


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

%"class.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 }

@n = external dso_local local_unnamed_addr global i32, align 4
@c1 = external dso_local local_unnamed_addr global i32, align 4
@c2 = external dso_local local_unnamed_addr global i32, align 4
@teams = external dso_local local_unnamed_addr global [505 x i32], align 16
@adj = external dso_local local_unnamed_addr global [505 x [505 x i32]], align 16
@d = external dso_local local_unnamed_addr global [505 x i32], align 16
@accTeams = external dso_local local_unnamed_addr global [505 x i32], align 16
@cnt = external dso_local local_unnamed_addr global [505 x i32], align 16
@visited = external dso_local local_unnamed_addr global [505 x i8], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5relaxiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = load i32, ptr @c1, align 4, !tbaa !5
  %2 = sext i32 %1 to i64
  %3 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %2
  store i32 0, ptr %3, align 4, !tbaa !5
  %4 = getelementptr inbounds [505 x i32], ptr @teams, i64 0, i64 %2
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds [505 x i32], ptr @accTeams, i64 0, i64 %2
  store i32 %5, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds [505 x i32], ptr @cnt, i64 0, i64 %2
  store i32 1, ptr %7, align 4, !tbaa !5
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %.pre, 0
  br i1 %8, label %.lr.ph.preheader, label %._crit_edge.thread

.loopexit:                                        ; preds = %54, %42
  %9 = phi i32 [ %14, %42 ], [ %55, %54 ]
  %10 = phi i32 [ %13, %42 ], [ %55, %54 ]
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %0, %.loopexit
  %12 = phi i1 [ %11, %.loopexit ], [ %8, %0 ]
  %13 = phi i32 [ %10, %.loopexit ], [ %.pre, %0 ]
  %14 = phi i32 [ %9, %.loopexit ], [ %.pre, %0 ]
  %wide.trip.count = zext nneg i32 %13 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %15 = icmp eq i32 %13, 1
  br i1 %15, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph

._crit_edge.unr-lcssa:                            ; preds = %41, %.lr.ph.preheader
  %.123.lcssa.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %.123.1, %41 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %41 ]
  %.02130.unr = phi i32 [ 1000000000, %.lr.ph.preheader ], [ %.1.1, %41 ]
  %.02229.unr = phi i32 [ -1, %.lr.ph.preheader ], [ %.123.1, %41 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa
  %16 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %indvars.iv.unr
  %17 = load i8, ptr %16, align 1, !tbaa !9, !range !11, !noundef !12
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %._crit_edge, label %19

19:                                               ; preds = %.lr.ph.epil
  %20 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %indvars.iv.unr
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp slt i32 %21, %.02130.unr
  %23 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %spec.select.epil = select i1 %22, i32 %23, i32 %.02229.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %19, %._crit_edge.unr-lcssa
  %.123.lcssa = phi i32 [ %.123.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.02229.unr, %.lr.ph.epil ], [ %spec.select.epil, %19 ]
  %24 = icmp eq i32 %.123.lcssa, -1
  br i1 %24, label %._crit_edge.thread, label %42

.lr.ph:                                           ; preds = %41, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %41 ]
  %.02130 = phi i32 [ 1000000000, %.lr.ph.preheader.new ], [ %.1.1, %41 ]
  %.02229 = phi i32 [ -1, %.lr.ph.preheader.new ], [ %.123.1, %41 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %41 ]
  %25 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %indvars.iv
  %26 = load i8, ptr %25, align 2, !tbaa !9, !range !11, !noundef !12
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %.lr.ph.1, label %28

28:                                               ; preds = %.lr.ph
  %29 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %indvars.iv
  %30 = load i32, ptr %29, align 8, !tbaa !5
  %31 = icmp slt i32 %30, %.02130
  %32 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %31, i32 %32, i32 %.02229
  %spec.select26 = tail call i32 @llvm.smin.i32(i32 %30, i32 %.02130)
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %28, %.lr.ph
  %.123 = phi i32 [ %.02229, %.lr.ph ], [ %spec.select, %28 ]
  %.1 = phi i32 [ %.02130, %.lr.ph ], [ %spec.select26, %28 ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %33 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %indvars.iv.next
  %34 = load i8, ptr %33, align 1, !tbaa !9, !range !11, !noundef !12
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %41, label %36

36:                                               ; preds = %.lr.ph.1
  %37 = getelementptr inbounds [505 x i32], ptr @d, i64 0, i64 %indvars.iv.next
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp slt i32 %38, %.1
  %40 = trunc nuw nsw i64 %indvars.iv.next to i32
  %spec.select.1 = select i1 %39, i32 %40, i32 %.123
  %spec.select26.1 = tail call i32 @llvm.smin.i32(i32 %38, i32 %.1)
  br label %41

41:                                               ; preds = %36, %.lr.ph.1
  %.123.1 = phi i32 [ %.123, %.lr.ph.1 ], [ %spec.select.1, %36 ]
  %.1.1 = phi i32 [ %.1, %.lr.ph.1 ], [ %spec.select26.1, %36 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph, !llvm.loop !13

42:                                               ; preds = %._crit_edge
  %43 = sext i32 %.123.lcssa to i64
  %44 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %43
  store i8 1, ptr %44, align 1, !tbaa !9
  br i1 %12, label %.lr.ph34, label %.loopexit

.lr.ph34:                                         ; preds = %42, %54
  %45 = phi i32 [ %55, %54 ], [ %14, %42 ]
  %indvars.iv36 = phi i64 [ %indvars.iv.next37, %54 ], [ 0, %42 ]
  %46 = getelementptr inbounds [505 x i8], ptr @visited, i64 0, i64 %indvars.iv36
  %47 = load i8, ptr %46, align 1, !tbaa !9, !range !11, !noundef !12
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %54, label %49

49:                                               ; preds = %.lr.ph34
  %50 = getelementptr inbounds [505 x [505 x i32]], ptr @adj, i64 0, i64 %43, i64 %indvars.iv36
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %.not = icmp eq i32 %51, 1000000000
  br i1 %.not, label %54, label %52

52:                                               ; preds = %49
  %53 = trunc nuw nsw i64 %indvars.iv36 to i32
  tail call void @_Z5relaxiii(i32 noundef %.123.lcssa, i32 noundef %53, i32 noundef %51)
  %.pre39 = load i32, ptr @n, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %.lr.ph34, %49, %52
  %55 = phi i32 [ %45, %.lr.ph34 ], [ %45, %49 ], [ %.pre39, %52 ]
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next37, %56
  br i1 %57, label %.lr.ph34, label %.loopexit, !llvm.loop !15

._crit_edge.thread:                               ; preds = %._crit_edge, %.loopexit, %0
  %58 = load i32, ptr @c2, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [505 x i32], ptr @cnt, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %61)
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull @.str)
  %64 = load i32, ptr @c2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [505 x i32], ptr @accTeams, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef %67)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret void
}

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; 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 #0 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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