; LLVM IR from tangjz/acm-icpc :: lydsy (3927)

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

@n = external dso_local global i32, align 4
@p = external dso_local global [200001 x i32], align 16
@f = external dso_local global [200001 x i32], align 16
@g = external dso_local global [200001 x i32], align 16
@mx = external dso_local global i32, align 4
@h = external dso_local global [200001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  br label %10

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

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

15:                                               ; preds = %10
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %19
  store i32 %17, ptr %20, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %15
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !9

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

25:                                               ; preds = %60, %24
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %63

30:                                               ; preds = %25
  %31 = load i32, ptr @mx, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr @h, i64 %32
  %34 = getelementptr inbounds i32, ptr %33, i64 1
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %36
  %38 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef getelementptr inbounds (i32, ptr @h, i64 1), ptr noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = ptrtoint ptr %38 to i64
  %40 = sub i64 %39, ptrtoint (ptr @h to i64)
  %41 = sdiv exact i64 %40, 4
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200001 x i32], ptr @h, i64 0, i64 %48
  store i32 %46, ptr %49, align 4, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %52
  store i32 %50, ptr %53, align 4, !tbaa !5
  %54 = load i32, ptr @mx, align 4, !tbaa !5
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %59

57:                                               ; preds = %30
  %58 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %58, ptr @mx, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %57, %30
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %4, align 4, !tbaa !5
  br label %25, !llvm.loop !11

63:                                               ; preds = %29
  store i32 0, ptr @mx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %64 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %64, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  br label %65

65:                                               ; preds = %99, %63
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = icmp sge i32 %66, 1
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %102

69:                                               ; preds = %65
  %70 = load i32, ptr @mx, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr @h, i64 %71
  %73 = getelementptr inbounds i32, ptr %72, i64 1
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %75
  %77 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef getelementptr inbounds (i32, ptr @h, i64 1), ptr noundef %73, ptr noundef nonnull align 4 dereferenceable(4) %76)
  %78 = ptrtoint ptr %77 to i64
  %79 = sub i64 %78, ptrtoint (ptr @h to i64)
  %80 = sdiv exact i64 %79, 4
  %81 = trunc i64 %80 to i32
  store i32 %81, ptr %7, align 4, !tbaa !5
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [200001 x i32], ptr @h, i64 0, i64 %87
  store i32 %85, ptr %88, align 4, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %91
  store i32 %89, ptr %92, align 4, !tbaa !5
  %93 = load i32, ptr @mx, align 4, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %96, label %98

96:                                               ; preds = %69
  %97 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %97, ptr @mx, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %96, %69
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr %6, align 4, !tbaa !5
  br label %65, !llvm.loop !12

102:                                              ; preds = %68
  store i32 0, ptr @mx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %133, %102
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = load i32, ptr @n, align 4, !tbaa !5
  %106 = icmp sle i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %136

108:                                              ; preds = %103
  %109 = load i32, ptr @mx, align 4, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = add nsw i32 %113, %117
  %119 = sub nsw i32 %118, 1
  %120 = icmp slt i32 %109, %119
  br i1 %120, label %121, label %132

121:                                              ; preds = %108
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = add nsw i32 %125, %129
  %131 = sub nsw i32 %130, 1
  store i32 %131, ptr @mx, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %121, %108
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %8, align 4, !tbaa !5
  br label %103, !llvm.loop !13

136:                                              ; preds = %107
  %137 = load i32, ptr @mx, align 4, !tbaa !5
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %137)
  ret i32 0
}

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: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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

@n = external dso_local global i32, align 4
@p = external dso_local global [200001 x i32], align 16
@f = external dso_local local_unnamed_addr global [200001 x i32], align 16
@g = external dso_local local_unnamed_addr global [200001 x i32], align 16
@mx = external dso_local local_unnamed_addr global i32, align 4
@h = external dso_local global [200001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %.not36 = icmp slt i32 %3, 1
  br i1 %.not36, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  br label %._crit_edge47.thread

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %.not3338 = icmp slt i32 %9, 1
  br i1 %.not3338, label %._crit_edge47.thread, label %.lr.ph41.preheader

.lr.ph41.preheader:                               ; preds = %._crit_edge
  %.pre = load i32, ptr @mx, align 4, !tbaa !5
  br label %.lr.ph41

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02737 = phi i32 [ %8, %.lr.ph ], [ 1, %0 ]
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %6
  store i32 %.02737, ptr %7, align 4, !tbaa !5
  %8 = add nuw nsw i32 %.02737, 1
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.02737, %9
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge42:                                    ; preds = %27
  store i32 0, ptr @mx, align 4, !tbaa !5
  %10 = icmp sgt i32 %29, 0
  br i1 %10, label %.lr.ph46.preheader, label %._crit_edge47.thread

.lr.ph46.preheader:                               ; preds = %._crit_edge42
  %11 = zext nneg i32 %29 to i64
  br label %.lr.ph46

.lr.ph41:                                         ; preds = %.lr.ph41.preheader, %27
  %12 = phi i32 [ %.pre, %.lr.ph41.preheader ], [ %28, %27 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph41.preheader ], [ %indvars.iv.next, %27 ]
  %13 = sext i32 %12 to i64
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @h, i64 4), i64 %13
  %14 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %indvars.iv
  %15 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @h, i64 4), ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %16 = ptrtoint ptr %15 to i64
  %17 = sub i64 %16, ptrtoint (ptr @h to i64)
  %18 = lshr exact i64 %17, 2
  %19 = trunc i64 %18 to i32
  %20 = load i32, ptr %14, align 4, !tbaa !5
  %sext35 = shl i64 %17, 30
  %21 = ashr i64 %sext35, 32
  %22 = getelementptr inbounds [200001 x i32], ptr @h, i64 0, i64 %21
  store i32 %20, ptr %22, align 4, !tbaa !5
  %23 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %indvars.iv
  store i32 %19, ptr %23, align 4, !tbaa !5
  %24 = load i32, ptr @mx, align 4, !tbaa !5
  %25 = icmp slt i32 %24, %19
  br i1 %25, label %26, label %27

26:                                               ; preds = %.lr.ph41
  store i32 %19, ptr @mx, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %.lr.ph41, %26
  %28 = phi i32 [ %24, %.lr.ph41 ], [ %19, %26 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %.not33.not = icmp slt i64 %indvars.iv, %30
  br i1 %.not33.not, label %.lr.ph41, label %._crit_edge42, !llvm.loop !11

._crit_edge47.thread:                             ; preds = %._crit_edge.thread, %._crit_edge, %._crit_edge42
  store i32 0, ptr @mx, align 4, !tbaa !5
  br label %._crit_edge52

._crit_edge47:                                    ; preds = %48
  %.pre61 = load i32, ptr @n, align 4, !tbaa !5
  store i32 0, ptr @mx, align 4, !tbaa !5
  %.not3448 = icmp slt i32 %.pre61, 1
  br i1 %.not3448, label %._crit_edge52, label %.lr.ph51.preheader

.lr.ph51.preheader:                               ; preds = %._crit_edge47
  %31 = zext nneg i32 %.pre61 to i64
  %xtraiter = and i64 %31, 1
  %32 = icmp eq i32 %.pre61, 1
  br i1 %32, label %._crit_edge52.loopexit.unr-lcssa, label %.lr.ph51.preheader.new

.lr.ph51.preheader.new:                           ; preds = %.lr.ph51.preheader
  %unroll_iter = and i64 %31, 2147483646
  br label %.lr.ph51

.lr.ph46:                                         ; preds = %.lr.ph46.preheader, %48
  %33 = phi i32 [ 0, %.lr.ph46.preheader ], [ %49, %48 ]
  %indvars.iv55 = phi i64 [ %11, %.lr.ph46.preheader ], [ %indvars.iv.next56, %48 ]
  %34 = sext i32 %33 to i64
  %gep43 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @h, i64 4), i64 %34
  %35 = getelementptr inbounds [200001 x i32], ptr @p, i64 0, i64 %indvars.iv55
  %36 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @h, i64 4), ptr noundef nonnull %gep43, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %37 = ptrtoint ptr %36 to i64
  %38 = sub i64 %37, ptrtoint (ptr @h to i64)
  %39 = lshr exact i64 %38, 2
  %40 = trunc i64 %39 to i32
  %41 = load i32, ptr %35, align 4, !tbaa !5
  %sext = shl i64 %38, 30
  %42 = ashr i64 %sext, 32
  %43 = getelementptr inbounds [200001 x i32], ptr @h, i64 0, i64 %42
  store i32 %41, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %indvars.iv55
  store i32 %40, ptr %44, align 4, !tbaa !5
  %45 = load i32, ptr @mx, align 4, !tbaa !5
  %46 = icmp slt i32 %45, %40
  br i1 %46, label %47, label %48

47:                                               ; preds = %.lr.ph46
  store i32 %40, ptr @mx, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %.lr.ph46, %47
  %49 = phi i32 [ %45, %.lr.ph46 ], [ %40, %47 ]
  %indvars.iv.next56 = add nsw i64 %indvars.iv55, -1
  %50 = icmp sgt i64 %indvars.iv55, 1
  br i1 %50, label %.lr.ph46, label %._crit_edge47, !llvm.loop !12

._crit_edge52.loopexit.unr-lcssa:                 ; preds = %79, %.lr.ph51.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph51.preheader ], [ %80, %79 ]
  %indvars.iv58.unr = phi i64 [ 1, %.lr.ph51.preheader ], [ %indvars.iv.next59.1, %79 ]
  %.unr = phi i32 [ 0, %.lr.ph51.preheader ], [ %80, %79 ]
  %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
  %51 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %indvars.iv58.unr
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %indvars.iv58.unr
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add i32 %52, -1
  %56 = add i32 %55, %54
  %57 = icmp slt i32 %.unr, %56
  br i1 %57, label %58, label %._crit_edge52

58:                                               ; preds = %.lr.ph51.epil
  store i32 %56, ptr @mx, align 4, !tbaa !5
  br label %._crit_edge52

._crit_edge52:                                    ; preds = %._crit_edge52.loopexit.unr-lcssa, %58, %.lr.ph51.epil, %._crit_edge47.thread, %._crit_edge47
  %59 = phi i32 [ 0, %._crit_edge47 ], [ 0, %._crit_edge47.thread ], [ %.lcssa.ph, %._crit_edge52.loopexit.unr-lcssa ], [ %.unr, %.lr.ph51.epil ], [ %56, %58 ]
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %59)
  ret i32 0

.lr.ph51:                                         ; preds = %79, %.lr.ph51.preheader.new
  %indvars.iv58 = phi i64 [ 1, %.lr.ph51.preheader.new ], [ %indvars.iv.next59.1, %79 ]
  %61 = phi i32 [ 0, %.lr.ph51.preheader.new ], [ %80, %79 ]
  %niter = phi i64 [ 0, %.lr.ph51.preheader.new ], [ %niter.next.1, %79 ]
  %62 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %indvars.iv58
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %indvars.iv58
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add i32 %63, -1
  %67 = add i32 %66, %65
  %68 = icmp slt i32 %61, %67
  br i1 %68, label %69, label %.lr.ph51.1

69:                                               ; preds = %.lr.ph51
  store i32 %67, ptr @mx, align 4, !tbaa !5
  br label %.lr.ph51.1

.lr.ph51.1:                                       ; preds = %.lr.ph51, %69
  %70 = phi i32 [ %61, %.lr.ph51 ], [ %67, %69 ]
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %71 = getelementptr inbounds [200001 x i32], ptr @f, i64 0, i64 %indvars.iv.next59
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = getelementptr inbounds [200001 x i32], ptr @g, i64 0, i64 %indvars.iv.next59
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add i32 %72, -1
  %76 = add i32 %75, %74
  %77 = icmp slt i32 %70, %76
  br i1 %77, label %78, label %79

78:                                               ; preds = %.lr.ph51.1
  store i32 %76, ptr @mx, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %78, %.lr.ph51.1
  %80 = phi i32 [ %70, %.lr.ph51.1 ], [ %76, %78 ]
  %indvars.iv.next59.1 = add nuw nsw i64 %indvars.iv58, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge52.loopexit.unr-lcssa, label %.lr.ph51, !llvm.loop !13
}

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

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

; Function Attrs: mustprogress 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 dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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