; LLVM IR from DionysiosB/CodeForces :: 1927C-ChooseTheDifferentOnes (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 [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::allocator.0", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca i8, align 1
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::_Bit_reference", align 8
  %26 = alloca %"struct.std::_Bit_reference", align 8
  %27 = alloca %"struct.std::_Bit_reference", align 8
  %28 = alloca %"struct.std::_Bit_reference", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %30

30:                                               ; preds = %225, %0
  %31 = load i64, ptr %2, align 8, !tbaa !5
  %32 = add nsw i64 %31, -1
  store i64 %32, ptr %2, align 8, !tbaa !5
  %33 = icmp ne i64 %31, 0
  br i1 %33, label %34, label %234

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #5
  %36 = load i64, ptr %5, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  store i8 0, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %38 unwind label %47

38:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #5
  %39 = load i64, ptr %5, align 8, !tbaa !5
  %40 = add nsw i64 %39, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %41 unwind label %51

41:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %79, %41
  %43 = load i64, ptr %14, align 8, !tbaa !5
  %44 = load i64, ptr %3, align 8, !tbaa !5
  %45 = icmp slt i64 %43, %44
  br i1 %45, label %55, label %46

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

47:                                               ; preds = %34
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  br label %233

51:                                               ; preds = %38
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %232

55:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %56 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %15)
          to label %57 unwind label %70

57:                                               ; preds = %55
  %58 = load i64, ptr %15, align 8, !tbaa !5
  %59 = load i64, ptr %5, align 8, !tbaa !5
  %60 = icmp sle i64 %58, %59
  br i1 %60, label %61, label %78

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %62 = load i64, ptr %15, align 8, !tbaa !5
  %63 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %62)
          to label %64 unwind label %74

64:                                               ; preds = %61
  %65 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %66 = extractvalue { ptr, i64 } %63, 0
  store ptr %66, ptr %65, align 8
  %67 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %68 = extractvalue { ptr, i64 } %63, 1
  store i64 %68, ptr %67, align 8
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %16, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %78

70:                                               ; preds = %55
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  br label %82

74:                                               ; preds = %61
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %82

78:                                               ; preds = %64, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %14, align 8, !tbaa !5
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %14, align 8, !tbaa !5
  br label %42, !llvm.loop !11

82:                                               ; preds = %74, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %231

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

84:                                               ; preds = %113, %83
  %85 = load i64, ptr %17, align 8, !tbaa !5
  %86 = load i64, ptr %4, align 8, !tbaa !5
  %87 = icmp slt i64 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %117

89:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %90 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %18)
          to label %91 unwind label %104

91:                                               ; preds = %89
  %92 = load i64, ptr %18, align 8, !tbaa !5
  %93 = load i64, ptr %5, align 8, !tbaa !5
  %94 = icmp sle i64 %92, %93
  br i1 %94, label %95, label %112

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %96 = load i64, ptr %18, align 8, !tbaa !5
  %97 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %96)
          to label %98 unwind label %108

98:                                               ; preds = %95
  %99 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %100 = extractvalue { ptr, i64 } %97, 0
  store ptr %100, ptr %99, align 8
  %101 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %102 = extractvalue { ptr, i64 } %97, 1
  store i64 %102, ptr %101, align 8
  %103 = 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
  br label %112

104:                                              ; preds = %89
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  br label %116

108:                                              ; preds = %95
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %116

112:                                              ; preds = %98, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %113

113:                                              ; preds = %112
  %114 = load i64, ptr %17, align 8, !tbaa !5
  %115 = add nsw i64 %114, 1
  store i64 %115, ptr %17, align 8, !tbaa !5
  br label %84, !llvm.loop !13

116:                                              ; preds = %108, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %231

117:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  store i8 1, ptr %20, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 0, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store i64 1, ptr %24, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %196, %117
  %119 = load i8, ptr %20, align 1, !tbaa !9, !range !14, !noundef !15
  %120 = trunc i8 %119 to i1
  br i1 %120, label %121, label %125

121:                                              ; preds = %118
  %122 = load i64, ptr %24, align 8, !tbaa !5
  %123 = load i64, ptr %5, align 8, !tbaa !5
  %124 = icmp sle i64 %122, %123
  br label %125

125:                                              ; preds = %121, %118
  %126 = phi i1 [ false, %118 ], [ %124, %121 ]
  br i1 %126, label %128, label %127

127:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %200

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %129 = load i64, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %130 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %129)
          to label %131 unwind label %151

131:                                              ; preds = %128
  %132 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %133 = extractvalue { ptr, i64 } %130, 0
  store ptr %133, ptr %132, align 8
  %134 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %135 = extractvalue { ptr, i64 } %130, 1
  store i64 %135, ptr %134, align 8
  %136 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  br i1 %136, label %137, label %146

137:                                              ; preds = %131
  %138 = load i64, ptr %24, align 8, !tbaa !5
  %139 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %138)
          to label %140 unwind label %155

140:                                              ; preds = %137
  %141 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %142 = extractvalue { ptr, i64 } %139, 0
  store ptr %142, ptr %141, align 8
  %143 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %144 = extractvalue { ptr, i64 } %139, 1
  store i64 %144, ptr %143, align 8
  %145 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #5
  br label %146

146:                                              ; preds = %140, %131
  %147 = phi i1 [ false, %131 ], [ %145, %140 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br i1 %147, label %148, label %160

148:                                              ; preds = %146
  %149 = load i64, ptr %23, align 8, !tbaa !5
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %23, align 8, !tbaa !5
  br label %195

151:                                              ; preds = %128
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %9, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %10, align 4
  br label %159

155:                                              ; preds = %137
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %9, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %159

159:                                              ; preds = %155, %151
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %199

160:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  %161 = load i64, ptr %24, align 8, !tbaa !5
  %162 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %161)
          to label %163 unwind label %172

163:                                              ; preds = %160
  %164 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %165 = extractvalue { ptr, i64 } %162, 0
  store ptr %165, ptr %164, align 8
  %166 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %167 = extractvalue { ptr, i64 } %162, 1
  store i64 %167, ptr %166, align 8
  %168 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  br i1 %168, label %169, label %176

169:                                              ; preds = %163
  %170 = load i64, ptr %21, align 8, !tbaa !5
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %21, align 8, !tbaa !5
  br label %194

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

176:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %177 = load i64, ptr %24, align 8, !tbaa !5
  %178 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %177)
          to label %179 unwind label %188

179:                                              ; preds = %176
  %180 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 0
  %181 = extractvalue { ptr, i64 } %178, 0
  store ptr %181, ptr %180, align 8
  %182 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 1
  %183 = extractvalue { ptr, i64 } %178, 1
  store i64 %183, ptr %182, align 8
  %184 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  br i1 %184, label %185, label %192

185:                                              ; preds = %179
  %186 = load i64, ptr %22, align 8, !tbaa !5
  %187 = add nsw i64 %186, 1
  store i64 %187, ptr %22, align 8, !tbaa !5
  br label %193

188:                                              ; preds = %176
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %9, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  br label %199

192:                                              ; preds = %179
  store i8 0, ptr %20, align 1, !tbaa !9
  br label %193

193:                                              ; preds = %192, %185
  br label %194

194:                                              ; preds = %193, %169
  br label %195

195:                                              ; preds = %194, %148
  br label %196

196:                                              ; preds = %195
  %197 = load i64, ptr %24, align 8, !tbaa !5
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %24, align 8, !tbaa !5
  br label %118, !llvm.loop !16

199:                                              ; preds = %188, %172, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %230

200:                                              ; preds = %127
  %201 = load i8, ptr %20, align 1, !tbaa !9, !range !14, !noundef !15
  %202 = trunc i8 %201 to i1
  br i1 %202, label %203, label %217

203:                                              ; preds = %200
  %204 = load i64, ptr %21, align 8, !tbaa !5
  %205 = load i64, ptr %23, align 8, !tbaa !5
  %206 = add nsw i64 %204, %205
  %207 = load i64, ptr %5, align 8, !tbaa !5
  %208 = sdiv i64 %207, 2
  %209 = icmp sge i64 %206, %208
  br i1 %209, label %210, label %217

210:                                              ; preds = %203
  %211 = load i64, ptr %22, align 8, !tbaa !5
  %212 = load i64, ptr %23, align 8, !tbaa !5
  %213 = add nsw i64 %211, %212
  %214 = load i64, ptr %5, align 8, !tbaa !5
  %215 = sdiv i64 %214, 2
  %216 = icmp sge i64 %213, %215
  br label %217

217:                                              ; preds = %210, %203, %200
  %218 = phi i1 [ false, %203 ], [ false, %200 ], [ %216, %210 ]
  %219 = zext i1 %218 to i8
  store i8 %219, ptr %20, align 1, !tbaa !9
  %220 = load i8, ptr %20, align 1, !tbaa !9, !range !14, !noundef !15
  %221 = trunc i8 %220 to i1
  %222 = zext i1 %221 to i64
  %223 = select i1 %221, ptr @.str.2, ptr @.str.3
  %224 = invoke i32 @puts(ptr noundef %223)
          to label %225 unwind label %226

225:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %30, !llvm.loop !17

226:                                              ; preds = %217
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %9, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %10, align 4
  br label %230

230:                                              ; preds = %226, %199
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  br label %231

231:                                              ; preds = %230, %116, %82
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  br label %232

232:                                              ; preds = %231, %51
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  br label %233

233:                                              ; preds = %232, %47
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %236

234:                                              ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %235 = load i32, ptr %1, align 4
  ret i32 %235

236:                                              ; preds = %233
  %237 = load ptr, ptr %9, align 8
  %238 = load i32, ptr %10, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240
}

; 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 @_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

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 #3 align 2

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

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

declare i32 @puts(ptr noundef) #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

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", !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 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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 [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca i64, align 8
  %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 %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = add nsw i64 %20, -1
  store i64 %21, ptr %1, align 8, !tbaa !5
  %.not87 = icmp eq i64 %20, 0
  br i1 %.not87, label %._crit_edge90, label %.lr.ph89

.lr.ph89:                                         ; preds = %0
  %22 = getelementptr inbounds i8, ptr %12, i64 8
  %23 = getelementptr inbounds i8, ptr %14, i64 8
  %24 = getelementptr inbounds i8, ptr %15, i64 8
  %25 = getelementptr inbounds i8, ptr %16, i64 8
  %26 = getelementptr inbounds i8, ptr %17, i64 8
  %27 = getelementptr inbounds i8, ptr %18, i64 8
  br label %28

28:                                               ; preds = %.lr.ph89, %.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = add nsw i64 %30, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %32 unwind label %40

32:                                               ; preds = %28
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #5
  %33 = load i64, ptr %4, align 8, !tbaa !5
  %34 = add nsw i64 %33, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  store i8 0, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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 %34, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %35 unwind label %42

35:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %37 = icmp sgt i64 %36, 0
  br i1 %37, label %.lr.ph, label %.preheader52

.preheader52:                                     ; preds = %55, %35
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = icmp sgt i64 %38, 0
  br i1 %39, label %.lr.ph75, label %.preheader

40:                                               ; preds = %28
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %129

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %128

.lr.ph:                                           ; preds = %35, %55
  %.03073 = phi i64 [ %56, %55 ], [ 0, %35 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %44 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11)
  %45 = load i64, ptr %11, align 8, !tbaa !5
  %46 = load i64, ptr %4, align 8, !tbaa !5
  %.not44 = icmp sgt i64 %45, %46
  br i1 %.not44, label %55, label %47

47:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %48 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %45)
          to label %49 unwind label %53

49:                                               ; preds = %47
  %50 = extractvalue { ptr, i64 } %48, 0
  store ptr %50, ptr %12, align 8
  %51 = extractvalue { ptr, i64 } %48, 1
  store i64 %51, ptr %22, align 8
  %52 = 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 %55

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

55:                                               ; preds = %49, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  %56 = add nuw nsw i64 %.03073, 1
  %57 = load i64, ptr %2, align 8, !tbaa !5
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %.lr.ph, label %.preheader52, !llvm.loop !11

.preheader:                                       ; preds = %72, %.preheader52
  %59 = load i64, ptr %4, align 8
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %.lr.ph82, label %._crit_edge.thread

.lr.ph75:                                         ; preds = %.preheader52, %72
  %.02974 = phi i64 [ %73, %72 ], [ 0, %.preheader52 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %13)
  %62 = load i64, ptr %13, align 8, !tbaa !5
  %63 = load i64, ptr %4, align 8, !tbaa !5
  %.not43 = icmp sgt i64 %62, %63
  br i1 %.not43, label %72, label %64

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

66:                                               ; preds = %64
  %67 = extractvalue { ptr, i64 } %65, 0
  store ptr %67, ptr %14, align 8
  %68 = extractvalue { ptr, i64 } %65, 1
  store i64 %68, ptr %23, align 8
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %72

70:                                               ; preds = %64
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %127

72:                                               ; preds = %66, %.lr.ph75
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  %73 = add nuw nsw i64 %.02974, 1
  %74 = load i64, ptr %3, align 8, !tbaa !5
  %75 = icmp slt i64 %73, %74
  br i1 %75, label %.lr.ph75, label %.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %113
  br i1 %.128, label %._crit_edge.thread, label %.thread

.lr.ph82:                                         ; preds = %.preheader, %113
  %.080 = phi i64 [ %114, %113 ], [ 1, %.preheader ]
  %.02279 = phi i64 [ %.1, %113 ], [ 0, %.preheader ]
  %.02378 = phi i64 [ %.124, %113 ], [ 0, %.preheader ]
  %.02577 = phi i64 [ %.126, %113 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  %76 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %.080)
          to label %77 unwind label %89

77:                                               ; preds = %.lr.ph82
  %78 = extractvalue { ptr, i64 } %76, 0
  store ptr %78, ptr %15, align 8
  %79 = extractvalue { ptr, i64 } %76, 1
  store i64 %79, ptr %24, align 8
  %80 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  br i1 %80, label %81, label %.critedge

