; LLVM IR from tangjz/acm-icpc :: codeforces/gym/104068I.ll (Z5solvev)

; 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.anon = type { ptr, ptr }
%class.anon.0 = type { i8 }

@_ZZ5solvevE3que = external hidden global [1000001 x i32], align 16
@_ZZ5solvevE1a = external hidden global [1000001 x i64], align 16
@_ZZ5solvevE1s = external hidden global [1000001 x i64], align 16
@_ZZ5solvevE1f = external hidden global [1000001 x i64], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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 %class.anon, align 8
  %7 = alloca %class.anon.0, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i128, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2)
  store i64 0, ptr @_ZZ5solvevE1f, align 16, !tbaa !9
  store i64 0, ptr @_ZZ5solvevE1s, align 16, !tbaa !9
  store i64 0, ptr @_ZZ5solvevE1a, align 16, !tbaa !9
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr %4, align 4, !tbaa !5
  %14 = sext i32 %12 to i64
  %15 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %14
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %109, %0
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i64, ptr @_ZZ5solvevE1a, i64 %23
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %24)
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = sub nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1s, i64 0, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1a, i64 0, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = add nsw i64 %30, %34
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1s, i64 0, i64 %37
  store i64 %35, ptr %38, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  %39 = getelementptr inbounds %class.anon, ptr %6, i32 0, i32 0
  store ptr %5, ptr %39, align 8, !tbaa !11
  %40 = getelementptr inbounds %class.anon, ptr %6, i32 0, i32 1
  store ptr %2, ptr %40, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = call noundef i64 @"_ZZ5solvevENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %44)
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %47
  store i64 %45, ptr %48, align 8, !tbaa !9
  store ptr %48, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  br label %49

49:                                               ; preds = %67, %21
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %64

54:                                               ; preds = %49
  %55 = load ptr, ptr %8, align 8, !tbaa !11
  %56 = load i64, ptr %55, align 8, !tbaa !9
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = call noundef i64 @"_ZZ5solvevENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %61)
  store i64 %62, ptr %9, align 8, !tbaa !9
  %63 = icmp sge i64 %56, %62
  br label %64

64:                                               ; preds = %54, %49
  %65 = phi i1 [ false, %49 ], [ %63, %54 ]
  br i1 %65, label %66, label %72

66:                                               ; preds = %64
  br label %67

67:                                               ; preds = %66
  %68 = load i64, ptr %9, align 8, !tbaa !9
  %69 = load ptr, ptr %8, align 8, !tbaa !11
  store i64 %68, ptr %69, align 8, !tbaa !9
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %3, align 4, !tbaa !5
  br label %49, !llvm.loop !13

72:                                               ; preds = %64
  br label %73

73:                                               ; preds = %100, %72
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %97

78:                                               ; preds = %73
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sub nsw i32 %79, 2
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = call noundef { i64, i64 } @"_ZZ5solvevENK3$_1clEiii"(ptr noundef nonnull align 1 dereferenceable(1) %7, i32 noundef %83, i32 noundef %88, i32 noundef %89)
  %91 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %92 = extractvalue { i64, i64 } %90, 0
  store i64 %92, ptr %91, align 16
  %93 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %94 = extractvalue { i64, i64 } %90, 1
  store i64 %94, ptr %93, align 8
  %95 = load i128, ptr %10, align 16, !tbaa !15
  %96 = icmp sle i128 %95, 0
  br label %97

97:                                               ; preds = %78, %73
  %98 = phi i1 [ false, %73 ], [ %96, %78 ]
  br i1 %98, label %99, label %103

99:                                               ; preds = %97
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %4, align 4, !tbaa !5
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %4, align 4, !tbaa !5
  br label %73, !llvm.loop !17

103:                                              ; preds = %97
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %4, align 4, !tbaa !5
  %107 = sext i32 %105 to i64
  %108 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %107
  store i32 %104, ptr %108, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  br label %109

109:                                              ; preds = %103
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %5, align 4, !tbaa !5
  br label %16, !llvm.loop !18

112:                                              ; preds = %20
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !9
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %116)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

; 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: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZZ5solvevENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef { i64, i64 } @"_ZZ5solvevENK3$_1clEiii"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef, i32 noundef) #3 align 2

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

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

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 = { "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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"__int128", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


; 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.anon = type { ptr, ptr }
%class.anon.0 = type { i8 }

@_ZZ5solvevE3que = external hidden local_unnamed_addr global [1000001 x i32], align 16
@_ZZ5solvevE1a = external hidden global [1000001 x i64], align 16
@_ZZ5solvevE1s = external hidden local_unnamed_addr global [1000001 x i64], align 16
@_ZZ5solvevE1f = external hidden local_unnamed_addr global [1000001 x i64], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %class.anon, align 8
  %5 = alloca %class.anon.0, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  store i64 0, ptr @_ZZ5solvevE1f, align 16, !tbaa !5
  store i64 0, ptr @_ZZ5solvevE1s, align 16, !tbaa !5
  store i64 0, ptr @_ZZ5solvevE1a, align 16, !tbaa !5
  store i32 0, ptr @_ZZ5solvevE3que, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 1, ptr %3, align 4, !tbaa !9
  %7 = load i32, ptr %1, align 4, !tbaa !9
  %.not24 = icmp slt i32 %7, 1
  br i1 %.not24, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %8 = getelementptr inbounds i8, ptr %4, i64 8
  br label %13

._crit_edge:                                      ; preds = %.critedge2, %0
  %.lcssa23 = phi i32 [ %7, %0 ], [ %64, %.critedge2 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  %9 = sext i32 %.lcssa23 to i64
  %10 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %9
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %11)
  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 void

13:                                               ; preds = %.lr.ph, %.critedge2
  %.027 = phi i32 [ 0, %.lr.ph ], [ %.1.lcssa, %.critedge2 ]
  %.01626 = phi i32 [ 1, %.lr.ph ], [ %60, %.critedge2 ]
  %storemerge25 = phi i32 [ 1, %.lr.ph ], [ %63, %.critedge2 ]
  %14 = sext i32 %storemerge25 to i64
  %15 = getelementptr inbounds i64, ptr @_ZZ5solvevE1a, i64 %14
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %15)
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = add nsw i32 %17, -1
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1s, i64 0, i64 %19
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %22 = sext i32 %17 to i64
  %23 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1a, i64 0, i64 %22
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = add nsw i64 %24, %21
  %26 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1s, i64 0, i64 %22
  store i64 %25, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  store ptr %3, ptr %4, align 8, !tbaa !11
  store ptr %2, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  %27 = sext i32 %.027 to i64
  %28 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = call noundef i64 @"_ZZ5solvevENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %29)
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [1000001 x i64], ptr @_ZZ5solvevE1f, i64 0, i64 %32
  %34 = sext i32 %.01626 to i64
  %35 = add i32 %.027, 1
  %smax = call i32 @llvm.smax.i32(i32 %.01626, i32 %35)
  %36 = add i32 %smax, -1
  br label %37

