; LLVM IR from tangjz/acm-icpc :: codeforces/complete/1551E.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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [32 x i64] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ5solvevE1a = external hidden global [2009 x i32], align 16
@_ZZ5solvevE1b = external hidden global [2009 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE2dp = external hidden global [2009 x %"class.std::bitset"], align 16
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::bitset", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %30, %0
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %33

15:                                               ; preds = %10
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %17
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %18)
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = sub nsw i32 %21, %25
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %28
  store i32 %26, ptr %29, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %15
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %3, align 4, !tbaa !5
  br label %10, !llvm.loop !9

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

34:                                               ; preds = %106, %33
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %109

39:                                               ; preds = %34
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256) %42) #5
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %39
  br label %106

50:                                               ; preds = %39
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %52
  %54 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE3setEmb(ptr noundef nonnull align 8 dereferenceable(256) %53, i64 noundef 1, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %89, %50
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %92

60:                                               ; preds = %55
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = icmp slt i32 %64, %68
  br i1 %69, label %70, label %88

70:                                               ; preds = %60
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp sle i32 %74, %78
  br i1 %79, label %80, label %88

80:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 256, ptr %8) #5
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %82
  call void @_ZNKSt6bitsetILm2009EElsEm(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %8, ptr noundef nonnull align 8 dereferenceable(256) %83, i64 noundef 1) #5
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %85
  %87 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(256) %86, ptr noundef nonnull align 8 dereferenceable(256) %8) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %8) #5
  br label %88

88:                                               ; preds = %80, %70, %60
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %7, align 4, !tbaa !5
  br label %55, !llvm.loop !11

92:                                               ; preds = %59
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %94
  %96 = load i32, ptr %2, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef zeroext i1 @_ZNKSt6bitsetILm2009EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %95, i64 noundef %97)
  br i1 %98, label %99, label %105

99:                                               ; preds = %92
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %101
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %102)
  %104 = load i32, ptr %103, align 4, !tbaa !5
  store i32 %104, ptr %4, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %99, %92
  br label %106

106:                                              ; preds = %105, %49
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %5, align 4, !tbaa !5
  br label %34, !llvm.loop !12

109:                                              ; preds = %38
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = icmp slt i32 %110, 1061109567
  br i1 %111, label %112, label %114

112:                                              ; preds = %109
  %113 = load i32, ptr %4, align 4, !tbaa !5
  br label %115

114:                                              ; preds = %109
  br label %115

115:                                              ; preds = %114, %112
  %116 = phi i32 [ %113, %112 ], [ -1, %114 ]
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %116)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

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

; 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 dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE3setEmb(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef, i1 noundef zeroext) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt6bitsetILm2009EElsEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm2009EE4testEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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


; 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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [32 x i64] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZ5solvevE1a = external hidden global [2009 x i32], align 16
@_ZZ5solvevE1b = external hidden global [2009 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE2dp = external hidden global [2009 x %"class.std::bitset"], align 16
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::bitset", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 1061109567, ptr %3, align 4, !tbaa !5
  br label %._crit_edge33.thread

._crit_edge:                                      ; preds = %.lr.ph
  %8 = icmp sgt i32 %15, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 1061109567, ptr %3, align 4, !tbaa !5
  br i1 %8, label %.lr.ph32, label %._crit_edge33.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %9 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %indvars.iv
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %9)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr %9, align 4, !tbaa !5
  %12 = trunc nuw nsw i64 %indvars.iv.next to i32
  %13 = sub nsw i32 %12, %11
  %14 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %indvars.iv
  store i32 %13, ptr %14, align 4, !tbaa !5
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge33:                                    ; preds = %48
  %.pre = load i32, ptr %3, align 4
  %.pre.fr = freeze i32 %.pre
  %18 = icmp slt i32 %.pre.fr, 1061109567
  %spec.select = select i1 %18, i32 %.pre.fr, i32 -1
  br label %._crit_edge33.thread

._crit_edge33.thread:                             ; preds = %._crit_edge33, %._crit_edge.thread, %._crit_edge
  %19 = phi i32 [ -1, %._crit_edge ], [ -1, %._crit_edge.thread ], [ %spec.select, %._crit_edge33 ]
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void

.lr.ph32:                                         ; preds = %._crit_edge, %48
  %indvars.iv39 = phi i64 [ %indvars.iv.next40, %48 ], [ 0, %._crit_edge ]
  %21 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %indvars.iv39
  %22 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256) %21) #5
  %23 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %indvars.iv39
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %48, label %26

26:                                               ; preds = %.lr.ph32
  %27 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE3setEmb(ptr noundef nonnull align 8 dereferenceable(256) %21, i64 noundef 1, i1 noundef zeroext true)
  %.not34 = icmp eq i64 %indvars.iv39, 0
  br i1 %.not34, label %._crit_edge28, label %.lr.ph27

.lr.ph27:                                         ; preds = %26
  %28 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv39
  br label %32

._crit_edge28:                                    ; preds = %44, %26
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call noundef zeroext i1 @_ZNKSt6bitsetILm2009EE4testEm(ptr noundef nonnull align 8 dereferenceable(256) %21, i64 noundef %30)
  br i1 %31, label %45, label %48

32:                                               ; preds = %.lr.ph27, %44
  %indvars.iv36 = phi i64 [ 0, %.lr.ph27 ], [ %indvars.iv.next37, %44 ]
  %33 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv36
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %28, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %37, label %44

37:                                               ; preds = %32
  %38 = getelementptr inbounds [2009 x i32], ptr @_ZZ5solvevE1b, i64 0, i64 %indvars.iv36
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = load i32, ptr %23, align 4, !tbaa !5
  %.not = icmp sgt i32 %39, %40
  br i1 %.not, label %44, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #5
  %42 = getelementptr inbounds [2009 x %"class.std::bitset"], ptr @_ZZ5solvevE2dp, i64 0, i64 %indvars.iv36
  call void @_ZNKSt6bitsetILm2009EElsEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %4, ptr noundef nonnull align 8 dereferenceable(256) %42, i64 noundef 1) #5
  %43 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(256) %21, ptr noundef nonnull align 8 dereferenceable(256) %4) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #5
  br label %44

44:                                               ; preds = %32, %37, %41
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next37, %indvars.iv39
  br i1 %exitcond.not, label %._crit_edge28, label %32, !llvm.loop !11

45:                                               ; preds = %._crit_edge28
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %47 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %47, ptr %3, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %._crit_edge28, %45, %.lr.ph32
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next40, %50
  br i1 %51, label %.lr.ph32, label %._crit_edge33, !llvm.loop !12
}

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

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE5resetEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EE3setEmb(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt6bitsetILm2009EElsEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6bitsetILm2009EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm2009EE4testEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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


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