; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2015-16/Open 2016/Plat (bcs_editorial)

; 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::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@ok = external dso_local global [100 x [100 x [100 x i8]]], align 16
@oc = external dso_local global [100 x i32], align 16
@num = external dso_local global i32, align 4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6searchSt6vectorISt4pairIiS0_IiiEESaIS2_EE(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4initv() #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector.11", align 8
  %3 = alloca ptr, align 8
  %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
  store i32 0, ptr %1, align 4
  call void @_Z4initv()
  call void @llvm.memset.p0.i64(ptr align 8 %2, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  invoke void @_Z6searchSt6vectorISt4pairIiS0_IiiEESaIS2_EE(ptr noundef %2)
          to label %10 unwind label %16

10:                                               ; preds = %0
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %149, %10
  %12 = load i32, ptr %6, align 4, !tbaa !5
  %13 = load i32, ptr @num, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %20, label %15

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

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  %18 = extractvalue { ptr, i32 } %17, 0
  store ptr %18, ptr %3, align 8
  %19 = extractvalue { ptr, i32 } %17, 1
  store i32 %19, ptr %4, align 4
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %154

20:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %21 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %21, ptr %8, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %145, %20
  %23 = load i32, ptr %8, align 4, !tbaa !5
  %24 = load i32, ptr @num, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %28 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %28, ptr %9, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %141, %27
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = load i32, ptr @num, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %29
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100 x [100 x [100 x i8]]], ptr @ok, i64 0, i64 %36
  %38 = load i32, ptr %8, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100 x [100 x i8]], ptr %37, i64 0, i64 %39
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100 x i8], ptr %40, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !9, !range !11, !noundef !12
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %140

46:                                               ; preds = %34
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp eq i32 %47, %48
  br i1 %49, label %50, label %74

50:                                               ; preds = %46
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = icmp eq i32 %51, %52
  br i1 %53, label %54, label %74

54:                                               ; preds = %50
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  %64 = mul nsw i32 %58, %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = sub nsw i32 %68, 2
  %70 = mul nsw i32 %64, %69
  %71 = sdiv i32 %70, 6
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = add nsw i32 %72, %71
  store i32 %73, ptr %5, align 4, !tbaa !5
  br label %139

74:                                               ; preds = %50, %46
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = icmp eq i32 %75, %76
  br i1 %77, label %78, label %97

78:                                               ; preds = %74
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sub nsw i32 %86, 1
  %88 = mul nsw i32 %82, %87
  %89 = sdiv i32 %88, 2
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = mul nsw i32 %89, %93
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = add nsw i32 %95, %94
  store i32 %96, ptr %5, align 4, !tbaa !5
  br label %138

97:                                               ; preds = %74
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = icmp eq i32 %98, %99
  br i1 %100, label %101, label %120

101:                                              ; preds = %97
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = mul nsw i32 %105, %109
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = mul nsw i32 %110, %115
  %117 = sdiv i32 %116, 2
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = add nsw i32 %118, %117
  store i32 %119, ptr %5, align 4, !tbaa !5
  br label %137

120:                                              ; preds = %97
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = mul nsw i32 %124, %128
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = mul nsw i32 %129, %133
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = add nsw i32 %135, %134
  store i32 %136, ptr %5, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %120, %101
  br label %138

138:                                              ; preds = %137, %78
  br label %139

139:                                              ; preds = %138, %54
  br label %140

140:                                              ; preds = %139, %34
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %9, align 4, !tbaa !5
  br label %29, !llvm.loop !13

144:                                              ; preds = %33
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %8, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %8, align 4, !tbaa !5
  br label %22, !llvm.loop !15

148:                                              ; preds = %26
  br label %149

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

152:                                              ; preds = %15
  call void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %153 = load i32, ptr %1, align 4
  ret i32 %153

154:                                              ; preds = %16
  %155 = load ptr, ptr %3, align 8
  %156 = load i32, ptr %4, align 4
  %157 = insertvalue { ptr, i32 } poison, ptr %155, 0
  %158 = insertvalue { ptr, i32 } %157, i32 %156, 1
  resume { ptr, i32 } %158
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) #1

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


; 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::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@ok = external dso_local local_unnamed_addr global [100 x [100 x [100 x i8]]], align 16
@oc = external dso_local local_unnamed_addr global [100 x i32], align 16
@num = external dso_local local_unnamed_addr global i32, align 4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6searchSt6vectorISt4pairIiS0_IiiEESaIS2_EE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.11", align 8
  %2 = alloca i32, align 4
  tail call void @_Z4initv()
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  invoke void @_Z6searchSt6vectorISt4pairIiS0_IiiEESaIS2_EE(ptr noundef nonnull %1)
          to label %3 unwind label %8

3:                                                ; preds = %0
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %4 = load i32, ptr @num, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader35.preheader, label %._crit_edge

.preheader35.preheader:                           ; preds = %3
  %6 = zext nneg i32 %4 to i64
  %wide.trip.count56 = zext nneg i32 %4 to i64
  br label %.preheader35

.preheader35:                                     ; preds = %.preheader35.preheader, %35
  %indvars.iv = phi i64 [ 0, %.preheader35.preheader ], [ %indvars.iv.next, %35 ]
  %.us-phi38.lcssa4142 = phi i32 [ 0, %.preheader35.preheader ], [ %.us-phi, %35 ]
  %7 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %indvars.iv
  br label %.preheader

._crit_edge:                                      ; preds = %35, %3
  %.us-phi38.lcssa41.lcssa = phi i32 [ 0, %3 ], [ %.us-phi, %35 ]
  store i32 %.us-phi38.lcssa41.lcssa, ptr %2, align 4, !tbaa !5
  call void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret i32 0

8:                                                ; preds = %0
  %9 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  resume { ptr, i32 } %9

.preheader:                                       ; preds = %.preheader35, %.split.us
  %indvars.iv46 = phi i64 [ %indvars.iv, %.preheader35 ], [ %indvars.iv.next47, %.split.us ]
  %.us-phi3839 = phi i32 [ %.us-phi38.lcssa4142, %.preheader35 ], [ %.us-phi, %.split.us ]
  %10 = icmp eq i64 %indvars.iv, %indvars.iv46
  %11 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %indvars.iv46
  %.fr = freeze i1 %10
  br i1 %.fr, label %.preheader.split.us, label %.preheader.split

.preheader.split.us:                              ; preds = %.preheader, %32
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %32 ], [ %indvars.iv46, %.preheader ]
  %12 = phi i32 [ %33, %32 ], [ %.us-phi3839, %.preheader ]
  %13 = getelementptr inbounds [100 x [100 x [100 x i8]]], ptr @ok, i64 0, i64 %indvars.iv, i64 %indvars.iv46, i64 %indvars.iv51
  %14 = load i8, ptr %13, align 1, !tbaa !9, !range !11, !noundef !12
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %16, label %32

16:                                               ; preds = %.preheader.split.us
  %17 = icmp eq i64 %indvars.iv46, %indvars.iv51
  %18 = load i32, ptr %7, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  %20 = mul nsw i32 %19, %18
  br i1 %17, label %27, label %21

21:                                               ; preds = %16
  %22 = sdiv i32 %20, 2
  %23 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %indvars.iv51
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = mul nsw i32 %22, %24
  %26 = add nsw i32 %25, %12
  br label %32

27:                                               ; preds = %16
  %28 = add nsw i32 %18, -2
  %29 = mul nsw i32 %20, %28
  %30 = sdiv i32 %29, 6
  %31 = add nsw i32 %30, %12
  br label %32

32:                                               ; preds = %27, %21, %.preheader.split.us
  %33 = phi i32 [ %12, %.preheader.split.us ], [ %26, %21 ], [ %31, %27 ]
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %34 = icmp ult i64 %indvars.iv.next52, %6
  br i1 %34, label %.preheader.split.us, label %.split.us, !llvm.loop !13

35:                                               ; preds = %.split.us
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond57.not = icmp eq i64 %indvars.iv.next, %wide.trip.count56
  br i1 %exitcond57.not, label %._crit_edge, label %.preheader35, !llvm.loop !15

.split.us:                                        ; preds = %55, %32
  %.us-phi = phi i32 [ %33, %32 ], [ %56, %55 ]
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count56
  br i1 %exitcond.not, label %35, label %.preheader, !llvm.loop !16

.preheader.split:                                 ; preds = %.preheader, %55
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %55 ], [ %indvars.iv46, %.preheader ]
  %36 = phi i32 [ %56, %55 ], [ %.us-phi3839, %.preheader ]
  %37 = getelementptr inbounds [100 x [100 x [100 x i8]]], ptr @ok, i64 0, i64 %indvars.iv, i64 %indvars.iv46, i64 %indvars.iv48
  %38 = load i8, ptr %37, align 1, !tbaa !9, !range !11, !noundef !12
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %40, label %55

40:                                               ; preds = %.preheader.split
  %41 = icmp eq i64 %indvars.iv46, %indvars.iv48
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = mul nsw i32 %43, %42
  br i1 %41, label %45, label %50

45:                                               ; preds = %40
  %46 = add nsw i32 %43, -1
  %47 = mul nsw i32 %44, %46
  %48 = sdiv i32 %47, 2
  %49 = add nsw i32 %48, %36
  br label %55

50:                                               ; preds = %40
  %51 = getelementptr inbounds [100 x i32], ptr @oc, i64 0, i64 %indvars.iv48
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = mul nsw i32 %44, %52
  %54 = add nsw i32 %36, %53
  br label %55

55:                                               ; preds = %.preheader.split, %50, %45
  %56 = phi i32 [ %36, %.preheader.split ], [ %54, %50 ], [ %49, %45 ]
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %57 = icmp ult i64 %indvars.iv.next49, %6
  br i1 %57, label %.preheader.split, label %.split.us, !llvm.loop !13
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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


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