37:                                               ; preds = %39, %13
  %indvars.iv = phi i64 [ %indvars.iv.next, %39 ], [ %27, %13 ]
  %storemerge21 = phi i64 [ %42, %39 ], [ %30, %13 ]
  store i64 %storemerge21, ptr %33, align 8, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %38 = icmp slt i64 %indvars.iv.next, %34
  br i1 %38, label %39, label %.critedge

39:                                               ; preds = %37
  %40 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %indvars.iv.next
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = call noundef i64 @"_ZZ5solvevENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %41)
  %.not22 = icmp slt i64 %storemerge21, %42
  br i1 %.not22, label %.critedge.split.loop.exit38, label %37, !llvm.loop !13

.critedge.split.loop.exit38:                      ; preds = %39
  %43 = trunc nsw i64 %indvars.iv to i32
  %44 = trunc nsw i64 %indvars.iv.next to i32
  br label %.critedge

.critedge:                                        ; preds = %37, %.critedge.split.loop.exit38
  %.1.lcssa = phi i32 [ %43, %.critedge.split.loop.exit38 ], [ %36, %37 ]
  %.lcssa = phi i32 [ %44, %.critedge.split.loop.exit38 ], [ %smax, %37 ]
  %45 = sext i32 %.lcssa to i64
  %smin = call i32 @llvm.smin.i32(i32 %.lcssa, i32 %.01626)
  br label %46

46:                                               ; preds = %48, %.critedge
  %indvars.iv30 = phi i64 [ %indvars.iv.next31, %48 ], [ %34, %.critedge ]
  %47 = icmp sgt i64 %indvars.iv30, %45
  %.pre33 = load i32, ptr %3, align 4, !tbaa !9
  br i1 %47, label %48, label %.critedge2

48:                                               ; preds = %46
  %49 = add nsw i64 %indvars.iv30, -2
  %50 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %indvars.iv.next31 = add nsw i64 %indvars.iv30, -1
  %52 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %indvars.iv.next31
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = call noundef { i64, i64 } @"_ZZ5solvevENK3$_1clEiii"(ptr noundef nonnull align 1 dereferenceable(1) %5, i32 noundef %51, i32 noundef %53, i32 noundef %.pre33)
  %55 = extractvalue { i64, i64 } %54, 0
  %56 = extractvalue { i64, i64 } %54, 1
  %.sroa.2.0.insert.ext = zext i64 %56 to i128
  %.sroa.2.0.insert.shift = shl nuw i128 %.sroa.2.0.insert.ext, 64
  %.sroa.0.0.insert.ext = zext i64 %55 to i128
  %.sroa.0.0.insert.insert = or disjoint i128 %.sroa.2.0.insert.shift, %.sroa.0.0.insert.ext
  %57 = icmp slt i128 %.sroa.0.0.insert.insert, 1
  br i1 %57, label %46, label %..critedge2_crit_edge, !llvm.loop !15

..critedge2_crit_edge:                            ; preds = %48
  %58 = trunc nsw i64 %indvars.iv30 to i32
  %.pre = load i32, ptr %3, align 4, !tbaa !9
  br label %.critedge2

.critedge2:                                       ; preds = %46, %..critedge2_crit_edge
  %59 = phi i32 [ %.pre, %..critedge2_crit_edge ], [ %.pre33, %46 ]
  %.117.lcssa = phi i32 [ %58, %..critedge2_crit_edge ], [ %smin, %46 ]
  %60 = add nsw i32 %.117.lcssa, 1
  %61 = sext i32 %.117.lcssa to i64
  %62 = getelementptr inbounds [1000001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %61
  store i32 %59, ptr %62, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  %63 = add nsw i32 %59, 1
  store i32 %63, ptr %3, align 4, !tbaa !9
  %64 = load i32, ptr %1, align 4, !tbaa !9
  %.not.not = icmp slt i32 %59, %64
  br i1 %.not.not, label %13, label %._crit_edge, !llvm.loop !16
}

; 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: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @"_ZZ5solvevENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef { i64, i64 } @"_ZZ5solvevENK3$_1clEiii"(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


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