; LLVM IR from DionysiosB/CodeForces :: 1200-1299 (1228B-FillingTheGrid)

; 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<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.2" = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store i64 1000000007, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %24 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  %25 = load i64, ptr %4, align 8, !tbaa !5
  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 1, ptr %8) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %25, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %26 unwind label %33

26:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %24, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %27 unwind label %37

27:                                               ; preds = %26
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 1, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %72, %27
  %29 = load i64, ptr %13, align 8, !tbaa !5
  %30 = load i64, ptr %3, align 8, !tbaa !5
  %31 = icmp slt i64 %29, %30
  br i1 %31, label %42, label %32

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

33:                                               ; preds = %0
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %9, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %10, align 4
  br label %41

37:                                               ; preds = %26
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %9, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %41

41:                                               ; preds = %37, %33
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %194

42:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %43 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %15)
          to label %44 unwind label %50

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %59, %44
  %46 = load i64, ptr %16, align 8, !tbaa !5
  %47 = load i64, ptr %15, align 8, !tbaa !5
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %54, label %49

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

50:                                               ; preds = %42
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %9, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %193

54:                                               ; preds = %45
  %55 = load i64, ptr %13, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %55) #5
  %57 = load i64, ptr %16, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %57) #5
  store i64 1, ptr %58, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %54
  %60 = load i64, ptr %16, align 8, !tbaa !5
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %16, align 8, !tbaa !5
  br label %45, !llvm.loop !9

62:                                               ; preds = %49
  %63 = load i64, ptr %15, align 8, !tbaa !5
  %64 = load i64, ptr %4, align 8, !tbaa !5
  %65 = icmp slt i64 %63, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %62
  %67 = load i64, ptr %13, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %67) #5
  %69 = load i64, ptr %15, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %69) #5
  store i64 -1, ptr %70, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %72

72:                                               ; preds = %71
  %73 = load i64, ptr %13, align 8, !tbaa !5
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %13, align 8, !tbaa !5
  br label %28, !llvm.loop !11

75:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %137, %75
  %77 = load i64, ptr %12, align 8, !tbaa !5
  %78 = icmp ne i64 %77, 0
  br i1 %78, label %79, label %83

79:                                               ; preds = %76
  %80 = load i64, ptr %17, align 8, !tbaa !5
  %81 = load i64, ptr %4, align 8, !tbaa !5
  %82 = icmp slt i64 %80, %81
  br label %83

83:                                               ; preds = %79, %76
  %84 = phi i1 [ false, %76 ], [ %82, %79 ]
  br i1 %84, label %86, label %85

85:                                               ; preds = %83
  store i32 8, ptr %14, align 4
  br label %140

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %87 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %18)
          to label %88 unwind label %94

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %111, %88
  %90 = load i64, ptr %19, align 8, !tbaa !5
  %91 = load i64, ptr %18, align 8, !tbaa !5
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %98, label %93

93:                                               ; preds = %89
  store i32 11, ptr %14, align 4
  br label %114

94:                                               ; preds = %86
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %193

98:                                               ; preds = %89
  %99 = load i64, ptr %19, align 8, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %99) #5
  %101 = load i64, ptr %17, align 8, !tbaa !5
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %101) #5
  %103 = load i64, ptr %102, align 8, !tbaa !5
  %104 = icmp eq i64 %103, -1
  br i1 %104, label %105, label %106

105:                                              ; preds = %98
  store i64 0, ptr %12, align 8, !tbaa !5
  store i32 11, ptr %14, align 4
  br label %114

106:                                              ; preds = %98
  %107 = load i64, ptr %19, align 8, !tbaa !5
  %108 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %107) #5
  %109 = load i64, ptr %17, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %109) #5
  store i64 1, ptr %110, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %106
  %112 = load i64, ptr %19, align 8, !tbaa !5
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %19, align 8, !tbaa !5
  br label %89, !llvm.loop !12

114:                                              ; preds = %105, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %115

115:                                              ; preds = %114
  %116 = load i64, ptr %18, align 8, !tbaa !5
  %117 = load i64, ptr %3, align 8, !tbaa !5
  %118 = icmp slt i64 %116, %117
  br i1 %118, label %119, label %133

119:                                              ; preds = %115
  %120 = load i64, ptr %18, align 8, !tbaa !5
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %120) #5
  %122 = load i64, ptr %17, align 8, !tbaa !5
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %122) #5
  %124 = load i64, ptr %123, align 8, !tbaa !5
  %125 = icmp eq i64 %124, 1
  br i1 %125, label %126, label %127

