; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (329A-Purification)

; 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 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 ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %18, i64 4)
  %20 = extractvalue { i64, i1 } %19, 1
  %21 = extractvalue { i64, i1 } %19, 0
  %22 = select i1 %20, i64 -1, i64 %21
  %23 = call noalias noundef nonnull ptr @_Znam(i64 noundef %22) #6
  store ptr %23, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %25, i64 4)
  %27 = extractvalue { i64, i1 } %26, 1
  %28 = extractvalue { i64, i1 } %26, 0
  %29 = select i1 %27, i64 -1, i64 %28
  %30 = call noalias noundef nonnull ptr @_Znam(i64 noundef %29) #6
  store ptr %30, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %45, %0
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %48

36:                                               ; preds = %31
  %37 = load ptr, ptr %4, align 8, !tbaa !9
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  store i32 -1, ptr %40, align 4, !tbaa !5
  %41 = load ptr, ptr %3, align 8, !tbaa !9
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr %41, i64 %43
  store i32 -1, ptr %44, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %36
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !5
  br label %31, !llvm.loop !11

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

49:                                               ; preds = %82, %48
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %85

54:                                               ; preds = %49
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %78, %54
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %81

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  store i8 48, ptr %9, align 1, !tbaa !13
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %9)
  %63 = load i8, ptr %9, align 1, !tbaa !13
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %64, 46
  br i1 %65, label %66, label %77

66:                                               ; preds = %61
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = load ptr, ptr %3, align 8, !tbaa !9
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  store i32 %67, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = load ptr, ptr %4, align 8, !tbaa !9
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  store i32 %72, ptr %76, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %66, %61
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  br label %78

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

81:                                               ; preds = %60
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %6, align 4, !tbaa !5
  br label %49, !llvm.loop !15

85:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  store i8 1, ptr %10, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %100, %85
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i32 11, ptr %7, align 4
  br label %103

91:                                               ; preds = %86
  %92 = load ptr, ptr %3, align 8, !tbaa !9
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp slt i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %91
  store i8 0, ptr %10, align 1, !tbaa !16
  store i32 11, ptr %7, align 4
  br label %103

99:                                               ; preds = %91
  br label %100

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

103:                                              ; preds = %98, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %104

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 1, ptr %12, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %119, %104
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 14, ptr %7, align 4
  br label %122

110:                                              ; preds = %105
  %111 = load ptr, ptr %4, align 8, !tbaa !9
  %112 = load i32, ptr %13, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %111, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp slt i32 %115, 0
  br i1 %116, label %117, label %118

117:                                              ; preds = %110
  store i8 0, ptr %12, align 1, !tbaa !16
  store i32 14, ptr %7, align 4
  br label %122

118:                                              ; preds = %110
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %13, align 4, !tbaa !5
  br label %105, !llvm.loop !19

122:                                              ; preds = %117, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %123

123:                                              ; preds = %122
  %124 = load i8, ptr %10, align 1, !tbaa !16, !range !20, !noundef !21
  %125 = trunc i8 %124 to i1
  br i1 %125, label %126, label %146

126:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %142, %126
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %145

132:                                              ; preds = %127
  %133 = load i32, ptr %14, align 4, !tbaa !5
  %134 = add nsw i32 1, %133
  %135 = load ptr, ptr %3, align 8, !tbaa !9
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %135, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = add nsw i32 1, %139
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %134, i32 noundef %140)
  br label %142

142:                                              ; preds = %132
  %143 = load i32, ptr %14, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %14, align 4, !tbaa !5
  br label %127, !llvm.loop !22

145:                                              ; preds = %131
  br label %172

146:                                              ; preds = %123
  %147 = load i8, ptr %12, align 1, !tbaa !16, !range !20, !noundef !21
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %169

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

150:                                              ; preds = %165, %149
  %151 = load i32, ptr %15, align 4, !tbaa !5
  %152 = load i32, ptr %2, align 4, !tbaa !5
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %168

155:                                              ; preds = %150
  %156 = load ptr, ptr %4, align 8, !tbaa !9
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %156, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = add nsw i32 1, %160
  %162 = load i32, ptr %15, align 4, !tbaa !5
  %163 = add nsw i32 1, %162
  %164 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %161, i32 noundef %163)
  br label %165

165:                                              ; preds = %155
  %166 = load i32, ptr %15, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %15, align 4, !tbaa !5
  br label %150, !llvm.loop !23

168:                                              ; preds = %154
  br label %171

169:                                              ; preds = %146
  %170 = call i32 @puts(ptr noundef @.str.4)
  br label %171

171:                                              ; preds = %169, %168
  br label %172

172:                                              ; preds = %171, %145
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %173 = load i32, ptr %1, align 4
  ret i32 %173
}

; 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

declare i32 @puts(ptr noundef) #2

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 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 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 i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = icmp slt i32 %4, 0
  %7 = shl nsw i64 %5, 2
  %8 = select i1 %6, i64 -1, i64 %7
  %9 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #6
  %10 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #6
  %11 = icmp sgt i32 %4, 0
  br i1 %11, label %.lr.ph53.preheader, label %.loopexit

.lr.ph53.preheader:                               ; preds = %0
  %12 = zext nneg i32 %4 to i64
  %13 = shl nuw nsw i64 %12, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %10, i8 -1, i64 %13, i1 false), !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %9, i8 -1, i64 %13, i1 false), !tbaa !5
  br label %.lr.ph53

.preheader47:                                     ; preds = %._crit_edge
  %.not54 = icmp sgt i32 %22, 0
  br i1 %.not54, label %.lr.ph57.preheader, label %.loopexit

