; LLVM IR from tangjz/acm-icpc :: codechef/SNCKPE19 (STRTF)

; 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 }
%struct.Query = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@low = external dso_local global i32, align 4
@a = external dso_local global [200001 x i32], align 16
@ans = external dso_local global [200001 x i32], align 16
@e = external dso_local global [513 x %"class.std::vector"], align 16
@sub = external dso_local global [513 x %"class.std::vector"], align 16
@b = external dso_local global [200001 x %struct.Query], align 16
@.str = external hidden unnamed_addr constant [5 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsii(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
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  store i32 0, ptr @mx, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %15, %0
  %10 = load i32, ptr @mx, align 4, !tbaa !5
  %11 = shl i32 1, %10
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp sle i32 %11, %12
  br i1 %13, label %14, label %18

14:                                               ; preds = %9
  br label %15

15:                                               ; preds = %14
  %16 = load i32, ptr @mx, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr @mx, align 4, !tbaa !5
  br label %9, !llvm.loop !9

18:                                               ; preds = %9
  %19 = load i32, ptr @mx, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  %21 = ashr i32 %20, 1
  store i32 %21, ptr @low, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %49, %18
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @low, align 4, !tbaa !5
  %25 = shl i32 1, %24
  %26 = icmp slt i32 %23, %25
  br i1 %26, label %28, label %27

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

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

29:                                               ; preds = %45, %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %48

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = and i32 %35, %36
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = icmp eq i32 %37, %38
  br i1 %39, label %40, label %44

40:                                               ; preds = %34
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [513 x %"class.std::vector"], ptr @sub, i64 0, i64 %42
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %44

44:                                               ; preds = %40, %34
  br label %45

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

48:                                               ; preds = %33
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !12

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

53:                                               ; preds = %63, %52
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp sle i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %66

58:                                               ; preds = %53
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr @a, i64 %60
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %61)
  br label %63

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

66:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %109, %66
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = load i32, ptr @m, align 4, !tbaa !5
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %112

72:                                               ; preds = %67
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.Query, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %78
  %80 = getelementptr inbounds %struct.Query, ptr %79, i32 0, i32 1
  %81 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %76, ptr noundef %80)
  %82 = load i32, ptr @mx, align 4, !tbaa !5
  %83 = shl i32 1, %82
  %84 = sub nsw i32 %83, 1
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %86
  %88 = getelementptr inbounds %struct.Query, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !14
  %90 = and i32 %89, %84
  store i32 %90, ptr %88, align 8, !tbaa !14
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.Query, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !14
  %96 = load i32, ptr @low, align 4, !tbaa !5
  %97 = ashr i32 %95, %96
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [513 x %"class.std::vector"], ptr @e, i64 0, i64 %98
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %100 = load i32, ptr @low, align 4, !tbaa !5
  %101 = shl i32 1, %100
  %102 = sub nsw i32 %101, 1
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %104
  %106 = getelementptr inbounds %struct.Query, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !14
  %108 = and i32 %107, %102
  store i32 %108, ptr %106, align 8, !tbaa !14
  br label %109

109:                                              ; preds = %72
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %6, align 4, !tbaa !5
  br label %67, !llvm.loop !16

112:                                              ; preds = %71
  %113 = load i32, ptr @low, align 4, !tbaa !5
  call void @_Z3dfsii(i32 noundef %113, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %125, %112
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = load i32, ptr @m, align 4, !tbaa !5
  %117 = icmp sle i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %128

119:                                              ; preds = %114
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [200001 x i32], ptr @ans, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %123)
  br label %125

125:                                              ; preds = %119
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %7, align 4, !tbaa !5
  br label %114, !llvm.loop !17

128:                                              ; preds = %118
  ret i32 0
}

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 @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 = !{!15, !6, i64 0}
!15 = !{!"_ZTS5Query", !6, i64 0, !6, i64 4}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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 }
%struct.Query = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@mx = external dso_local local_unnamed_addr global i32, align 4
@low = external dso_local local_unnamed_addr global i32, align 4
@a = external dso_local global [200001 x i32], align 16
@ans = external dso_local local_unnamed_addr global [200001 x i32], align 16
@e = external dso_local global [513 x %"class.std::vector"], align 16
@sub = external dso_local global [513 x %"class.std::vector"], align 16
@b = external dso_local global [200001 x %struct.Query], align 16
@.str = external hidden unnamed_addr constant [5 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsii(i32 noundef, 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 @m)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  br label %5

5:                                                ; preds = %5, %0
  %storemerge = phi i32 [ 0, %0 ], [ %7, %5 ]
  %6 = shl nuw i32 1, %storemerge
  %.not = icmp sgt i32 %6, %4
  %7 = add nuw nsw i32 %storemerge, 1
  br i1 %.not, label %8, label %5, !llvm.loop !9

8:                                                ; preds = %5
  store i32 %storemerge, ptr @mx, align 4, !tbaa !5
  %9 = lshr i32 %7, 1
  store i32 %9, ptr @low, align 4, !tbaa !5
  %.not38 = icmp eq i32 %9, 31
  br i1 %.not38, label %.preheader, label %.lr.ph

.preheader.loopexit:                              ; preds = %13
  %.pre46 = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %8
  %10 = phi i32 [ %.pre46, %.preheader.loopexit ], [ %4, %8 ]
  %.not1525 = icmp slt i32 %10, 1
  br i1 %.not1525, label %._crit_edge, label %.lr.ph27

.lr.ph:                                           ; preds = %8, %13
  %indvars.iv = phi i64 [ %indvars.iv.next, %13 ], [ 0, %8 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  %11 = getelementptr inbounds [513 x %"class.std::vector"], ptr @sub, i64 0, i64 %indvars.iv
  %12 = trunc nuw nsw i64 %indvars.iv to i32
  br label %18

13:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @low, align 4, !tbaa !5
  %15 = shl nuw i32 1, %14
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %.preheader.loopexit, !llvm.loop !11

18:                                               ; preds = %.lr.ph, %22
  %storemerge2023 = phi i32 [ 0, %.lr.ph ], [ %24, %22 ]
  %19 = and i32 %storemerge2023, %12
  %20 = icmp eq i32 %19, %storemerge2023
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %18, %21
  %23 = phi i32 [ %storemerge2023, %18 ], [ %.pre, %21 ]
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %23 to i64
  %.not21.not = icmp sgt i64 %indvars.iv, %25
  br i1 %.not21.not, label %18, label %13, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph27, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr @m, align 4, !tbaa !5
  %.not1728 = icmp slt i32 %26, 1
  br i1 %.not1728, label %._crit_edge.._crit_edge32_crit_edge, label %.lr.ph31

._crit_edge.._crit_edge32_crit_edge:              ; preds = %._crit_edge
  %.pre47 = load i32, ptr @low, align 4, !tbaa !5
  br label %._crit_edge32

.lr.ph27:                                         ; preds = %.preheader, %.lr.ph27
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %.lr.ph27 ], [ 1, %.preheader ]
  %27 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv40
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %27)
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %.not15.not = icmp slt i64 %indvars.iv40, %30
  br i1 %.not15.not, label %.lr.ph27, label %._crit_edge, !llvm.loop !13

._crit_edge32:                                    ; preds = %.lr.ph31, %._crit_edge.._crit_edge32_crit_edge
  %31 = phi i32 [ %.pre47, %._crit_edge.._crit_edge32_crit_edge ], [ %48, %.lr.ph31 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @_Z3dfsii(i32 noundef %31, i32 noundef 0)
  %32 = load i32, ptr @m, align 4, !tbaa !5
  %.not1833 = icmp slt i32 %32, 1
  br i1 %.not1833, label %._crit_edge37, label %.lr.ph36

.lr.ph31:                                         ; preds = %._crit_edge, %.lr.ph31
  %storemerge1629 = phi i32 [ %55, %.lr.ph31 ], [ 1, %._crit_edge ]
  %33 = sext i32 %storemerge1629 to i64
  %34 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %33
  %35 = getelementptr inbounds i8, ptr %34, i64 4
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %34, ptr noundef nonnull %35)
  %37 = load i32, ptr @mx, align 4, !tbaa !5
  %notmask = shl nsw i32 -1, %37
  %38 = xor i32 %notmask, -1
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %40
  %42 = load i32, ptr %41, align 8, !tbaa !14
  %43 = and i32 %42, %38
  store i32 %43, ptr %41, align 8, !tbaa !14
  %44 = load i32, ptr @low, align 4, !tbaa !5
  %45 = lshr i32 %43, %44
  %46 = zext nneg i32 %45 to i64
  %47 = getelementptr inbounds [513 x %"class.std::vector"], ptr @e, i64 0, i64 %46
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %48 = load i32, ptr @low, align 4, !tbaa !5
  %notmask19 = shl nsw i32 -1, %48
  %49 = xor i32 %notmask19, -1
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [200001 x %struct.Query], ptr @b, i64 0, i64 %51
  %53 = load i32, ptr %52, align 8, !tbaa !14
  %54 = and i32 %53, %49
  store i32 %54, ptr %52, align 8, !tbaa !14
  %55 = add nsw i32 %50, 1
  store i32 %55, ptr %2, align 4, !tbaa !5
  %56 = load i32, ptr @m, align 4, !tbaa !5
  %.not17.not = icmp slt i32 %50, %56
  br i1 %.not17.not, label %.lr.ph31, label %._crit_edge32, !llvm.loop !16

._crit_edge37:                                    ; preds = %.lr.ph36, %._crit_edge32
  ret i32 0

.lr.ph36:                                         ; preds = %._crit_edge32, %.lr.ph36
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %.lr.ph36 ], [ 1, %._crit_edge32 ]
  %57 = getelementptr inbounds [200001 x i32], ptr @ans, i64 0, i64 %indvars.iv43
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %58)
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %.not18.not = icmp slt i64 %indvars.iv43, %61
  br i1 %.not18.not, label %.lr.ph36, label %._crit_edge37, !llvm.loop !17
}

; 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 @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 = !{!15, !6, i64 0}
!15 = !{!"_ZTS5Query", !6, i64 0, !6, i64 4}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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