126:                                              ; preds = %119
  store i64 0, ptr %12, align 8, !tbaa !5
  store i32 8, ptr %14, align 4
  br label %134

127:                                              ; preds = %119
  %128 = load i64, ptr %18, align 8, !tbaa !5
  %129 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %128) #5
  %130 = load i64, ptr %17, align 8, !tbaa !5
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %130) #5
  store i64 -1, ptr %131, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %127
  br label %133

133:                                              ; preds = %132, %115
  store i32 0, ptr %14, align 4
  br label %134

134:                                              ; preds = %133, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %135 = load i32, ptr %14, align 4
  switch i32 %135, label %140 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %17, align 8, !tbaa !5
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %17, align 8, !tbaa !5
  br label %76, !llvm.loop !13

140:                                              ; preds = %134, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %141

141:                                              ; preds = %140
  %142 = load i64, ptr %12, align 8, !tbaa !5
  %143 = icmp ne i64 %142, 0
  br i1 %143, label %144, label %184

144:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %170, %144
  %146 = load i64, ptr %21, align 8, !tbaa !5
  %147 = load i64, ptr %3, align 8, !tbaa !5
  %148 = icmp slt i64 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %173

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 0, ptr %22, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %166, %150
  %152 = load i64, ptr %22, align 8, !tbaa !5
  %153 = load i64, ptr %4, align 8, !tbaa !5
  %154 = icmp slt i64 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %169

156:                                              ; preds = %151
  %157 = load i64, ptr %21, align 8, !tbaa !5
  %158 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %157) #5
  %159 = load i64, ptr %22, align 8, !tbaa !5
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %159) #5
  %161 = load i64, ptr %160, align 8, !tbaa !5
  %162 = icmp eq i64 %161, 0
  %163 = zext i1 %162 to i64
  %164 = load i64, ptr %20, align 8, !tbaa !5
  %165 = add nsw i64 %164, %163
  store i64 %165, ptr %20, align 8, !tbaa !5
  br label %166

166:                                              ; preds = %156
  %167 = load i64, ptr %22, align 8, !tbaa !5
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %22, align 8, !tbaa !5
  br label %151, !llvm.loop !14

169:                                              ; preds = %155
  br label %170

170:                                              ; preds = %169
  %171 = load i64, ptr %21, align 8, !tbaa !5
  %172 = add nsw i64 %171, 1
  store i64 %172, ptr %21, align 8, !tbaa !5
  br label %145, !llvm.loop !15

173:                                              ; preds = %149
  br label %174

174:                                              ; preds = %178, %173
  %175 = load i64, ptr %20, align 8, !tbaa !5
  %176 = add nsw i64 %175, -1
  store i64 %176, ptr %20, align 8, !tbaa !5
  %177 = icmp ne i64 %175, 0
  br i1 %177, label %178, label %183

178:                                              ; preds = %174
  %179 = load i64, ptr %12, align 8, !tbaa !5
  %180 = mul nsw i64 %179, 2
  store i64 %180, ptr %12, align 8, !tbaa !5
  %181 = load i64, ptr %12, align 8, !tbaa !5
  %182 = srem i64 %181, 1000000007
  store i64 %182, ptr %12, align 8, !tbaa !5
  br label %174, !llvm.loop !16

183:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %184

184:                                              ; preds = %183, %141
  %185 = load i64, ptr %12, align 8, !tbaa !5
  %186 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %185)
          to label %187 unwind label %189

187:                                              ; preds = %184
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %188 = load i32, ptr %1, align 4
  ret i32 %188

189:                                              ; preds = %184
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %9, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %10, align 4
  br label %193

193:                                              ; preds = %189, %94, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %194

194:                                              ; preds = %193, %41
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %9, align 8
  %197 = load i32, ptr %10, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 #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 = !{!"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}


; 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<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.2" = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %11 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %12 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %12, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %19

13:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %11, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %14 unwind label %21

14:                                               ; preds = %13
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph62, label %.preheader57

.preheader57:                                     ; preds = %38, %14
  %17 = load i64, ptr %2, align 8
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph71, label %.preheader56

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %23

21:                                               ; preds = %13
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %23

23:                                               ; preds = %21, %19
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %20, %19 ]
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn

.lr.ph62:                                         ; preds = %14, %38
  %.03960 = phi i64 [ %39, %38 ], [ 0, %14 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %8)
  %25 = load i64, ptr %8, align 8, !tbaa !5
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph62
  %.lcssa = phi i64 [ %25, %.lr.ph62 ], [ %32, %.lr.ph ]
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = icmp slt i64 %.lcssa, %27
  br i1 %28, label %34, label %38

.lr.ph:                                           ; preds = %.lr.ph62, %.lr.ph
  %.03759 = phi i64 [ %31, %.lr.ph ], [ 0, %.lr.ph62 ]
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03960) #5
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %.03759) #5
  store i64 1, ptr %30, align 8, !tbaa !5
  %31 = add nuw nsw i64 %.03759, 1
  %32 = load i64, ptr %8, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !9

34:                                               ; preds = %._crit_edge
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03960) #5
  %36 = load i64, ptr %8, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %36) #5
  store i64 -1, ptr %37, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %34, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %39 = add nuw nsw i64 %.03960, 1
  %40 = load i64, ptr %1, align 8, !tbaa !5
  %41 = icmp slt i64 %39, %40
  br i1 %41, label %.lr.ph62, label %.preheader57, !llvm.loop !11

.lr.ph71:                                         ; preds = %.preheader57, %68
  %.03670 = phi i64 [ %69, %68 ], [ 0, %.preheader57 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %9)
  %43 = load i64, ptr %9, align 8, !tbaa !5
  %44 = icmp sgt i64 %43, 0
  br i1 %44, label %.lr.ph65, label %._crit_edge66

.lr.ph65:                                         ; preds = %.lr.ph71, %48
  %.03563 = phi i64 [ %51, %48 ], [ 0, %.lr.ph71 ]
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03563) #5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %.03670) #5
  %47 = load i64, ptr %46, align 8, !tbaa !5
  %.not = icmp eq i64 %47, -1
  br i1 %.not, label %.lr.ph65.._crit_edge66.loopexit_crit_edge, label %48

.lr.ph65.._crit_edge66.loopexit_crit_edge:        ; preds = %.lr.ph65
  %.pre.pre = load i64, ptr %9, align 8, !tbaa !5
  br label %._crit_edge66

48:                                               ; preds = %.lr.ph65
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03563) #5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %.03670) #5
  store i64 1, ptr %50, align 8, !tbaa !5
  %51 = add nuw nsw i64 %.03563, 1
  %52 = load i64, ptr %9, align 8, !tbaa !5
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %.lr.ph65, label %._crit_edge66, !llvm.loop !12

._crit_edge66:                                    ; preds = %48, %.lr.ph65.._crit_edge66.loopexit_crit_edge, %.lr.ph71
  %54 = phi i64 [ %43, %.lr.ph71 ], [ %.pre.pre, %.lr.ph65.._crit_edge66.loopexit_crit_edge ], [ %52, %48 ]
  %55 = phi i1 [ true, %.lr.ph71 ], [ false, %.lr.ph65.._crit_edge66.loopexit_crit_edge ], [ true, %48 ]
  %56 = phi i1 [ false, %.lr.ph71 ], [ true, %.lr.ph65.._crit_edge66.loopexit_crit_edge ], [ false, %48 ]
  %57 = load i64, ptr %1, align 8, !tbaa !5
  %58 = icmp slt i64 %54, %57
  br i1 %58, label %59, label %68

59:                                               ; preds = %._crit_edge66
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %54) #5
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %.03670) #5
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = icmp eq i64 %62, 1
  br i1 %63, label %.thread52, label %64

64:                                               ; preds = %59
  %65 = load i64, ptr %9, align 8, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %65) #5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %.03670) #5
  store i64 -1, ptr %67, align 8, !tbaa !5
  br label %68

.thread52:                                        ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %.loopexit

68:                                               ; preds = %64, %._crit_edge66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %69 = add nuw nsw i64 %.03670, 1
  %70 = load i64, ptr %2, align 8
  %71 = icmp slt i64 %69, %70
  %72 = select i1 %55, i1 %71, i1 false
  br i1 %72, label %.lr.ph71, label %._crit_edge72, !llvm.loop !13

._crit_edge72:                                    ; preds = %68
  br i1 %56, label %.loopexit, label %.preheader56

.preheader56:                                     ; preds = %.preheader57, %._crit_edge72
  %73 = phi i64 [ %70, %._crit_edge72 ], [ %17, %.preheader57 ]
  %74 = load i64, ptr %1, align 8, !tbaa !5
  %75 = icmp sgt i64 %74, 0
  %76 = icmp sgt i64 %73, 0
  %or.cond = select i1 %75, i1 %76, i1 false
  br i1 %or.cond, label %.preheader55, label %.loopexit

