; LLVM IR from Shah-Shishir/Codeforces-Solutions :: 1339C. Powered Addition (main)

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

@arr = external dso_local global [100005 x i32], align 16
@res = external dso_local global [31 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = 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
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr @res, align 16, !tbaa !5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %23, %0
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 31
  br i1 %12, label %13, label %26

13:                                               ; preds = %10
  %14 = load i32, ptr %5, align 4, !tbaa !5
  %15 = sub nsw i32 %14, 1
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [31 x i32], ptr @res, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = mul nsw i32 %18, 2
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [31 x i32], ptr @res, i64 0, i64 %21
  store i32 %19, ptr %22, align 4, !tbaa !5
  br label %23

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

26:                                               ; preds = %10
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %104, %26
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %32, label %107

32:                                               ; preds = %28
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %4)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %43, %32
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %40
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %41)
  br label %43

43:                                               ; preds = %38
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !5
  br label %34, !llvm.loop !11

46:                                               ; preds = %34
  store i32 0, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %98, %46
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = icmp slt i32 %48, %50
  br i1 %51, label %52, label %101

52:                                               ; preds = %47
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = icmp sgt i32 %56, %61
  br i1 %62, label %63, label %97

63:                                               ; preds = %52
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %6, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %91, %63
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %94

70:                                               ; preds = %66
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sub nsw i32 %74, %78
  store i32 %79, ptr %7, align 4, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %70
  br label %94

83:                                               ; preds = %70
  %84 = call noundef ptr @_ZSt11upper_boundIPiiET_S1_S1_RKT0_(ptr noundef @res, ptr noundef getelementptr inbounds (i32, ptr @res, i64 31), ptr noundef nonnull align 4 dereferenceable(4) %7)
  %85 = ptrtoint ptr %84 to i64
  %86 = sub i64 %85, ptrtoint (ptr @res to i64)
  %87 = sdiv exact i64 %86, 4
  %88 = trunc i64 %87 to i32
  store i32 %88, ptr %8, align 4, !tbaa !5
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %90 = load i32, ptr %89, align 4, !tbaa !5
  store i32 %90, ptr %9, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %83
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %6, align 4, !tbaa !5
  br label %66, !llvm.loop !12

94:                                               ; preds = %82, %66
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sub nsw i32 %95, 1
  store i32 %96, ptr %5, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %94, %52
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %5, align 4, !tbaa !5
  br label %47, !llvm.loop !13

101:                                              ; preds = %47
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %102)
  br label %104

104:                                              ; preds = %101
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !14

107:                                              ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  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 %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

; 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 uwtable
declare dso_local noundef ptr @_ZSt11upper_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

@arr = external dso_local global [100005 x i32], align 16
@res = external dso_local global [31 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = 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 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store <4 x i32> <i32 1, i32 2, i32 4, i32 8>, ptr @res, align 16, !tbaa !5
  store <4 x i32> <i32 16, i32 32, i32 64, i32 128>, ptr getelementptr inbounds (i8, ptr @res, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 256, i32 512, i32 1024, i32 2048>, ptr getelementptr inbounds (i8, ptr @res, i64 32), align 16, !tbaa !5
  store <4 x i32> <i32 4096, i32 8192, i32 16384, i32 32768>, ptr getelementptr inbounds (i8, ptr @res, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 65536, i32 131072, i32 262144, i32 524288>, ptr getelementptr inbounds (i8, ptr @res, i64 64), align 16, !tbaa !5
  store <4 x i32> <i32 1048576, i32 2097152, i32 4194304, i32 8388608>, ptr getelementptr inbounds (i8, ptr @res, i64 80), align 16, !tbaa !5
  store <4 x i32> <i32 16777216, i32 33554432, i32 67108864, i32 134217728>, ptr getelementptr inbounds (i8, ptr @res, i64 96), align 16, !tbaa !5
  store i32 268435456, ptr getelementptr inbounds (i8, ptr @res, i64 112), align 16, !tbaa !5
  store i32 536870912, ptr getelementptr inbounds (i8, ptr @res, i64 116), align 4, !tbaa !5
  store i32 1073741824, ptr getelementptr inbounds (i8, ptr @res, i64 120), align 8, !tbaa !5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %.not32 = icmp slt i32 %7, 1
  br i1 %.not32, label %._crit_edge36, label %.lr.ph35

.lr.ph35:                                         ; preds = %0, %._crit_edge31
  %.02033 = phi i32 [ %57, %._crit_edge31 ], [ 1, %0 ]
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph35
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %._crit_edge31

.lr.ph:                                           ; preds = %.lr.ph35, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph35 ]
  %11 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %indvars.iv
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = icmp slt i64 %indvars.iv.next, %14
  br i1 %15, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph
  store i32 0, ptr %5, align 4, !tbaa !5
  %16 = icmp sgt i32 %13, 1
  br i1 %16, label %.lr.ph30, label %._crit_edge31

.lr.ph30:                                         ; preds = %._crit_edge, %._crit_edge25
  %17 = phi i32 [ %51, %._crit_edge25 ], [ 0, %._crit_edge ]
  %18 = phi i32 [ %52, %._crit_edge25 ], [ %13, %._crit_edge ]
  %.228 = phi i32 [ %.pre-phi, %._crit_edge25 ], [ 0, %._crit_edge ]
  %19 = sext i32 %.228 to i64
  %20 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = add nsw i32 %.228, 1
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = icmp sgt i32 %21, %25
  %27 = icmp slt i32 %22, %18
  %or.cond = and i1 %26, %27
  br i1 %or.cond, label %.lr.ph24.preheader, label %._crit_edge25

.lr.ph24.preheader:                               ; preds = %.lr.ph30
  %28 = add nsw i64 %19, 1
  %29 = load i32, ptr %20, align 4, !tbaa !5
  %30 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %28
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = sub nsw i32 %29, %31
  store i32 %32, ptr %3, align 4, !tbaa !5
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %._crit_edge25.loopexit, label %.lr.ph45

.lr.ph24:                                         ; preds = %.lr.ph45
  %34 = load i32, ptr %20, align 4, !tbaa !5
  %35 = getelementptr inbounds [100005 x i32], ptr @arr, i64 0, i64 %indvars.iv.next40
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = sub nsw i32 %34, %36
  store i32 %37, ptr %3, align 4, !tbaa !5
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %._crit_edge25.loopexit, label %.lr.ph45, !llvm.loop !11

.lr.ph45:                                         ; preds = %.lr.ph24.preheader, %.lr.ph24
  %indvars.iv3944 = phi i64 [ %indvars.iv.next40, %.lr.ph24 ], [ %28, %.lr.ph24.preheader ]
  %39 = call noundef ptr @_ZSt11upper_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @res, ptr noundef nonnull getelementptr inbounds (i8, ptr @res, i64 124), ptr noundef nonnull align 4 dereferenceable(4) %3)
  %40 = ptrtoint ptr %39 to i64
  %41 = sub i64 %40, ptrtoint (ptr @res to i64)
  %42 = lshr exact i64 %41, 2
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %4, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %45, ptr %5, align 4, !tbaa !5
  %indvars.iv.next40 = add nsw i64 %indvars.iv3944, 1
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next40, %47
  br i1 %48, label %.lr.ph24, label %._crit_edge25.loopexit, !llvm.loop !11

._crit_edge25.loopexit:                           ; preds = %.lr.ph45, %.lr.ph24, %.lr.ph24.preheader
  %49 = phi i32 [ %17, %.lr.ph24.preheader ], [ %45, %.lr.ph24 ], [ %45, %.lr.ph45 ]
  %50 = phi i32 [ %18, %.lr.ph24.preheader ], [ %46, %.lr.ph24 ], [ %46, %.lr.ph45 ]
  %.0.lcssa.ph.in = phi i64 [ %28, %.lr.ph24.preheader ], [ %indvars.iv.next40, %.lr.ph24 ], [ %indvars.iv.next40, %.lr.ph45 ]
  %.0.lcssa.ph = trunc i64 %.0.lcssa.ph.in to i32
  br label %._crit_edge25

._crit_edge25:                                    ; preds = %._crit_edge25.loopexit, %.lr.ph30
  %.pre-phi = phi i32 [ %22, %.lr.ph30 ], [ %.0.lcssa.ph, %._crit_edge25.loopexit ]
  %51 = phi i32 [ %17, %.lr.ph30 ], [ %49, %._crit_edge25.loopexit ]
  %52 = phi i32 [ %18, %.lr.ph30 ], [ %50, %._crit_edge25.loopexit ]
  %53 = add nsw i32 %52, -1
  %54 = icmp slt i32 %.pre-phi, %53
  br i1 %54, label %.lr.ph30, label %._crit_edge31, !llvm.loop !12

._crit_edge31:                                    ; preds = %._crit_edge25, %._crit_edge.thread, %._crit_edge
  %55 = phi i32 [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %51, %._crit_edge25 ]
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %55)
  %57 = add nuw nsw i32 %.02033, 1
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.02033, %58
  br i1 %.not.not, label %.lr.ph35, label %._crit_edge36, !llvm.loop !13

._crit_edge36:                                    ; preds = %._crit_edge31, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  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: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11upper_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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)) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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

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 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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