; LLVM IR from eyangch/competitive-programming :: Codeforces/1738 (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" }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@A = external dso_local global [100 x i64], align 16
@dp = external dso_local global [101 x [101 x [101 x i64]]], align 16
@O = external dso_local global i64, align 8
@E = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dpfxxxx(i64 noundef, i64 noundef, i64 noundef, i64 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 i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %15

15:                                               ; preds = %91, %0
  %16 = load i64, ptr @T, align 8, !tbaa !8
  %17 = add nsw i64 %16, -1
  store i64 %17, ptr @T, align 8, !tbaa !8
  %18 = icmp ne i64 %16, 0
  br i1 %18, label %19, label %92

19:                                               ; preds = %15
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  store i64 0, ptr @E, align 8, !tbaa !8
  store i64 0, ptr @O, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %21

21:                                               ; preds = %53, %19
  %22 = load i64, ptr %2, align 8, !tbaa !8
  %23 = load i64, ptr @N, align 8, !tbaa !8
  %24 = icmp sle i64 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %56

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %27

27:                                               ; preds = %49, %26
  %28 = load i64, ptr %4, align 8, !tbaa !8
  %29 = load i64, ptr @N, align 8, !tbaa !8
  %30 = icmp sle i64 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %33

33:                                               ; preds = %45, %32
  %34 = load i64, ptr %5, align 8, !tbaa !8
  %35 = load i64, ptr @N, align 8, !tbaa !8
  %36 = icmp sle i64 %34, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %33
  %39 = load i64, ptr %2, align 8, !tbaa !8
  %40 = getelementptr inbounds [101 x [101 x [101 x i64]]], ptr @dp, i64 0, i64 %39
  %41 = load i64, ptr %4, align 8, !tbaa !8
  %42 = getelementptr inbounds [101 x [101 x i64]], ptr %40, i64 0, i64 %41
  %43 = load i64, ptr %5, align 8, !tbaa !8
  %44 = getelementptr inbounds [101 x i64], ptr %42, i64 0, i64 %43
  store i64 0, ptr %44, align 8, !tbaa !8
  br label %45

45:                                               ; preds = %38
  %46 = load i64, ptr %5, align 8, !tbaa !8
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %5, align 8, !tbaa !8
  br label %33, !llvm.loop !11

48:                                               ; preds = %37
  br label %49

49:                                               ; preds = %48
  %50 = load i64, ptr %4, align 8, !tbaa !8
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %4, align 8, !tbaa !8
  br label %27, !llvm.loop !13

52:                                               ; preds = %31
  br label %53

53:                                               ; preds = %52
  %54 = load i64, ptr %2, align 8, !tbaa !8
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %2, align 8, !tbaa !8
  br label %21, !llvm.loop !14

56:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %57

57:                                               ; preds = %78, %56
  %58 = load i64, ptr %6, align 8, !tbaa !8
  %59 = load i64, ptr @N, align 8, !tbaa !8
  %60 = icmp slt i64 %58, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %57
  %63 = load i64, ptr %6, align 8, !tbaa !8
  %64 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %63
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %64)
  %66 = load i64, ptr %6, align 8, !tbaa !8
  %67 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !8
  %69 = srem i64 %68, 2
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %62
  %72 = load i64, ptr @O, align 8, !tbaa !8
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr @O, align 8, !tbaa !8
  br label %77

74:                                               ; preds = %62
  %75 = load i64, ptr @E, align 8, !tbaa !8
  %76 = add nsw i64 %75, 1
  store i64 %76, ptr @E, align 8, !tbaa !8
  br label %77

77:                                               ; preds = %74, %71
  br label %78

78:                                               ; preds = %77
  %79 = load i64, ptr %6, align 8, !tbaa !8
  %80 = add nsw i64 %79, 1
  store i64 %80, ptr %6, align 8, !tbaa !8
  br label %57, !llvm.loop !15

81:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %82 = call noundef i64 @_Z3dpfxxxx(i64 noundef 0, i64 noundef 0, i64 noundef 0, i64 noundef 0)
  store i64 %82, ptr %7, align 8, !tbaa !8
  %83 = load i64, ptr %7, align 8, !tbaa !8
  %84 = icmp eq i64 %83, 1
  br i1 %84, label %85, label %88

85:                                               ; preds = %81
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %86, i8 noundef signext 10)
  br label %91

88:                                               ; preds = %81
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %89, i8 noundef signext 10)
  br label %91

91:                                               ; preds = %88, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %15, !llvm.loop !16

92:                                               ; preds = %15
  %93 = load i32, ptr %1, align 4
  ret i32 %93
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

; 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)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

; 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) #5

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 = { 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 = { "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 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@A = external dso_local global [100 x i64], align 16
@dp = external dso_local local_unnamed_addr global [101 x [101 x [101 x i64]]], align 16
@O = external dso_local local_unnamed_addr global i64, align 8
@E = external dso_local local_unnamed_addr global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dpfxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %2 = getelementptr i8, ptr %1, i64 -24
  %3 = load i64, ptr %2, align 8
  %4 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %3
  %5 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef null)
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = 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) @T)
  %8 = load i64, ptr @T, align 8, !tbaa !8
  %9 = add nsw i64 %8, -1
  store i64 %9, ptr @T, align 8, !tbaa !8
  %.not33 = icmp eq i64 %8, 0
  br i1 %.not33, label %._crit_edge36, label %.lr.ph35

.lr.ph35:                                         ; preds = %0, %._crit_edge32
  %10 = 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) @N)
  store i64 0, ptr @E, align 8, !tbaa !8
  store i64 0, ptr @O, align 8, !tbaa !8
  %11 = load i64, ptr @N, align 8, !tbaa !8
  %.not1829 = icmp slt i64 %11, 0
  br i1 %.not1829, label %._crit_edge32, label %.preheader22.preheader

.preheader22.preheader:                           ; preds = %.lr.ph35
  %12 = shl i64 %11, 3
  %13 = add i64 %12, 8
  %14 = add nuw i64 %11, 1
  %xtraiter = and i64 %14, 7
  %15 = icmp ult i64 %11, 7
  %unroll_iter = and i64 %14, -8
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader22

.preheader23:                                     ; preds = %._crit_edge28.split
  %.not40 = icmp eq i64 %11, 0
  br i1 %.not40, label %._crit_edge32, label %.lr.ph

.preheader22:                                     ; preds = %.preheader22.preheader, %._crit_edge28.split
  %.030 = phi i64 [ %29, %._crit_edge28.split ], [ 0, %.preheader22.preheader ]
  %16 = mul nuw nsw i64 %.030, 81608
  %17 = getelementptr i8, ptr @dp, i64 %16
  br i1 %15, label %._crit_edge28.split.unr-lcssa, label %.preheader22.new

.preheader22.new:                                 ; preds = %.preheader22
  %invariant.gep = getelementptr i8, ptr %17, i64 808
  %invariant.gep41 = getelementptr i8, ptr %17, i64 1616
  %invariant.gep43 = getelementptr i8, ptr %17, i64 2424
  %invariant.gep45 = getelementptr i8, ptr %17, i64 3232
  %invariant.gep47 = getelementptr i8, ptr %17, i64 4040
  %invariant.gep49 = getelementptr i8, ptr %17, i64 4848
  %invariant.gep51 = getelementptr i8, ptr %17, i64 5656
  br label %.preheader

.preheader:                                       ; preds = %.preheader, %.preheader22.new
  %.01727 = phi i64 [ 0, %.preheader22.new ], [ %26, %.preheader ]
  %niter = phi i64 [ 0, %.preheader22.new ], [ %niter.next.7, %.preheader ]
  %18 = mul nuw nsw i64 %.01727, 808
  %scevgep = getelementptr i8, ptr %17, i64 %18
  tail call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 0, i64 %13, i1 false), !tbaa !8
  %19 = mul nuw i64 %.01727, 808
  %gep = getelementptr i8, ptr %invariant.gep, i64 %19
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %13, i1 false), !tbaa !8
  %20 = mul nuw i64 %.01727, 808
  %gep42 = getelementptr i8, ptr %invariant.gep41, i64 %20
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep42, i8 0, i64 %13, i1 false), !tbaa !8
  %21 = mul nuw i64 %.01727, 808
  %gep44 = getelementptr i8, ptr %invariant.gep43, i64 %21
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep44, i8 0, i64 %13, i1 false), !tbaa !8
  %22 = mul nuw i64 %.01727, 808
  %gep46 = getelementptr i8, ptr %invariant.gep45, i64 %22
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep46, i8 0, i64 %13, i1 false), !tbaa !8
  %23 = mul nuw i64 %.01727, 808
  %gep48 = getelementptr i8, ptr %invariant.gep47, i64 %23
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep48, i8 0, i64 %13, i1 false), !tbaa !8
  %24 = mul nuw i64 %.01727, 808
  %gep50 = getelementptr i8, ptr %invariant.gep49, i64 %24
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep50, i8 0, i64 %13, i1 false), !tbaa !8
  %25 = mul nuw i64 %.01727, 808
  %gep52 = getelementptr i8, ptr %invariant.gep51, i64 %25
  tail call void @llvm.memset.p0.i64(ptr align 8 %gep52, i8 0, i64 %13, i1 false), !tbaa !8
  %26 = add nuw i64 %.01727, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge28.split.unr-lcssa, label %.preheader, !llvm.loop !11

._crit_edge28.split.unr-lcssa:                    ; preds = %.preheader, %.preheader22
  %.01727.unr = phi i64 [ 0, %.preheader22 ], [ %26, %.preheader ]
  br i1 %lcmp.mod.not, label %._crit_edge28.split, label %.preheader.epil

.preheader.epil:                                  ; preds = %._crit_edge28.split.unr-lcssa, %.preheader.epil
  %.01727.epil = phi i64 [ %28, %.preheader.epil ], [ %.01727.unr, %._crit_edge28.split.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.epil ], [ 0, %._crit_edge28.split.unr-lcssa ]
  %27 = mul nuw nsw i64 %.01727.epil, 808
  %scevgep.epil = getelementptr i8, ptr %17, i64 %27
  tail call void @llvm.memset.p0.i64(ptr align 8 %scevgep.epil, i8 0, i64 %13, i1 false), !tbaa !8
  %28 = add nuw i64 %.01727.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_edge28.split, label %.preheader.epil, !llvm.loop !13

._crit_edge28.split:                              ; preds = %.preheader.epil, %._crit_edge28.split.unr-lcssa
  %29 = add nuw i64 %.030, 1
  %exitcond37.not = icmp eq i64 %.030, %11
  br i1 %exitcond37.not, label %.preheader23, label %.preheader22, !llvm.loop !15

._crit_edge32:                                    ; preds = %.lr.ph, %.lr.ph35, %.preheader23
  %30 = tail call noundef i64 @_Z3dpfxxxx(i64 noundef 0, i64 noundef 0, i64 noundef 0, i64 noundef 0)
  %31 = icmp eq i64 %30, 1
  %.str..str.1 = select i1 %31, ptr @.str, ptr @.str.1
  %32 = 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..str.1)
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %32, i8 noundef signext 10)
  %34 = load i64, ptr @T, align 8, !tbaa !8
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %._crit_edge36, label %.lr.ph35, !llvm.loop !16

.lr.ph:                                           ; preds = %.preheader23, %.lr.ph
  %.01531 = phi i64 [ %42, %.lr.ph ], [ 0, %.preheader23 ]
  %36 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %.01531
  %37 = 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) %36)
  %38 = load i64, ptr %36, align 8, !tbaa !8
  %39 = and i64 %38, 1
  %.not19 = icmp eq i64 %39, 0
  %E.O = select i1 %.not19, ptr @E, ptr @O
  %40 = load i64, ptr %E.O, align 8, !tbaa !8
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %E.O, align 8, !tbaa !8
  %42 = add nuw nsw i64 %.01531, 1
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %.lr.ph, label %._crit_edge32, !llvm.loop !17

._crit_edge36:                                    ; preds = %._crit_edge32, %0
  ret i32 0
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #3

; 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 #0 align 2

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

; 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 #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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