; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2012-13/Open 2013/13 Open G3.ll (Z3geti)

; 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
@lst = external dso_local global [300 x [300 x [300 x i16]]], align 16
@fst = external dso_local global [300 x [300 x [300 x i16]]], align 16
@best = external dso_local global [300 x [300 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3getiii(i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z3geti(i32 noundef %0) #1 {
  %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 %2, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @best, i8 0, i64 360000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 -1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 3, ptr %4, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %173, %1
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = add nsw i32 %11, 1
  %13 = icmp slt i32 %10, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %176

15:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %169, %15
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = sub nsw i32 %19, %20
  %22 = icmp slt i32 %17, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %16
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %172

24:                                               ; preds = %16
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %27
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sub nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [300 x i32], ptr %28, i64 0, i64 %31
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %34
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [300 x i32], ptr %35, i64 0, i64 %38
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %43
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [300 x i32], ptr %44, i64 0, i64 %46
  store i32 %41, ptr %47, align 4, !tbaa !5
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [300 x [300 x [300 x i16]]], ptr @fst, i64 0, i64 %49
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [300 x [300 x i16]], ptr %50, i64 0, i64 %52
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = add nsw i32 %54, %55
  %57 = sub nsw i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [300 x i16], ptr %53, i64 0, i64 %58
  %60 = load i16, ptr %59, align 2, !tbaa !9
  %61 = sext i16 %60 to i32
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  %64 = icmp slt i32 %61, %63
  br i1 %64, label %65, label %100

65:                                               ; preds = %24
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %67
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [300 x i32], ptr %68, i64 0, i64 %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [300 x [300 x [300 x i16]]], ptr @fst, i64 0, i64 %74
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [300 x [300 x i16]], ptr %75, i64 0, i64 %77
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = add nsw i32 %79, %80
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [300 x i16], ptr %78, i64 0, i64 %83
  %85 = load i16, ptr %84, align 2, !tbaa !9
  %86 = sext i16 %85 to i32
  %87 = sub nsw i32 %72, %86
  %88 = sub nsw i32 %87, 1
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = sub nsw i32 %89, 2
  %91 = mul nsw i32 %88, %90
  store i32 %91, ptr %7, align 4, !tbaa !5
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %71, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %95
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [300 x i32], ptr %96, i64 0, i64 %98
  store i32 %93, ptr %99, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %100

100:                                              ; preds = %65, %24
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = load i32, ptr %4, align 4, !tbaa !5
  %105 = add nsw i32 %103, %104
  %106 = sub nsw i32 %105, 1
  %107 = call noundef i32 @_Z3getiii(i32 noundef %101, i32 noundef %102, i32 noundef %106)
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %100
  br label %169

110:                                              ; preds = %100
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [300 x [300 x [300 x i16]]], ptr @lst, i64 0, i64 %112
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [300 x [300 x i16]], ptr %113, i64 0, i64 %115
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = add nsw i32 %117, %118
  %120 = sub nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [300 x i16], ptr %116, i64 0, i64 %121
  %123 = load i16, ptr %122, align 2, !tbaa !9
  %124 = sext i16 %123 to i32
  %125 = load i32, ptr %2, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  %127 = icmp sgt i32 %124, %126
  br i1 %127, label %128, label %168

128:                                              ; preds = %110
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %130
  %132 = load i32, ptr %4, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [300 x i32], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = icmp sgt i32 %135, 0
  br i1 %136, label %137, label %168

137:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 2
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [300 x [300 x [300 x i16]]], ptr @lst, i64 0, i64 %141
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [300 x [300 x i16]], ptr %142, i64 0, i64 %144
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = load i32, ptr %4, align 4, !tbaa !5
  %148 = add nsw i32 %146, %147
  %149 = sub nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [300 x i16], ptr %145, i64 0, i64 %150
  %152 = load i16, ptr %151, align 2, !tbaa !9
  %153 = sext i16 %152 to i32
  %154 = load i32, ptr %2, align 4, !tbaa !5
  %155 = sub nsw i32 %153, %154
  %156 = sub nsw i32 %155, 1
  %157 = mul nsw i32 %139, %156
  %158 = load i32, ptr %6, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %159
  %161 = load i32, ptr %4, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [300 x i32], ptr %160, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = mul nsw i32 %157, %164
  store i32 %165, ptr %8, align 4, !tbaa !5
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %167 = load i32, ptr %166, align 4, !tbaa !5
  store i32 %167, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %168

168:                                              ; preds = %137, %128, %110
  br label %169

169:                                              ; preds = %168, %109
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %6, align 4, !tbaa !5
  br label %16, !llvm.loop !11

172:                                              ; preds = %23
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %4, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %4, align 4, !tbaa !5
  br label %9, !llvm.loop !13

176:                                              ; preds = %14
  %177 = load i32, ptr %3, align 4, !tbaa !5
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 %177
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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

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 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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 local_unnamed_addr global i32, align 4
@lst = external dso_local local_unnamed_addr global [300 x [300 x [300 x i16]]], align 16
@fst = external dso_local local_unnamed_addr global [300 x [300 x [300 x i16]]], align 16
@best = external dso_local global [300 x [300 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3getiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z3geti(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(360000) @best, i8 0, i64 360000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 -1, ptr %2, align 4, !tbaa !5
  %5 = load i32, ptr @N, align 4, !tbaa !5
  %.not47 = icmp slt i32 %5, 3
  br i1 %.not47, label %._crit_edge49, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %1
  %6 = sext i32 %0 to i64
  %7 = add nsw i32 %0, -1
  %8 = add nsw i32 %0, 1
  %9 = xor i32 %0, -1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %10 = phi i32 [ %5, %.preheader.lr.ph ], [ %19, %._crit_edge ]
  %indvars.iv51 = phi i64 [ 3, %.preheader.lr.ph ], [ %indvars.iv.next52, %._crit_edge ]
  %indvars53 = trunc i64 %indvars.iv51 to i32
  %reass.sub = sub i32 %10, %indvars53
  %11 = icmp ult i32 %reass.sub, 2147483647
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %12 = add nsw i64 %indvars.iv51, -1
  %13 = add nsw i64 %indvars.iv51, -2
  %14 = trunc nuw nsw i64 %12 to i32
  %15 = trunc nuw nsw i64 %13 to i32
  %16 = trunc nuw nsw i64 %13 to i32
  %17 = trunc i64 %indvars.iv51 to i32
  br label %21

._crit_edge49.loopexit:                           ; preds = %._crit_edge
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge49

._crit_edge49:                                    ; preds = %._crit_edge49.loopexit, %1
  %18 = phi i32 [ %.pre, %._crit_edge49.loopexit ], [ -1, %1 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  ret i32 %18

._crit_edge:                                      ; preds = %58, %.preheader
  %19 = phi i32 [ %10, %.preheader ], [ %59, %58 ]
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv51, %20
  br i1 %.not.not, label %.preheader, label %._crit_edge49.loopexit, !llvm.loop !9

21:                                               ; preds = %.lr.ph, %58
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %58 ]
  %indvars50 = trunc i64 %indvars.iv to i32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %indvars.iv.next, i64 %12
  %23 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %indvars.iv, i64 %12
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = getelementptr inbounds [300 x [300 x i32]], ptr @best, i64 0, i64 %indvars.iv, i64 %indvars.iv51
  store i32 %25, ptr %26, align 4, !tbaa !5
  %27 = add nuw nsw i64 %12, %indvars.iv
  %28 = add nuw i32 %14, %indvars50
  %sext = shl i64 %27, 32
  %29 = ashr exact i64 %sext, 32
  %30 = getelementptr inbounds [300 x [300 x [300 x i16]]], ptr @fst, i64 0, i64 %6, i64 %indvars.iv, i64 %29
  %31 = load i16, ptr %30, align 2, !tbaa !11
  %32 = sext i16 %31 to i32
  %33 = icmp sgt i32 %7, %32
  br i1 %33, label %34, label %41

34:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %35 = xor i16 %31, -1
  %36 = sext i16 %35 to i32
  %37 = add i32 %36, %0
  %38 = mul nsw i32 %37, %15
  store i32 %38, ptr %3, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %41

41:                                               ; preds = %34, %21
  %42 = call noundef i32 @_Z3getiii(i32 noundef %0, i32 noundef %indvars50, i32 noundef %28)
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %58, label %44

44:                                               ; preds = %41
  %45 = getelementptr inbounds [300 x [300 x [300 x i16]]], ptr @lst, i64 0, i64 %6, i64 %indvars.iv, i64 %29
  %46 = load i16, ptr %45, align 2, !tbaa !11
  %47 = sext i16 %46 to i32
  %48 = icmp slt i32 %8, %47
  br i1 %48, label %49, label %58

49:                                               ; preds = %44
  %50 = load i32, ptr %26, align 4, !tbaa !5
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %52, label %58

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %53 = add i32 %47, %9
  %54 = mul nsw i32 %53, %16
  %55 = mul nsw i32 %54, %50
  store i32 %55, ptr %4, align 4, !tbaa !5
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %57 = load i32, ptr %56, align 4, !tbaa !5
  store i32 %57, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %58

58:                                               ; preds = %44, %49, %52, %41
  %59 = load i32, ptr @N, align 4, !tbaa !5
  %reass.sub54 = sub i32 %59, %17
  %60 = add i32 %reass.sub54, 1
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %21, label %._crit_edge, !llvm.loop !13
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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 nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !10}


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