; LLVM IR from tangjz/acm-icpc :: self_training/2015-03-15 (D)

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

@t = external dso_local global i32, align 4
@flag = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@state = external dso_local global [3 x [3 x [20 x i8]]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5checkii(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 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
  store i32 0, ptr %1, align 4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %8

8:                                                ; preds = %85, %0
  %9 = load i32, ptr @t, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr @t, align 4, !tbaa !5
  %11 = icmp ne i32 %9, 0
  br i1 %11, label %12, label %86

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

13:                                               ; preds = %35, %12
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp slt i32 %14, 3
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %38

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

18:                                               ; preds = %31, %17
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 3
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 7, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %34

22:                                               ; preds = %18
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [3 x [3 x [20 x i8]]], ptr @state, i64 0, i64 %24
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [3 x [20 x i8]], ptr %25, i64 0, i64 %27
  %29 = getelementptr inbounds [20 x i8], ptr %28, i64 0, i64 0
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29)
  br label %31

31:                                               ; preds = %22
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %18, !llvm.loop !9

34:                                               ; preds = %21
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !5
  br label %13, !llvm.loop !11

38:                                               ; preds = %16
  store i32 0, ptr @flag, 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 %39

39:                                               ; preds = %64, %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 12
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %67

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

44:                                               ; preds = %60, %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 2
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %63

48:                                               ; preds = %44
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = call noundef zeroext i1 @_Z5checkii(i32 noundef %49, i32 noundef %50)
  br i1 %51, label %52, label %59

52:                                               ; preds = %48
  %53 = load i32, ptr @flag, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr @flag, align 4, !tbaa !5
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = shl i32 %55, 1
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = or i32 %56, %57
  store i32 %58, ptr @ans, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %52, %48
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !12

63:                                               ; preds = %47
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !13

67:                                               ; preds = %42
  %68 = load i32, ptr @flag, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 1
  br i1 %69, label %70, label %72

70:                                               ; preds = %67
  %71 = call i32 @puts(ptr noundef @.str.2)
  br label %85

72:                                               ; preds = %67
  %73 = load i32, ptr @ans, align 4, !tbaa !5
  %74 = ashr i32 %73, 1
  %75 = add nsw i32 65, %74
  %76 = load i32, ptr @ans, align 4, !tbaa !5
  %77 = and i32 %76, 1
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %72
  br label %81

80:                                               ; preds = %72
  br label %81

81:                                               ; preds = %80, %79
  %82 = phi ptr [ @.str.4, %79 ], [ @.str.5, %80 ]
  %83 = getelementptr inbounds [6 x i8], ptr %82, i64 0, i64 0
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %75, ptr noundef %83)
  br label %85

85:                                               ; preds = %81, %70
  br label %8, !llvm.loop !14

86:                                               ; preds = %8
  ret i32 0
}

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

declare i32 @puts(ptr noundef) #3

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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}


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

@t = external dso_local global i32, align 4
@flag = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@state = external dso_local global [3 x [3 x [20 x i8]]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5checkii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not25 = icmp eq i32 %2, 0
  br i1 %.not25, label %._crit_edge, label %.preheader20

.preheader20:                                     ; preds = %0, %130
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @state)
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 20))
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 40))
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 60))
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 80))
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 100))
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 120))
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 140))
  %12 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @state, i64 160))
  store i32 0, ptr @flag, align 4, !tbaa !5
  %13 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 0, i32 noundef 0)
  br i1 %13, label %14, label %17

14:                                               ; preds = %.preheader20
  %15 = load i32, ptr @flag, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr @flag, align 4, !tbaa !5
  store i32 0, ptr @ans, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %.preheader20, %14
  %18 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 0, i32 noundef 1)
  br i1 %18, label %19, label %.preheader.1

19:                                               ; preds = %17
  %20 = load i32, ptr @flag, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr @flag, align 4, !tbaa !5
  store i32 1, ptr @ans, align 4, !tbaa !5
  br label %.preheader.1

.preheader.1:                                     ; preds = %19, %17
  %22 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 1, i32 noundef 0)
  br i1 %22, label %23, label %26

23:                                               ; preds = %.preheader.1
  %24 = load i32, ptr @flag, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr @flag, align 4, !tbaa !5
  store i32 2, ptr @ans, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %23, %.preheader.1
  %27 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 1, i32 noundef 1)
  br i1 %27, label %28, label %.preheader.2

28:                                               ; preds = %26
  %29 = load i32, ptr @flag, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr @flag, align 4, !tbaa !5
  store i32 3, ptr @ans, align 4, !tbaa !5
  br label %.preheader.2

.preheader.2:                                     ; preds = %28, %26
  %31 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 2, i32 noundef 0)
  br i1 %31, label %32, label %35

32:                                               ; preds = %.preheader.2
  %33 = load i32, ptr @flag, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr @flag, align 4, !tbaa !5
  store i32 4, ptr @ans, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %32, %.preheader.2
  %36 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 2, i32 noundef 1)
  br i1 %36, label %37, label %.preheader.3

37:                                               ; preds = %35
  %38 = load i32, ptr @flag, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr @flag, align 4, !tbaa !5
  store i32 5, ptr @ans, align 4, !tbaa !5
  br label %.preheader.3

.preheader.3:                                     ; preds = %37, %35
  %40 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 3, i32 noundef 0)
  br i1 %40, label %41, label %44

41:                                               ; preds = %.preheader.3
  %42 = load i32, ptr @flag, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr @flag, align 4, !tbaa !5
  store i32 6, ptr @ans, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %41, %.preheader.3
  %45 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 3, i32 noundef 1)
  br i1 %45, label %46, label %.preheader.4

46:                                               ; preds = %44
  %47 = load i32, ptr @flag, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr @flag, align 4, !tbaa !5
  store i32 7, ptr @ans, align 4, !tbaa !5
  br label %.preheader.4

.preheader.4:                                     ; preds = %46, %44
  %49 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 4, i32 noundef 0)
  br i1 %49, label %50, label %53

50:                                               ; preds = %.preheader.4
  %51 = load i32, ptr @flag, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr @flag, align 4, !tbaa !5
  store i32 8, ptr @ans, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %50, %.preheader.4
  %54 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 4, i32 noundef 1)
  br i1 %54, label %55, label %.preheader.5

55:                                               ; preds = %53
  %56 = load i32, ptr @flag, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr @flag, align 4, !tbaa !5
  store i32 9, ptr @ans, align 4, !tbaa !5
  br label %.preheader.5

.preheader.5:                                     ; preds = %55, %53
  %58 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 5, i32 noundef 0)
  br i1 %58, label %59, label %62

59:                                               ; preds = %.preheader.5
  %60 = load i32, ptr @flag, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr @flag, align 4, !tbaa !5
  store i32 10, ptr @ans, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %59, %.preheader.5
  %63 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 5, i32 noundef 1)
  br i1 %63, label %64, label %.preheader.6

64:                                               ; preds = %62
  %65 = load i32, ptr @flag, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr @flag, align 4, !tbaa !5
  store i32 11, ptr @ans, align 4, !tbaa !5
  br label %.preheader.6

.preheader.6:                                     ; preds = %64, %62
  %67 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 6, i32 noundef 0)
  br i1 %67, label %68, label %71

68:                                               ; preds = %.preheader.6
  %69 = load i32, ptr @flag, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr @flag, align 4, !tbaa !5
  store i32 12, ptr @ans, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %68, %.preheader.6
  %72 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 6, i32 noundef 1)
  br i1 %72, label %73, label %.preheader.7

73:                                               ; preds = %71
  %74 = load i32, ptr @flag, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr @flag, align 4, !tbaa !5
  store i32 13, ptr @ans, align 4, !tbaa !5
  br label %.preheader.7

.preheader.7:                                     ; preds = %73, %71
  %76 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 7, i32 noundef 0)
  br i1 %76, label %77, label %80

77:                                               ; preds = %.preheader.7
  %78 = load i32, ptr @flag, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr @flag, align 4, !tbaa !5
  store i32 14, ptr @ans, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %77, %.preheader.7
  %81 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 7, i32 noundef 1)
  br i1 %81, label %82, label %.preheader.8

82:                                               ; preds = %80
  %83 = load i32, ptr @flag, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr @flag, align 4, !tbaa !5
  store i32 15, ptr @ans, align 4, !tbaa !5
  br label %.preheader.8

.preheader.8:                                     ; preds = %82, %80
  %85 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 8, i32 noundef 0)
  br i1 %85, label %86, label %89

86:                                               ; preds = %.preheader.8
  %87 = load i32, ptr @flag, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr @flag, align 4, !tbaa !5
  store i32 16, ptr @ans, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %86, %.preheader.8
  %90 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 8, i32 noundef 1)
  br i1 %90, label %91, label %.preheader.9

91:                                               ; preds = %89
  %92 = load i32, ptr @flag, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr @flag, align 4, !tbaa !5
  store i32 17, ptr @ans, align 4, !tbaa !5
  br label %.preheader.9

.preheader.9:                                     ; preds = %91, %89
  %94 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 9, i32 noundef 0)
  br i1 %94, label %95, label %98

95:                                               ; preds = %.preheader.9
  %96 = load i32, ptr @flag, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr @flag, align 4, !tbaa !5
  store i32 18, ptr @ans, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %95, %.preheader.9
  %99 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 9, i32 noundef 1)
  br i1 %99, label %100, label %.preheader.10

100:                                              ; preds = %98
  %101 = load i32, ptr @flag, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr @flag, align 4, !tbaa !5
  store i32 19, ptr @ans, align 4, !tbaa !5
  br label %.preheader.10

.preheader.10:                                    ; preds = %100, %98
  %103 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 10, i32 noundef 0)
  br i1 %103, label %104, label %107

104:                                              ; preds = %.preheader.10
  %105 = load i32, ptr @flag, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr @flag, align 4, !tbaa !5
  store i32 20, ptr @ans, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %104, %.preheader.10
  %108 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 10, i32 noundef 1)
  br i1 %108, label %109, label %.preheader.11

109:                                              ; preds = %107
  %110 = load i32, ptr @flag, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr @flag, align 4, !tbaa !5
  store i32 21, ptr @ans, align 4, !tbaa !5
  br label %.preheader.11

.preheader.11:                                    ; preds = %109, %107
  %112 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 11, i32 noundef 0)
  br i1 %112, label %113, label %116

113:                                              ; preds = %.preheader.11
  %114 = load i32, ptr @flag, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr @flag, align 4, !tbaa !5
  store i32 22, ptr @ans, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %113, %.preheader.11
  %117 = tail call noundef zeroext i1 @_Z5checkii(i32 noundef 11, i32 noundef 1)
  %.pre = load i32, ptr @flag, align 4, !tbaa !5
  br i1 %117, label %118, label %120

118:                                              ; preds = %116
  %119 = add nsw i32 %.pre, 1
  store i32 %119, ptr @flag, align 4, !tbaa !5
  store i32 23, ptr @ans, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %118, %116
  %121 = phi i32 [ %119, %118 ], [ %.pre, %116 ]
  %.not17 = icmp eq i32 %121, 1
  br i1 %.not17, label %124, label %122

122:                                              ; preds = %120
  %123 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %130

124:                                              ; preds = %120
  %125 = load i32, ptr @ans, align 4, !tbaa !5
  %126 = ashr i32 %125, 1
  %127 = add nsw i32 %126, 65
  %128 = and i32 %125, 1
  %.not18 = icmp eq i32 %128, 0
  %.str.4..str.5 = select i1 %.not18, ptr @.str.5, ptr @.str.4
  %129 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %127, ptr noundef nonnull %.str.4..str.5)
  br label %130

130:                                              ; preds = %124, %122
  %131 = load i32, ptr @t, align 4, !tbaa !5
  %132 = add nsw i32 %131, -1
  store i32 %132, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %131, 0
  br i1 %.not, label %._crit_edge, label %.preheader20, !llvm.loop !9

._crit_edge:                                      ; preds = %130, %0
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

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 = { mustprogress norecurse 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass