; LLVM IR from upupming/algorithm :: kick-start/2019/2019B-A.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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@cntAcc = external dso_local global [30 x [100005 x i32]], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_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 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %18, %0
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 26
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  br label %21

13:                                               ; preds = %9
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %15
  %17 = getelementptr inbounds [100005 x i32], ptr %16, i64 0, i64 0
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %13
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %1, align 4, !tbaa !5
  br label %9, !llvm.loop !9

21:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %79, %21
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %82

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sub nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %30)
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = sub nsw i32 %33, 65
  store i32 %34, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %75, %27
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 26
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %35
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = icmp eq i32 %40, %41
  br i1 %42, label %43, label %59

43:                                               ; preds = %39
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %45
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100005 x i32], ptr %46, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %54
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100005 x i32], ptr %55, i64 0, i64 %57
  store i32 %52, ptr %58, align 4, !tbaa !5
  br label %74

59:                                               ; preds = %39
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %61
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = sub nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100005 x i32], ptr %62, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %69
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100005 x i32], ptr %70, i64 0, i64 %72
  store i32 %67, ptr %73, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %59, %43
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %5, align 4, !tbaa !5
  br label %35, !llvm.loop !12

78:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !13

82:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %125, %82
  %84 = load i32, ptr @q, align 4, !tbaa !5
  %85 = add nsw i32 %84, -1
  store i32 %85, ptr @q, align 4, !tbaa !5
  %86 = icmp ne i32 %84, 0
  br i1 %86, label %87, label %126

87:                                               ; preds = %83
  %88 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @l, ptr noundef @r)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %116, %87
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = icmp slt i32 %90, 26
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %119

93:                                               ; preds = %89
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %95
  %97 = load i32, ptr @r, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100005 x i32], ptr %96, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %102
  %104 = load i32, ptr @l, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100005 x i32], ptr %103, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sub nsw i32 %100, %108
  %110 = srem i32 %109, 2
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %115

112:                                              ; preds = %93
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %7, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %112, %93
  br label %116

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

119:                                              ; preds = %92
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = icmp sle i32 %120, 1
  br i1 %121, label %122, label %125

122:                                              ; preds = %119
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %6, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %122, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %83, !llvm.loop !15

126:                                              ; preds = %83
  %127 = load i32, ptr %6, align 4, !tbaa !5
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  ret i32 %127
}

; 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 nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

declare i32 @__isoc99_scanf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@n = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global i32, align 4
@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@cntAcc = external dso_local local_unnamed_addr global [30 x [100005 x i32]], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z5solvev() local_unnamed_addr #0 {
.preheader35:
  store i32 0, ptr @cntAcc, align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 400020), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 800040), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 1200060), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 1600080), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 2000100), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 2400120), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 2800140), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 3200160), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 3600180), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 4000200), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 4400220), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 4800240), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 5200260), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 5600280), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 6000300), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 6400320), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 6800340), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 7200360), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 7600380), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 8000400), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 8400420), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 8800440), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 9200460), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 9600480), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @cntAcc, i64 10000500), align 4, !tbaa !5
  %0 = load i32, ptr @n, align 4, !tbaa !5
  %.not38 = icmp slt i32 %0, 1
  br i1 %.not38, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %10, %.preheader35
  %1 = load i32, ptr @q, align 4, !tbaa !5
  %2 = add nsw i32 %1, -1
  store i32 %2, ptr @q, align 4, !tbaa !5
  %.not3242 = icmp eq i32 %1, 0
  br i1 %.not3242, label %._crit_edge, label %.lr.ph44

.lr.ph:                                           ; preds = %.preheader35, %10
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %10 ], [ 1, %.preheader35 ]
  %3 = add nsw i64 %indvars.iv47, -1
  %4 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %3)
  %5 = load i8, ptr %4, align 1, !tbaa !9
  %6 = sext i8 %5 to i64
  %7 = add nsw i64 %6, 4294967231
  %8 = and i64 %7, 4294967295
  %9 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %8, i64 %3
  br label %13

10:                                               ; preds = %30
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv47, %12
  br i1 %.not.not, label %.lr.ph, label %.preheader, !llvm.loop !10

13:                                               ; preds = %30, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %30 ]
  %14 = icmp eq i64 %indvars.iv, %8
  br i1 %14, label %15, label %18

15:                                               ; preds = %13
  %16 = load i32, ptr %9, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  br label %21

18:                                               ; preds = %13
  %19 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %indvars.iv, i64 %3
  %20 = load i32, ptr %19, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %15, %18
  %.sink = phi i32 [ %17, %15 ], [ %20, %18 ]
  %22 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %indvars.iv, i64 %indvars.iv47
  store i32 %.sink, ptr %22, align 4
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %23 = icmp eq i64 %indvars.iv.next, %8
  br i1 %23, label %27, label %24

24:                                               ; preds = %21
  %25 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %indvars.iv.next, i64 %3
  %26 = load i32, ptr %25, align 4, !tbaa !5
  br label %30

27:                                               ; preds = %21
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  br label %30

30:                                               ; preds = %27, %24
  %.sink.1 = phi i32 [ %29, %27 ], [ %26, %24 ]
  %31 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 %indvars.iv.next, i64 %indvars.iv47
  store i32 %.sink.1, ptr %31, align 4
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 26
  br i1 %exitcond.not.1, label %10, label %13, !llvm.loop !12

.lr.ph44:                                         ; preds = %.preheader, %.lr.ph44
  %.02743 = phi i32 [ %spec.select, %.lr.ph44 ], [ 0, %.preheader ]
  %32 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @l, ptr noundef nonnull @r)
  %33 = load i32, ptr @r, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = load i32, ptr @l, align 4, !tbaa !5
  %36 = add nsw i32 %35, -1
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 0, i64 %34
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 0, i64 %37
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sub nsw i32 %39, %41
  %43 = and i32 %42, 1
  %44 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 1, i64 %34
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 1, i64 %37
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = sub nsw i32 %45, %47
  %49 = and i32 %48, 1
  %spec.select34.1 = add nuw nsw i32 %49, %43
  %50 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 2, i64 %34
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 2, i64 %37
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sub nsw i32 %51, %53
  %55 = and i32 %54, 1
  %spec.select34.2 = add nuw nsw i32 %55, %spec.select34.1
  %56 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 3, i64 %34
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 3, i64 %37
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sub nsw i32 %57, %59
  %61 = and i32 %60, 1
  %spec.select34.3 = add nuw nsw i32 %61, %spec.select34.2
  %62 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 4, i64 %34
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 4, i64 %37
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sub nsw i32 %63, %65
  %67 = and i32 %66, 1
  %spec.select34.4 = add nuw nsw i32 %67, %spec.select34.3
  %68 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 5, i64 %34
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 5, i64 %37
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sub nsw i32 %69, %71
  %73 = and i32 %72, 1
  %spec.select34.5 = add nuw nsw i32 %73, %spec.select34.4
  %74 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 6, i64 %34
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 6, i64 %37
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sub nsw i32 %75, %77
  %79 = and i32 %78, 1
  %spec.select34.6 = add nuw nsw i32 %79, %spec.select34.5
  %80 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 7, i64 %34
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 7, i64 %37
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sub nsw i32 %81, %83
  %85 = and i32 %84, 1
  %spec.select34.7 = add nuw nsw i32 %85, %spec.select34.6
  %86 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 8, i64 %34
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 8, i64 %37
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sub nsw i32 %87, %89
  %91 = and i32 %90, 1
  %spec.select34.8 = add nuw nsw i32 %91, %spec.select34.7
  %92 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 9, i64 %34
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 9, i64 %37
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sub nsw i32 %93, %95
  %97 = and i32 %96, 1
  %spec.select34.9 = add nuw nsw i32 %97, %spec.select34.8
  %98 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 10, i64 %34
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 10, i64 %37
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sub nsw i32 %99, %101
  %103 = and i32 %102, 1
  %spec.select34.10 = add nuw nsw i32 %103, %spec.select34.9
  %104 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 11, i64 %34
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 11, i64 %37
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sub nsw i32 %105, %107
  %109 = and i32 %108, 1
  %spec.select34.11 = add nuw nsw i32 %109, %spec.select34.10
  %110 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 12, i64 %34
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 12, i64 %37
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sub nsw i32 %111, %113
  %115 = and i32 %114, 1
  %spec.select34.12 = add nuw nsw i32 %115, %spec.select34.11
  %116 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 13, i64 %34
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 13, i64 %37
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = sub nsw i32 %117, %119
  %121 = and i32 %120, 1
  %spec.select34.13 = add nuw nsw i32 %121, %spec.select34.12
  %122 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 14, i64 %34
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 14, i64 %37
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = sub nsw i32 %123, %125
  %127 = and i32 %126, 1
  %spec.select34.14 = add nuw nsw i32 %127, %spec.select34.13
  %128 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 15, i64 %34
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 15, i64 %37
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = sub nsw i32 %129, %131
  %133 = and i32 %132, 1
  %spec.select34.15 = add nuw nsw i32 %133, %spec.select34.14
  %134 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 16, i64 %34
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 16, i64 %37
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sub nsw i32 %135, %137
  %139 = and i32 %138, 1
  %spec.select34.16 = add nuw nsw i32 %139, %spec.select34.15
  %140 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 17, i64 %34
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 17, i64 %37
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sub nsw i32 %141, %143
  %145 = and i32 %144, 1
  %spec.select34.17 = add nuw nsw i32 %145, %spec.select34.16
  %146 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 18, i64 %34
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 18, i64 %37
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = sub nsw i32 %147, %149
  %151 = and i32 %150, 1
  %spec.select34.18 = add nuw nsw i32 %151, %spec.select34.17
  %152 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 19, i64 %34
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 19, i64 %37
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = sub nsw i32 %153, %155
  %157 = and i32 %156, 1
  %spec.select34.19 = add nuw nsw i32 %157, %spec.select34.18
  %158 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 20, i64 %34
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 20, i64 %37
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = sub nsw i32 %159, %161
  %163 = and i32 %162, 1
  %spec.select34.20 = add nuw nsw i32 %163, %spec.select34.19
  %164 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 21, i64 %34
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 21, i64 %37
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sub nsw i32 %165, %167
  %169 = and i32 %168, 1
  %spec.select34.21 = add nuw nsw i32 %169, %spec.select34.20
  %170 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 22, i64 %34
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 22, i64 %37
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = sub nsw i32 %171, %173
  %175 = and i32 %174, 1
  %spec.select34.22 = add nuw nsw i32 %175, %spec.select34.21
  %176 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 23, i64 %34
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 23, i64 %37
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = sub nsw i32 %177, %179
  %181 = and i32 %180, 1
  %spec.select34.23 = add nuw nsw i32 %181, %spec.select34.22
  %182 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 24, i64 %34
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 24, i64 %37
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = sub nsw i32 %183, %185
  %187 = and i32 %186, 1
  %spec.select34.24 = add nuw nsw i32 %187, %spec.select34.23
  %188 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 25, i64 %34
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = getelementptr inbounds [30 x [100005 x i32]], ptr @cntAcc, i64 0, i64 25, i64 %37
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = sub nsw i32 %189, %191
  %193 = and i32 %192, 1
  %spec.select34.25 = add nuw nsw i32 %193, %spec.select34.24
  %194 = icmp ult i32 %spec.select34.25, 2
  %195 = zext i1 %194 to i32
  %spec.select = add nuw nsw i32 %.02743, %195
  %196 = load i32, ptr @q, align 4, !tbaa !5
  %197 = add nsw i32 %196, -1
  store i32 %197, ptr @q, align 4, !tbaa !5
  %.not32 = icmp eq i32 %196, 0
  br i1 %.not32, label %._crit_edge, label %.lr.ph44, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph44, %.preheader
  %.027.lcssa = phi i32 [ 0, %.preheader ], [ %spec.select, %.lr.ph44 ]
  ret i32 %.027.lcssa
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { 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" }

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


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