; LLVM IR from DionysiosB/CodeForces :: 0900-0999 (977D-DivideByThreeMultiplyByTwo)

; 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 }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.4" = type { i8 }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = 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 %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::allocator.4", align 1
  %11 = alloca %"class.std::deque", align 8
  %12 = alloca %"struct.std::_Bit_reference", align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %23, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %24 unwind label %30

24:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %39, %24
  %26 = load i64, ptr %7, align 8, !tbaa !5
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %34, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %46

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %5, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  br label %239

34:                                               ; preds = %25
  %35 = load i64, ptr %7, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %35) #5
  %37 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
          to label %38 unwind label %42

38:                                               ; preds = %34
  br label %39

39:                                               ; preds = %38
  %40 = load i64, ptr %7, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %7, align 8, !tbaa !5
  br label %25, !llvm.loop !9

42:                                               ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %5, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %238

46:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #5
  %47 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  store i8 0, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %47, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %48 unwind label %64

48:                                               ; preds = %46
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #5
  invoke void @_ZNSt5dequeIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %49 unwind label %68

49:                                               ; preds = %48
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %51 unwind label %72

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %52 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEE4backEv(ptr noundef nonnull align 8 dereferenceable(40) %8)
          to label %53 unwind label %76

53:                                               ; preds = %51
  %54 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %55 = extractvalue { ptr, i64 } %52, 0
  store ptr %55, ptr %54, align 8
  %56 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %57 = extractvalue { ptr, i64 } %52, 1
  store i64 %57, ptr %56, align 8
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 1, ptr %13, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %211, %53
  %60 = load i64, ptr %13, align 8, !tbaa !5
  %61 = load i64, ptr %2, align 8, !tbaa !5
  %62 = icmp slt i64 %60, %61
  br i1 %62, label %80, label %63

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

64:                                               ; preds = %46
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %5, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  br label %237

68:                                               ; preds = %48
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %5, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %6, align 4
  br label %236

72:                                               ; preds = %49
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %5, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %6, align 4
  br label %235

76:                                               ; preds = %51
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %5, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %235

80:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %205, %80
  %82 = load i64, ptr %15, align 8, !tbaa !5
  %83 = load i64, ptr %2, align 8, !tbaa !5
  %84 = icmp slt i64 %82, %83
  br i1 %84, label %86, label %85

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

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %87 = load i64, ptr %15, align 8, !tbaa !5
  %88 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %87)
          to label %89 unwind label %96

89:                                               ; preds = %86
  %90 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %91 = extractvalue { ptr, i64 } %88, 0
  store ptr %91, ptr %90, align 8
  %92 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %93 = extractvalue { ptr, i64 } %88, 1
  store i64 %93, ptr %92, align 8
  %94 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br i1 %94, label %95, label %100

95:                                               ; preds = %89
  br label %205

96:                                               ; preds = %86
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %5, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %209

100:                                              ; preds = %89
  %101 = load i64, ptr %15, align 8, !tbaa !5
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %101) #5
  %103 = load i64, ptr %102, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = mul nsw i64 2, %105
  %107 = icmp eq i64 %103, %106
  br i1 %107, label %108, label %128

108:                                              ; preds = %100
  %109 = load i64, ptr %15, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %109) #5
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %110)
          to label %111 unwind label %120

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %112 = load i64, ptr %15, align 8, !tbaa !5
  %113 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %112)
          to label %114 unwind label %124

114:                                              ; preds = %111
  %115 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %116 = extractvalue { ptr, i64 } %113, 0
  store ptr %116, ptr %115, align 8
  %117 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %118 = extractvalue { ptr, i64 } %113, 1
  store i64 %118, ptr %117, align 8
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  store i32 8, ptr %14, align 4
  br label %208

120:                                              ; preds = %184, %160, %136, %108
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %5, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %6, align 4
  br label %209

124:                                              ; preds = %111
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %5, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %209

128:                                              ; preds = %100
  %129 = load i64, ptr %15, align 8, !tbaa !5
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %129) #5
  %131 = load i64, ptr %130, align 8, !tbaa !5
  %132 = mul nsw i64 2, %131
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %135 = icmp eq i64 %132, %134
  br i1 %135, label %136, label %152

136:                                              ; preds = %128
  %137 = load i64, ptr %15, align 8, !tbaa !5
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %137) #5
  invoke void @_ZNSt5dequeIxSaIxEE10push_frontERKx(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %138)
          to label %139 unwind label %120

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %140 = load i64, ptr %15, align 8, !tbaa !5
  %141 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %140)
          to label %142 unwind label %148

142:                                              ; preds = %139
  %143 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %144 = extractvalue { ptr, i64 } %141, 0
  store ptr %144, ptr %143, align 8
  %145 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %146 = extractvalue { ptr, i64 } %141, 1
  store i64 %146, ptr %145, align 8
  %147 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  store i32 8, ptr %14, align 4
  br label %208

148:                                              ; preds = %139
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %5, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %209

152:                                              ; preds = %128
  %153 = load i64, ptr %15, align 8, !tbaa !5
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %153) #5
  %155 = load i64, ptr %154, align 8, !tbaa !5
  %156 = mul nsw i64 3, %155
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  %158 = load i64, ptr %157, align 8, !tbaa !5
  %159 = icmp eq i64 %156, %158
  br i1 %159, label %160, label %176

160:                                              ; preds = %152
  %161 = load i64, ptr %15, align 8, !tbaa !5
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %161) #5
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %162)
          to label %163 unwind label %120

163:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %164 = load i64, ptr %15, align 8, !tbaa !5
  %165 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %164)
          to label %166 unwind label %172

166:                                              ; preds = %163
  %167 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %168 = extractvalue { ptr, i64 } %165, 0
  store ptr %168, ptr %167, align 8
  %169 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %170 = extractvalue { ptr, i64 } %165, 1
  store i64 %170, ptr %169, align 8
  %171 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  store i32 8, ptr %14, align 4
  br label %208

172:                                              ; preds = %163
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %5, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %209

176:                                              ; preds = %152
  %177 = load i64, ptr %15, align 8, !tbaa !5
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %177) #5
  %179 = load i64, ptr %178, align 8, !tbaa !5
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  %181 = load i64, ptr %180, align 8, !tbaa !5
  %182 = mul nsw i64 3, %181
  %183 = icmp eq i64 %179, %182
  br i1 %183, label %184, label %200

184:                                              ; preds = %176
  %185 = load i64, ptr %15, align 8, !tbaa !5
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %185) #5
  invoke void @_ZNSt5dequeIxSaIxEE10push_frontERKx(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %186)
          to label %187 unwind label %120

187:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %188 = load i64, ptr %15, align 8, !tbaa !5
  %189 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %188)
          to label %190 unwind label %196

190:                                              ; preds = %187
  %191 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %192 = extractvalue { ptr, i64 } %189, 0
  store ptr %192, ptr %191, align 8
  %193 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %194 = extractvalue { ptr, i64 } %189, 1
  store i64 %194, ptr %193, align 8
  %195 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  store i32 8, ptr %14, align 4
  br label %208

196:                                              ; preds = %187
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %5, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %209

200:                                              ; preds = %176
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204, %95
  %206 = load i64, ptr %15, align 8, !tbaa !5
  %207 = add nsw i64 %206, 1
  store i64 %207, ptr %15, align 8, !tbaa !5
  br label %81, !llvm.loop !13

208:                                              ; preds = %190, %166, %142, %114, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %210

209:                                              ; preds = %196, %172, %148, %124, %120, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %235

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210
  %212 = load i64, ptr %13, align 8, !tbaa !5
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %13, align 8, !tbaa !5
  br label %59, !llvm.loop !14

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

215:                                              ; preds = %226, %214
  %216 = load i64, ptr %21, align 8, !tbaa !5
  %217 = load i64, ptr %2, align 8, !tbaa !5
  %218 = icmp slt i64 %216, %217
  br i1 %218, label %220, label %219

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

220:                                              ; preds = %215
  %221 = load i64, ptr %21, align 8, !tbaa !5
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %11, i64 noundef %221) #5
  %223 = load i64, ptr %222, align 8, !tbaa !5
  %224 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %223)
          to label %225 unwind label %229

225:                                              ; preds = %220
  br label %226

226:                                              ; preds = %225
  %227 = load i64, ptr %21, align 8, !tbaa !5
  %228 = add nsw i64 %227, 1
  store i64 %228, ptr %21, align 8, !tbaa !5
  br label %215, !llvm.loop !15

229:                                              ; preds = %220
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %5, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %235

233:                                              ; preds = %219
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %234 = load i32, ptr %1, align 4
  ret i32 %234

235:                                              ; preds = %229, %209, %76, %72
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  br label %236

236:                                              ; preds = %235, %68
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  br label %237

237:                                              ; preds = %236, %64
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  br label %238

238:                                              ; preds = %237, %42
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %239

239:                                              ; preds = %238, %30
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %240

240:                                              ; preds = %239
  %241 = load ptr, ptr %5, align 8
  %242 = load i32, ptr %6, align 4
  %243 = insertvalue { ptr, i32 } poison, ptr %241, 0
  %244 = insertvalue { ptr, i32 } %243, i32 %242, 1
  resume { ptr, i32 } %244
}

; 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 @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEE4backEv(ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #3 align 2

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

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

; 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 void @_ZNSt15__new_allocatorIxED2Ev(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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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<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 }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.4" = type { i8 }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = 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 %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::allocator.4", align 1
  %7 = alloca %"class.std::deque", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca %"struct.std::_Bit_reference", align 8
  %13 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  %15 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %16 unwind label %19

16:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %16
  %.lcssa = phi i64 [ %17, %16 ], [ %24, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.lcssa, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %26 unwind label %47

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %145

.lr.ph:                                           ; preds = %16, %.lr.ph
  %.02745 = phi i64 [ %23, %.lr.ph ], [ 0, %16 ]
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02745) #5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %21)
  %23 = add nuw nsw i64 %.02745, 1
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !11

26:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIbED2Ev(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 1, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #5
  invoke void @_ZNSt5dequeIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %27 unwind label %49

27:                                               ; preds = %26
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %29 unwind label %51

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %30 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEE4backEv(ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %31 unwind label %53

31:                                               ; preds = %29
  %32 = extractvalue { ptr, i64 } %30, 0
  store ptr %32, ptr %8, align 8
  %33 = getelementptr inbounds i8, ptr %8, i64 8
  %34 = extractvalue { ptr, i64 } %30, 1
  store i64 %34, ptr %33, align 8
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  %36 = load i64, ptr %1, align 8, !tbaa !5
  %37 = icmp sgt i64 %36, 1
  br i1 %37, label %.preheader39.preheader, label %.preheader

.preheader39.preheader:                           ; preds = %31
  %38 = getelementptr inbounds i8, ptr %9, i64 8
  %39 = getelementptr inbounds i8, ptr %13, i64 8
  %40 = getelementptr inbounds i8, ptr %12, i64 8
  %41 = getelementptr inbounds i8, ptr %11, i64 8
  %42 = getelementptr inbounds i8, ptr %10, i64 8
  br label %.preheader39

.preheader39:                                     ; preds = %.preheader39.preheader, %.loopexit
  %43 = phi i64 [ %134, %.loopexit ], [ %36, %.preheader39.preheader ]
  %.02648 = phi i64 [ %133, %.loopexit ], [ 1, %.preheader39.preheader ]
  %44 = icmp sgt i64 %43, 0
  br i1 %44, label %.lr.ph47, label %.loopexit

.preheader:                                       ; preds = %.loopexit, %31
  %45 = phi i64 [ %36, %31 ], [ %134, %.loopexit ]
  %46 = icmp sgt i64 %45, 0
  br i1 %46, label %.lr.ph50, label %._crit_edge51

47:                                               ; preds = %._crit_edge
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(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 1, ptr nonnull %5) #5
  br label %144

49:                                               ; preds = %26
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %143

51:                                               ; preds = %27
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %142

53:                                               ; preds = %29
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %142

.lr.ph47:                                         ; preds = %.preheader39, %129
  %.02546 = phi i64 [ %130, %129 ], [ 0, %.preheader39 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %55 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.02546)
          to label %56 unwind label %60

56:                                               ; preds = %.lr.ph47
  %57 = extractvalue { ptr, i64 } %55, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i64 } %55, 1
  store i64 %58, ptr %38, align 8
  %59 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br i1 %59, label %129, label %62

60:                                               ; preds = %.lr.ph47
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %142

62:                                               ; preds = %56
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02546) #5
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = shl nsw i64 %66, 1
  %68 = icmp eq i64 %64, %67
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02546) #5
  br i1 %68, label %70, label %81

70:                                               ; preds = %62
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %69)
          to label %71 unwind label %77

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %72 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.02546)
          to label %73 unwind label %79

73:                                               ; preds = %71
  %74 = extractvalue { ptr, i64 } %72, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i64 } %72, 1
  store i64 %75, ptr %42, align 8
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %.loopexit

77:                                               ; preds = %119, %104, %88, %70
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %142

