; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (378B-Semifinals)

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

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %13 = load i64, ptr %2, align 8, !tbaa !5
  %14 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %13, i64 8)
  %15 = extractvalue { i64, i1 } %14, 1
  %16 = extractvalue { i64, i1 } %14, 0
  %17 = select i1 %15, i64 -1, i64 %16
  %18 = call noalias noundef nonnull ptr @_Znam(i64 noundef %17) #7
  store ptr %18, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %20 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %19, i64 8)
  %21 = extractvalue { i64, i1 } %20, 1
  %22 = extractvalue { i64, i1 } %20, 0
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = call noalias noundef nonnull ptr @_Znam(i64 noundef %23) #7
  store ptr %24, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %68, %0
  %26 = load i32, ptr %7, align 4, !tbaa !11
  %27 = sext i32 %26 to i64
  %28 = load i64, ptr %2, align 8, !tbaa !5
  %29 = icmp slt i64 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %71

31:                                               ; preds = %25
  %32 = load ptr, ptr %3, align 8, !tbaa !9
  %33 = load i32, ptr %7, align 4, !tbaa !11
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i64, ptr %32, i64 %34
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  %37 = load i32, ptr %7, align 4, !tbaa !11
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i64, ptr %36, i64 %38
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %35, ptr noundef %39)
  %41 = load ptr, ptr %3, align 8, !tbaa !9
  %42 = load i64, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds i64, ptr %41, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = load ptr, ptr %4, align 8, !tbaa !9
  %46 = load i64, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds i64, ptr %45, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = icmp slt i64 %44, %48
  br i1 %49, label %50, label %53

50:                                               ; preds = %31
  %51 = load i64, ptr %5, align 8, !tbaa !5
  %52 = add nsw i64 %51, 1
  store i64 %52, ptr %5, align 8, !tbaa !5
  br label %67

53:                                               ; preds = %31
  %54 = load ptr, ptr %3, align 8, !tbaa !9
  %55 = load i64, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds i64, ptr %54, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = load ptr, ptr %4, align 8, !tbaa !9
  %59 = load i64, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds i64, ptr %58, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = icmp sgt i64 %57, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %53
  %64 = load i64, ptr %6, align 8, !tbaa !5
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %6, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %63, %53
  br label %67

67:                                               ; preds = %66, %50
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %7, align 4, !tbaa !11
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %7, align 4, !tbaa !11
  br label %25, !llvm.loop !13

71:                                               ; preds = %30
  %72 = load i64, ptr %5, align 8, !tbaa !5
  %73 = load i64, ptr %2, align 8, !tbaa !5
  %74 = sdiv i64 %73, 2
  %75 = icmp slt i64 %72, %74
  br i1 %75, label %76, label %79

76:                                               ; preds = %71
  %77 = load i64, ptr %2, align 8, !tbaa !5
  %78 = sdiv i64 %77, 2
  store i64 %78, ptr %5, align 8, !tbaa !5
  br label %88

79:                                               ; preds = %71
  %80 = load i64, ptr %6, align 8, !tbaa !5
  %81 = load i64, ptr %2, align 8, !tbaa !5
  %82 = sdiv i64 %81, 2
  %83 = icmp slt i64 %80, %82
  br i1 %83, label %84, label %87

84:                                               ; preds = %79
  %85 = load i64, ptr %2, align 8, !tbaa !5
  %86 = sdiv i64 %85, 2
  store i64 %86, ptr %6, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %84, %79
  br label %88

88:                                               ; preds = %87, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %89

89:                                               ; preds = %97, %88
  %90 = load i32, ptr %8, align 4, !tbaa !11
  %91 = sext i32 %90 to i64
  %92 = load i64, ptr %5, align 8, !tbaa !5
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %100

95:                                               ; preds = %89
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %97

97:                                               ; preds = %95
  %98 = load i32, ptr %8, align 4, !tbaa !11
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !11
  br label %89, !llvm.loop !15

100:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %101 = load i64, ptr %5, align 8, !tbaa !5
  %102 = trunc i64 %101 to i32
  store i32 %102, ptr %9, align 4, !tbaa !11
  br label %103

103:                                              ; preds = %111, %100
  %104 = load i32, ptr %9, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = load i64, ptr %2, align 8, !tbaa !5
  %107 = icmp slt i64 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %114

109:                                              ; preds = %103
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %111

111:                                              ; preds = %109
  %112 = load i32, ptr %9, align 4, !tbaa !11
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %9, align 4, !tbaa !11
  br label %103, !llvm.loop !16

114:                                              ; preds = %108
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %116

116:                                              ; preds = %124, %114
  %117 = load i32, ptr %10, align 4, !tbaa !11
  %118 = sext i32 %117 to i64
  %119 = load i64, ptr %6, align 8, !tbaa !5
  %120 = icmp slt i64 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %127

122:                                              ; preds = %116
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %124

124:                                              ; preds = %122
  %125 = load i32, ptr %10, align 4, !tbaa !11
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %10, align 4, !tbaa !11
  br label %116, !llvm.loop !17

127:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %128 = load i64, ptr %6, align 8, !tbaa !5
  %129 = trunc i64 %128 to i32
  store i32 %129, ptr %11, align 4, !tbaa !11
  br label %130

130:                                              ; preds = %138, %127
  %131 = load i32, ptr %11, align 4, !tbaa !11
  %132 = sext i32 %131 to i64
  %133 = load i64, ptr %2, align 8, !tbaa !5
  %134 = icmp slt i64 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %141

136:                                              ; preds = %130
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %138

138:                                              ; preds = %136
  %139 = load i32, ptr %11, align 4, !tbaa !11
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %11, align 4, !tbaa !11
  br label %130, !llvm.loop !18

