; LLVM IR from kazunetakahashi/atcoder :: 201411_201509/1224_codethanks_A/E.ll (Z11count_southSt5tupleIJiiiiEE)

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

@R = external dso_local global i32, align 4
@C = external dso_local global i32, align 4
@X = external dso_local global [60 x [60 x i32]], align 16
@Y = external dso_local global [60 x [60 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z11count_southSt5tupleIJiiiiEE(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %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 ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %40, %1
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = icmp slt i32 %14, 60
  br i1 %15, label %17, label %16

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

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #2
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %36, %17
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = icmp slt i32 %19, 60
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %18
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [60 x [60 x i32]], ptr @X, i64 0, i64 %24
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [60 x i32], ptr %25, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %31
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [60 x i32], ptr %32, i64 0, i64 %34
  store i32 %29, ptr %35, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %22
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %5, align 4, !tbaa !9
  br label %18, !llvm.loop !11

39:                                               ; preds = %21
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !9
  br label %13, !llvm.loop !13

43:                                               ; preds = %16
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %46
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [60 x i32], ptr %47, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = add nsw i32 %52, -1
  store i32 %53, ptr %51, align 4, !tbaa !9
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %56
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm3EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [60 x i32], ptr %57, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !9
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %66
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [60 x i32], ptr %67, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %71, align 4, !tbaa !9
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %76
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm3EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #2
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [60 x i32], ptr %77, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %81, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %114, %43
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = icmp slt i32 %85, 60
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  br label %117

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %110, %88
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = icmp slt i32 %90, 60
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  br label %113

93:                                               ; preds = %89
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %95
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [60 x i32], ptr %96, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %103
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [60 x i32], ptr %104, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = add nsw i32 %108, %101
  store i32 %109, ptr %107, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %93
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !9
  br label %89, !llvm.loop !14

113:                                              ; preds = %92
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %6, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %6, align 4, !tbaa !9
  br label %84, !llvm.loop !15

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

118:                                              ; preds = %148, %117
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = icmp slt i32 %119, 60
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  br label %151

122:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %144, %122
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = icmp slt i32 %124, 60
  br i1 %125, label %127, label %126

126:                                              ; preds = %123
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  br label %147

127:                                              ; preds = %123
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %130
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [60 x i32], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = load i32, ptr %8, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %137
  %139 = load i32, ptr %9, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [60 x i32], ptr %138, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !9
  %143 = add nsw i32 %142, %135
  store i32 %143, ptr %141, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %127
  %145 = load i32, ptr %9, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %9, align 4, !tbaa !9
  br label %123, !llvm.loop !16

147:                                              ; preds = %126
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %8, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %8, align 4, !tbaa !9
  br label %118, !llvm.loop !17

151:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %181, %151
  %153 = load i32, ptr %11, align 4, !tbaa !9
  %154 = load i32, ptr @R, align 4, !tbaa !9
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  br label %184

157:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %177, %157
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = load i32, ptr @C, align 4, !tbaa !9
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  br label %180

163:                                              ; preds = %158
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %165
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [60 x i32], ptr %166, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = srem i32 %170, 4
  %172 = icmp eq i32 %171, 0
  br i1 %172, label %173, label %176

173:                                              ; preds = %163
  %174 = load i32, ptr %10, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %10, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %173, %163
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %12, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %12, align 4, !tbaa !9
  br label %158, !llvm.loop !18

180:                                              ; preds = %162
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %11, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %11, align 4, !tbaa !9
  br label %152, !llvm.loop !19

184:                                              ; preds = %156
  %185 = load i32, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  ret i32 %185
}

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm3EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) #0

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!"any pointer", !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}
!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}


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

@R = external dso_local local_unnamed_addr global i32, align 4
@C = external dso_local local_unnamed_addr global i32, align 4
@X = external dso_local local_unnamed_addr global [60 x [60 x i32]], align 16
@Y = external dso_local local_unnamed_addr global [60 x [60 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z11count_southSt5tupleIJiiiiEE(ptr noundef nonnull %0) local_unnamed_addr #0 {
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(14400) @Y, ptr noundef nonnull align 16 dereferenceable(14400) @X, i64 14400, i1 false), !tbaa !5
  %2 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = sext i32 %3 to i64
  %5 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %4, i64 %7
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr %8, align 4, !tbaa !5
  %11 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm3EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %13, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %17, align 4, !tbaa !5
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %22, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %26, align 4, !tbaa !5
  %29 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm3EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16) %0) #3
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %31, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %35, align 4, !tbaa !5
  br label %.preheader43

.preheader43:                                     ; preds = %1, %38
  %indvars.iv62 = phi i64 [ 0, %1 ], [ %indvars.iv.next63, %38 ]
  %.phi.trans.insert = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv62, i64 0
  %.pre = load i32, ptr %.phi.trans.insert, align 16, !tbaa !5
  br label %39

38:                                               ; preds = %39
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next63, 60
  br i1 %exitcond65.not, label %.preheader41, label %.preheader43, !llvm.loop !9

39:                                               ; preds = %50, %.preheader43
  %40 = phi i32 [ %.pre, %.preheader43 ], [ %53, %50 ]
  %indvars.iv = phi i64 [ 1, %.preheader43 ], [ %indvars.iv.next.3, %50 ]
  %41 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv62, i64 %indvars.iv
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, %40
  store i32 %43, ptr %41, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv62, i64 %indvars.iv.next
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = add nsw i32 %45, %43
  store i32 %46, ptr %44, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %47 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv62, i64 %indvars.iv.next.1
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %48, %46
  store i32 %49, ptr %47, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 60
  br i1 %exitcond.not.2, label %38, label %50, !llvm.loop !11

50:                                               ; preds = %39
  %51 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv62, i64 %indvars.iv.next.2
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, %49
  store i32 %53, ptr %51, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  br label %39

.preheader41:                                     ; preds = %38, %.preheader41
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.preheader41 ], [ 1, %38 ]
  %54 = add nsw i64 %indvars.iv70, -1
  %55 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 0
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load = load <4 x i32>, ptr %55, align 16, !tbaa !5
  %wide.load83 = load <4 x i32>, ptr %56, align 16, !tbaa !5
  %57 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 0
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %wide.load84 = load <4 x i32>, ptr %57, align 16, !tbaa !5
  %wide.load85 = load <4 x i32>, ptr %58, align 16, !tbaa !5
  %59 = add nsw <4 x i32> %wide.load84, %wide.load
  %60 = add nsw <4 x i32> %wide.load85, %wide.load83
  store <4 x i32> %59, ptr %57, align 16, !tbaa !5
  store <4 x i32> %60, ptr %58, align 16, !tbaa !5
  %61 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 8
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %wide.load.1 = load <4 x i32>, ptr %61, align 16, !tbaa !5
  %wide.load83.1 = load <4 x i32>, ptr %62, align 16, !tbaa !5
  %63 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 8
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %wide.load84.1 = load <4 x i32>, ptr %63, align 16, !tbaa !5
  %wide.load85.1 = load <4 x i32>, ptr %64, align 16, !tbaa !5
  %65 = add nsw <4 x i32> %wide.load84.1, %wide.load.1
  %66 = add nsw <4 x i32> %wide.load85.1, %wide.load83.1
  store <4 x i32> %65, ptr %63, align 16, !tbaa !5
  store <4 x i32> %66, ptr %64, align 16, !tbaa !5
  %67 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 16
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %wide.load.2 = load <4 x i32>, ptr %67, align 16, !tbaa !5
  %wide.load83.2 = load <4 x i32>, ptr %68, align 16, !tbaa !5
  %69 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 16
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %wide.load84.2 = load <4 x i32>, ptr %69, align 16, !tbaa !5
  %wide.load85.2 = load <4 x i32>, ptr %70, align 16, !tbaa !5
  %71 = add nsw <4 x i32> %wide.load84.2, %wide.load.2
  %72 = add nsw <4 x i32> %wide.load85.2, %wide.load83.2
  store <4 x i32> %71, ptr %69, align 16, !tbaa !5
  store <4 x i32> %72, ptr %70, align 16, !tbaa !5
  %73 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 24
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  %wide.load.3 = load <4 x i32>, ptr %73, align 16, !tbaa !5
  %wide.load83.3 = load <4 x i32>, ptr %74, align 16, !tbaa !5
  %75 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 24
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %wide.load84.3 = load <4 x i32>, ptr %75, align 16, !tbaa !5
  %wide.load85.3 = load <4 x i32>, ptr %76, align 16, !tbaa !5
  %77 = add nsw <4 x i32> %wide.load84.3, %wide.load.3
  %78 = add nsw <4 x i32> %wide.load85.3, %wide.load83.3
  store <4 x i32> %77, ptr %75, align 16, !tbaa !5
  store <4 x i32> %78, ptr %76, align 16, !tbaa !5
  %79 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 32
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %wide.load.4 = load <4 x i32>, ptr %79, align 16, !tbaa !5
  %wide.load83.4 = load <4 x i32>, ptr %80, align 16, !tbaa !5
  %81 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 32
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  %wide.load84.4 = load <4 x i32>, ptr %81, align 16, !tbaa !5
  %wide.load85.4 = load <4 x i32>, ptr %82, align 16, !tbaa !5
  %83 = add nsw <4 x i32> %wide.load84.4, %wide.load.4
  %84 = add nsw <4 x i32> %wide.load85.4, %wide.load83.4
  store <4 x i32> %83, ptr %81, align 16, !tbaa !5
  store <4 x i32> %84, ptr %82, align 16, !tbaa !5
  %85 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 40
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  %wide.load.5 = load <4 x i32>, ptr %85, align 16, !tbaa !5
  %wide.load83.5 = load <4 x i32>, ptr %86, align 16, !tbaa !5
  %87 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 40
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %wide.load84.5 = load <4 x i32>, ptr %87, align 16, !tbaa !5
  %wide.load85.5 = load <4 x i32>, ptr %88, align 16, !tbaa !5
  %89 = add nsw <4 x i32> %wide.load84.5, %wide.load.5
  %90 = add nsw <4 x i32> %wide.load85.5, %wide.load83.5
  store <4 x i32> %89, ptr %87, align 16, !tbaa !5
  store <4 x i32> %90, ptr %88, align 16, !tbaa !5
  %91 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 48
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  %wide.load.6 = load <4 x i32>, ptr %91, align 16, !tbaa !5
  %wide.load83.6 = load <4 x i32>, ptr %92, align 16, !tbaa !5
  %93 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 48
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  %wide.load84.6 = load <4 x i32>, ptr %93, align 16, !tbaa !5
  %wide.load85.6 = load <4 x i32>, ptr %94, align 16, !tbaa !5
  %95 = add nsw <4 x i32> %wide.load84.6, %wide.load.6
  %96 = add nsw <4 x i32> %wide.load85.6, %wide.load83.6
  store <4 x i32> %95, ptr %93, align 16, !tbaa !5
  store <4 x i32> %96, ptr %94, align 16, !tbaa !5
  %97 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 56
  %98 = load i32, ptr %97, align 16, !tbaa !5
  %99 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 56
  %100 = load i32, ptr %99, align 16, !tbaa !5
  %101 = add nsw i32 %100, %98
  store i32 %101, ptr %99, align 16, !tbaa !5
  %102 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 57
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 57
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, %103
  store i32 %106, ptr %104, align 4, !tbaa !5
  %107 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 58
  %108 = load i32, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 58
  %110 = load i32, ptr %109, align 8, !tbaa !5
  %111 = add nsw i32 %110, %108
  store i32 %111, ptr %109, align 8, !tbaa !5
  %112 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %54, i64 59
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv70, i64 59
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = add nsw i32 %115, %113
  store i32 %116, ptr %114, align 4, !tbaa !5
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next71, 60
  br i1 %exitcond73.not, label %.preheader40, label %.preheader41, !llvm.loop !12

.preheader40:                                     ; preds = %.preheader41
  %117 = load i32, ptr @R, align 4, !tbaa !5
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %.preheader.lr.ph, label %._crit_edge55

.preheader.lr.ph:                                 ; preds = %.preheader40
  %119 = load i32, ptr @C, align 4, !tbaa !5
  %120 = icmp sgt i32 %119, 0
  br i1 %120, label %.preheader.us.preheader, label %._crit_edge55

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count81 = zext nneg i32 %117 to i64
  %wide.trip.count = zext nneg i32 %119 to i64
  %min.iters.check = icmp ult i32 %119, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv78 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next79, %._crit_edge.us ]
  %.03353.us = phi i32 [ 0, %.preheader.us.preheader ], [ %spec.select.us.lcssa, %._crit_edge.us ]
  br i1 %min.iters.check, label %scalar.ph87.preheader, label %vector.ph88

vector.ph88:                                      ; preds = %.preheader.us
  %121 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.03353.us, i64 0
  br label %vector.body90

vector.body90:                                    ; preds = %vector.body90, %vector.ph88
  %index91 = phi i64 [ 0, %vector.ph88 ], [ %index.next95, %vector.body90 ]
  %vec.phi = phi <4 x i32> [ %121, %vector.ph88 ], [ %130, %vector.body90 ]
  %vec.phi92 = phi <4 x i32> [ zeroinitializer, %vector.ph88 ], [ %131, %vector.body90 ]
  %122 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv78, i64 %index91
  %123 = getelementptr inbounds i8, ptr %122, i64 16
  %wide.load93 = load <4 x i32>, ptr %122, align 16, !tbaa !5
  %wide.load94 = load <4 x i32>, ptr %123, align 16, !tbaa !5
  %124 = and <4 x i32> %wide.load93, <i32 3, i32 3, i32 3, i32 3>
  %125 = and <4 x i32> %wide.load94, <i32 3, i32 3, i32 3, i32 3>
  %126 = icmp eq <4 x i32> %124, zeroinitializer
  %127 = icmp eq <4 x i32> %125, zeroinitializer
  %128 = zext <4 x i1> %126 to <4 x i32>
  %129 = zext <4 x i1> %127 to <4 x i32>
  %130 = add <4 x i32> %vec.phi, %128
  %131 = add <4 x i32> %vec.phi92, %129
  %index.next95 = add nuw i64 %index91, 8
  %132 = icmp eq i64 %index.next95, %n.vec
  br i1 %132, label %middle.block86, label %vector.body90, !llvm.loop !13

middle.block86:                                   ; preds = %vector.body90
  %bin.rdx = add <4 x i32> %131, %130
  %133 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph87.preheader

scalar.ph87.preheader:                            ; preds = %middle.block86, %.preheader.us
  %indvars.iv74.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block86 ]
  %.151.us.ph = phi i32 [ %.03353.us, %.preheader.us ], [ %133, %middle.block86 ]
  br label %scalar.ph87

scalar.ph87:                                      ; preds = %scalar.ph87.preheader, %scalar.ph87
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %scalar.ph87 ], [ %indvars.iv74.ph, %scalar.ph87.preheader ]
  %.151.us = phi i32 [ %spec.select.us, %scalar.ph87 ], [ %.151.us.ph, %scalar.ph87.preheader ]
  %134 = getelementptr inbounds [60 x [60 x i32]], ptr @Y, i64 0, i64 %indvars.iv78, i64 %indvars.iv74
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = and i32 %135, 3
  %137 = icmp eq i32 %136, 0
  %138 = zext i1 %137 to i32
  %spec.select.us = add nsw i32 %.151.us, %138
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count
  br i1 %exitcond77.not, label %._crit_edge.us, label %scalar.ph87, !llvm.loop !16

._crit_edge.us:                                   ; preds = %scalar.ph87, %middle.block86
  %spec.select.us.lcssa = phi i32 [ %133, %middle.block86 ], [ %spec.select.us, %scalar.ph87 ]
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge55, label %.preheader.us, !llvm.loop !17

._crit_edge55:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %.preheader40
  %.033.lcssa = phi i32 [ 0, %.preheader40 ], [ 0, %.preheader.lr.ph ], [ %spec.select.us.lcssa, %._crit_edge.us ]
  ret i32 %.033.lcssa
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm3EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !15, !14}
!17 = distinct !{!17, !10}


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