.lr.ph57.preheader:                               ; preds = %.preheader47
  %14 = zext nneg i32 %22 to i64
  %wide.trip.count = zext nneg i32 %22 to i64
  %15 = load i32, ptr %9, align 4, !tbaa !5
  %16 = icmp slt i32 %15, 0
  br i1 %16, label %._crit_edge58, label %.lr.ph

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %._crit_edge
  %indvars.iv79 = phi i64 [ 0, %.lr.ph53.preheader ], [ %indvars.iv.next80, %._crit_edge ]
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1)
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph51, label %.lr.ph53.._crit_edge_crit_edge

.lr.ph53.._crit_edge_crit_edge:                   ; preds = %.lr.ph53
  %.pre = sext i32 %18 to i64
  br label %._crit_edge

.lr.ph51:                                         ; preds = %.lr.ph53
  %20 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv79
  %21 = trunc nuw nsw i64 %indvars.iv79 to i32
  br label %24

._crit_edge:                                      ; preds = %31, %.lr.ph53.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.lr.ph53.._crit_edge_crit_edge ], [ %33, %31 ]
  %22 = phi i32 [ %18, %.lr.ph53.._crit_edge_crit_edge ], [ %32, %31 ]
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %23 = icmp slt i64 %indvars.iv.next80, %.pre-phi
  br i1 %23, label %.lr.ph53, label %.preheader47, !llvm.loop !9

24:                                               ; preds = %.lr.ph51, %31
  %indvars.iv = phi i64 [ 0, %.lr.ph51 ], [ %indvars.iv.next, %31 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  store i8 48, ptr %2, align 1, !tbaa !11
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2)
  %26 = load i8, ptr %2, align 1, !tbaa !11
  %27 = icmp eq i8 %26, 46
  br i1 %27, label %28, label %31

28:                                               ; preds = %24
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %29, ptr %20, align 4, !tbaa !5
  %30 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  store i32 %21, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %28, %24
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next, %33
  br i1 %34, label %24, label %._crit_edge, !llvm.loop !12

.lr.ph:                                           ; preds = %.lr.ph57.preheader, %.lr.ph57
  %indvars.iv82119 = phi i64 [ %indvars.iv.next83, %.lr.ph57 ], [ 0, %.lr.ph57.preheader ]
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82119, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge58.loopexit, label %.lr.ph57, !llvm.loop !13

.lr.ph57:                                         ; preds = %.lr.ph
  %35 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv.next83
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %._crit_edge58.loopexit, label %.lr.ph, !llvm.loop !13

._crit_edge58.loopexit:                           ; preds = %.lr.ph, %.lr.ph57
  %.not.le = icmp ult i64 %indvars.iv.next83, %14
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge58.loopexit, %.lr.ph57.preheader
  %.not.lcssa = phi i1 [ true, %.lr.ph57.preheader ], [ %.not.le, %._crit_edge58.loopexit ]
  br i1 %.not54, label %.lr.ph66.preheader, label %.loopexit

.lr.ph66.preheader:                               ; preds = %._crit_edge58
  %38 = zext nneg i32 %22 to i64
  %wide.trip.count86 = zext nneg i32 %22 to i64
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %._crit_edge67, label %.lr.ph122

.lr.ph122:                                        ; preds = %.lr.ph66.preheader, %.lr.ph66
  %indvars.iv84121 = phi i64 [ %indvars.iv.next85, %.lr.ph66 ], [ 0, %.lr.ph66.preheader ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84121, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count86
  br i1 %exitcond87.not, label %._crit_edge67.loopexit, label %.lr.ph66, !llvm.loop !14

.lr.ph66:                                         ; preds = %.lr.ph122
  %41 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv.next85
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %._crit_edge67.loopexit, label %.lr.ph122, !llvm.loop !14

._crit_edge67.loopexit:                           ; preds = %.lr.ph122, %.lr.ph66
  %.not44.le = icmp ult i64 %indvars.iv.next85, %38
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit, %.lr.ph66.preheader
  %.not44.lcssa = phi i1 [ true, %.lr.ph66.preheader ], [ %.not44.le, %._crit_edge67.loopexit ]
  br i1 %.not.lcssa, label %52, label %.preheader45

.preheader45:                                     ; preds = %._crit_edge67
  br i1 %.not54, label %.lr.ph72, label %.loopexit

.lr.ph72:                                         ; preds = %.preheader45, %.lr.ph72
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph72 ], [ 0, %.preheader45 ]
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %44 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv88
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  %47 = trunc nuw nsw i64 %indvars.iv.next89 to i32
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %47, i32 noundef %46)
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next89, %50
  br i1 %51, label %.lr.ph72, label %.loopexit, !llvm.loop !15

52:                                               ; preds = %._crit_edge67
  br i1 %.not44.lcssa, label %61, label %.preheader

.preheader:                                       ; preds = %52
  br i1 %.not54, label %.lr.ph74, label %.loopexit

.lr.ph74:                                         ; preds = %.preheader, %.lr.ph74
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %.lr.ph74 ], [ 0, %.preheader ]
  %53 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv91
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %56 = trunc nuw nsw i64 %indvars.iv.next92 to i32
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %55, i32 noundef %56)
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next92, %59
  br i1 %60, label %.lr.ph74, label %.loopexit, !llvm.loop !16

61:                                               ; preds = %52
  %62 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph72, %.lr.ph74, %._crit_edge58, %0, %.preheader47, %.preheader45, %.preheader, %61
  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: 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: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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