; LLVM IR from tangjz/acm-icpc :: timus (1597)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@c = external dso_local global [65 x [69996 x i64]], align 16
@ans = external dso_local global [65 x %"class.std::vector"], align 16
@_ZL4maxn = external hidden constant i64, align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %16

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

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

20:                                               ; preds = %16
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [69996 x i64], ptr @c, i64 0, i64 %22
  store i64 1, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %24

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

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

28:                                               ; preds = %103, %27
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 65
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %106

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

33:                                               ; preds = %98, %32
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = icmp slt i32 %34, 69996
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 8, ptr %5, align 4
  br label %101

37:                                               ; preds = %33
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %41, label %60

41:                                               ; preds = %37
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sub nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [69996 x i64], ptr %44, i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %52
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [69996 x i64], ptr %53, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = add nsw i64 %49, %58
  br label %61

60:                                               ; preds = %37
  br label %61

61:                                               ; preds = %60, %41
  %62 = phi i64 [ %59, %41 ], [ 0, %60 ]
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [69996 x i64], ptr %65, i64 0, i64 %67
  store i64 %62, ptr %68, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %71
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #8
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %78
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [69996 x i64], ptr %79, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = add nsw i64 %76, %83
  store i64 %84, ptr %7, align 8, !tbaa !9
  %85 = load i64, ptr %7, align 8, !tbaa !9
  %86 = icmp sge i64 %85, 1000000000000000001
  br i1 %86, label %87, label %91

87:                                               ; preds = %61
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %89
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 8 dereferenceable(8) @_ZL4maxn)
  store i32 8, ptr %5, align 4
  br label %95

91:                                               ; preds = %61
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %93
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr noundef nonnull align 8 dereferenceable(8) %7)
  store i32 0, ptr %5, align 4
  br label %95

95:                                               ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  %96 = load i32, ptr %5, align 4
  switch i32 %96, label %101 [
    i32 0, label %97
  ]

97:                                               ; preds = %95
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %6, align 4, !tbaa !5
  br label %33, !llvm.loop !13

101:                                              ; preds = %95, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %4, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %4, align 4, !tbaa !5
  br label %28, !llvm.loop !14

106:                                              ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  br label %107

107:                                              ; preds = %223, %106
  call void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %108 = load i64, ptr %8, align 8, !tbaa !9
  %109 = icmp ne i64 %108, 0
  br i1 %109, label %110, label %113

110:                                              ; preds = %107
  %111 = load i64, ptr %9, align 8, !tbaa !9
  %112 = icmp ne i64 %111, 0
  br label %113

113:                                              ; preds = %110, %107
  %114 = phi i1 [ false, %107 ], [ %112, %110 ]
  br i1 %114, label %115, label %224

115:                                              ; preds = %113
  %116 = load i64, ptr %8, align 8, !tbaa !9
  %117 = icmp eq i64 %116, 1
  br i1 %117, label %118, label %120

118:                                              ; preds = %115
  %119 = load i64, ptr %9, align 8, !tbaa !9
  call void @_Z5printIxEvT_(i64 noundef %119)
  br label %223

120:                                              ; preds = %115
  %121 = load i64, ptr %8, align 8, !tbaa !9
  %122 = icmp eq i64 %121, 2
  br i1 %122, label %123, label %158

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %124 = load i64, ptr %9, align 8, !tbaa !9
  %125 = mul nsw i64 %124, 8
  %126 = sitofp i64 %125 to double
  %127 = fadd double %126, 1.000000e+00
  %128 = call double @sqrt(double noundef %127) #8
  %129 = fsub double %128, 1.000000e+00
  %130 = fmul double %129, 5.000000e-01
  %131 = call double @llvm.ceil.f64(double %130)
  %132 = fptosi double %131 to i64
  store i64 %132, ptr %10, align 8, !tbaa !9
  br label %133

133:                                              ; preds = %141, %123
  %134 = load i64, ptr %10, align 8, !tbaa !9
  %135 = load i64, ptr %10, align 8, !tbaa !9
  %136 = add nsw i64 %135, 1
  %137 = mul nsw i64 %134, %136
  %138 = sdiv i64 %137, 2
  %139 = load i64, ptr %9, align 8, !tbaa !9
  %140 = icmp sge i64 %138, %139
  br i1 %140, label %141, label %144

141:                                              ; preds = %133
  %142 = load i64, ptr %10, align 8, !tbaa !9
  %143 = add nsw i64 %142, -1
  store i64 %143, ptr %10, align 8, !tbaa !9
  br label %133, !llvm.loop !15

144:                                              ; preds = %133
  br label %145

145:                                              ; preds = %153, %144
  %146 = load i64, ptr %10, align 8, !tbaa !9
  %147 = load i64, ptr %10, align 8, !tbaa !9
  %148 = add nsw i64 %147, 1
  %149 = mul nsw i64 %146, %148
  %150 = sdiv i64 %149, 2
  %151 = load i64, ptr %9, align 8, !tbaa !9
  %152 = icmp slt i64 %150, %151
  br i1 %152, label %153, label %156

153:                                              ; preds = %145
  %154 = load i64, ptr %10, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %10, align 8, !tbaa !9
  br label %145, !llvm.loop !16

156:                                              ; preds = %145
  %157 = load i64, ptr %10, align 8, !tbaa !9
  call void @_Z5printIxEvT_(i64 noundef %157)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %222

158:                                              ; preds = %120
  %159 = load i64, ptr %8, align 8, !tbaa !9
  %160 = icmp eq i64 %159, 3
  br i1 %160, label %161, label %197

161:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %162 = load i64, ptr %9, align 8, !tbaa !9
  %163 = mul nsw i64 %162, 6
  %164 = call noundef double @_ZSt3powIxdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef %163, double noundef 0x3FD5555555555555)
  %165 = fadd double %164, 5.000000e-01
  %166 = call double @llvm.ceil.f64(double %165)
  %167 = fptosi double %166 to i64
  store i64 %167, ptr %11, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %178, %161
  %169 = load i64, ptr %11, align 8, !tbaa !9
  %170 = load i64, ptr %11, align 8, !tbaa !9
  %171 = load i64, ptr %11, align 8, !tbaa !9
  %172 = mul nsw i64 %170, %171
  %173 = add nsw i64 %172, 5
  %174 = mul nsw i64 %169, %173
  %175 = sdiv i64 %174, 6
  %176 = load i64, ptr %9, align 8, !tbaa !9
  %177 = icmp sge i64 %175, %176
  br i1 %177, label %178, label %181

178:                                              ; preds = %168
  %179 = load i64, ptr %11, align 8, !tbaa !9
  %180 = add nsw i64 %179, -1
  store i64 %180, ptr %11, align 8, !tbaa !9
  br label %168, !llvm.loop !17

181:                                              ; preds = %168
  br label %182

182:                                              ; preds = %192, %181
  %183 = load i64, ptr %11, align 8, !tbaa !9
  %184 = load i64, ptr %11, align 8, !tbaa !9
  %185 = load i64, ptr %11, align 8, !tbaa !9
  %186 = mul nsw i64 %184, %185
  %187 = add nsw i64 %186, 5
  %188 = mul nsw i64 %183, %187
  %189 = sdiv i64 %188, 6
  %190 = load i64, ptr %9, align 8, !tbaa !9
  %191 = icmp slt i64 %189, %190
  br i1 %191, label %192, label %195

192:                                              ; preds = %182
  %193 = load i64, ptr %11, align 8, !tbaa !9
  %194 = add nsw i64 %193, 1
  store i64 %194, ptr %11, align 8, !tbaa !9
  br label %182, !llvm.loop !18

195:                                              ; preds = %182
  %196 = load i64, ptr %11, align 8, !tbaa !9
  call void @_Z5printIxEvT_(i64 noundef %196)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %221

197:                                              ; preds = %158
  %198 = load i64, ptr %8, align 8, !tbaa !9
  %199 = icmp sge i64 %198, 65
  br i1 %199, label %200, label %201

200:                                              ; preds = %197
  store i64 64, ptr %8, align 8, !tbaa !9
  br label %201

201:                                              ; preds = %200, %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %202 = load i64, ptr %8, align 8, !tbaa !9
  %203 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %202
  %204 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #8
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %204, ptr %205, align 8
  %206 = load i64, ptr %8, align 8, !tbaa !9
  %207 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %206
  %208 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %207) #8
  %209 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %208, ptr %209, align 8
  %210 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %211 = load ptr, ptr %210, align 8
  %212 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8
  %214 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEExET_S7_S7_RKT0_(ptr %211, ptr %213, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %215 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %214, ptr %215, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %216 = load i64, ptr %8, align 8, !tbaa !9
  %217 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %216
  %218 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #8
  %219 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %218, ptr %219, align 8
  %220 = call noundef i64 @_ZN9__gnu_cxxmiIPxSt6vectorIxSaIxEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @_Z5printIlEvT_(i64 noundef %220)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %221

221:                                              ; preds = %201, %195
  br label %222

222:                                              ; preds = %221, %156
  br label %223

223:                                              ; preds = %222, %118
  br label %107, !llvm.loop !19

224:                                              ; preds = %113
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  %225 = load i32, ptr %1, align 4
  ret i32 %225
}

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

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

; 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 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printIxEvT_(i64 noundef) #2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIxdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef, double noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printIlEvT_(i64 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPxSt6vectorIxSaIxEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEExET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) #7

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { inlinehint 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 #7 = { inlinehint 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 #8 = { 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 = !{!"long long", !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@c = external dso_local local_unnamed_addr global [65 x [69996 x i64]], align 16
@ans = external dso_local global [65 x %"class.std::vector"], align 16
@_ZL4maxn = external hidden constant i64, align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  br label %7

7:                                                ; preds = %0, %7
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %7 ]
  %8 = getelementptr inbounds [69996 x i64], ptr @c, i64 0, i64 %indvars.iv
  store i64 1, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 0, ptr %1, align 8, !tbaa !5
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) @ans, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 69996
  br i1 %exitcond.not, label %.preheader51, label %7, !llvm.loop !9

.preheader51:                                     ; preds = %7, %.loopexit
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.loopexit ], [ 1, %7 ]
  %9 = add nsw i64 %indvars.iv63, -1
  %10 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %9
  %11 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %indvars.iv63
  br label %18

12:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %13 = load i64, ptr %3, align 8, !tbaa !5
  %14 = icmp ne i64 %13, 0
  %15 = load i64, ptr %4, align 8
  %16 = icmp ne i64 %15, 0
  %17 = select i1 %14, i1 %16, i1 false
  br i1 %17, label %.lr.ph, label %._crit_edge

18:                                               ; preds = %.preheader51, %35
  %indvars.iv59 = phi i64 [ 0, %.preheader51 ], [ %indvars.iv.next60, %35 ]
  %.not49 = icmp ugt i64 %indvars.iv63, %indvars.iv59
  br i1 %.not49, label %26, label %19

19:                                               ; preds = %18
  %20 = add nsw i64 %indvars.iv59, -1
  %21 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %indvars.iv63, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %9, i64 %20
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = add nsw i64 %24, %22
  br label %26

26:                                               ; preds = %18, %19
  %27 = phi i64 [ %25, %19 ], [ 0, %18 ]
  %28 = getelementptr inbounds [65 x [69996 x i64]], ptr @c, i64 0, i64 %indvars.iv63, i64 %indvars.iv59
  store i64 %27, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv59) #8
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = load i64, ptr %28, align 8, !tbaa !5
  %32 = add nsw i64 %31, %30
  store i64 %32, ptr %2, align 8, !tbaa !5
  %33 = icmp slt i64 %32, 1000000000000000001
  br i1 %33, label %35, label %34

34:                                               ; preds = %26
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) @_ZL4maxn)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  br label %.loopexit

35:                                               ; preds = %26
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond62.not = icmp eq i64 %indvars.iv.next60, 69996
  br i1 %exitcond62.not, label %.loopexit, label %18, !llvm.loop !11

.loopexit:                                        ; preds = %35, %34
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next64, 65
  br i1 %exitcond66.not, label %12, label %.preheader51, !llvm.loop !12

.lr.ph:                                           ; preds = %12, %94
  %36 = phi i64 [ %97, %94 ], [ %15, %12 ]
  %37 = phi i64 [ %95, %94 ], [ %13, %12 ]
  switch i64 %37, label %79 [
    i64 1, label %38
    i64 2, label %39
    i64 3, label %59
  ]

38:                                               ; preds = %.lr.ph
  call void @_Z5printIxEvT_(i64 noundef %36)
  br label %94

39:                                               ; preds = %.lr.ph
  %40 = shl nsw i64 %36, 3
  %41 = sitofp i64 %40 to double
  %42 = fadd double %41, 1.000000e+00
  %43 = call double @sqrt(double noundef %42) #8
  %44 = fadd double %43, -1.000000e+00
  %45 = fmul double %44, 5.000000e-01
  %46 = call double @llvm.ceil.f64(double %45)
  %47 = fptosi double %46 to i64
  %48 = load i64, ptr %4, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %49, %39
  %.041 = phi i64 [ %47, %39 ], [ %53, %49 ]
  %50 = add nsw i64 %.041, 1
  %51 = mul nsw i64 %50, %.041
  %52 = sdiv i64 %51, 2
  %.not48 = icmp slt i64 %52, %48
  %53 = add nsw i64 %.041, -1
  br i1 %.not48, label %.preheader, label %49, !llvm.loop !13

.preheader:                                       ; preds = %49, %.preheader
  %.142 = phi i64 [ %54, %.preheader ], [ %.041, %49 ]
  %54 = add nsw i64 %.142, 1
  %55 = mul nsw i64 %54, %.142
  %56 = sdiv i64 %55, 2
  %57 = icmp slt i64 %56, %48
  br i1 %57, label %.preheader, label %58, !llvm.loop !14

58:                                               ; preds = %.preheader
  call void @_Z5printIxEvT_(i64 noundef %.142)
  br label %94

59:                                               ; preds = %.lr.ph
  %60 = mul nsw i64 %36, 6
  %61 = call noundef double @_ZSt3powIxdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef %60, double noundef 0x3FD5555555555555)
  %62 = fadd double %61, 5.000000e-01
  %63 = call double @llvm.ceil.f64(double %62)
  %64 = fptosi double %63 to i64
  %65 = load i64, ptr %4, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %66, %59
  %.040 = phi i64 [ %64, %59 ], [ %71, %66 ]
  %67 = mul nsw i64 %.040, %.040
  %68 = add nuw nsw i64 %67, 5
  %69 = mul nsw i64 %68, %.040
  %70 = sdiv i64 %69, 6
  %.not = icmp slt i64 %70, %65
  %71 = add nsw i64 %.040, -1
  br i1 %.not, label %.preheader50, label %66, !llvm.loop !15

.preheader50:                                     ; preds = %66, %.preheader50
  %.1 = phi i64 [ %77, %.preheader50 ], [ %.040, %66 ]
  %72 = mul nsw i64 %.1, %.1
  %73 = add nuw nsw i64 %72, 5
  %74 = mul nsw i64 %73, %.1
  %75 = sdiv i64 %74, 6
  %76 = icmp slt i64 %75, %65
  %77 = add nsw i64 %.1, 1
  br i1 %76, label %.preheader50, label %78, !llvm.loop !16

78:                                               ; preds = %.preheader50
  call void @_Z5printIxEvT_(i64 noundef %.1)
  br label %94

79:                                               ; preds = %.lr.ph
  %80 = icmp sgt i64 %37, 64
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  store i64 64, ptr %3, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %81, %79
  %83 = phi i64 [ 64, %81 ], [ %37, %79 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %84 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %83
  %85 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #8
  %86 = load i64, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %86
  %88 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %87) #8
  %89 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEExET_S7_S7_RKT0_(ptr %85, ptr %88, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store ptr %89, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %90 = load i64, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds [65 x %"class.std::vector"], ptr @ans, i64 0, i64 %90
  %92 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #8
  store ptr %92, ptr %6, align 8
  %93 = call noundef i64 @_ZN9__gnu_cxxmiIPxSt6vectorIxSaIxEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @_Z5printIlEvT_(i64 noundef %93)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %94

94:                                               ; preds = %58, %82, %78, %38
  call void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %95 = load i64, ptr %3, align 8, !tbaa !5
  %96 = icmp ne i64 %95, 0
  %97 = load i64, ptr %4, align 8
  %98 = icmp ne i64 %97, 0
  %99 = select i1 %96, i1 %98, i1 false
  br i1 %99, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %94, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress 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 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4scanIxEvRT_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printIxEvT_(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIxdEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef, double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printIlEvT_(i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPxSt6vectorIxSaIxEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEExET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(write) "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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { inlinehint 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 #7 = { inlinehint 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 #8 = { 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 = !{!"long long", !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 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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