81:                                               ; preds = %77
  %82 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %.080)
          to label %83 unwind label %91

83:                                               ; preds = %81
  %84 = extractvalue { ptr, i64 } %82, 0
  store ptr %84, ptr %16, align 8
  %85 = extractvalue { ptr, i64 } %82, 1
  store i64 %85, ptr %25, align 8
  %86 = 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 nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br i1 %86, label %87, label %94

87:                                               ; preds = %83
  %88 = add nsw i64 %.02279, 1
  br label %113

89:                                               ; preds = %.lr.ph82
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

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

93:                                               ; preds = %91, %89
  %.pn = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %127

.critedge:                                        ; preds = %77
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %94

94:                                               ; preds = %.critedge, %83
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %95 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %.080)
          to label %96 unwind label %102

96:                                               ; preds = %94
  %97 = extractvalue { ptr, i64 } %95, 0
  store ptr %97, ptr %17, align 8
  %98 = extractvalue { ptr, i64 } %95, 1
  store i64 %98, ptr %26, align 8
  %99 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br i1 %99, label %100, label %104

100:                                              ; preds = %96
  %101 = add nsw i64 %.02577, 1
  br label %113

102:                                              ; preds = %94
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br label %127

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

106:                                              ; preds = %104
  %107 = extractvalue { ptr, i64 } %105, 0
  store ptr %107, ptr %18, align 8
  %108 = extractvalue { ptr, i64 } %105, 1
  store i64 %108, ptr %27, align 8
  %109 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  %110 = zext i1 %109 to i64
  %spec.select49 = add nsw i64 %.02378, %110
  br label %113

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

113:                                              ; preds = %106, %87, %100
  %.128 = phi i1 [ true, %87 ], [ true, %100 ], [ %109, %106 ]
  %.126 = phi i64 [ %.02577, %87 ], [ %101, %100 ], [ %.02577, %106 ]
  %.124 = phi i64 [ %.02378, %87 ], [ %.02378, %100 ], [ %spec.select49, %106 ]
  %.1 = phi i64 [ %88, %87 ], [ %.02279, %100 ], [ %.02279, %106 ]
  %114 = add nuw nsw i64 %.080, 1
  %115 = load i64, ptr %4, align 8
  %116 = icmp slt i64 %.080, %115
  %117 = select i1 %.128, i1 %116, i1 false
  br i1 %117, label %.lr.ph82, label %._crit_edge, !llvm.loop !14

._crit_edge.thread:                               ; preds = %.preheader, %._crit_edge
  %.lcssa100 = phi i64 [ %115, %._crit_edge ], [ %59, %.preheader ]
  %.022.lcssa99 = phi i64 [ %.1, %._crit_edge ], [ 0, %.preheader ]
  %.023.lcssa98 = phi i64 [ %.124, %._crit_edge ], [ 0, %.preheader ]
  %.025.lcssa97 = phi i64 [ %.126, %._crit_edge ], [ 0, %.preheader ]
  %118 = add nsw i64 %.022.lcssa99, %.025.lcssa97
  %119 = sdiv i64 %.lcssa100, 2
  %.not39 = icmp slt i64 %118, %119
  br i1 %.not39, label %.thread, label %120

120:                                              ; preds = %._crit_edge.thread
  %121 = add nsw i64 %.022.lcssa99, %.023.lcssa98
  %122 = icmp sge i64 %121, %119
  %cond.fr = freeze i1 %122
  %spec.select51 = select i1 %cond.fr, ptr @.str.2, ptr @.str.3
  br label %.thread

.thread:                                          ; preds = %120, %._crit_edge, %._crit_edge.thread
  %123 = phi ptr [ @.str.3, %._crit_edge.thread ], [ @.str.3, %._crit_edge ], [ %spec.select51, %120 ]
  %124 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %123)
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %125 = load i64, ptr %1, align 8, !tbaa !5
  %126 = add nsw i64 %125, -1
  store i64 %126, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %125, 0
  br i1 %.not, label %._crit_edge90, label %28, !llvm.loop !15

127:                                              ; preds = %93, %102, %111, %70, %53
  %.pn45 = phi { ptr, i32 } [ %54, %53 ], [ %71, %70 ], [ %112, %111 ], [ %103, %102 ], [ %.pn, %93 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  br label %128

128:                                              ; preds = %127, %42
  %.pn45.pn = phi { ptr, i32 } [ %.pn45, %127 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  br label %129

129:                                              ; preds = %128, %40
  %.pn45.pn.pn = phi { ptr, i32 } [ %.pn45.pn, %128 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn45.pn.pn

._crit_edge90:                                    ; preds = %.thread, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_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

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 #3 align 2

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

; Function Attrs: mustprogress 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 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 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: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #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

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", !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 = distinct !{!15, !12}


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