; LLVM IR from DionysiosB/CodeForces :: 1950D-ProductOfBinaryDecimals (main)

; 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::_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.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z6bindecl(i64 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::_Bit_reference", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  store i8 0, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 100007, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %19 unwind label %32

19:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %20 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 1)
          to label %21 unwind label %36

21:                                               ; preds = %19
  %22 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %23 = extractvalue { ptr, i64 } %20, 0
  store ptr %23, ptr %22, align 8
  %24 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %25 = extractvalue { ptr, i64 } %20, 1
  store i64 %25, ptr %24, align 8
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 1, ptr %8, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %51, %21
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  %30 = icmp ult i64 %28, %29
  br i1 %30, label %40, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %58

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

36:                                               ; preds = %19
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %5, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %169

40:                                               ; preds = %27
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = call noundef zeroext i1 @_Z6bindecl(i64 noundef %41)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %43 = load i64, ptr %8, align 8, !tbaa !9
  %44 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %43)
          to label %45 unwind label %54

45:                                               ; preds = %40
  %46 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %47 = extractvalue { ptr, i64 } %44, 0
  store ptr %47, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %49 = extractvalue { ptr, i64 } %44, 1
  store i64 %49, ptr %48, align 8
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext %42) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %51

51:                                               ; preds = %45
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = add nsw i64 %52, 1
  store i64 %53, ptr %8, align 8, !tbaa !9
  br label %27, !llvm.loop !11

54:                                               ; preds = %40
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %5, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %169

58:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 1, ptr %10, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %127, %58
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %64, label %63

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

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %65 = load i64, ptr %10, align 8, !tbaa !9
  %66 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %65)
          to label %67 unwind label %75

67:                                               ; preds = %64
  %68 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %69 = extractvalue { ptr, i64 } %66, 0
  store ptr %69, ptr %68, align 8
  %70 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %71 = extractvalue { ptr, i64 } %66, 1
  store i64 %71, ptr %70, align 8
  %72 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  %73 = xor i1 %72, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br i1 %73, label %74, label %79

74:                                               ; preds = %67
  br label %127

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

79:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 1, ptr %13, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %122, %79
  %81 = load i64, ptr %13, align 8, !tbaa !9
  %82 = load i64, ptr %10, align 8, !tbaa !9
  %83 = icmp sle i64 %81, %82
  br i1 %83, label %84, label %90

84:                                               ; preds = %80
  %85 = load i64, ptr %13, align 8, !tbaa !9
  %86 = load i64, ptr %10, align 8, !tbaa !9
  %87 = mul nsw i64 %85, %86
  %88 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  %89 = icmp ult i64 %87, %88
  br label %90

90:                                               ; preds = %84, %80
  %91 = phi i1 [ false, %80 ], [ %89, %84 ]
  br i1 %91, label %93, label %92

92:                                               ; preds = %90
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %126

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %94 = load i64, ptr %13, align 8, !tbaa !9
  %95 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %94)
          to label %96 unwind label %113

96:                                               ; preds = %93
  %97 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %98 = extractvalue { ptr, i64 } %95, 0
  store ptr %98, ptr %97, align 8
  %99 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %100 = extractvalue { ptr, i64 } %95, 1
  store i64 %100, ptr %99, align 8
  %101 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br i1 %101, label %102, label %121

102:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %103 = load i64, ptr %10, align 8, !tbaa !9
  %104 = load i64, ptr %13, align 8, !tbaa !9
  %105 = mul nsw i64 %103, %104
  %106 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %105)
          to label %107 unwind label %117

107:                                              ; preds = %102
  %108 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %109 = extractvalue { ptr, i64 } %106, 0
  store ptr %109, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %111 = extractvalue { ptr, i64 } %106, 1
  store i64 %111, ptr %110, align 8
  %112 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %121

113:                                              ; preds = %93
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %5, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %125

117:                                              ; preds = %102
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %5, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %125

121:                                              ; preds = %107, %96
  br label %122

122:                                              ; preds = %121
  %123 = load i64, ptr %13, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %13, align 8, !tbaa !9
  br label %80, !llvm.loop !13

125:                                              ; preds = %117, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %130

126:                                              ; preds = %92
  br label %127

127:                                              ; preds = %126, %74
  %128 = load i64, ptr %10, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %10, align 8, !tbaa !9
  br label %59, !llvm.loop !14

130:                                              ; preds = %125, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %169

131:                                              ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %132 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %16)
          to label %133 unwind label %153

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %152, %133
  %135 = load i64, ptr %16, align 8, !tbaa !9
  %136 = add nsw i64 %135, -1
  store i64 %136, ptr %16, align 8, !tbaa !9
  %137 = icmp ne i64 %135, 0
  br i1 %137, label %138, label %166

138:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %139 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %17)
          to label %140 unwind label %157

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

143:                                              ; preds = %140
  %144 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %145 = extractvalue { ptr, i64 } %142, 0
  store ptr %145, ptr %144, align 8
  %146 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %147 = extractvalue { ptr, i64 } %142, 1
  store i64 %147, ptr %146, align 8
  %148 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  %149 = zext i1 %148 to i64
  %150 = select i1 %148, ptr @.str.1, ptr @.str.2
  %151 = invoke i32 @puts(ptr noundef %150)
          to label %152 unwind label %161

152:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %134, !llvm.loop !15

153:                                              ; preds = %131
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %5, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %6, align 4
  br label %168

157:                                              ; preds = %138
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %5, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %6, align 4
  br label %165

161:                                              ; preds = %143, %140
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %5, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %165

165:                                              ; preds = %161, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %168

166:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #5
  %167 = load i32, ptr %1, align 4
  ret i32 %167

168:                                              ; preds = %165, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %169

169:                                              ; preds = %168, %130, %54, %36
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  br label %170

170:                                              ; preds = %169, %32
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #5
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %5, align 8
  %173 = load i32, ptr %6, align 4
  %174 = insertvalue { ptr, i32 } poison, ptr %172, 0
  %175 = insertvalue { ptr, i32 } %174, i32 %173, 1
  resume { ptr, i32 } %175
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 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) #0 align 2

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

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

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

declare i32 @puts(ptr noundef) #4

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_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.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z6bindecl(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i8, align 1
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"struct.std::_Bit_reference", align 8
  %5 = alloca %"struct.std::_Bit_reference", align 8
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  store i8 0, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 100007, ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %12 unwind label %27

12:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %13 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 1)
          to label %14 unwind label %29

14:                                               ; preds = %12
  %15 = extractvalue { ptr, i64 } %13, 0
  store ptr %15, ptr %4, align 8
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  %17 = extractvalue { ptr, i64 } %13, 1
  store i64 %17, ptr %16, align 8
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  %19 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  %20 = icmp ugt i64 %19, 1
  br i1 %20, label %.lr.ph, label %.preheader31

.lr.ph:                                           ; preds = %14
  %21 = getelementptr inbounds i8, ptr %5, i64 8
  br label %31

.preheader31:                                     ; preds = %34, %14
  %22 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  %23 = icmp ugt i64 %22, 1
  br i1 %23, label %.lr.ph36, label %._crit_edge

.lr.ph36:                                         ; preds = %.preheader31
  %24 = getelementptr inbounds i8, ptr %6, i64 8
  %25 = getelementptr inbounds i8, ptr %7, i64 8
  %26 = getelementptr inbounds i8, ptr %8, i64 8
  br label %47

27:                                               ; preds = %0
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  br label %94

29:                                               ; preds = %12
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %93

31:                                               ; preds = %.lr.ph, %34
  %.01832 = phi i64 [ 1, %.lr.ph ], [ %38, %34 ]
  %32 = call noundef zeroext i1 @_Z6bindecl(i64 noundef %.01832)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %33 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %.01832)
          to label %34 unwind label %41

34:                                               ; preds = %31
  %35 = extractvalue { ptr, i64 } %33, 0
  store ptr %35, ptr %5, align 8
  %36 = extractvalue { ptr, i64 } %33, 1
  store i64 %36, ptr %21, align 8
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext %32) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %38 = add nuw nsw i64 %.01832, 1
  %39 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  %40 = icmp ult i64 %38, %39
  br i1 %40, label %31, label %.preheader31, !llvm.loop !9

41:                                               ; preds = %31
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %93

._crit_edge:                                      ; preds = %.critedge, %.preheader31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %9)
  %44 = load i64, ptr %9, align 8, !tbaa !11
  %45 = add nsw i64 %44, -1
  store i64 %45, ptr %9, align 8, !tbaa !11
  %.not37 = icmp eq i64 %44, 0
  br i1 %.not37, label %._crit_edge40, label %.lr.ph39

.lr.ph39:                                         ; preds = %._crit_edge
  %46 = getelementptr inbounds i8, ptr %11, i64 8
  br label %79

47:                                               ; preds = %.lr.ph36, %.critedge
  %indvars.iv = phi i64 [ 2, %.lr.ph36 ], [ %indvars.iv.next, %.critedge ]
  %.01734 = phi i64 [ 1, %.lr.ph36 ], [ %76, %.critedge ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %48 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %.01734)
          to label %49 unwind label %53

49:                                               ; preds = %47
  %50 = extractvalue { ptr, i64 } %48, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i64 } %48, 1
  store i64 %51, ptr %24, align 8
  %52 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br i1 %52, label %.preheader, label %.critedge

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

.preheader:                                       ; preds = %49, %74
  %.033 = phi i64 [ %75, %74 ], [ 1, %49 ]
  %55 = mul nuw nsw i64 %.033, %.01734
  %56 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %58, label %.critedge

58:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %59 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %.033)
          to label %60 unwind label %70

60:                                               ; preds = %58
  %61 = extractvalue { ptr, i64 } %59, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i64 } %59, 1
  store i64 %62, ptr %25, align 8
  %63 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br i1 %63, label %64, label %74

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %65 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %55)
          to label %66 unwind label %72

66:                                               ; preds = %64
  %67 = extractvalue { ptr, i64 } %65, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i64 } %65, 1
  store i64 %68, ptr %26, align 8
  %69 = 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
  br label %74

70:                                               ; preds = %58
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %93

72:                                               ; preds = %64
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %93

74:                                               ; preds = %60, %66
  %75 = add nuw i64 %.033, 1
  %exitcond.not = icmp eq i64 %75, %indvars.iv
  br i1 %exitcond.not, label %.critedge, label %.preheader, !llvm.loop !13

.critedge:                                        ; preds = %.preheader, %74, %49
  %76 = add nuw nsw i64 %.01734, 1
  %77 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  %78 = icmp ult i64 %76, %77
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  br i1 %78, label %47, label %._crit_edge, !llvm.loop !14

79:                                               ; preds = %.lr.ph39, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %80 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %81 = load i64, ptr %10, align 8, !tbaa !11
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %81)
          to label %83 unwind label %91

83:                                               ; preds = %79
  %84 = extractvalue { ptr, i64 } %82, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i64 } %82, 1
  store i64 %85, ptr %46, align 8
  %86 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  %87 = select i1 %86, ptr @.str.1, ptr @.str.2
  %88 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %87)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %89 = load i64, ptr %9, align 8, !tbaa !11
  %90 = add nsw i64 %89, -1
  store i64 %90, ptr %9, align 8, !tbaa !11
  %.not = icmp eq i64 %89, 0
  br i1 %.not, label %._crit_edge40, label %79, !llvm.loop !15

91:                                               ; preds = %79
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %93

._crit_edge40:                                    ; preds = %83, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  ret i32 0

93:                                               ; preds = %53, %72, %70, %91, %41, %29
  %.pn28 = phi { ptr, i32 } [ %42, %41 ], [ %92, %91 ], [ %30, %29 ], [ %54, %53 ], [ %73, %72 ], [ %71, %70 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  br label %94

94:                                               ; preds = %93, %27
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %93 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn28.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 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 #0 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = !{!"bool", !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 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass