; LLVM IR from kazunetakahashi/atcoder :: 2018/0325_ARC093 (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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@A = external dso_local global i32, align 4
@B = external dso_local global i32, align 4
@ans = external dso_local global [100 x [100 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5flushv() #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @A)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @B)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %15

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

18:                                               ; preds = %15
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %38

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

20:                                               ; preds = %31, %19
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 100
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %34

24:                                               ; preds = %20
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100 x i8], ptr %27, i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !9
  br label %31

31:                                               ; preds = %24
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %20, !llvm.loop !11

34:                                               ; preds = %23
  br label %35

35:                                               ; preds = %34
  %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 %15, !llvm.loop !13

38:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 50, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %59, %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 100
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %62

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

44:                                               ; preds = %55, %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 100
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %58

48:                                               ; preds = %44
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %50
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100 x i8], ptr %51, i64 0, i64 %53
  store i8 0, ptr %54, align 1, !tbaa !9
  br label %55

55:                                               ; preds = %48
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !14

58:                                               ; preds = %47
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !15

62:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %105, %62
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = load i32, ptr @A, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %106

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %101, %67
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 100
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i32 16, ptr %3, align 4
  br label %104

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %91, %72
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = icmp slt i32 %74, 100
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 19, ptr %3, align 4
  br label %94

77:                                               ; preds = %73
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %79
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100 x i8], ptr %80, i64 0, i64 %82
  store i8 0, ptr %83, align 1, !tbaa !9
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = load i32, ptr @A, align 4, !tbaa !5
  %88 = icmp sge i32 %86, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %77
  store i32 19, ptr %3, align 4
  br label %94

90:                                               ; preds = %77
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = add nsw i32 %92, 2
  store i32 %93, ptr %9, align 4, !tbaa !5
  br label %73, !llvm.loop !16

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

95:                                               ; preds = %94
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = load i32, ptr @A, align 4, !tbaa !5
  %98 = icmp sge i32 %96, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  store i32 16, ptr %3, align 4
  br label %104

100:                                              ; preds = %95
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = add nsw i32 %102, 2
  store i32 %103, ptr %8, align 4, !tbaa !5
  br label %68, !llvm.loop !17

104:                                              ; preds = %99, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %105

105:                                              ; preds = %104
  br label %63, !llvm.loop !18

106:                                              ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %149, %106
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = load i32, ptr @B, align 4, !tbaa !5
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %111, label %150

111:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 51, ptr %11, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %145, %111
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = icmp slt i32 %113, 100
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i32 24, ptr %3, align 4
  br label %148

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

117:                                              ; preds = %135, %116
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = icmp slt i32 %118, 100
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  store i32 27, ptr %3, align 4
  br label %138

121:                                              ; preds = %117
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %123
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100 x i8], ptr %124, i64 0, i64 %126
  store i8 1, ptr %127, align 1, !tbaa !9
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %10, align 4, !tbaa !5
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = load i32, ptr @B, align 4, !tbaa !5
  %132 = icmp sge i32 %130, %131
  br i1 %132, label %133, label %134

133:                                              ; preds = %121
  store i32 27, ptr %3, align 4
  br label %138

134:                                              ; preds = %121
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = add nsw i32 %136, 2
  store i32 %137, ptr %12, align 4, !tbaa !5
  br label %117, !llvm.loop !19

138:                                              ; preds = %133, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = load i32, ptr @B, align 4, !tbaa !5
  %142 = icmp sge i32 %140, %141
  br i1 %142, label %143, label %144

143:                                              ; preds = %139
  store i32 24, ptr %3, align 4
  br label %148

144:                                              ; preds = %139
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = add nsw i32 %146, 2
  store i32 %147, ptr %11, align 4, !tbaa !5
  br label %112, !llvm.loop !20

148:                                              ; preds = %143, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %149

149:                                              ; preds = %148
  br label %107, !llvm.loop !21

150:                                              ; preds = %107
  call void @_Z5flushv()
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %151 = load i32, ptr %1, align 4
  ret i32 %151
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@A = external dso_local global i32, align 4
@B = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global [100 x [100 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5flushv() local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
.preheader58.preheader:
  %0 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @A)
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) @B)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(5000) @ans, i8 1, i64 5000, i1 false), !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(5000) getelementptr inbounds (i8, ptr @ans, i64 5000), i8 0, i64 5000, i1 false), !tbaa !5
  %2 = load i32, ptr @A, align 4, !tbaa !9
  %3 = icmp sgt i32 %2, 1
  br i1 %3, label %.preheader55, label %.preheader54

.preheader54:                                     ; preds = %.loopexit121, %.preheader58.preheader
  %4 = load i32, ptr @B, align 4, !tbaa !9
  %5 = icmp sgt i32 %4, 1
  br i1 %5, label %.preheader, label %._crit_edge

.preheader55:                                     ; preds = %.preheader58.preheader, %.loopexit121
  %indvars.iv83 = phi i64 [ %indvars.iv.next84.mux, %.loopexit121 ], [ 1, %.preheader58.preheader ]
  %.13867 = phi i32 [ %.lcssa93, %.loopexit121 ], [ 1, %.preheader58.preheader ]
  %6 = add nsw i32 %.13867, 1
  %smax = tail call i32 @llvm.smax.i32(i32 %2, i32 %6)
  %7 = xor i32 %.13867, -1
  %8 = add i32 %smax, %7
  %9 = tail call i32 @llvm.umin.i32(i32 %8, i32 49)
  %narrow = add nuw nsw i32 %9, 1
  %10 = zext nneg i32 %narrow to i64
  %min.iters.check = icmp ult i32 %8, 15
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader55
  %n.vec = and i64 %10, 112
  %11 = shl nuw nsw i64 %n.vec, 1
  %ind.end = or disjoint i64 %11, 1
  %.cast = trunc nuw nsw i64 %n.vec to i32
  %ind.end94 = add i32 %.13867, %.cast
  %12 = add i32 %.13867, 15
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %13 = phi i32 [ %12, %vector.ph ], [ %46, %vector.body ]
  %14 = shl i64 %index, 1
  %offset.idx = or disjoint i64 %14, 1
  %15 = or disjoint i64 %14, 3
  %16 = or disjoint i64 %14, 5
  %17 = or disjoint i64 %14, 7
  %18 = or disjoint i64 %14, 9
  %19 = or disjoint i64 %14, 11
  %20 = or disjoint i64 %14, 13
  %21 = or disjoint i64 %14, 15
  %22 = or disjoint i64 %14, 17
  %23 = or disjoint i64 %14, 19
  %24 = or disjoint i64 %14, 21
  %25 = or disjoint i64 %14, 23
  %26 = or disjoint i64 %14, 25
  %27 = or disjoint i64 %14, 27
  %28 = or disjoint i64 %14, 29
  %29 = or disjoint i64 %14, 31
  %30 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %offset.idx
  %31 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %15
  %32 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %16
  %33 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %17
  %34 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %18
  %35 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %19
  %36 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %20
  %37 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %21
  %38 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %22
  %39 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %23
  %40 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %24
  %41 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %25
  %42 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %26
  %43 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %27
  %44 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %28
  %45 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %29
  store i8 0, ptr %30, align 1, !tbaa !5
  store i8 0, ptr %31, align 1, !tbaa !5
  store i8 0, ptr %32, align 1, !tbaa !5
  store i8 0, ptr %33, align 1, !tbaa !5
  store i8 0, ptr %34, align 1, !tbaa !5
  store i8 0, ptr %35, align 1, !tbaa !5
  store i8 0, ptr %36, align 1, !tbaa !5
  store i8 0, ptr %37, align 1, !tbaa !5
  store i8 0, ptr %38, align 1, !tbaa !5
  store i8 0, ptr %39, align 1, !tbaa !5
  store i8 0, ptr %40, align 1, !tbaa !5
  store i8 0, ptr %41, align 1, !tbaa !5
  store i8 0, ptr %42, align 1, !tbaa !5
  store i8 0, ptr %43, align 1, !tbaa !5
  store i8 0, ptr %44, align 1, !tbaa !5
  store i8 0, ptr %45, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 16
  %46 = add i32 %13, 16
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %48 = add nsw i32 %13, 1
  %49 = icmp slt i32 %48, %2
  %cmp.n = icmp eq i64 %n.vec, %10
  br i1 %cmp.n, label %.loopexit121, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader55
  %indvars.iv.ph = phi i64 [ 1, %.preheader55 ], [ %ind.end, %middle.block ]
  %.23965.ph = phi i32 [ %.13867, %.preheader55 ], [ %ind.end94, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.23965 = phi i32 [ %51, %scalar.ph ], [ %.23965.ph, %scalar.ph.preheader ]
  %50 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv83, i64 %indvars.iv
  store i8 0, ptr %50, align 1, !tbaa !5
  %51 = add nsw i32 %.23965, 1
  %.not51 = icmp slt i32 %51, %2
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %52 = icmp ult i64 %indvars.iv, 98
  %or.cond75 = and i1 %.not51, %52
  br i1 %or.cond75, label %scalar.ph, label %.loopexit121, !llvm.loop !15

.loopexit121:                                     ; preds = %scalar.ph, %middle.block
  %.lcssa93 = phi i32 [ %ind.end94, %middle.block ], [ %51, %scalar.ph ]
  %.not51.lcssa = phi i1 [ %49, %middle.block ], [ %.not51, %scalar.ph ]
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 2
  %53 = icmp ult i64 %indvars.iv83, 98
  %or.cond = and i1 %.not51.lcssa, %53
  %indvars.iv.next84.mux = select i1 %or.cond, i64 %indvars.iv.next84, i64 1
  br i1 %.not51.lcssa, label %.preheader55, label %.preheader54, !llvm.loop !16

.preheader:                                       ; preds = %.preheader54, %.loopexit
  %indvars.iv89 = phi i64 [ %indvars.iv.next90.mux, %.loopexit ], [ 51, %.preheader54 ]
  %.172 = phi i32 [ %.lcssa, %.loopexit ], [ 1, %.preheader54 ]
  %54 = add nsw i32 %.172, 1
  %smax96 = tail call i32 @llvm.smax.i32(i32 %4, i32 %54)
  %55 = xor i32 %.172, -1
  %56 = add i32 %smax96, %55
  %57 = tail call i32 @llvm.umin.i32(i32 %56, i32 49)
  %narrow122 = add nuw nsw i32 %57, 1
  %58 = zext nneg i32 %narrow122 to i64
  %min.iters.check100 = icmp ult i32 %56, 15
  br i1 %min.iters.check100, label %scalar.ph99.preheader, label %vector.ph101

vector.ph101:                                     ; preds = %.preheader
  %n.vec103 = and i64 %58, 112
  %59 = shl nuw nsw i64 %n.vec103, 1
  %ind.end104 = or disjoint i64 %59, 1
  %.cast106 = trunc nuw nsw i64 %n.vec103 to i32
  %ind.end107 = add i32 %.172, %.cast106
  %60 = add i32 %.172, 15
  br label %vector.body109

vector.body109:                                   ; preds = %vector.body109, %vector.ph101
  %index110 = phi i64 [ 0, %vector.ph101 ], [ %index.next119, %vector.body109 ]
  %61 = phi i32 [ %60, %vector.ph101 ], [ %94, %vector.body109 ]
  %62 = shl i64 %index110, 1
  %offset.idx116 = or disjoint i64 %62, 1
  %63 = or disjoint i64 %62, 3
  %64 = or disjoint i64 %62, 5
  %65 = or disjoint i64 %62, 7
  %66 = or disjoint i64 %62, 9
  %67 = or disjoint i64 %62, 11
  %68 = or disjoint i64 %62, 13
  %69 = or disjoint i64 %62, 15
  %70 = or disjoint i64 %62, 17
  %71 = or disjoint i64 %62, 19
  %72 = or disjoint i64 %62, 21
  %73 = or disjoint i64 %62, 23
  %74 = or disjoint i64 %62, 25
  %75 = or disjoint i64 %62, 27
  %76 = or disjoint i64 %62, 29
  %77 = or disjoint i64 %62, 31
  %78 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %offset.idx116
  %79 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %63
  %80 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %64
  %81 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %65
  %82 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %66
  %83 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %67
  %84 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %68
  %85 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %69
  %86 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %70
  %87 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %71
  %88 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %72
  %89 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %73
  %90 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %74
  %91 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %75
  %92 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %76
  %93 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %77
  store i8 1, ptr %78, align 1, !tbaa !5
  store i8 1, ptr %79, align 1, !tbaa !5
  store i8 1, ptr %80, align 1, !tbaa !5
  store i8 1, ptr %81, align 1, !tbaa !5
  store i8 1, ptr %82, align 1, !tbaa !5
  store i8 1, ptr %83, align 1, !tbaa !5
  store i8 1, ptr %84, align 1, !tbaa !5
  store i8 1, ptr %85, align 1, !tbaa !5
  store i8 1, ptr %86, align 1, !tbaa !5
  store i8 1, ptr %87, align 1, !tbaa !5
  store i8 1, ptr %88, align 1, !tbaa !5
  store i8 1, ptr %89, align 1, !tbaa !5
  store i8 1, ptr %90, align 1, !tbaa !5
  store i8 1, ptr %91, align 1, !tbaa !5
  store i8 1, ptr %92, align 1, !tbaa !5
  store i8 1, ptr %93, align 1, !tbaa !5
  %index.next119 = add nuw i64 %index110, 16
  %94 = add i32 %61, 16
  %95 = icmp eq i64 %index.next119, %n.vec103
  br i1 %95, label %middle.block98, label %vector.body109, !llvm.loop !17

middle.block98:                                   ; preds = %vector.body109
  %96 = add nsw i32 %61, 1
  %97 = icmp slt i32 %96, %4
  %cmp.n120 = icmp eq i64 %n.vec103, %58
  br i1 %cmp.n120, label %.loopexit, label %scalar.ph99.preheader

scalar.ph99.preheader:                            ; preds = %middle.block98, %.preheader
  %indvars.iv86.ph = phi i64 [ 1, %.preheader ], [ %ind.end104, %middle.block98 ]
  %.270.ph = phi i32 [ %.172, %.preheader ], [ %ind.end107, %middle.block98 ]
  br label %scalar.ph99

scalar.ph99:                                      ; preds = %scalar.ph99.preheader, %scalar.ph99
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %scalar.ph99 ], [ %indvars.iv86.ph, %scalar.ph99.preheader ]
  %.270 = phi i32 [ %99, %scalar.ph99 ], [ %.270.ph, %scalar.ph99.preheader ]
  %98 = getelementptr inbounds [100 x [100 x i8]], ptr @ans, i64 0, i64 %indvars.iv89, i64 %indvars.iv86
  store i8 1, ptr %98, align 1, !tbaa !5
  %99 = add nsw i32 %.270, 1
  %.not = icmp slt i32 %99, %4
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 2
  %100 = icmp ult i64 %indvars.iv86, 98
  %or.cond77 = and i1 %.not, %100
  br i1 %or.cond77, label %scalar.ph99, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %scalar.ph99, %middle.block98
  %.lcssa = phi i32 [ %ind.end107, %middle.block98 ], [ %99, %scalar.ph99 ]
  %.not.lcssa = phi i1 [ %97, %middle.block98 ], [ %.not, %scalar.ph99 ]
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 2
  %101 = icmp ult i64 %indvars.iv89, 98
  %or.cond76 = and i1 %.not.lcssa, %101
  %indvars.iv.next90.mux = select i1 %or.cond76, i64 %indvars.iv.next90, i64 51
  br i1 %.not.lcssa, label %.preheader, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %.loopexit, %.preheader54
  tail call void @_Z5flushv()
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) 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) #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.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 = { "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 nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !14, !13}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12, !13, !14}
!18 = distinct !{!18, !12, !14, !13}
!19 = distinct !{!19, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass