; LLVM IR from tangjz/acm-icpc :: lydsy (1086)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@cnt = external dso_local global i32, align 4
@no = external dso_local global [1001 x i32], align 16
@no2 = external dso_local global [1001 x i32], align 16
@s = external dso_local global [1001 x i32], align 16
@g = external dso_local global [1001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3dfsi(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
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @b)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  br label %12

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

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %28

17:                                               ; preds = %12
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %4)
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [1001 x %"class.std::vector"], ptr @g, i64 0, i64 %20
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [1001 x %"class.std::vector"], ptr @g, i64 0, i64 %23
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %25

25:                                               ; preds = %17
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

28:                                               ; preds = %16
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = load i32, ptr @b, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  %33 = call i32 @puts(ptr noundef @.str.2)
  br label %154

34:                                               ; preds = %28
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = load i32, ptr @b, align 4, !tbaa !5
  %37 = mul nsw i32 3, %36
  %38 = icmp sle i32 %35, %37
  br i1 %38, label %39, label %54

39:                                               ; preds = %34
  %40 = call i32 @puts(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %48, %39
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %51

46:                                               ; preds = %41
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %48

48:                                               ; preds = %46
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !11

51:                                               ; preds = %45
  %52 = call i32 @puts(ptr noundef @.str.3)
  %53 = call i32 @puts(ptr noundef @.str.3)
  br label %153

54:                                               ; preds = %34
  %55 = call noundef i32 @_Z3dfsi(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %78, %54
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %81

61:                                               ; preds = %56
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %77, label %67

67:                                               ; preds = %61
  %68 = load i32, ptr @cnt, align 4, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %70
  store i32 %68, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr @cnt, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1001 x i32], ptr @s, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %74, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %67, %61
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !5
  br label %56, !llvm.loop !12

81:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %105, %81
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = load i32, ptr @cnt, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 11, ptr %8, align 4
  br label %108

87:                                               ; preds = %82
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1001 x i32], ptr @s, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = load i32, ptr @b, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %102, label %94

94:                                               ; preds = %87
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1001 x i32], ptr @s, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = load i32, ptr @b, align 4, !tbaa !5
  %100 = mul nsw i32 3, %99
  %101 = icmp sgt i32 %98, %100
  br i1 %101, label %102, label %104

102:                                              ; preds = %94, %87
  %103 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %108

104:                                              ; preds = %94
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %7, align 4, !tbaa !5
  br label %82, !llvm.loop !13

108:                                              ; preds = %102, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %109 = load i32, ptr %8, align 4
  switch i32 %109, label %157 [
    i32 11, label %110
    i32 1, label %155
  ]

110:                                              ; preds = %108
  %111 = load i32, ptr @cnt, align 4, !tbaa !5
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %111)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %124, %110
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %113
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %127

118:                                              ; preds = %113
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %122)
  br label %124

124:                                              ; preds = %118
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %9, align 4, !tbaa !5
  br label %113, !llvm.loop !14

127:                                              ; preds = %117
  %128 = load i32, ptr @n, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %131)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %144, %127
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = load i32, ptr @cnt, align 4, !tbaa !5
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %147

138:                                              ; preds = %133
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1001 x i32], ptr @no2, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %142)
  br label %144

144:                                              ; preds = %138
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !5
  br label %133, !llvm.loop !15

147:                                              ; preds = %137
  %148 = load i32, ptr @cnt, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1001 x i32], ptr @no2, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %151)
  br label %153

153:                                              ; preds = %147, %51
  br label %154

154:                                              ; preds = %153, %32
  store i32 0, ptr %1, align 4
  br label %155

155:                                              ; preds = %154, %108
  %156 = load i32, ptr %1, align 4
  ret i32 %156

157:                                              ; preds = %108
  unreachable
}

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

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

declare i32 @puts(ptr noundef) #3

declare i32 @printf(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 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}
!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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@cnt = external dso_local local_unnamed_addr global i32, align 4
@no = external dso_local local_unnamed_addr global [1001 x i32], align 16
@no2 = external dso_local local_unnamed_addr global [1001 x i32], align 16
@s = external dso_local local_unnamed_addr global [1001 x i32], align 16
@g = external dso_local global [1001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

; Function Attrs: mustprogress 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() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @b)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 1
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa41 = phi i32 [ %4, %0 ], [ %16, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %6 = load i32, ptr @b, align 4, !tbaa !5
  %7 = icmp slt i32 %.lcssa41, %6
  br i1 %7, label %18, label %20

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02542 = phi i32 [ %15, %.lr.ph ], [ 1, %0 ]
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [1001 x %"class.std::vector"], ptr @g, i64 0, i64 %10
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [1001 x %"class.std::vector"], ptr @g, i64 0, i64 %13
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %15 = add nuw nsw i32 %.02542, 1
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

18:                                               ; preds = %._crit_edge
  %19 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %91

20:                                               ; preds = %._crit_edge
  %21 = mul nsw i32 %6, 3
  %.not = icmp sgt i32 %.lcssa41, %21
  br i1 %.not, label %32, label %22

22:                                               ; preds = %20
  %23 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 1
  br i1 %25, label %.lr.ph45, label %._crit_edge46

._crit_edge46:                                    ; preds = %.lr.ph45, %22
  %26 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %27 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %91

.lr.ph45:                                         ; preds = %22, %.lr.ph45
  %.02443 = phi i32 [ %29, %.lr.ph45 ], [ 1, %22 ]
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %29 = add nuw nsw i32 %.02443, 1
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %.lr.ph45, label %._crit_edge46, !llvm.loop !11

32:                                               ; preds = %20
  %33 = call noundef i32 @_Z3dfsi(i32 noundef 1)
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %.not3347 = icmp slt i32 %34, 1
  %.pre = load i32, ptr @cnt, align 4
  br i1 %.not3347, label %.preheader, label %.lr.ph50

.lr.ph50:                                         ; preds = %32
  %35 = sext i32 %.pre to i64
  %36 = getelementptr inbounds [1001 x i32], ptr @s, i64 0, i64 %35
  %37 = zext nneg i32 %34 to i64
  %xtraiter = and i64 %37, 1
  %38 = icmp eq i32 %34, 1
  br i1 %38, label %.preheader.loopexit.unr-lcssa, label %.lr.ph50.new

.lr.ph50.new:                                     ; preds = %.lr.ph50
  %unroll_iter = and i64 %37, 2147483646
  br label %47

.preheader.loopexit.unr-lcssa:                    ; preds = %59, %.lr.ph50
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph50 ], [ %indvars.iv.next.1, %59 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.loopexit.unr-lcssa
  %39 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %indvars.iv.unr
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %.not35.epil = icmp eq i32 %40, 0
  br i1 %.not35.epil, label %41, label %.preheader

41:                                               ; preds = %.epil.preheader
  store i32 %.pre, ptr %39, align 4, !tbaa !5
  %42 = load i32, ptr %36, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %36, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %41, %.epil.preheader, %32
  %.not3451 = icmp slt i32 %.pre, 1
  br i1 %.not3451, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %.preheader
  %44 = load i32, ptr @b, align 4, !tbaa !5
  %45 = mul nsw i32 %44, 3
  %46 = add nuw i32 %.pre, 1
  %wide.trip.count72 = zext i32 %46 to i64
  br label %61

47:                                               ; preds = %59, %.lr.ph50.new
  %indvars.iv = phi i64 [ 1, %.lr.ph50.new ], [ %indvars.iv.next.1, %59 ]
  %niter = phi i64 [ 0, %.lr.ph50.new ], [ %niter.next.1, %59 ]
  %48 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %indvars.iv
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %.not35 = icmp eq i32 %49, 0
  br i1 %.not35, label %50, label %53

50:                                               ; preds = %47
  store i32 %.pre, ptr %48, align 4, !tbaa !5
  %51 = load i32, ptr %36, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %36, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %47, %50
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %indvars.iv.next
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %.not35.1 = icmp eq i32 %55, 0
  br i1 %.not35.1, label %56, label %59

56:                                               ; preds = %53
  store i32 %.pre, ptr %54, align 4, !tbaa !5
  %57 = load i32, ptr %36, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %36, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %56, %53
  %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 %.preheader.loopexit.unr-lcssa, label %47, !llvm.loop !12

60:                                               ; preds = %61
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72
  br i1 %exitcond73.not, label %._crit_edge54, label %61, !llvm.loop !13

61:                                               ; preds = %.lr.ph53, %60
  %indvars.iv69 = phi i64 [ 1, %.lr.ph53 ], [ %indvars.iv.next70, %60 ]
  %62 = getelementptr inbounds [1001 x i32], ptr @s, i64 0, i64 %indvars.iv69
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp slt i32 %63, %44
  %65 = icmp sgt i32 %63, %45
  %or.cond = select i1 %64, i1 true, i1 %65
  br i1 %or.cond, label %66, label %60

66:                                               ; preds = %61
  %67 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %91

._crit_edge54:                                    ; preds = %60, %.preheader
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %.pre)
  %69 = load i32, ptr @n, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, 1
  br i1 %70, label %.lr.ph57, label %._crit_edge54.._crit_edge58_crit_edge

._crit_edge54.._crit_edge58_crit_edge:            ; preds = %._crit_edge54
  %.pre80 = sext i32 %69 to i64
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge54.._crit_edge58_crit_edge
  %.pre-phi = phi i64 [ %.pre80, %._crit_edge54.._crit_edge58_crit_edge ], [ %80, %.lr.ph57 ]
  %71 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %.pre-phi
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %72)
  %74 = load i32, ptr @cnt, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 1
  br i1 %75, label %.lr.ph62, label %._crit_edge58.._crit_edge63_crit_edge

._crit_edge58.._crit_edge63_crit_edge:            ; preds = %._crit_edge58
  %.pre81 = sext i32 %74 to i64
  br label %._crit_edge63

.lr.ph57:                                         ; preds = %._crit_edge54, %.lr.ph57
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph57 ], [ 1, %._crit_edge54 ]
  %76 = getelementptr inbounds [1001 x i32], ptr @no, i64 0, i64 %indvars.iv74
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %77)
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = icmp slt i64 %indvars.iv.next75, %80
  br i1 %81, label %.lr.ph57, label %._crit_edge58, !llvm.loop !14

._crit_edge63:                                    ; preds = %.lr.ph62, %._crit_edge58.._crit_edge63_crit_edge
  %.pre-phi82 = phi i64 [ %.pre81, %._crit_edge58.._crit_edge63_crit_edge ], [ %89, %.lr.ph62 ]
  %82 = getelementptr inbounds [1001 x i32], ptr @no2, i64 0, i64 %.pre-phi82
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %83)
  br label %91

.lr.ph62:                                         ; preds = %._crit_edge58, %.lr.ph62
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %.lr.ph62 ], [ 1, %._crit_edge58 ]
  %85 = getelementptr inbounds [1001 x i32], ptr @no2, i64 0, i64 %indvars.iv77
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %86)
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %88 = load i32, ptr @cnt, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next78, %89
  br i1 %90, label %.lr.ph62, label %._crit_edge63, !llvm.loop !15

91:                                               ; preds = %66, %18, %._crit_edge63, %._crit_edge46
  ret i32 0
}

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { mustprogress 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 = { 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 = { 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}


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