; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/XETF/A.ll (Z4get2xx)

; 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.std::allocator" = type { i8 }

@C = external dso_local global [266 x [266 x i64]], align 16
@B = external dso_local global [266 x i64], align 16
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@__PRETTY_FUNCTION__._Z4get2xx = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4fastxx(i64 noundef, i64 noundef) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9getPrimesx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) #3

declare i32 @__gxx_personality_v0(...)

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

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

; 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) #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z4get2xx(i64 noundef %0, i64 noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %21 = load i64, ptr %3, align 8, !tbaa !5
  call void @_Z9getPrimesx(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %5, i64 noundef %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %22 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %187, %2
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = shl i32 1, %26
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 1, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %52, %30
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %55

36:                                               ; preds = %31
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = shl i32 1, %38
  %40 = and i32 %37, %39
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %51

42:                                               ; preds = %36
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %44) #5
  %46 = load i64, ptr %45, align 8, !tbaa !5
  %47 = load i64, ptr %10, align 8, !tbaa !5
  %48 = mul nsw i64 %47, %46
  store i64 %48, ptr %10, align 8, !tbaa !5
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = xor i32 %49, 1
  store i32 %50, ptr %11, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %42, %36
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %12, align 4, !tbaa !9
  br label %31, !llvm.loop !11

55:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %56 = load i64, ptr %3, align 8, !tbaa !5
  %57 = load i64, ptr %10, align 8, !tbaa !5
  %58 = sdiv i64 %56, %57
  store i64 %58, ptr %14, align 8, !tbaa !5
  %59 = load i64, ptr %14, align 8, !tbaa !5
  %60 = srem i64 %59, 1000000007
  store i64 %60, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  %61 = load i64, ptr %4, align 8, !tbaa !5
  %62 = add nsw i64 %61, 2
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %62, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %63 unwind label %72

63:                                               ; preds = %55
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 0) #5
  store i64 1, ptr %64, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 1, ptr %19, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %88, %63
  %66 = load i32, ptr %19, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = load i64, ptr %4, align 8, !tbaa !5
  %69 = add nsw i64 %68, 1
  %70 = icmp sle i64 %67, %69
  br i1 %70, label %76, label %71

71:                                               ; preds = %65
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %91

72:                                               ; preds = %55
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %17, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %18, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %191

76:                                               ; preds = %65
  %77 = load i32, ptr %19, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %79) #5
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = load i64, ptr %14, align 8, !tbaa !5
  %83 = mul nsw i64 %81, %82
  %84 = srem i64 %83, 1000000007
  %85 = load i32, ptr %19, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %86) #5
  store i64 %84, ptr %87, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %76
  %89 = load i32, ptr %19, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %19, align 4, !tbaa !9
  br label %65, !llvm.loop !13

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

92:                                               ; preds = %156, %91
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = load i64, ptr %4, align 8, !tbaa !5
  %96 = icmp sle i64 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %159

98:                                               ; preds = %92
  %99 = load i32, ptr %20, align 4, !tbaa !9
  %100 = and i32 %99, 1
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %131

102:                                              ; preds = %98
  %103 = load i64, ptr %4, align 8, !tbaa !5
  %104 = add nsw i64 %103, 1
  %105 = getelementptr inbounds [266 x [266 x i64]], ptr @C, i64 0, i64 %104
  %106 = load i32, ptr %20, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [266 x i64], ptr %105, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !5
  %110 = load i32, ptr %20, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [266 x i64], ptr @B, i64 0, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !5
  %114 = mul nsw i64 %109, %113
  %115 = srem i64 %114, 1000000007
  %116 = load i64, ptr %4, align 8, !tbaa !5
  %117 = add nsw i64 %116, 1
  %118 = load i32, ptr %20, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = sub nsw i64 %117, %119
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %120) #5
  %122 = load i64, ptr %121, align 8, !tbaa !5
  %123 = mul nsw i64 %115, %122
  %124 = srem i64 %123, 1000000007
  %125 = sub nsw i64 1000000007, %124
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %125)
          to label %126 unwind label %127

126:                                              ; preds = %102
  br label %155

127:                                              ; preds = %131, %102
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %17, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %190

131:                                              ; preds = %98
  %132 = load i64, ptr %4, align 8, !tbaa !5
  %133 = add nsw i64 %132, 1
  %134 = getelementptr inbounds [266 x [266 x i64]], ptr @C, i64 0, i64 %133
  %135 = load i32, ptr %20, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [266 x i64], ptr %134, i64 0, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !5
  %139 = load i32, ptr %20, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [266 x i64], ptr @B, i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !5
  %143 = mul nsw i64 %138, %142
  %144 = srem i64 %143, 1000000007
  %145 = load i64, ptr %4, align 8, !tbaa !5
  %146 = add nsw i64 %145, 1
  %147 = load i32, ptr %20, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = sub nsw i64 %146, %148
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %149) #5
  %151 = load i64, ptr %150, align 8, !tbaa !5
  %152 = mul nsw i64 %144, %151
  %153 = srem i64 %152, 1000000007
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %153)
          to label %154 unwind label %127

154:                                              ; preds = %131
  br label %155

155:                                              ; preds = %154, %126
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %20, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %20, align 4, !tbaa !9
  br label %92, !llvm.loop !14

159:                                              ; preds = %97
  %160 = load i64, ptr %13, align 8, !tbaa !5
  %161 = load i64, ptr %10, align 8, !tbaa !5
  %162 = srem i64 %161, 1000000007
  %163 = load i64, ptr %4, align 8, !tbaa !5
  %164 = call noundef i64 @_Z4fastxx(i64 noundef %162, i64 noundef %163)
  %165 = mul nsw i64 %160, %164
  %166 = srem i64 %165, 1000000007
  store i64 %166, ptr %13, align 8, !tbaa !5
  %167 = load i64, ptr %13, align 8, !tbaa !5
  %168 = load i64, ptr %4, align 8, !tbaa !5
  %169 = add nsw i64 %168, 1
  %170 = call noundef i64 @_Z4fastxx(i64 noundef %169, i64 noundef 1000000005)
  %171 = mul nsw i64 %167, %170
  %172 = srem i64 %171, 1000000007
  store i64 %172, ptr %13, align 8, !tbaa !5
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %183

175:                                              ; preds = %159
  %176 = load i64, ptr %13, align 8, !tbaa !5
  %177 = sub nsw i64 1000000007, %176
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %177)
          to label %178 unwind label %179

178:                                              ; preds = %175
  br label %186

179:                                              ; preds = %183, %175
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %17, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %18, align 4
  br label %190

183:                                              ; preds = %159
  %184 = load i64, ptr %13, align 8, !tbaa !5
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %184)
          to label %185 unwind label %179

185:                                              ; preds = %183
  br label %186

186:                                              ; preds = %185, %178
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %8, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %8, align 4, !tbaa !9
  br label %24, !llvm.loop !15

190:                                              ; preds = %179, %127
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %191

191:                                              ; preds = %190, %72
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %205

192:                                              ; preds = %29
  %193 = load i64, ptr %7, align 8, !tbaa !5
  %194 = icmp sle i64 0, %193
  br i1 %194, label %195, label %198

195:                                              ; preds = %192
  %196 = load i64, ptr %7, align 8, !tbaa !5
  %197 = icmp slt i64 %196, 1000000007
  br label %198

198:                                              ; preds = %195, %192
  %199 = phi i1 [ false, %192 ], [ %197, %195 ]
  br i1 %199, label %200, label %201

200:                                              ; preds = %198
  br label %203

201:                                              ; preds = %198
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 210, ptr noundef @__PRETTY_FUNCTION__._Z4get2xx) #6
  unreachable

202:                                              ; No predecessors!
  br label %203

203:                                              ; preds = %202, %200
  %204 = load i64, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  ret i64 %204

205:                                              ; preds = %191
  %206 = load ptr, ptr %17, align 8
  %207 = load i32, ptr %18, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn 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 = { nounwind }
attributes #6 = { noreturn 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 = !{!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}


; 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.std::allocator" = type { i8 }