79:                                               ; preds = %71
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %142

81:                                               ; preds = %62
  %82 = load i64, ptr %69, align 8, !tbaa !5
  %83 = shl nsw i64 %82, 1
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  %85 = load i64, ptr %84, align 8, !tbaa !5
  %86 = icmp eq i64 %83, %85
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02546) #5
  br i1 %86, label %88, label %97

88:                                               ; preds = %81
  invoke void @_ZNSt5dequeIxSaIxEE10push_frontERKx(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %87)
          to label %89 unwind label %77

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %90 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.02546)
          to label %91 unwind label %95

91:                                               ; preds = %89
  %92 = extractvalue { ptr, i64 } %90, 0
  store ptr %92, ptr %11, align 8
  %93 = extractvalue { ptr, i64 } %90, 1
  store i64 %93, ptr %41, align 8
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %.loopexit

95:                                               ; preds = %89
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %142

97:                                               ; preds = %81
  %98 = load i64, ptr %87, align 8, !tbaa !5
  %99 = mul nsw i64 %98, 3
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = icmp eq i64 %99, %101
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02546) #5
  br i1 %102, label %104, label %113

104:                                              ; preds = %97
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %103)
          to label %105 unwind label %77

105:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %106 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.02546)
          to label %107 unwind label %111

107:                                              ; preds = %105
  %108 = extractvalue { ptr, i64 } %106, 0
  store ptr %108, ptr %12, align 8
  %109 = extractvalue { ptr, i64 } %106, 1
  store i64 %109, ptr %40, align 8
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %12, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %.loopexit

111:                                              ; preds = %105
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %142

113:                                              ; preds = %97
  %114 = load i64, ptr %103, align 8, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  %116 = load i64, ptr %115, align 8, !tbaa !5
  %117 = mul nsw i64 %116, 3
  %118 = icmp eq i64 %114, %117
  br i1 %118, label %119, label %129

119:                                              ; preds = %113
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02546) #5
  invoke void @_ZNSt5dequeIxSaIxEE10push_frontERKx(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %120)
          to label %121 unwind label %77

121:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %122 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.02546)
          to label %123 unwind label %127

123:                                              ; preds = %121
  %124 = extractvalue { ptr, i64 } %122, 0
  store ptr %124, ptr %13, align 8
  %125 = extractvalue { ptr, i64 } %122, 1
  store i64 %125, ptr %39, align 8
  %126 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %13, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %.loopexit

127:                                              ; preds = %121
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %142

129:                                              ; preds = %113, %56
  %130 = add nuw nsw i64 %.02546, 1
  %131 = load i64, ptr %1, align 8, !tbaa !5
  %132 = icmp slt i64 %130, %131
  br i1 %132, label %.lr.ph47, label %.loopexit, !llvm.loop !13

.loopexit:                                        ; preds = %129, %.preheader39, %123, %107, %91, %73
  %133 = add nuw nsw i64 %.02648, 1
  %134 = load i64, ptr %1, align 8, !tbaa !5
  %135 = icmp slt i64 %133, %134
  br i1 %135, label %.preheader39, label %.preheader, !llvm.loop !14

._crit_edge51:                                    ; preds = %.lr.ph50, %.preheader
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

.lr.ph50:                                         ; preds = %.preheader, %.lr.ph50
  %.049 = phi i64 [ %139, %.lr.ph50 ], [ 0, %.preheader ]
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(80) %7, i64 noundef %.049) #5
  %137 = load i64, ptr %136, align 8, !tbaa !5
  %138 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %137)
  %139 = add nuw nsw i64 %.049, 1
  %140 = load i64, ptr %1, align 8, !tbaa !5
  %141 = icmp slt i64 %139, %140
  br i1 %141, label %.lr.ph50, label %._crit_edge51, !llvm.loop !16

142:                                              ; preds = %60, %77, %79, %95, %111, %127, %53, %51
  %.pn.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ], [ %80, %79 ], [ %78, %77 ], [ %96, %95 ], [ %112, %111 ], [ %128, %127 ], [ %61, %60 ]
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  br label %143

143:                                              ; preds = %142, %49
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %142 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  br label %144

144:                                              ; preds = %143, %47
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %143 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %145

145:                                              ; preds = %144, %19
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %144 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; 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 @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEE4backEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIxSaIxEE10push_frontERKx(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #3 align 2

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

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

; 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 void @_ZNSt15__new_allocatorIxED2Ev(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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !12}


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