; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101081I.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"

%"struct.std::pair" = type { i32, i32 }
%class.anon = type { i8 }
%class.anon.0 = type { i8 }

@_ZZ5solvevE3ord = external hidden global [100001 x i32], align 16
@_ZZ5solvevE1a = external hidden global [100001 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZZ5solvevE3pos = external hidden global [100001 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 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 %class.anon, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %class.anon.0, align 1
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %41, %0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %44

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = mul nsw i32 %20, 60
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = add nsw i32 %21, %22
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %25
  %27 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 1
  store i32 %23, ptr %27, align 4, !tbaa !9
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = mul nsw i32 %29, 60
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = add nsw i32 %30, %31
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %34
  %36 = getelementptr inbounds %"struct.std::pair", ptr %35, i32 0, i32 0
  store i32 %32, ptr %36, align 8, !tbaa !11
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %39
  store i32 %37, ptr %40, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %41

41:                                               ; preds = %18
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %13, !llvm.loop !12

44:                                               ; preds = %17
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr @_ZZ5solvevE3ord, i64 %46
  call void @"_ZSt4sortIPiZ5solvevE3$_0EvT_S2_T0_"(ptr noundef @_ZZ5solvevE3ord, ptr noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, 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 %48

48:                                               ; preds = %77, %44
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %80

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  store i32 %57, ptr %9, align 4, !tbaa !5
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %60
  %62 = getelementptr inbounds %"struct.std::pair", ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = icmp sle i32 %58, %63
  br i1 %64, label %65, label %76

65:                                               ; preds = %53
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %67 to i64
  %70 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %69
  store i32 %66, ptr %70, align 4, !tbaa !5
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %72
  %74 = getelementptr inbounds %"struct.std::pair", ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !11
  store i32 %75, ptr %8, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %65, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %7, align 4, !tbaa !5
  br label %48, !llvm.loop !14

80:                                               ; preds = %52
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr @_ZZ5solvevE3pos, i64 %82
  call void @"_ZSt4sortIPiZ5solvevE3$_1EvT_S2_T0_"(ptr noundef @_ZZ5solvevE3pos, ptr noundef %83)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %104, %80
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %107

89:                                               ; preds = %84
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = icmp eq i32 %95, %97
  %99 = zext i1 %98 to i64
  %100 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !15
  %102 = sext i8 %101 to i32
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %94, i32 noundef %102)
  br label %104

104:                                              ; preds = %89
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %11, align 4, !tbaa !5
  br label %84, !llvm.loop !16

107:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ5solvevE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ5solvevE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) #3

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 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, !6, i64 4}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !13}


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

%"struct.std::pair" = type { i32, i32 }

@_ZZ5solvevE3ord = external hidden global [100001 x i32], align 16
@_ZZ5solvevE1a = external hidden local_unnamed_addr global [100001 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZZ5solvevE3pos = external hidden global [100001 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = sext i32 %5 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %26, %.lr.ph ]
  %7 = getelementptr inbounds i32, ptr @_ZZ5solvevE3ord, i64 %.pre-phi
  call void @"_ZSt4sortIPiZ5solvevE3$_0EvT_S2_T0_"(ptr noundef nonnull @_ZZ5solvevE3ord, ptr noundef nonnull %7)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph32.preheader, label %._crit_edge33.thread

._crit_edge33.thread:                             ; preds = %._crit_edge
  call void @"_ZSt4sortIPiZ5solvevE3$_1EvT_S2_T0_"(ptr noundef nonnull @_ZZ5solvevE3pos, ptr noundef nonnull @_ZZ5solvevE3pos)
  br label %._crit_edge38

.lr.ph32.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %8 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %10 = icmp eq i32 %8, 1
  br i1 %10, label %._crit_edge33.unr-lcssa, label %.lr.ph32.preheader.new

.lr.ph32.preheader.new:                           ; preds = %.lr.ph32.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph32

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = mul nsw i32 %12, 60
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = add nsw i32 %13, %14
  %16 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv
  %17 = getelementptr inbounds i8, ptr %16, i64 4
  store i32 %15, ptr %17, align 4, !tbaa !9
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = mul nsw i32 %19, 60
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = add nsw i32 %20, %21
  store i32 %22, ptr %16, align 8, !tbaa !11
  %23 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %indvars.iv
  %24 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %24, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge33.unr-lcssa:                          ; preds = %64, %.lr.ph32.preheader
  %.125.lcssa.ph = phi i32 [ poison, %.lr.ph32.preheader ], [ %.125.1, %64 ]
  %indvars.iv41.unr = phi i64 [ 0, %.lr.ph32.preheader ], [ %indvars.iv.next42.1, %64 ]
  %.02230.unr = phi i32 [ -1, %.lr.ph32.preheader ], [ %.1.1, %64 ]
  %.02428.unr = phi i32 [ 0, %.lr.ph32.preheader ], [ %.125.1, %64 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge33, label %.lr.ph32.epil

.lr.ph32.epil:                                    ; preds = %._crit_edge33.unr-lcssa
  %28 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %indvars.iv41.unr
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %30, i32 1
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %.not.epil = icmp sgt i32 %.02230.unr, %32
  br i1 %.not.epil, label %._crit_edge33, label %33

33:                                               ; preds = %.lr.ph32.epil
  %34 = add nsw i32 %.02428.unr, 1
  %35 = sext i32 %.02428.unr to i64
  %36 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %35
  store i32 %29, ptr %36, align 4, !tbaa !5
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %.lr.ph32.epil, %33, %._crit_edge33.unr-lcssa
  %.125.lcssa = phi i32 [ %.125.lcssa.ph, %._crit_edge33.unr-lcssa ], [ %34, %33 ], [ %.02428.unr, %.lr.ph32.epil ]
  %37 = sext i32 %.125.lcssa to i64
  %38 = getelementptr inbounds i32, ptr @_ZZ5solvevE3pos, i64 %37
  call void @"_ZSt4sortIPiZ5solvevE3$_1EvT_S2_T0_"(ptr noundef nonnull @_ZZ5solvevE3pos, ptr noundef nonnull %38)
  %39 = icmp sgt i32 %.125.lcssa, 0
  br i1 %39, label %.lr.ph37, label %._crit_edge38

.lr.ph37:                                         ; preds = %._crit_edge33
  %40 = add nsw i32 %.125.lcssa, -1
  %41 = zext nneg i32 %40 to i64
  %wide.trip.count47 = zext nneg i32 %.125.lcssa to i64
  br label %65

.lr.ph32:                                         ; preds = %64, %.lr.ph32.preheader.new
  %indvars.iv41 = phi i64 [ 0, %.lr.ph32.preheader.new ], [ %indvars.iv.next42.1, %64 ]
  %.02230 = phi i32 [ -1, %.lr.ph32.preheader.new ], [ %.1.1, %64 ]
  %.02428 = phi i32 [ 0, %.lr.ph32.preheader.new ], [ %.125.1, %64 ]
  %niter = phi i64 [ 0, %.lr.ph32.preheader.new ], [ %niter.next.1, %64 ]
  %42 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %indvars.iv41
  %43 = load i32, ptr %42, align 8, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %44
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %.not = icmp sgt i32 %.02230, %47
  br i1 %.not, label %.lr.ph32.1, label %48

48:                                               ; preds = %.lr.ph32
  %49 = add nsw i32 %.02428, 1
  %50 = sext i32 %.02428 to i64
  %51 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %50
  store i32 %43, ptr %51, align 4, !tbaa !5
  %52 = load i32, ptr %45, align 8, !tbaa !11
  br label %.lr.ph32.1

.lr.ph32.1:                                       ; preds = %48, %.lr.ph32
  %.125 = phi i32 [ %49, %48 ], [ %.02428, %.lr.ph32 ]
  %.1 = phi i32 [ %52, %48 ], [ %.02230, %.lr.ph32 ]
  %indvars.iv.next42 = or disjoint i64 %indvars.iv41, 1
  %53 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %indvars.iv.next42
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1a, i64 0, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 4
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %.not.1 = icmp sgt i32 %.1, %58
  br i1 %.not.1, label %64, label %59

59:                                               ; preds = %.lr.ph32.1
  %60 = add nsw i32 %.125, 1
  %61 = sext i32 %.125 to i64
  %62 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %61
  store i32 %54, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %56, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %59, %.lr.ph32.1
  %.125.1 = phi i32 [ %60, %59 ], [ %.125, %.lr.ph32.1 ]
  %.1.1 = phi i32 [ %63, %59 ], [ %.1, %.lr.ph32.1 ]
  %indvars.iv.next42.1 = add nuw nsw i64 %indvars.iv41, 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_edge33.unr-lcssa, label %.lr.ph32, !llvm.loop !14

._crit_edge38:                                    ; preds = %65, %._crit_edge33.thread, %._crit_edge33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void

65:                                               ; preds = %.lr.ph37, %65
  %indvars.iv44 = phi i64 [ 0, %.lr.ph37 ], [ %indvars.iv.next45, %65 ]
  %66 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %indvars.iv44
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  %69 = icmp eq i64 %indvars.iv44, %41
  %70 = zext i1 %69 to i64
  %71 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %70
  %72 = load i8, ptr %71, align 1, !tbaa !15
  %73 = sext i8 %72 to i32
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %68, i32 noundef %73)
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count47
  br i1 %exitcond48.not, label %._crit_edge38, label %65, !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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ5solvevE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ5solvevE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { 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 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, !6, i64 4}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !13}


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