@C = external dso_local local_unnamed_addr global [266 x [266 x i64]], align 16
@B = external dso_local local_unnamed_addr global [266 x i64], align 16
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@__PRETTY_FUNCTION__._Z4get2xx = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4fastxx(i64 noundef, i64 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9getPrimesx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

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

; 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 #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i64 0, 1000000007) i64 @_Z4get2xx(i64 noundef %0, i64 noundef %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_Z9getPrimesx(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %3, i64 noundef %0)
  %8 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %9 = trunc i64 %8 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  %.not72 = icmp eq i32 %9, 31
  br i1 %.not72, label %._crit_edge71.thread, label %.preheader56.lr.ph

.preheader56.lr.ph:                               ; preds = %2
  %10 = shl nuw nsw i32 1, %9
  %11 = icmp sgt i32 %9, 0
  %12 = add nsw i64 %1, 2
  %13 = add nsw i64 %1, 1
  %.not61 = icmp slt i64 %1, 0
  %wide.trip.count = and i64 %8, 2147483647
  br label %.preheader56

.preheader56:                                     ; preds = %.preheader56.lr.ph, %._crit_edge69
  %.04270 = phi i32 [ 0, %.preheader56.lr.ph ], [ %45, %._crit_edge69 ]
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge71:                                    ; preds = %._crit_edge69
  %.pre = load i64, ptr %4, align 8
  %14 = icmp ult i64 %.pre, 1000000007
  br i1 %14, label %._crit_edge71.thread, label %59

._crit_edge:                                      ; preds = %25, %.preheader56
  %.045.lcssa = phi i64 [ 1, %.preheader56 ], [ %.146, %25 ]
  %.044.lcssa = phi i32 [ 0, %.preheader56 ], [ %.1, %25 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  %15 = sdiv i64 %0, %.045.lcssa
  %16 = srem i64 %15, 1000000007
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %26 unwind label %28

.lr.ph:                                           ; preds = %.preheader56, %25
  %indvars.iv = phi i64 [ %indvars.iv.next, %25 ], [ 0, %.preheader56 ]
  %.04458 = phi i32 [ %.1, %25 ], [ 0, %.preheader56 ]
  %.04557 = phi i64 [ %.146, %25 ], [ 1, %.preheader56 ]
  %17 = trunc nuw nsw i64 %indvars.iv to i32
  %18 = shl nuw i32 1, %17
  %19 = and i32 %18, %.04270
  %.not55 = icmp eq i32 %19, 0
  br i1 %.not55, label %25, label %20

20:                                               ; preds = %.lr.ph
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #5
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = mul nsw i64 %22, %.04557
  %24 = xor i32 %.04458, 1
  br label %25

25:                                               ; preds = %.lr.ph, %20
  %.146 = phi i64 [ %23, %20 ], [ %.04557, %.lr.ph ]
  %.1 = phi i32 [ %24, %20 ], [ %.04458, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

26:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #5
  store i64 1, ptr %27, align 8, !tbaa !5
  br i1 %.not61, label %._crit_edge69, label %.lr.ph64

.preheader:                                       ; preds = %.lr.ph64
  br i1 %.not61, label %._crit_edge69, label %.lr.ph68

28:                                               ; preds = %._crit_edge
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %29

.lr.ph64:                                         ; preds = %26, %.lr.ph64
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph64 ], [ 1, %26 ]
  %30 = add nsw i64 %indvars.iv74, -1
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %30) #5
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = mul nsw i64 %32, %16
  %34 = srem i64 %33, 1000000007
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv74) #5
  store i64 %34, ptr %35, align 8, !tbaa !5
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %.not = icmp sgt i64 %indvars.iv74, %1
  br i1 %.not, label %.preheader, label %.lr.ph64, !llvm.loop !11

._crit_edge69:                                    ; preds = %.lr.ph68, %26, %.preheader
  %36 = load i64, ptr %5, align 8, !tbaa !5
  %37 = srem i64 %.045.lcssa, 1000000007
  %38 = call noundef i64 @_Z4fastxx(i64 noundef %37, i64 noundef %1)
  %39 = mul nsw i64 %38, %36
  %40 = srem i64 %39, 1000000007
  store i64 %40, ptr %5, align 8, !tbaa !5
  %41 = call noundef i64 @_Z4fastxx(i64 noundef %13, i64 noundef 1000000005)
  %42 = mul nsw i64 %40, %41
  %43 = srem i64 %42, 1000000007
  store i64 %43, ptr %5, align 8, !tbaa !5
  %.not53 = icmp eq i32 %.044.lcssa, 0
  %44 = sub nsw i64 1000000007, %43
  %.sink81 = select i1 %.not53, i64 %43, i64 %44
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %.sink81)
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %45 = add nuw nsw i32 %.04270, 1
  %exitcond80.not = icmp eq i32 %45, %10
  br i1 %exitcond80.not, label %._crit_edge71, label %.preheader56, !llvm.loop !12

.lr.ph68:                                         ; preds = %.preheader, %.lr.ph68
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %.lr.ph68 ], [ 0, %.preheader ]
  %46 = and i64 %indvars.iv77, 1
  %.not54 = icmp eq i64 %46, 0
  %47 = getelementptr inbounds [266 x [266 x i64]], ptr @C, i64 0, i64 %13, i64 %indvars.iv77
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds [266 x i64], ptr @B, i64 0, i64 %indvars.iv77
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = mul nsw i64 %50, %48
  %52 = srem i64 %51, 1000000007
  %53 = sub nsw i64 %13, %indvars.iv77
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %53) #5
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = mul nsw i64 %52, %55
  %57 = srem i64 %56, 1000000007
  %58 = sub nsw i64 1000000007, %57
  %.sink = select i1 %.not54, i64 %57, i64 %58
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %.sink)
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %.not52.not = icmp slt i64 %indvars.iv77, %1
  br i1 %.not52.not, label %.lr.ph68, label %._crit_edge69, !llvm.loop !13

59:                                               ; preds = %._crit_edge71
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 210, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4get2xx) #6
  unreachable

._crit_edge71.thread:                             ; preds = %2, %._crit_edge71
  %60 = phi i64 [ %.pre, %._crit_edge71 ], [ 0, %2 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret i64 %60
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn 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 = { nounwind }
attributes #6 = { noreturn 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}


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