; LLVM IR from upupming/algorithm :: upupming (1029)

; 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_ostream" = type { ptr, %"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 }

@n = external dso_local global i64, align 8
@m = external dso_local global i64, align 8
@a = external dso_local global [200010 x i64], align 16
@b = external dso_local global [200010 x i64], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %22, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = load i64, ptr @n, align 8, !tbaa !9
  %15 = icmp slt i64 %13, %14
  br i1 %15, label %17, label %16

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

17:                                               ; preds = %11
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %19
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %20)
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !11

25:                                               ; preds = %16
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %38, %25
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = load i64, ptr @m, align 8, !tbaa !9
  %31 = icmp slt i64 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %41

33:                                               ; preds = %27
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
  br label %38

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

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %42 = load i64, ptr @n, align 8, !tbaa !9
  %43 = load i64, ptr @m, align 8, !tbaa !9
  %44 = add nsw i64 %42, %43
  %45 = sub nsw i64 %44, 1
  %46 = sdiv i64 %45, 2
  %47 = trunc i64 %46 to i32
  store i32 %47, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 0, ptr %8, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  store i8 0, ptr %9, align 1, !tbaa !14
  br label %48

48:                                               ; preds = %87, %41
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  %52 = icmp ne i32 %49, %51
  br i1 %52, label %53, label %90

53:                                               ; preds = %48
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = load i64, ptr @n, align 8, !tbaa !9
  %57 = icmp eq i64 %55, %56
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  store i8 1, ptr %8, align 1, !tbaa !14
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !5
  br label %87

61:                                               ; preds = %53
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = load i64, ptr @m, align 8, !tbaa !9
  %65 = icmp eq i64 %63, %64
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  store i8 1, ptr %9, align 1, !tbaa !14
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %6, align 4, !tbaa !5
  br label %86

69:                                               ; preds = %61
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = icmp sle i64 %73, %77
  br i1 %78, label %79, label %82

79:                                               ; preds = %69
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %6, align 4, !tbaa !5
  br label %85

82:                                               ; preds = %69
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %7, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %82, %79
  br label %86

86:                                               ; preds = %85, %66
  br label %87

87:                                               ; preds = %86, %58
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !16

90:                                               ; preds = %48
  %91 = load i8, ptr %8, align 1, !tbaa !14, !range !17, !noundef !18
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %101

93:                                               ; preds = %90
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %98)
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %126

101:                                              ; preds = %90
  %102 = load i8, ptr %9, align 1, !tbaa !14, !range !17, !noundef !18
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %112

104:                                              ; preds = %101
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %109)
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %125

112:                                              ; preds = %101
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = sub nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %115
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %119
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull align 8 dereferenceable(8) %120)
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %122)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %125

125:                                              ; preds = %112, %104
  br label %126

126:                                              ; preds = %125, %93
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %127 = load i32, ptr %1, align 4
  ret i32 %127
}

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

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

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

; 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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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


; 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_ostream" = type { ptr, %"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 }

@n = external dso_local global i64, align 8
@m = external dso_local global i64, align 8
@a = external dso_local global [200010 x i64], align 16
@b = external dso_local global [200010 x i64], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

._crit_edge:                                      ; preds = %.lr.ph, %0
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %5 = load i64, ptr @m, align 8, !tbaa !5
  %6 = icmp sgt i64 %5, 0
  br i1 %6, label %.lr.ph42, label %._crit_edge43

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %7 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %indvars.iv
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = load i64, ptr @n, align 8, !tbaa !5
  %10 = icmp sgt i64 %9, %indvars.iv.next
  br i1 %10, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge43:                                    ; preds = %.lr.ph42, %._crit_edge
  %.lcssa = phi i64 [ %5, %._crit_edge ], [ %18, %.lr.ph42 ]
  %11 = load i64, ptr @n, align 8, !tbaa !5
  %12 = add i64 %.lcssa, -1
  %13 = add i64 %12, %11
  %14 = sdiv i64 %13, 2
  %15 = trunc i64 %14 to i32
  %.not44 = icmp eq i32 %15, -1
  br i1 %.not44, label %.thread83, label %.lr.ph51.outer

.lr.ph42:                                         ; preds = %._crit_edge, %.lr.ph42
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph42 ], [ 0, %._crit_edge ]
  %16 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %indvars.iv59
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %18 = load i64, ptr @m, align 8, !tbaa !5
  %19 = icmp sgt i64 %18, %indvars.iv.next60
  br i1 %19, label %.lr.ph42, label %._crit_edge43, !llvm.loop !11

.lr.ph51:                                         ; preds = %.thread
  %20 = add nuw nsw i32 %.03045101, 1
  %21 = add nsw i32 %.02647100, 1
  br i1 %38, label %.thread, label %.lr.ph51._crit_edge, !llvm.loop !12

.lr.ph51._crit_edge:                              ; preds = %.lr.ph51, %.lr.ph51.outer
  %.02448.lcssa = phi i1 [ %.02448.ph, %.lr.ph51.outer ], [ true, %.lr.ph51 ]
  %.02647.lcssa = phi i32 [ %.02647.ph, %.lr.ph51.outer ], [ %21, %.lr.ph51 ]
  %.03045.lcssa = phi i32 [ %.03045.ph, %.lr.ph51.outer ], [ %20, %.lr.ph51 ]
  %22 = sext i32 %.02647.lcssa to i64
  %23 = icmp eq i64 %.lcssa, %22
  br i1 %23, label %24, label %26

24:                                               ; preds = %.lr.ph51._crit_edge
  %25 = add nsw i32 %.02846.ph, 1
  br label %35

26:                                               ; preds = %.lr.ph51._crit_edge
  %27 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %37
  %28 = load i64, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %22
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %.not38 = icmp sgt i64 %28, %30
  br i1 %.not38, label %33, label %31

31:                                               ; preds = %26
  %32 = add nsw i32 %.02846.ph, 1
  br label %35

33:                                               ; preds = %26
  %34 = add nsw i32 %.02647.lcssa, 1
  br label %35

35:                                               ; preds = %24, %33, %31
  %.129 = phi i32 [ %25, %24 ], [ %32, %31 ], [ %.02846.ph, %33 ]
  %.127 = phi i32 [ %.02647.lcssa, %24 ], [ %.02647.lcssa, %31 ], [ %34, %33 ]
  %.1 = phi i1 [ true, %24 ], [ %.049.ph, %31 ], [ %.049.ph, %33 ]
  %36 = add nuw nsw i32 %.03045.lcssa, 1
  %.not = icmp eq i32 %.03045.lcssa, %15
  br i1 %.not, label %._crit_edge52, label %.lr.ph51.outer, !llvm.loop !12

.lr.ph51.outer:                                   ; preds = %._crit_edge43, %35
  %.049.ph = phi i1 [ %.1, %35 ], [ false, %._crit_edge43 ]
  %.02448.ph = phi i1 [ %.02448.lcssa, %35 ], [ false, %._crit_edge43 ]
  %.02647.ph = phi i32 [ %.127, %35 ], [ 0, %._crit_edge43 ]
  %.02846.ph = phi i32 [ %.129, %35 ], [ 0, %._crit_edge43 ]
  %.03045.ph = phi i32 [ %36, %35 ], [ 0, %._crit_edge43 ]
  %37 = sext i32 %.02846.ph to i64
  %38 = icmp eq i64 %11, %37
  br i1 %38, label %.thread, label %.lr.ph51._crit_edge

.thread:                                          ; preds = %.lr.ph51.outer, %.lr.ph51
  %.03045101 = phi i32 [ %20, %.lr.ph51 ], [ %.03045.ph, %.lr.ph51.outer ]
  %.02647100 = phi i32 [ %21, %.lr.ph51 ], [ %.02647.ph, %.lr.ph51.outer ]
  %.not73 = icmp eq i32 %.03045101, %15
  br i1 %.not73, label %._crit_edge52.thread78, label %.lr.ph51, !llvm.loop !12

._crit_edge52.thread78:                           ; preds = %.thread
  %39 = sext i32 %.02647100 to i64
  br label %44

._crit_edge52:                                    ; preds = %35
  %40 = add nsw i32 %.129, -1
  %41 = sext i32 %40 to i64
  %42 = add nsw i32 %.127, -1
  %43 = sext i32 %42 to i64
  br i1 %.02448.lcssa, label %44, label %47

44:                                               ; preds = %._crit_edge52.thread78, %._crit_edge52
  %45 = phi i64 [ %39, %._crit_edge52.thread78 ], [ %43, %._crit_edge52 ]
  %46 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %45
  br label %53

47:                                               ; preds = %._crit_edge52
  br i1 %.1, label %48, label %.thread83

48:                                               ; preds = %47
  %49 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %41
  br label %53

.thread83:                                        ; preds = %._crit_edge43, %47
  %.028.lcssa6688 = phi i64 [ %41, %47 ], [ -1, %._crit_edge43 ]
  %.026.lcssa6787 = phi i64 [ %43, %47 ], [ -1, %._crit_edge43 ]
  %50 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %.028.lcssa6688
  %51 = getelementptr inbounds [200010 x i64], ptr @b, i64 0, i64 %.026.lcssa6787
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %51)
  br label %53

53:                                               ; preds = %48, %.thread83, %44
  %.sink = phi ptr [ %49, %48 ], [ %52, %.thread83 ], [ %46, %44 ]
  %54 = load i64, ptr %.sink, align 8, !tbaa !5
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %54)
  %56 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

; 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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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 = { 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 #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" }
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" }

!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 = !{!"long long", !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: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass