; LLVM IR from tangjz/acm-icpc :: self_training/2015-02-07 (E)

; 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
@k = external dso_local global i32, align 4
@fa = external dso_local global [150003 x i32], align 16
@ans = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(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
  %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
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @k)
  store i32 0, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %25, %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = mul nsw i32 %16, 3
  %18 = icmp sle i32 %15, %17
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %14
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %23
  store i32 %21, ptr %24, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %20
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

28:                                               ; preds = %19
  br label %29

29:                                               ; preds = %148, %146, %28
  %30 = load i32, ptr @k, align 4, !tbaa !5
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr @k, align 4, !tbaa !5
  %32 = icmp ne i32 %30, 0
  br i1 %32, label %33, label %149

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp sgt i32 %35, %36
  br i1 %37, label %42, label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp sgt i32 %39, %40
  br i1 %41, label %42, label %45

42:                                               ; preds = %38, %33
  %43 = load i32, ptr @ans, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr @ans, align 4, !tbaa !5
  store i32 5, ptr %6, align 4
  br label %146, !llvm.loop !11

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = call noundef i32 @_Z4findi(i32 noundef %46)
  store i32 %47, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = add nsw i32 %48, %49
  %51 = call noundef i32 @_Z4findi(i32 noundef %50)
  store i32 %51, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = add nsw i32 %52, %53
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = add nsw i32 %54, %55
  %57 = call noundef i32 @_Z4findi(i32 noundef %56)
  store i32 %57, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = call noundef i32 @_Z4findi(i32 noundef %58)
  store i32 %59, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = load i32, ptr @n, align 4, !tbaa !5
  %62 = add nsw i32 %60, %61
  %63 = call noundef i32 @_Z4findi(i32 noundef %62)
  store i32 %63, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = add nsw i32 %64, %65
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = add nsw i32 %66, %67
  %69 = call noundef i32 @_Z4findi(i32 noundef %68)
  store i32 %69, ptr %12, align 4, !tbaa !5
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = icmp eq i32 %70, 1
  br i1 %71, label %72, label %110

72:                                               ; preds = %45
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = icmp eq i32 %73, %74
  br i1 %75, label %88, label %76

76:                                               ; preds = %72
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = icmp eq i32 %77, %78
  br i1 %79, label %88, label %80

80:                                               ; preds = %76
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = icmp eq i32 %81, %82
  br i1 %83, label %88, label %84

84:                                               ; preds = %80
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = icmp eq i32 %85, %86
  br i1 %87, label %88, label %91

88:                                               ; preds = %84, %80, %76, %72
  %89 = load i32, ptr @ans, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr @ans, align 4, !tbaa !5
  store i32 5, ptr %6, align 4
  br label %145, !llvm.loop !11

91:                                               ; preds = %84
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = call noundef i32 @_Z4findi(i32 noundef %92)
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = call noundef i32 @_Z4findi(i32 noundef %94)
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %96
  store i32 %93, ptr %97, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = call noundef i32 @_Z4findi(i32 noundef %98)
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = call noundef i32 @_Z4findi(i32 noundef %100)
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %102
  store i32 %99, ptr %103, align 4, !tbaa !5
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = call noundef i32 @_Z4findi(i32 noundef %104)
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = call noundef i32 @_Z4findi(i32 noundef %106)
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %108
  store i32 %105, ptr %109, align 4, !tbaa !5
  br label %144

110:                                              ; preds = %45
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = load i32, ptr %10, align 4, !tbaa !5
  %113 = icmp eq i32 %111, %112
  br i1 %113, label %122, label %114

114:                                              ; preds = %110
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = icmp eq i32 %115, %116
  br i1 %117, label %122, label %118

118:                                              ; preds = %114
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = icmp eq i32 %119, %120
  br i1 %121, label %122, label %125

122:                                              ; preds = %118, %114, %110
  %123 = load i32, ptr @ans, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr @ans, align 4, !tbaa !5
  store i32 5, ptr %6, align 4
  br label %145, !llvm.loop !11

125:                                              ; preds = %118
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = call noundef i32 @_Z4findi(i32 noundef %126)
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = call noundef i32 @_Z4findi(i32 noundef %128)
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %130
  store i32 %127, ptr %131, align 4, !tbaa !5
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = call noundef i32 @_Z4findi(i32 noundef %132)
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = call noundef i32 @_Z4findi(i32 noundef %134)
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %136
  store i32 %133, ptr %137, align 4, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = call noundef i32 @_Z4findi(i32 noundef %138)
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = call noundef i32 @_Z4findi(i32 noundef %140)
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %142
  store i32 %139, ptr %143, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %125, %91
  store i32 0, ptr %6, align 4
  br label %145

145:                                              ; preds = %144, %122, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %146

146:                                              ; preds = %145, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  %147 = load i32, ptr %6, align 4
  switch i32 %147, label %152 [
    i32 0, label %148
    i32 5, label %29
  ]

148:                                              ; preds = %146
  br label %29, !llvm.loop !11

149:                                              ; preds = %29
  %150 = load i32, ptr @ans, align 4, !tbaa !5
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %150)
  ret i32 0

152:                                              ; preds = %146
  unreachable
}

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

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

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !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"

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@fa = external dso_local local_unnamed_addr global [150003 x i32], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @k)
  store i32 0, ptr @ans, align 4, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not48 = icmp slt i32 %5, 1
  br i1 %.not48, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %6 = mul i32 %5, 3
  %smax = tail call i32 @llvm.smax.i32(i32 %6, i32 1)
  %7 = add nuw i32 %smax, 1
  %wide.trip.count = zext i32 %7 to i64
  %8 = zext nneg i32 %smax to i64
  %min.iters.check = icmp slt i32 %6, 8
  br i1 %min.iters.check, label %.lr.ph.preheader54, label %vector.ph

.lr.ph.preheader54:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %8, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %9 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %offset.idx
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  store <4 x i32> %vec.ind, ptr %9, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %10, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %11 = icmp eq i64 %index.next, %n.vec
  br i1 %11, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %8
  br i1 %cmp.n, label %.preheader, label %.lr.ph.preheader54

.preheader:                                       ; preds = %.lr.ph, %middle.block, %0
  %12 = load i32, ptr @k, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr @k, align 4, !tbaa !5
  %.not4050 = icmp eq i32 %12, 0
  br i1 %.not4050, label %._crit_edge, label %.lr.ph51

.lr.ph:                                           ; preds = %.lr.ph.preheader54, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader54 ]
  %14 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %indvars.iv
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %15, ptr %14, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !13

.lr.ph51:                                         ; preds = %.preheader, %90
  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
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp sgt i32 %17, %18
  %20 = load i32, ptr %3, align 4
  %21 = icmp sgt i32 %20, %18
  %or.cond = select i1 %19, i1 true, i1 %21
  br i1 %or.cond, label %22, label %25

22:                                               ; preds = %.lr.ph51
  %23 = load i32, ptr @ans, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr @ans, align 4, !tbaa !5
  br label %90, !llvm.loop !14

25:                                               ; preds = %.lr.ph51
  %26 = call noundef i32 @_Z4findi(i32 noundef %17)
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = add nsw i32 %28, %27
  %30 = call noundef i32 @_Z4findi(i32 noundef %29)
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %reass.add = shl i32 %32, 1
  %33 = add i32 %reass.add, %31
  %34 = call noundef i32 @_Z4findi(i32 noundef %33)
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = call noundef i32 @_Z4findi(i32 noundef %35)
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = add nsw i32 %38, %37
  %40 = call noundef i32 @_Z4findi(i32 noundef %39)
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %reass.add41 = shl i32 %42, 1
  %43 = add i32 %reass.add41, %41
  %44 = call noundef i32 @_Z4findi(i32 noundef %43)
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 1
  %47 = icmp eq i32 %26, %44
  br i1 %46, label %48, label %70

48:                                               ; preds = %25
  %49 = icmp eq i32 %26, %40
  %50 = icmp eq i32 %36, %30
  %51 = or i1 %49, %50
  %52 = icmp eq i32 %36, %34
  %53 = or i1 %51, %52
  %or.cond45 = or i1 %53, %47
  br i1 %or.cond45, label %54, label %57

54:                                               ; preds = %48
  %55 = load i32, ptr @ans, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr @ans, align 4, !tbaa !5
  br label %90, !llvm.loop !14

57:                                               ; preds = %48
  %58 = call noundef i32 @_Z4findi(i32 noundef %36)
  %59 = call noundef i32 @_Z4findi(i32 noundef %26)
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %60
  store i32 %58, ptr %61, align 4, !tbaa !5
  %62 = call noundef i32 @_Z4findi(i32 noundef %40)
  %63 = call noundef i32 @_Z4findi(i32 noundef %30)
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %64
  store i32 %62, ptr %65, align 4, !tbaa !5
  %66 = call noundef i32 @_Z4findi(i32 noundef %44)
  %67 = call noundef i32 @_Z4findi(i32 noundef %34)
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %68
  store i32 %66, ptr %69, align 4, !tbaa !5
  br label %90

70:                                               ; preds = %25
  %71 = icmp eq i32 %26, %36
  %72 = icmp eq i32 %30, %36
  %73 = or i1 %71, %72
  %or.cond47 = or i1 %73, %47
  br i1 %or.cond47, label %74, label %77

74:                                               ; preds = %70
  %75 = load i32, ptr @ans, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr @ans, align 4, !tbaa !5
  br label %90, !llvm.loop !14

77:                                               ; preds = %70
  %78 = call noundef i32 @_Z4findi(i32 noundef %40)
  %79 = call noundef i32 @_Z4findi(i32 noundef %26)
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %80
  store i32 %78, ptr %81, align 4, !tbaa !5
  %82 = call noundef i32 @_Z4findi(i32 noundef %44)
  %83 = call noundef i32 @_Z4findi(i32 noundef %30)
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %84
  store i32 %82, ptr %85, align 4, !tbaa !5
  %86 = call noundef i32 @_Z4findi(i32 noundef %36)
  %87 = call noundef i32 @_Z4findi(i32 noundef %34)
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [150003 x i32], ptr @fa, i64 0, i64 %88
  store i32 %86, ptr %89, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %54, %74, %77, %57, %22
  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
  %91 = load i32, ptr @k, align 4, !tbaa !5
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr @k, align 4, !tbaa !5
  %.not40 = icmp eq i32 %91, 0
  br i1 %.not40, label %._crit_edge.loopexit, label %.lr.ph51

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %93 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %93)
  ret i32 0
}

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

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

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


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