; LLVM IR from reyadussalahin/problem-solving :: search/binary_search/codeforces/F1486D (Solution)

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

@a = external dso_local global [200020 x i32], align 16
@t = external dso_local global [200020 x i32], align 16
@mn = external dso_local global [200020 x i32], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [116 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = 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
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %24, %0
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %22)
  br label %24

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

27:                                               ; preds = %18
  store i32 0, ptr @t, align 16, !tbaa !5
  store i32 0, ptr @mn, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %28, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 -1, ptr %7, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %122, %27
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %33, label %123

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = add nsw i32 %34, %35
  %37 = sdiv i32 %36, 2
  store i32 %37, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %83, %33
  %39 = load i32, ptr %9, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %38
  %44 = load i32, ptr %9, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp sge i32 %47, %48
  br i1 %49, label %50, label %60

50:                                               ; preds = %43
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = sub nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %58
  store i32 %56, ptr %59, align 4, !tbaa !5
  br label %70

60:                                               ; preds = %43
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %68
  store i32 %66, ptr %69, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %60, %50
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %73
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %76
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %74, ptr noundef nonnull align 4 dereferenceable(4) %77)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %81
  store i32 %79, ptr %82, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %70
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %9, align 4, !tbaa !5
  br label %38, !llvm.loop !11

86:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  store i8 0, ptr %10, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %87 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %87, ptr %11, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %108, %86
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 10, ptr %12, align 4
  br label %111

93:                                               ; preds = %88
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = sub nsw i32 %98, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = sub nsw i32 %97, %103
  %105 = icmp sgt i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %93
  store i8 1, ptr %10, align 1, !tbaa !12
  store i32 10, ptr %12, align 4
  br label %111

107:                                              ; preds = %93
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %11, align 4, !tbaa !5
  br label %88, !llvm.loop !14

111:                                              ; preds = %106, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %112

112:                                              ; preds = %111
  %113 = load i8, ptr %10, align 1, !tbaa !12, !range !15, !noundef !16
  %114 = trunc i8 %113 to i1
  br i1 %114, label %115, label %119

115:                                              ; preds = %112
  %116 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %116, ptr %7, align 4, !tbaa !5
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %5, align 4, !tbaa !5
  br label %122

119:                                              ; preds = %112
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  store i32 %121, ptr %6, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %119, %115
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %29, !llvm.loop !17

123:                                              ; preds = %29
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = icmp ne i32 %124, -1
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  br label %129

127:                                              ; preds = %123
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 53, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

128:                                              ; No predecessors!
  br label %129

129:                                              ; preds = %128, %126
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %130)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %132 = load i32, ptr %1, align 4
  ret i32 %132
}

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !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"