.preheader55:                                     ; preds = %.preheader56, %._crit_edge77
  %77 = phi i64 [ %81, %._crit_edge77 ], [ %74, %.preheader56 ]
  %78 = phi i64 [ %82, %._crit_edge77 ], [ %73, %.preheader56 ]
  %.03380 = phi i64 [ %83, %._crit_edge77 ], [ 0, %.preheader56 ]
  %.03479 = phi i64 [ %.1.lcssa, %._crit_edge77 ], [ 0, %.preheader56 ]
  %79 = icmp sgt i64 %78, 0
  br i1 %79, label %.lr.ph76, label %._crit_edge77

.preheader:                                       ; preds = %._crit_edge77
  %.not4882 = icmp eq i64 %.1.lcssa, 0
  br i1 %.not4882, label %.loopexit, label %.lr.ph85.preheader

.lr.ph85.preheader:                               ; preds = %.preheader
  %xtraiter = and i64 %.1.lcssa, 3
  %80 = icmp ult i64 %.1.lcssa, 4
  br i1 %80, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph85.preheader.new

.lr.ph85.preheader.new:                           ; preds = %.lr.ph85.preheader
  %unroll_iter = and i64 %.1.lcssa, -4
  br label %.lr.ph85

._crit_edge77.loopexit:                           ; preds = %.lr.ph76
  %.pre92 = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge77

._crit_edge77:                                    ; preds = %._crit_edge77.loopexit, %.preheader55
  %81 = phi i64 [ %77, %.preheader55 ], [ %.pre92, %._crit_edge77.loopexit ]
  %82 = phi i64 [ %78, %.preheader55 ], [ %92, %._crit_edge77.loopexit ]
  %.1.lcssa = phi i64 [ %.03479, %.preheader55 ], [ %90, %._crit_edge77.loopexit ]
  %83 = add nuw nsw i64 %.03380, 1
  %84 = icmp slt i64 %83, %81
  br i1 %84, label %.preheader55, label %.preheader, !llvm.loop !14

.lr.ph76:                                         ; preds = %.preheader55, %.lr.ph76
  %.075 = phi i64 [ %91, %.lr.ph76 ], [ 0, %.preheader55 ]
  %.174 = phi i64 [ %90, %.lr.ph76 ], [ %.03479, %.preheader55 ]
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03380) #5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %.075) #5
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = icmp eq i64 %87, 0
  %89 = zext i1 %88 to i64
  %90 = add nsw i64 %.174, %89
  %91 = add nuw nsw i64 %.075, 1
  %92 = load i64, ptr %2, align 8, !tbaa !5
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %.lr.ph76, label %._crit_edge77.loopexit, !llvm.loop !16

.lr.ph85:                                         ; preds = %.lr.ph85, %.lr.ph85.preheader.new
  %.483 = phi i64 [ 1, %.lr.ph85.preheader.new ], [ %101, %.lr.ph85 ]
  %niter = phi i64 [ 0, %.lr.ph85.preheader.new ], [ %niter.next.3, %.lr.ph85 ]
  %94 = shl nsw i64 %.483, 1
  %95 = srem i64 %94, 1000000007
  %96 = shl nsw i64 %95, 1
  %97 = srem i64 %96, 1000000007
  %98 = shl nsw i64 %97, 1
  %99 = srem i64 %98, 1000000007
  %100 = shl nsw i64 %99, 1
  %101 = srem i64 %100, 1000000007
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph85, !llvm.loop !17

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph85, %.lr.ph85.preheader
  %.lcssa112.ph = phi i64 [ poison, %.lr.ph85.preheader ], [ %101, %.lr.ph85 ]
  %.483.unr = phi i64 [ 1, %.lr.ph85.preheader ], [ %101, %.lr.ph85 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph85.epil

.lr.ph85.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph85.epil
  %.483.epil = phi i64 [ %103, %.lr.ph85.epil ], [ %.483.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph85.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %102 = shl nsw i64 %.483.epil, 1
  %103 = srem i64 %102, 1000000007
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph85.epil, !llvm.loop !18

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph85.epil, %.preheader56, %.preheader, %.thread52, %._crit_edge72
  %.5 = phi i64 [ 0, %._crit_edge72 ], [ 0, %.thread52 ], [ 1, %.preheader ], [ 1, %.preheader56 ], [ %.lcssa112.ph, %.loopexit.loopexit.unr-lcssa ], [ %103, %.lr.ph85.epil ]
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.5)
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nofree 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 #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 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 #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 = !{!"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}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}


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