; LLVM IR from kazunetakahashi/atcoder :: 2018/0520_AGC024 (C)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@A = external dso_local global [200010 x i64], align 16
@ok = external dso_local global [200010 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

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

9:                                                ; preds = %19, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %22

14:                                               ; preds = %9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %16
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %17)
  br label %19

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

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

23:                                               ; preds = %40, %22
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr @N, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 5, ptr %4, align 4
  br label %43

28:                                               ; preds = %23
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !11
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = icmp sgt i64 %32, %34
  br i1 %35, label %36, label %39

36:                                               ; preds = %28
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %43

39:                                               ; preds = %28
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !5
  br label %23, !llvm.loop !13

43:                                               ; preds = %36, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %44 = load i32, ptr %4, align 4
  switch i32 %44, label %121 [
    i32 5, label %45
    i32 1, label %119
  ]

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

46:                                               ; preds = %83, %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr @N, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 8, ptr %4, align 4
  br label %86

51:                                               ; preds = %46
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = add nsw i64 %56, 1
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = icmp slt i64 %57, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %51
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %86

66:                                               ; preds = %51
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = add nsw i64 %71, 1
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !11
  %77 = icmp ne i64 %72, %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %80
  %82 = zext i1 %77 to i8
  store i8 %82, ptr %81, align 1, !tbaa !14
  br label %83

83:                                               ; preds = %66
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %5, align 4, !tbaa !5
  br label %46, !llvm.loop !16

86:                                               ; preds = %63, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %87 = load i32, ptr %4, align 4
  switch i32 %87, label %121 [
    i32 8, label %88
    i32 1, label %119
  ]

88:                                               ; preds = %86
  %89 = load i32, ptr @N, align 4, !tbaa !5
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %91
  store i8 1, ptr %92, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %112, %88
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = load i32, ptr @N, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %115

98:                                               ; preds = %93
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !14, !range !17, !noundef !18
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %111

104:                                              ; preds = %98
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !11
  %109 = load i64, ptr %6, align 8, !tbaa !11
  %110 = add nsw i64 %109, %108
  store i64 %110, ptr %6, align 8, !tbaa !11
  br label %111

111:                                              ; preds = %104, %98
  br label %112

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

115:                                              ; preds = %97
  %116 = load i64, ptr %6, align 8, !tbaa !11
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %116)
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %119

119:                                              ; preds = %115, %86, %43
  %120 = load i32, ptr %1, align 4
  ret i32 %120

121:                                              ; preds = %86, %43
  unreachable
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

attributes #0 = { 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 #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { inlinehint 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 #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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@A = external dso_local global [200010 x i64], align 16
@ok = external dso_local local_unnamed_addr global [200010 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %2 = load i32, ptr @N, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %._crit_edge.thread

.preheader42:                                     ; preds = %.lr.ph
  %4 = icmp sgt i32 %7, 0
  br i1 %4, label %.lr.ph45.preheader, label %._crit_edge.thread

.lr.ph45.preheader:                               ; preds = %.preheader42
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %.lr.ph45

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %5 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %7 = load i32, ptr @N, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = icmp slt i64 %indvars.iv.next, %8
  br i1 %9, label %.lr.ph, label %.preheader42, !llvm.loop !9

10:                                               ; preds = %.lr.ph45
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph45, !llvm.loop !11

._crit_edge.thread:                               ; preds = %0, %.preheader42
  %.ph69 = phi i32 [ %7, %.preheader42 ], [ %2, %0 ]
  %11 = add nsw i32 %.ph69, -1
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %12
  store i8 1, ptr %13, align 1, !tbaa !12
  br label %._crit_edge52

.preheader:                                       ; preds = %10
  %.not = icmp eq i32 %7, 1
  br i1 %.not, label %._crit_edge, label %.lr.ph47.preheader

.lr.ph47.preheader:                               ; preds = %.preheader
  %wide.trip.count62 = zext nneg i32 %7 to i64
  %.pre = load i64, ptr @A, align 16, !tbaa !14
  br label %.lr.ph47

.lr.ph45:                                         ; preds = %.lr.ph45.preheader, %10
  %indvars.iv56 = phi i64 [ 0, %.lr.ph45.preheader ], [ %indvars.iv.next57, %10 ]
  %14 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv56
  %15 = load i64, ptr %14, align 8, !tbaa !14
  %16 = icmp sgt i64 %15, %indvars.iv56
  br i1 %16, label %.thread, label %10

.thread:                                          ; preds = %.lr.ph45
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %72

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %23
  %18 = phi i64 [ %.pre, %.lr.ph47.preheader ], [ %21, %23 ]
  %indvars.iv59 = phi i64 [ 1, %.lr.ph47.preheader ], [ %indvars.iv.next60, %23 ]
  %19 = add nsw i64 %18, 1
  %20 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv59
  %21 = load i64, ptr %20, align 8, !tbaa !14
  %22 = icmp slt i64 %19, %21
  br i1 %22, label %28, label %23

23:                                               ; preds = %.lr.ph47
  %24 = add nsw i64 %indvars.iv59, -1
  %25 = icmp ne i64 %19, %21
  %26 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %24
  %27 = zext i1 %25 to i8
  store i8 %27, ptr %26, align 1, !tbaa !12
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count62
  br i1 %exitcond63.not, label %._crit_edge, label %.lr.ph47, !llvm.loop !16

28:                                               ; preds = %.lr.ph47
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %72

._crit_edge:                                      ; preds = %23, %.preheader
  %30 = add nsw i32 %7, -1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %31
  store i8 1, ptr %32, align 1, !tbaa !12
  br i1 %4, label %.lr.ph51.preheader, label %._crit_edge52

.lr.ph51.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i64 %wide.trip.count, 3
  %33 = icmp ult i32 %7, 4
  br i1 %33, label %._crit_edge52.loopexit.unr-lcssa, label %.lr.ph51.preheader.new

.lr.ph51.preheader.new:                           ; preds = %.lr.ph51.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph51

._crit_edge52.loopexit.unr-lcssa:                 ; preds = %71, %.lr.ph51.preheader
  %.1.lcssa.ph = phi i64 [ poison, %.lr.ph51.preheader ], [ %.1.3, %71 ]
  %indvars.iv64.unr = phi i64 [ 0, %.lr.ph51.preheader ], [ %indvars.iv.next65.3, %71 ]
  %.02348.unr = phi i64 [ 0, %.lr.ph51.preheader ], [ %.1.3, %71 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge52, label %.lr.ph51.epil

.lr.ph51.epil:                                    ; preds = %._crit_edge52.loopexit.unr-lcssa, %41
  %indvars.iv64.epil = phi i64 [ %indvars.iv.next65.epil, %41 ], [ %indvars.iv64.unr, %._crit_edge52.loopexit.unr-lcssa ]
  %.02348.epil = phi i64 [ %.1.epil, %41 ], [ %.02348.unr, %._crit_edge52.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %41 ], [ 0, %._crit_edge52.loopexit.unr-lcssa ]
  %34 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %indvars.iv64.epil
  %35 = load i8, ptr %34, align 1, !tbaa !12, !range !17, !noundef !18
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %37, label %41

37:                                               ; preds = %.lr.ph51.epil
  %38 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv64.epil
  %39 = load i64, ptr %38, align 8, !tbaa !14
  %40 = add nsw i64 %39, %.02348.epil
  br label %41

41:                                               ; preds = %37, %.lr.ph51.epil
  %.1.epil = phi i64 [ %40, %37 ], [ %.02348.epil, %.lr.ph51.epil ]
  %indvars.iv.next65.epil = add nuw nsw i64 %indvars.iv64.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge52, label %.lr.ph51.epil, !llvm.loop !19

._crit_edge52:                                    ; preds = %._crit_edge52.loopexit.unr-lcssa, %41, %._crit_edge.thread, %._crit_edge
  %.023.lcssa = phi i64 [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %.1.lcssa.ph, %._crit_edge52.loopexit.unr-lcssa ], [ %.1.epil, %41 ]
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.023.lcssa)
  br label %72

.lr.ph51:                                         ; preds = %71, %.lr.ph51.preheader.new
  %indvars.iv64 = phi i64 [ 0, %.lr.ph51.preheader.new ], [ %indvars.iv.next65.3, %71 ]
  %.02348 = phi i64 [ 0, %.lr.ph51.preheader.new ], [ %.1.3, %71 ]
  %niter = phi i64 [ 0, %.lr.ph51.preheader.new ], [ %niter.next.3, %71 ]
  %43 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %indvars.iv64
  %44 = load i8, ptr %43, align 4, !tbaa !12, !range !17, !noundef !18
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %46, label %.lr.ph51.1

46:                                               ; preds = %.lr.ph51
  %47 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv64
  %48 = load i64, ptr %47, align 16, !tbaa !14
  %49 = add nsw i64 %48, %.02348
  br label %.lr.ph51.1

.lr.ph51.1:                                       ; preds = %.lr.ph51, %46
  %.1 = phi i64 [ %49, %46 ], [ %.02348, %.lr.ph51 ]
  %indvars.iv.next65 = or disjoint i64 %indvars.iv64, 1
  %50 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %indvars.iv.next65
  %51 = load i8, ptr %50, align 1, !tbaa !12, !range !17, !noundef !18
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %53, label %.lr.ph51.2

53:                                               ; preds = %.lr.ph51.1
  %54 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv.next65
  %55 = load i64, ptr %54, align 8, !tbaa !14
  %56 = add nsw i64 %55, %.1
  br label %.lr.ph51.2

.lr.ph51.2:                                       ; preds = %53, %.lr.ph51.1
  %.1.1 = phi i64 [ %56, %53 ], [ %.1, %.lr.ph51.1 ]
  %indvars.iv.next65.1 = or disjoint i64 %indvars.iv64, 2
  %57 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %indvars.iv.next65.1
  %58 = load i8, ptr %57, align 2, !tbaa !12, !range !17, !noundef !18
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %60, label %.lr.ph51.3

60:                                               ; preds = %.lr.ph51.2
  %61 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv.next65.1
  %62 = load i64, ptr %61, align 16, !tbaa !14
  %63 = add nsw i64 %62, %.1.1
  br label %.lr.ph51.3

.lr.ph51.3:                                       ; preds = %60, %.lr.ph51.2
  %.1.2 = phi i64 [ %63, %60 ], [ %.1.1, %.lr.ph51.2 ]
  %indvars.iv.next65.2 = or disjoint i64 %indvars.iv64, 3
  %64 = getelementptr inbounds [200010 x i8], ptr @ok, i64 0, i64 %indvars.iv.next65.2
  %65 = load i8, ptr %64, align 1, !tbaa !12, !range !17, !noundef !18
  %66 = trunc nuw i8 %65 to i1
  br i1 %66, label %67, label %71

67:                                               ; preds = %.lr.ph51.3
  %68 = getelementptr inbounds [200010 x i64], ptr @A, i64 0, i64 %indvars.iv.next65.2
  %69 = load i64, ptr %68, align 8, !tbaa !14
  %70 = add nsw i64 %69, %.1.2
  br label %71

71:                                               ; preds = %67, %.lr.ph51.3
  %.1.3 = phi i64 [ %70, %67 ], [ %.1.2, %.lr.ph51.3 ]
  %indvars.iv.next65.3 = add nuw nsw i64 %indvars.iv64, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge52.loopexit.unr-lcssa, label %.lr.ph51, !llvm.loop !21

72:                                               ; preds = %28, %.thread, %._crit_edge52
  %.sink = phi ptr [ %29, %28 ], [ %17, %.thread ], [ %42, %._crit_edge52 ]
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 2

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

!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 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !10}


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