@a = external dso_local global [200020 x i32], align 16
@t = external dso_local global [200020 x i32], align 16
@mn = external dso_local global [200020 x i32], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [116 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

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

._crit_edge:                                      ; preds = %.lr.ph, %0
  %5 = phi i32 [ %4, %0 ], [ %26, %.lr.ph ]
  store i32 0, ptr @t, align 16, !tbaa !5
  store i32 0, ptr @mn, align 16, !tbaa !5
  %.not3755 = icmp slt i32 %5, 0
  br i1 %.not3755, label %._crit_edge61.thread, label %.lr.ph60

.lr.ph60:                                         ; preds = %._crit_edge
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %.lr.ph60.split.us, label %.lr.ph60.split

.lr.ph60.split.us:                                ; preds = %.lr.ph60
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %.not40.not51.us = icmp sgt i32 %7, %5
  br i1 %.not40.not51.us, label %._crit_edge61.thread, label %.lr.ph54.us.preheader

.lr.ph54.us.preheader:                            ; preds = %.lr.ph60.split.us
  %8 = sext i32 %7 to i64
  br label %.lr.ph54.us

.lr.ph54.us:                                      ; preds = %.lr.ph54.us.preheader, %22
  %.03158.us = phi i32 [ %.1.us, %22 ], [ -1, %.lr.ph54.us.preheader ]
  %.03257.us = phi i32 [ %.133.us, %22 ], [ 0, %.lr.ph54.us.preheader ]
  %.03456.us = phi i32 [ %.135.us, %22 ], [ 0, %.lr.ph54.us.preheader ]
  %9 = add nuw nsw i32 %.03257.us, %.03456.us
  %10 = lshr i32 %9, 1
  br label %13

11:                                               ; preds = %13
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, 1
  %12 = and i64 %indvars.iv.next76, 4294967295
  %exitcond79.not = icmp eq i64 %12, 1
  br i1 %exitcond79.not, label %..critedge_crit_edge.us, label %13, !llvm.loop !9

13:                                               ; preds = %.lr.ph54.us, %11
  %indvars.iv75 = phi i64 [ %8, %.lr.ph54.us ], [ %indvars.iv.next76, %11 ]
  %14 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %indvars.iv75
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = sub nsw i64 %indvars.iv75, %8
  %17 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = icmp sgt i32 %15, %18
  br i1 %19, label %20, label %11

20:                                               ; preds = %13
  %21 = add nuw nsw i32 %10, 1
  br label %22

22:                                               ; preds = %..critedge_crit_edge.us, %20
  %.135.us = phi i32 [ %21, %20 ], [ %.03456.us, %..critedge_crit_edge.us ]
  %.133.us = phi i32 [ %.03257.us, %20 ], [ %23, %..critedge_crit_edge.us ]
  %.1.us = phi i32 [ %10, %20 ], [ %.03158.us, %..critedge_crit_edge.us ]
  %.not37.us = icmp sgt i32 %.135.us, %.133.us
  br i1 %.not37.us, label %._crit_edge61, label %.lr.ph54.us, !llvm.loop !11

..critedge_crit_edge.us:                          ; preds = %11
  %23 = add nsw i32 %10, -1
  br label %22

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %24 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %indvars.iv
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %.not.not = icmp slt i64 %indvars.iv, %27
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !12

.lr.ph60.split:                                   ; preds = %.lr.ph60, %58
  %28 = phi i32 [ %31, %58 ], [ %5, %.lr.ph60 ]
  %.03158 = phi i32 [ %.1, %58 ], [ -1, %.lr.ph60 ]
  %.03257 = phi i32 [ %.133, %58 ], [ %5, %.lr.ph60 ]
  %.03456 = phi i32 [ %.135, %58 ], [ 0, %.lr.ph60 ]
  %29 = add nuw nsw i32 %.03257, %.03456
  %30 = lshr i32 %29, 1
  %.not3945 = icmp slt i32 %28, 1
  br i1 %.not3945, label %._crit_edge49, label %.lr.ph48

._crit_edge49:                                    ; preds = %.lr.ph48, %.lr.ph60.split
  %31 = phi i32 [ %28, %.lr.ph60.split ], [ %46, %.lr.ph48 ]
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %.not40.not51 = icmp sgt i32 %32, %31
  br i1 %.not40.not51, label %.critedge, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %._crit_edge49
  %33 = sext i32 %32 to i64
  %34 = add i32 %31, 1
  br label %.lr.ph54

.lr.ph48:                                         ; preds = %.lr.ph60.split, %.lr.ph48
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph48 ], [ 1, %.lr.ph60.split ]
  %35 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %indvars.iv69
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not41 = icmp slt i32 %36, %30
  %37 = add nsw i64 %indvars.iv69, -1
  %38 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %. = select i1 %.not41, i32 -1, i32 1
  %40 = add nsw i32 %39, %.
  %41 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %indvars.iv69
  store i32 %40, ptr %41, align 4
  %42 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %37
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %indvars.iv69
  store i32 %44, ptr %45, align 4, !tbaa !5
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %.not39.not = icmp slt i64 %indvars.iv69, %47
  br i1 %.not39.not, label %.lr.ph48, label %._crit_edge49, !llvm.loop !13

48:                                               ; preds = %.lr.ph54
  %indvars.iv.next73 = add nsw i64 %indvars.iv72, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next73 to i32
  %exitcond.not = icmp eq i32 %34, %lftr.wideiv
  br i1 %exitcond.not, label %.critedge, label %.lr.ph54, !llvm.loop !9

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %48
  %indvars.iv72 = phi i64 [ %33, %.lr.ph54.preheader ], [ %indvars.iv.next73, %48 ]
  %49 = getelementptr inbounds [200020 x i32], ptr @t, i64 0, i64 %indvars.iv72
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = sub nsw i64 %indvars.iv72, %33
  %52 = getelementptr inbounds [200020 x i32], ptr @mn, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp sgt i32 %50, %53
  br i1 %54, label %55, label %48

55:                                               ; preds = %.lr.ph54
  %56 = add nuw nsw i32 %30, 1
  br label %58

.critedge:                                        ; preds = %48, %._crit_edge49
  %57 = add nsw i32 %30, -1
  br label %58

58:                                               ; preds = %.critedge, %55
  %.135 = phi i32 [ %56, %55 ], [ %.03456, %.critedge ]
  %.133 = phi i32 [ %.03257, %55 ], [ %57, %.critedge ]
  %.1 = phi i32 [ %30, %55 ], [ %.03158, %.critedge ]
  %.not37 = icmp sgt i32 %.135, %.133
  br i1 %.not37, label %._crit_edge61, label %.lr.ph60.split, !llvm.loop !14

._crit_edge61:                                    ; preds = %58, %22
  %.031.lcssa = phi i32 [ %.1.us, %22 ], [ %.1, %58 ]
  %.not38 = icmp eq i32 %.031.lcssa, -1
  br i1 %.not38, label %._crit_edge61.thread, label %59

._crit_edge61.thread:                             ; preds = %.lr.ph60.split.us, %._crit_edge, %._crit_edge61
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 53, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

59:                                               ; preds = %._crit_edge61
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.031.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress norecurse 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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}
!14 = distinct !{!14, !10, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass