; LLVM IR from tangjz/acm-icpc :: self_training/2015-04-30 (D)

; 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
@p = external dso_local global [10000086 x i32], align 16
@f = external dso_local global [10000086 x i32], align 16
@ans = external dso_local global i64, align 8
@s = external dso_local global [10000086 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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
  store i32 0, ptr %1, align 4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @s)
  %8 = call i64 @strlen(ptr noundef @s) #5
  %9 = trunc i64 %8 to i32
  store i32 %9, ptr @n, align 4, !tbaa !5
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = mul nsw i32 %10, 2
  %12 = add nsw i32 %11, 2
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %13
  store i8 0, ptr %14, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %15 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %15, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %35, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %38

20:                                               ; preds = %16
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = mul nsw i32 %21, 2
  %23 = add nsw i32 %22, 1
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %24
  store i8 35, ptr %25, align 1, !tbaa !9
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sub nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !9
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = mul nsw i32 %31, 2
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %33
  store i8 %30, ptr %34, align 1, !tbaa !9
  br label %35

35:                                               ; preds = %20
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !10

38:                                               ; preds = %19
  store i8 35, ptr getelementptr inbounds ([10000086 x i8], ptr @s, i64 0, i64 1), align 1, !tbaa !9
  store i8 64, ptr @s, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  br label %39

39:                                               ; preds = %114, %38
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !9
  %44 = icmp ne i8 %43, 0
  br i1 %44, label %46, label %45

45:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %117

46:                                               ; preds = %39
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = icmp sgt i32 %47, %48
  br i1 %49, label %50, label %62

50:                                               ; preds = %46
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = mul nsw i32 %51, 2
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sub nsw i32 %52, %53
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sub nsw i32 %58, %59
  %61 = call noundef i32 @_Z3minii(i32 noundef %57, i32 noundef %60)
  br label %63

62:                                               ; preds = %46
  br label %63

63:                                               ; preds = %62, %50
  %64 = phi i32 [ %61, %50 ], [ 1, %62 ]
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %90, %63
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add nsw i32 %69, %73
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !9
  %78 = sext i8 %77 to i32
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sub nsw i32 %79, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !9
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %78, %88
  br i1 %89, label %90, label %96

90:                                               ; preds = %68
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %93, align 4, !tbaa !5
  br label %68, !llvm.loop !12

96:                                               ; preds = %68
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = add nsw i32 %98, %102
  %104 = icmp slt i32 %97, %103
  br i1 %104, label %105, label %113

105:                                              ; preds = %96
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add nsw i32 %106, %110
  store i32 %111, ptr %4, align 4, !tbaa !5
  %112 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %112, ptr %5, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %105, %96
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %3, align 4, !tbaa !5
  br label %39, !llvm.loop !13

117:                                              ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %150, %117
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = load i32, ptr @n, align 4, !tbaa !5
  %121 = icmp sle i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %153

123:                                              ; preds = %118
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  %131 = icmp eq i32 %128, %130
  br i1 %131, label %132, label %142

132:                                              ; preds = %123
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = ashr i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [10000086 x i32], ptr @f, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [10000086 x i32], ptr @f, i64 0, i64 %140
  store i32 %138, ptr %141, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %132, %123
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [10000086 x i32], ptr @f, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = load i64, ptr @ans, align 8, !tbaa !14
  %149 = add nsw i64 %148, %147
  store i64 %149, ptr @ans, align 8, !tbaa !14
  br label %150

150:                                              ; preds = %142
  %151 = load i32, ptr %6, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %6, align 4, !tbaa !5
  br label %118, !llvm.loop !16

153:                                              ; preds = %122
  %154 = load i64, ptr @ans, align 8, !tbaa !14
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %154)
  ret i32 0
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

declare i32 @printf(ptr noundef, ...) #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 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 #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 = { nounwind willreturn memory(read) "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind willreturn memory(read) }
attributes #6 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !11}


; 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
@p = external dso_local local_unnamed_addr global [10000086 x i32], align 16
@f = external dso_local local_unnamed_addr global [10000086 x i32], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@s = external dso_local global [10000086 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @s)
  %2 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #5
  %3 = trunc i64 %2 to i32
  store i32 %3, ptr @n, align 4, !tbaa !5
  %4 = shl nsw i32 %3, 1
  %5 = add nsw i32 %4, 2
  %6 = sext i32 %5 to i64
  %7 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %6
  store i8 0, ptr %7, align 2, !tbaa !9
  %.not41 = icmp eq i32 %3, 0
  br i1 %.not41, label %.lr.ph48.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %sext = shl i64 %2, 32
  %8 = ashr exact i64 %sext, 32
  %xtraiter = and i64 %2, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader
  %9 = ashr exact i64 %sext, 31
  %10 = or disjoint i64 %9, 1
  %11 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %10
  store i8 35, ptr %11, align 1, !tbaa !9
  %indvars.iv.next.prol = add nsw i64 %8, -1
  %12 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %indvars.iv.next.prol
  %13 = load i8, ptr %12, align 1, !tbaa !9
  %14 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %9
  store i8 %13, ptr %14, align 2, !tbaa !9
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ %8, %.lr.ph.preheader ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %15 = icmp eq i64 %sext, 4294967296
  br i1 %15, label %.lr.ph48.preheader, label %.lr.ph

.lr.ph48.preheader:                               ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %0
  store i8 35, ptr getelementptr inbounds (i8, ptr @s, i64 1), align 1, !tbaa !9
  store i8 64, ptr @s, align 16, !tbaa !9
  br label %.lr.ph48

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %16 = shl nsw i64 %indvars.iv, 1
  %17 = or disjoint i64 %16, 1
  %18 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %17
  store i8 35, ptr %18, align 1, !tbaa !9
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %19 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %indvars.iv.next
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %16
  store i8 %20, ptr %21, align 2, !tbaa !9
  %22 = shl nsw i64 %indvars.iv.next, 1
  %23 = or disjoint i64 %22, 1
  %24 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %23
  store i8 35, ptr %24, align 1, !tbaa !9
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  %25 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %indvars.iv.next.1
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %22
  store i8 %26, ptr %27, align 2, !tbaa !9
  %.not.1 = icmp eq i64 %indvars.iv.next.1, 0
  br i1 %.not.1, label %.lr.ph48.preheader, label %.lr.ph, !llvm.loop !10

.preheader:                                       ; preds = %51
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %ans.promoted = load i64, ptr @ans, align 8, !tbaa !12
  %.not3949 = icmp slt i32 %.pre, 1
  br i1 %.not3949, label %59, label %.lr.ph51.preheader

.lr.ph51.preheader:                               ; preds = %.preheader
  %28 = add nuw i32 %.pre, 1
  %wide.trip.count = zext i32 %28 to i64
  br label %.lr.ph51

.lr.ph48:                                         ; preds = %.lr.ph48.preheader, %51
  %indvars.iv59 = phi i64 [ 1, %.lr.ph48.preheader ], [ %indvars.iv.next60, %51 ]
  %.03246 = phi i32 [ undef, %.lr.ph48.preheader ], [ %spec.select40, %51 ]
  %.03345 = phi i32 [ 0, %.lr.ph48.preheader ], [ %spec.select, %51 ]
  %29 = sext i32 %.03345 to i64
  %30 = icmp slt i64 %indvars.iv59, %29
  br i1 %30, label %31, label %40

31:                                               ; preds = %.lr.ph48
  %32 = shl nsw i32 %.03246, 1
  %33 = sext i32 %32 to i64
  %34 = sub nsw i64 %33, %indvars.iv59
  %35 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = trunc nuw nsw i64 %indvars.iv59 to i32
  %38 = sub nsw i32 %.03345, %37
  %39 = tail call noundef i32 @_Z3minii(i32 noundef %36, i32 noundef %38)
  br label %40

40:                                               ; preds = %.lr.ph48, %31
  %41 = phi i32 [ %39, %31 ], [ 1, %.lr.ph48 ]
  %42 = sext i32 %41 to i64
  br label %43

43:                                               ; preds = %43, %40
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %43 ], [ %42, %40 ]
  %44 = add nsw i64 %indvars.iv56, %indvars.iv59
  %45 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = sub nsw i64 %indvars.iv59, %indvars.iv56
  %48 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = icmp eq i8 %46, %49
  %indvars.iv.next57 = add nsw i64 %indvars.iv56, 1
  br i1 %50, label %43, label %51, !llvm.loop !14

51:                                               ; preds = %43
  %52 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %indvars.iv59
  %53 = trunc nsw i64 %indvars.iv56 to i32
  %54 = trunc nsw i64 %44 to i32
  store i32 %53, ptr %52, align 4, !tbaa !5
  %55 = icmp slt i32 %.03345, %54
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.03345, i32 %54)
  %56 = trunc nuw nsw i64 %indvars.iv59 to i32
  %spec.select40 = select i1 %55, i32 %56, i32 %.03246
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %57 = getelementptr inbounds [10000086 x i8], ptr @s, i64 0, i64 %indvars.iv.next60
  %58 = load i8, ptr %57, align 1, !tbaa !9
  %.not38 = icmp eq i8 %58, 0
  br i1 %.not38, label %.preheader, label %.lr.ph48, !llvm.loop !15

._crit_edge52:                                    ; preds = %74
  store i64 %77, ptr @ans, align 8, !tbaa !12
  br label %59

59:                                               ; preds = %._crit_edge52, %.preheader
  %60 = phi i64 [ %77, %._crit_edge52 ], [ %ans.promoted, %.preheader ]
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %60)
  ret i32 0

.lr.ph51:                                         ; preds = %.lr.ph51.preheader, %74
  %indvars.iv62 = phi i64 [ 1, %.lr.ph51.preheader ], [ %indvars.iv.next63, %74 ]
  %62 = phi i64 [ %ans.promoted, %.lr.ph51.preheader ], [ %77, %74 ]
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %63 = getelementptr inbounds [10000086 x i32], ptr @p, i64 0, i64 %indvars.iv.next63
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = icmp eq i64 %indvars.iv.next63, %65
  br i1 %66, label %67, label %.lr.ph51._crit_edge

.lr.ph51._crit_edge:                              ; preds = %.lr.ph51
  %.phi.trans.insert = getelementptr inbounds [10000086 x i32], ptr @f, i64 0, i64 %indvars.iv62
  %.pre65 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %74

67:                                               ; preds = %.lr.ph51
  %68 = lshr i64 %indvars.iv62, 1
  %69 = and i64 %68, 2147483647
  %70 = getelementptr inbounds [10000086 x i32], ptr @f, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  %73 = getelementptr inbounds [10000086 x i32], ptr @f, i64 0, i64 %indvars.iv62
  store i32 %72, ptr %73, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %.lr.ph51._crit_edge, %67
  %75 = phi i32 [ %.pre65, %.lr.ph51._crit_edge ], [ %72, %67 ]
  %76 = sext i32 %75 to i64
  %77 = add nsw i64 %62, %76
  %exitcond.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !16
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

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 norecurse 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 #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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind willreturn memory(read) }

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


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