141:                                              ; preds = %135
  %142 = load ptr, ptr %3, align 8, !tbaa !9
  %143 = icmp eq ptr %142, null
  br i1 %143, label %145, label %144

144:                                              ; preds = %141
  call void @_ZdaPv(ptr noundef %142) #8
  br label %145

145:                                              ; preds = %144, %141
  %146 = load ptr, ptr %4, align 8, !tbaa !9
  %147 = icmp eq ptr %146, null
  br i1 %147, label %149, label %148

148:                                              ; preds = %145
  call void @_ZdaPv(ptr noundef %146) #8
  br label %149

149:                                              ; preds = %148, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; 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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!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"

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store i64 0, ptr %1, align 8, !tbaa !5
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %3 = load i64, ptr %1, align 8, !tbaa !5
  %4 = icmp ugt i64 %3, 2305843009213693951
  %5 = shl i64 %3, 3
  %6 = select i1 %4, i64 -1, i64 %5
  %7 = call noalias noundef nonnull ptr @_Znam(i64 noundef %6) #7
  %8 = call noalias noundef nonnull ptr @_Znam(i64 noundef %6) #7
  %9 = icmp sgt i64 %3, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.036.lcssa = phi i64 [ 0, %0 ], [ %.137, %.lr.ph ]
  %.035.lcssa = phi i64 [ 0, %0 ], [ %.1, %.lr.ph ]
  %.lcssa = phi i64 [ %3, %0 ], [ %23, %.lr.ph ]
  %10 = sdiv i64 %.lcssa, 2
  %11 = icmp slt i64 %.036.lcssa, %10
  %spec.select45 = call i64 @llvm.smax.i64(i64 %.035.lcssa, i64 %10)
  %.238 = call i64 @llvm.smax.i64(i64 %.036.lcssa, i64 %10)
  %.2 = select i1 %11, i64 %.035.lcssa, i64 %spec.select45
  %12 = icmp sgt i64 %.238, 0
  br i1 %12, label %.lr.ph53, label %._crit_edge54

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %.03547 = phi i64 [ %.1, %.lr.ph ], [ 0, %0 ]
  %.03646 = phi i64 [ %.137, %.lr.ph ], [ 0, %0 ]
  %13 = getelementptr inbounds i64, ptr %7, i64 %indvars.iv
  %14 = getelementptr inbounds i64, ptr %8, i64 %indvars.iv
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %13, ptr noundef nonnull %14)
  %16 = getelementptr inbounds i64, ptr %7, i64 %.03646
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i64, ptr %8, i64 %.03547
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = icmp slt i64 %17, %19
  %21 = icmp sgt i64 %17, %19
  %22 = zext i1 %20 to i64
  %.137 = add nuw nsw i64 %.03646, %22
  %spec.select = zext i1 %21 to i64
  %.1 = add nuw nsw i64 %.03547, %spec.select
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %24 = icmp sgt i64 %23, %indvars.iv.next
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge54.loopexit:                           ; preds = %.lr.ph53
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge54

._crit_edge54:                                    ; preds = %._crit_edge54.loopexit, %._crit_edge
  %25 = phi i64 [ %.pre, %._crit_edge54.loopexit ], [ %.lcssa, %._crit_edge ]
  %sext = shl i64 %.238, 32
  %26 = ashr exact i64 %sext, 32
  %27 = icmp sgt i64 %25, %26
  br i1 %27, label %.lr.ph57, label %._crit_edge58

.lr.ph53:                                         ; preds = %._crit_edge, %.lr.ph53
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph53 ], [ 0, %._crit_edge ]
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next71, %.238
  br i1 %exitcond.not, label %._crit_edge54.loopexit, label %.lr.ph53, !llvm.loop !11

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge54
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %30 = icmp sgt i64 %.2, 0
  br i1 %30, label %.lr.ph61, label %._crit_edge62

.lr.ph57:                                         ; preds = %._crit_edge54, %.lr.ph57
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph57 ], [ %26, %._crit_edge54 ]
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %indvars.iv.next74 = add nsw i64 %indvars.iv73, 1
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = icmp sgt i64 %32, %indvars.iv.next74
  br i1 %33, label %.lr.ph57, label %._crit_edge58, !llvm.loop !12

._crit_edge62:                                    ; preds = %.lr.ph61, %._crit_edge58
  %sext67 = shl i64 %.2, 32
  %34 = ashr exact i64 %sext67, 32
  %35 = load i64, ptr %1, align 8, !tbaa !5
  %36 = icmp sgt i64 %35, %34
  br i1 %36, label %.lr.ph65, label %._crit_edge66

.lr.ph61:                                         ; preds = %._crit_edge58, %.lr.ph61
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %.lr.ph61 ], [ 0, %._crit_edge58 ]
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next77, %.2
  br i1 %exitcond79.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !13

.lr.ph65:                                         ; preds = %._crit_edge62, %.lr.ph65
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph65 ], [ %34, %._crit_edge62 ]
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %indvars.iv.next81 = add nsw i64 %indvars.iv80, 1
  %39 = load i64, ptr %1, align 8, !tbaa !5
  %40 = icmp sgt i64 %39, %indvars.iv.next81
  br i1 %40, label %.lr.ph65, label %._crit_edge66, !llvm.loop !14

._crit_edge66:                                    ; preds = %.lr.ph65, %._crit_edge62
  call void @_ZdaPv(ptr noundef nonnull %7) #8
  call void @_ZdaPv(ptr noundef nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) 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) #1

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #4

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

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 = { nobuiltin allocsize(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 = { nobuiltin 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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", !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}


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