; LLVM IR from tangjz/acm-icpc :: codeforces/1427E.ll (Z5solvev)

; 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<Operation, std::allocator<Operation>>::_Vector_impl" }
%"struct.std::_Vector_base<Operation, std::allocator<Operation>>::_Vector_impl" = type { %"struct.std::_Vector_base<Operation, std::allocator<Operation>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Operation, std::allocator<Operation>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { ptr }
%struct.Operation = type { i8, i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5exgcdxxRxS_(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %class.anon, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.Operation, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca %struct.Operation, align 8
  %16 = alloca %struct.Operation, align 8
  %17 = alloca %struct.Operation, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #7
  call void @_ZNSt6vectorI9OperationSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %23 = getelementptr inbounds %class.anon, ptr %3, i32 0, i32 0
  store ptr %2, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 19, ptr %5, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %72, %0
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = icmp sge i32 %25, 0
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 2, ptr %6, align 4
  br label %75

28:                                               ; preds = %24
  %29 = load i64, ptr %1, align 8, !tbaa !11
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = shl i32 1, %30
  %32 = or i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = mul nsw i64 %29, %33
  %35 = load i64, ptr %1, align 8, !tbaa !11
  %36 = load i64, ptr %1, align 8, !tbaa !11
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = shl i64 %36, %38
  %40 = xor i64 %35, %39
  %41 = icmp ne i64 %34, %40
  br i1 %41, label %42, label %71

42:                                               ; preds = %28
  %43 = load i64, ptr %1, align 8, !tbaa !11
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = shl i32 1, %44
  %46 = sext i32 %45 to i64
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %43, i64 noundef %46)
          to label %47 unwind label %63

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  %48 = getelementptr inbounds %struct.Operation, ptr %9, i32 0, i32 0
  store i8 94, ptr %48, align 8, !tbaa !13
  %49 = getelementptr inbounds %struct.Operation, ptr %9, i32 0, i32 1
  %50 = load i64, ptr %1, align 8, !tbaa !11
  store i64 %50, ptr %49, align 8, !tbaa !15
  %51 = getelementptr inbounds %struct.Operation, ptr %9, i32 0, i32 2
  %52 = load i64, ptr %1, align 8, !tbaa !11
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = shl i64 %52, %54
  store i64 %55, ptr %51, align 8, !tbaa !16
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %56 unwind label %67

56:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  %57 = load i64, ptr %1, align 8, !tbaa !11
  %58 = load i64, ptr %1, align 8, !tbaa !11
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = shl i64 %58, %60
  %62 = xor i64 %57, %61
  store i64 %62, ptr %4, align 8, !tbaa !11
  store i32 2, ptr %6, align 4
  br label %75

63:                                               ; preds = %42
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  br label %76

67:                                               ; preds = %47
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  br label %76

71:                                               ; preds = %28
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = add nsw i32 %73, -1
  store i32 %74, ptr %5, align 4, !tbaa !9
  br label %24, !llvm.loop !17

75:                                               ; preds = %56, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %77

76:                                               ; preds = %67, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %212

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %78 = load i64, ptr %1, align 8, !tbaa !11
  %79 = load i64, ptr %4, align 8, !tbaa !11
  %80 = invoke noundef i64 @_Z5exgcdxxRxS_(i64 noundef %78, i64 noundef %79, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %81 unwind label %86

81:                                               ; preds = %77
  store i64 %80, ptr %12, align 8, !tbaa !11
  %82 = load i64, ptr %12, align 8, !tbaa !11
  %83 = icmp eq i64 %82, 1
  br i1 %83, label %84, label %85

84:                                               ; preds = %81
  br label %91

85:                                               ; preds = %81
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 70, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #8
  unreachable

86:                                               ; preds = %106, %105, %100, %96, %95, %91, %77
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  br label %211

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90, %84
  %92 = load i64, ptr %1, align 8, !tbaa !11
  %93 = load i64, ptr %10, align 8, !tbaa !11
  %94 = invoke noundef i64 @_ZSt3absx(i64 noundef %93)
          to label %95 unwind label %86

95:                                               ; preds = %91
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %92, i64 noundef %94)
          to label %96 unwind label %86

96:                                               ; preds = %95
  %97 = load i64, ptr %1, align 8, !tbaa !11
  %98 = load i64, ptr %10, align 8, !tbaa !11
  %99 = invoke noundef i64 @_ZSt3absx(i64 noundef %98)
          to label %100 unwind label %86

100:                                              ; preds = %96
  %101 = mul nsw i64 %97, %99
  store i64 %101, ptr %10, align 8, !tbaa !11
  %102 = load i64, ptr %4, align 8, !tbaa !11
  %103 = load i64, ptr %11, align 8, !tbaa !11
  %104 = invoke noundef i64 @_ZSt3absx(i64 noundef %103)
          to label %105 unwind label %86

105:                                              ; preds = %100
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %102, i64 noundef %104)
          to label %106 unwind label %86

106:                                              ; preds = %105
  %107 = load i64, ptr %4, align 8, !tbaa !11
  %108 = load i64, ptr %11, align 8, !tbaa !11
  %109 = invoke noundef i64 @_ZSt3absx(i64 noundef %108)
          to label %110 unwind label %86

110:                                              ; preds = %106
  %111 = mul nsw i64 %107, %109
  store i64 %111, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !11
  br label %112

112:                                              ; preds = %117, %110
  %113 = load i64, ptr %10, align 8, !tbaa !11
  %114 = load i64, ptr %11, align 8, !tbaa !11
  %115 = xor i64 %113, %114
  %116 = icmp ne i64 %115, 1
  br i1 %116, label %117, label %126

117:                                              ; preds = %112
  %118 = load i64, ptr %13, align 8, !tbaa !11
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %13, align 8, !tbaa !11
  %120 = load i64, ptr %1, align 8, !tbaa !11
  %121 = load i64, ptr %10, align 8, !tbaa !11
  %122 = add nsw i64 %121, %120
  store i64 %122, ptr %10, align 8, !tbaa !11
  %123 = load i64, ptr %1, align 8, !tbaa !11
  %124 = load i64, ptr %11, align 8, !tbaa !11
  %125 = add nsw i64 %124, %123
  store i64 %125, ptr %11, align 8, !tbaa !11
  br label %112, !llvm.loop !19

126:                                              ; preds = %112
  %127 = load i64, ptr %13, align 8, !tbaa !11
  %128 = icmp sgt i64 %127, 0
  br i1 %128, label %129, label %165

129:                                              ; preds = %126
  %130 = load i64, ptr %1, align 8, !tbaa !11
  %131 = load i64, ptr %13, align 8, !tbaa !11
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %130, i64 noundef %131)
          to label %132 unwind label %152

132:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %133 = load i64, ptr %1, align 8, !tbaa !11
  %134 = load i64, ptr %13, align 8, !tbaa !11
  %135 = mul nsw i64 %133, %134
  store i64 %135, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #7
  %136 = getelementptr inbounds %struct.Operation, ptr %15, i32 0, i32 0
  store i8 43, ptr %136, align 8, !tbaa !13
  %137 = getelementptr inbounds %struct.Operation, ptr %15, i32 0, i32 1
  %138 = load i64, ptr %10, align 8, !tbaa !11
  %139 = load i64, ptr %14, align 8, !tbaa !11
  %140 = sub nsw i64 %138, %139
  store i64 %140, ptr %137, align 8, !tbaa !15
  %141 = getelementptr inbounds %struct.Operation, ptr %15, i32 0, i32 2
  %142 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %142, ptr %141, align 8, !tbaa !16
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %143 unwind label %156

143:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #7
  %144 = getelementptr inbounds %struct.Operation, ptr %16, i32 0, i32 0
  store i8 43, ptr %144, align 8, !tbaa !13
  %145 = getelementptr inbounds %struct.Operation, ptr %16, i32 0, i32 1
  %146 = load i64, ptr %11, align 8, !tbaa !11
  %147 = load i64, ptr %14, align 8, !tbaa !11
  %148 = sub nsw i64 %146, %147
  store i64 %148, ptr %145, align 8, !tbaa !15
  %149 = getelementptr inbounds %struct.Operation, ptr %16, i32 0, i32 2
  %150 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %150, ptr %149, align 8, !tbaa !16
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %151 unwind label %160

151:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %165

152:                                              ; preds = %171, %129
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %7, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %8, align 4
  br label %210

156:                                              ; preds = %132
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %7, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  br label %164

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

164:                                              ; preds = %160, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %210

165:                                              ; preds = %151, %126
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  %166 = getelementptr inbounds %struct.Operation, ptr %17, i32 0, i32 0
  store i8 94, ptr %166, align 8, !tbaa !13
  %167 = getelementptr inbounds %struct.Operation, ptr %17, i32 0, i32 1
  %168 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %168, ptr %167, align 8, !tbaa !15
  %169 = getelementptr inbounds %struct.Operation, ptr %17, i32 0, i32 2
  %170 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %170, ptr %169, align 8, !tbaa !16
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %171 unwind label %185

171:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  %172 = call noundef i64 @_ZNKSt6vectorI9OperationSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %173 = trunc i64 %172 to i32
  %174 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %173)
          to label %175 unwind label %152

175:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr %2, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %176 = load ptr, ptr %18, align 8, !tbaa !5
  %177 = call ptr @_ZNSt6vectorI9OperationSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %176) #7
  %178 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %177, ptr %178, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = call ptr @_ZNSt6vectorI9OperationSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %179) #7
  %181 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %180, ptr %181, align 8
  br label %182

182:                                              ; preds = %203, %175
  %183 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP9OperationSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br i1 %183, label %189, label %184

184:                                              ; preds = %182
  store i32 7, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %209

185:                                              ; preds = %165
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %7, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  br label %210

189:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %190 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP9OperationSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  store ptr %190, ptr %21, align 8, !tbaa !5
  %191 = load ptr, ptr %21, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.Operation, ptr %191, i32 0, i32 1
  %193 = load i64, ptr %192, align 8, !tbaa !15
  %194 = load ptr, ptr %21, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.Operation, ptr %194, i32 0, i32 0
  %196 = load i8, ptr %195, align 8, !tbaa !13
  %197 = sext i8 %196 to i32
  %198 = load ptr, ptr %21, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.Operation, ptr %198, i32 0, i32 2
  %200 = load i64, ptr %199, align 8, !tbaa !16
  %201 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, i64 noundef %193, i32 noundef %197, i64 noundef %200)
          to label %202 unwind label %205

202:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %203

203:                                              ; preds = %202
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP9OperationSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %182

205:                                              ; preds = %189
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %7, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %210

209:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @_ZNSt6vectorI9OperationSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret void

210:                                              ; preds = %205, %185, %164, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %211

211:                                              ; preds = %210, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %212

212:                                              ; preds = %211, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @_ZNSt6vectorI9OperationSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  br label %213

213:                                              ; preds = %212
  %214 = load ptr, ptr %7, align 8
  %215 = load i32, ptr %8, align 4
  %216 = insertvalue { ptr, i32 } poison, ptr %214, 0
  %217 = insertvalue { ptr, i32 } %216, i32 %215, 1
  resume { ptr, i32 } %217
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) #6

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP9OperationSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

attributes #0 = { 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 #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 = { inlinehint 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"_ZTS9Operation", !7, i64 0, !12, i64 8, !12, i64 16}
!15 = !{!14, !12, i64 8}
!16 = !{!14, !12, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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<Operation, std::allocator<Operation>>::_Vector_impl" }
%"struct.std::_Vector_base<Operation, std::allocator<Operation>>::_Vector_impl" = type { %"struct.std::_Vector_base<Operation, std::allocator<Operation>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Operation, std::allocator<Operation>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { ptr }
%struct.Operation = type { i8, i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5exgcdxxRxS_(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %class.anon, align 8
  %4 = alloca %struct.Operation, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %struct.Operation, align 8
  %8 = alloca %struct.Operation, align 8
  %9 = alloca %struct.Operation, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  call void @_ZNSt6vectorI9OperationSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store ptr %2, ptr %3, align 8, !tbaa !5
  %13 = load i64, ptr %1, align 8, !tbaa !9
  %14 = mul nsw i64 %13, 524289
  %15 = shl i64 %13, 19
  %16 = xor i64 %15, %13
  %.not = icmp eq i64 %14, %16
  br i1 %.not, label %17, label %90

17:                                               ; preds = %0
  %18 = mul nsw i64 %13, 262145
  %19 = shl i64 %13, 18
  %20 = xor i64 %19, %13
  %.not.1 = icmp eq i64 %18, %20
  br i1 %.not.1, label %21, label %90

21:                                               ; preds = %17
  %22 = mul nsw i64 %13, 131073
  %23 = shl i64 %13, 17
  %24 = xor i64 %23, %13
  %.not.2 = icmp eq i64 %22, %24
  br i1 %.not.2, label %25, label %90

25:                                               ; preds = %21
  %26 = mul nsw i64 %13, 65537
  %27 = shl i64 %13, 16
  %28 = xor i64 %27, %13
  %.not.3 = icmp eq i64 %26, %28
  br i1 %.not.3, label %29, label %90

29:                                               ; preds = %25
  %30 = mul nsw i64 %13, 32769
  %31 = shl i64 %13, 15
  %32 = xor i64 %31, %13
  %.not.4 = icmp eq i64 %30, %32
  br i1 %.not.4, label %33, label %90

33:                                               ; preds = %29
  %34 = mul nsw i64 %13, 16385
  %35 = shl i64 %13, 14
  %36 = xor i64 %35, %13
  %.not.5 = icmp eq i64 %34, %36
  br i1 %.not.5, label %37, label %90

37:                                               ; preds = %33
  %38 = mul nsw i64 %13, 8193
  %39 = shl i64 %13, 13
  %40 = xor i64 %39, %13
  %.not.6 = icmp eq i64 %38, %40
  br i1 %.not.6, label %41, label %90

41:                                               ; preds = %37
  %42 = mul nsw i64 %13, 4097
  %43 = shl i64 %13, 12
  %44 = xor i64 %43, %13
  %.not.7 = icmp eq i64 %42, %44
  br i1 %.not.7, label %45, label %90

45:                                               ; preds = %41
  %46 = mul nsw i64 %13, 2049
  %47 = shl i64 %13, 11
  %48 = xor i64 %47, %13
  %.not.8 = icmp eq i64 %46, %48
  br i1 %.not.8, label %49, label %90

49:                                               ; preds = %45
  %50 = mul nsw i64 %13, 1025
  %51 = shl i64 %13, 10
  %52 = xor i64 %51, %13
  %.not.9 = icmp eq i64 %50, %52
  br i1 %.not.9, label %53, label %90

53:                                               ; preds = %49
  %54 = mul nsw i64 %13, 513
  %55 = shl i64 %13, 9
  %56 = xor i64 %55, %13
  %.not.10 = icmp eq i64 %54, %56
  br i1 %.not.10, label %57, label %90

57:                                               ; preds = %53
  %58 = mul nsw i64 %13, 257
  %59 = shl i64 %13, 8
  %60 = xor i64 %59, %13
  %.not.11 = icmp eq i64 %58, %60
  br i1 %.not.11, label %61, label %90

61:                                               ; preds = %57
  %62 = mul nsw i64 %13, 129
  %63 = shl i64 %13, 7
  %64 = xor i64 %63, %13
  %.not.12 = icmp eq i64 %62, %64
  br i1 %.not.12, label %65, label %90

65:                                               ; preds = %61
  %66 = mul nsw i64 %13, 65
  %67 = shl i64 %13, 6
  %68 = xor i64 %67, %13
  %.not.13 = icmp eq i64 %66, %68
  br i1 %.not.13, label %69, label %90

69:                                               ; preds = %65
  %70 = mul nsw i64 %13, 33
  %71 = shl i64 %13, 5
  %72 = xor i64 %71, %13
  %.not.14 = icmp eq i64 %70, %72
  br i1 %.not.14, label %73, label %90

73:                                               ; preds = %69
  %74 = mul nsw i64 %13, 17
  %75 = shl i64 %13, 4
  %76 = xor i64 %75, %13
  %.not.15 = icmp eq i64 %74, %76
  br i1 %.not.15, label %77, label %90

77:                                               ; preds = %73
  %78 = mul nsw i64 %13, 9
  %79 = shl i64 %13, 3
  %80 = xor i64 %79, %13
  %.not.16 = icmp eq i64 %78, %80
  br i1 %.not.16, label %81, label %90

81:                                               ; preds = %77
  %82 = mul nsw i64 %13, 5
  %83 = shl i64 %13, 2
  %84 = xor i64 %83, %13
  %.not.17 = icmp eq i64 %82, %84
  br i1 %.not.17, label %85, label %90

85:                                               ; preds = %81
  %86 = mul nsw i64 %13, 3
  %87 = shl i64 %13, 1
  %88 = xor i64 %87, %13
  %.not.18 = icmp eq i64 %86, %88
  br i1 %.not.18, label %89, label %90

89:                                               ; preds = %85
  %.not.19 = icmp eq i64 %13, 0
  br i1 %.not.19, label %.loopexit, label %90

90:                                               ; preds = %89, %85, %81, %77, %73, %69, %65, %61, %57, %53, %49, %45, %41, %37, %33, %29, %25, %21, %17, %0
  %.lcssa57 = phi i64 [ 524288, %0 ], [ 262144, %17 ], [ 131072, %21 ], [ 65536, %25 ], [ 32768, %29 ], [ 16384, %33 ], [ 8192, %37 ], [ 4096, %41 ], [ 2048, %45 ], [ 1024, %49 ], [ 512, %53 ], [ 256, %57 ], [ 128, %61 ], [ 64, %65 ], [ 32, %69 ], [ 16, %73 ], [ 8, %77 ], [ 4, %81 ], [ 2, %85 ], [ 1, %89 ]
  %.lcssa55 = phi i64 [ 19, %0 ], [ 18, %17 ], [ 17, %21 ], [ 16, %25 ], [ 15, %29 ], [ 14, %33 ], [ 13, %37 ], [ 12, %41 ], [ 11, %45 ], [ 10, %49 ], [ 9, %53 ], [ 8, %57 ], [ 7, %61 ], [ 6, %65 ], [ 5, %69 ], [ 4, %73 ], [ 3, %77 ], [ 2, %81 ], [ 1, %85 ], [ 0, %89 ]
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %13, i64 noundef %.lcssa57)
          to label %91 unwind label %100

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  store i8 94, ptr %4, align 8, !tbaa !11
  %92 = getelementptr inbounds i8, ptr %4, i64 8
  %93 = load i64, ptr %1, align 8, !tbaa !9
  store i64 %93, ptr %92, align 8, !tbaa !13
  %94 = getelementptr inbounds i8, ptr %4, i64 16
  %95 = shl i64 %93, %.lcssa55
  store i64 %95, ptr %94, align 8, !tbaa !14
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %96 unwind label %102

96:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  %97 = load i64, ptr %1, align 8, !tbaa !9
  %98 = shl i64 %97, %.lcssa55
  %99 = xor i64 %98, %97
  br label %.loopexit

100:                                              ; preds = %90
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %180

102:                                              ; preds = %91
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %180

.loopexit:                                        ; preds = %89, %96
  %104 = phi i64 [ %97, %96 ], [ 0, %89 ]
  %.0 = phi i64 [ %99, %96 ], [ undef, %89 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %105 = invoke noundef i64 @_Z5exgcdxxRxS_(i64 noundef %104, i64 noundef %.0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %106 unwind label %109

106:                                              ; preds = %.loopexit
  %107 = icmp eq i64 %105, 1
  br i1 %107, label %111, label %108

108:                                              ; preds = %106
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 70, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #8
  unreachable

109:                                              ; preds = %115, %111, %.loopexit
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %179

111:                                              ; preds = %106
  %112 = load i64, ptr %1, align 8, !tbaa !9
  %113 = load i64, ptr %5, align 8, !tbaa !9
  %114 = call noundef i64 @_ZSt3absx(i64 noundef %113)
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %112, i64 noundef %114)
          to label %115 unwind label %109

115:                                              ; preds = %111
  %116 = load i64, ptr %1, align 8, !tbaa !9
  %117 = load i64, ptr %5, align 8, !tbaa !9
  %118 = call noundef i64 @_ZSt3absx(i64 noundef %117)
  %119 = mul nsw i64 %118, %116
  store i64 %119, ptr %5, align 8, !tbaa !9
  %120 = load i64, ptr %6, align 8, !tbaa !9
  %121 = call noundef i64 @_ZSt3absx(i64 noundef %120)
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %.0, i64 noundef %121)
          to label %122 unwind label %109

122:                                              ; preds = %115
  %123 = load i64, ptr %6, align 8, !tbaa !9
  %124 = call noundef i64 @_ZSt3absx(i64 noundef %123)
  %125 = mul nsw i64 %124, %.0
  %.promoted = load i64, ptr %5, align 8, !tbaa !9
  %126 = xor i64 %.promoted, %125
  %.not3445 = icmp eq i64 %126, 1
  br i1 %.not3445, label %.thread, label %.lr.ph

.thread:                                          ; preds = %122
  store i64 %125, ptr %6, align 8, !tbaa !9
  br label %155

.lr.ph:                                           ; preds = %122
  %127 = load i64, ptr %1, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %.lr.ph, %128
  %.02647 = phi i64 [ 0, %.lr.ph ], [ %130, %128 ]
  %storemerge46 = phi i64 [ %125, %.lr.ph ], [ %132, %128 ]
  %129 = phi i64 [ %.promoted, %.lr.ph ], [ %131, %128 ]
  %130 = add nuw nsw i64 %.02647, 1
  %131 = add nsw i64 %127, %129
  %132 = add nsw i64 %127, %storemerge46
  %133 = xor i64 %131, %132
  %.not34 = icmp eq i64 %133, 1
  br i1 %.not34, label %134, label %128, !llvm.loop !15

134:                                              ; preds = %128
  store i64 %131, ptr %5, align 8, !tbaa !9
  store i64 %132, ptr %6, align 8, !tbaa !9
  %135 = load i64, ptr %1, align 8, !tbaa !9
  invoke void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %135, i64 noundef %130)
          to label %136 unwind label %149

136:                                              ; preds = %134
  %137 = load i64, ptr %1, align 8, !tbaa !9
  %138 = mul nsw i64 %137, %130
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  store i8 43, ptr %7, align 8, !tbaa !11
  %139 = getelementptr inbounds i8, ptr %7, i64 8
  %140 = load i64, ptr %5, align 8, !tbaa !9
  %141 = sub nsw i64 %140, %138
  store i64 %141, ptr %139, align 8, !tbaa !13
  %142 = getelementptr inbounds i8, ptr %7, i64 16
  store i64 %138, ptr %142, align 8, !tbaa !14
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %143 unwind label %151

143:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  store i8 43, ptr %8, align 8, !tbaa !11
  %144 = getelementptr inbounds i8, ptr %8, i64 8
  %145 = load i64, ptr %6, align 8, !tbaa !9
  %146 = sub nsw i64 %145, %138
  store i64 %146, ptr %144, align 8, !tbaa !13
  %147 = getelementptr inbounds i8, ptr %8, i64 16
  store i64 %138, ptr %147, align 8, !tbaa !14
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %148 unwind label %153

148:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  %.pre = load i64, ptr %5, align 8, !tbaa !9
  %.pre60 = load i64, ptr %6, align 8, !tbaa !9
  br label %155

149:                                              ; preds = %134
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %179

151:                                              ; preds = %136
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %179

153:                                              ; preds = %143
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %179

155:                                              ; preds = %.thread, %148
  %156 = phi i64 [ %.pre60, %148 ], [ %125, %.thread ]
  %157 = phi i64 [ %.pre, %148 ], [ %.promoted, %.thread ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  store i8 94, ptr %9, align 8, !tbaa !11
  %158 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 %157, ptr %158, align 8, !tbaa !13
  %159 = getelementptr inbounds i8, ptr %9, i64 16
  store i64 %156, ptr %159, align 8, !tbaa !14
  invoke void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %160 unwind label %167

160:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  %161 = call noundef i64 @_ZNKSt6vectorI9OperationSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %162 = trunc i64 %161 to i32
  %163 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %162)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %164 = call ptr @_ZNSt6vectorI9OperationSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  store ptr %164, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %165 = call ptr @_ZNSt6vectorI9OperationSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  store ptr %165, ptr %11, align 8
  %166 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP9OperationSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %166, label %.lr.ph51, label %._crit_edge52

._crit_edge52:                                    ; preds = %.lr.ph51, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @_ZNSt6vectorI9OperationSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret void

167:                                              ; preds = %155
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %179

.lr.ph51:                                         ; preds = %160, %.lr.ph51
  %169 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP9OperationSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %170 = getelementptr inbounds i8, ptr %169, i64 8
  %171 = load i64, ptr %170, align 8, !tbaa !13
  %172 = load i8, ptr %169, align 8, !tbaa !11
  %173 = sext i8 %172 to i32
  %174 = getelementptr inbounds i8, ptr %169, i64 16
  %175 = load i64, ptr %174, align 8, !tbaa !14
  %176 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %171, i32 noundef %173, i64 noundef %175)
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP9OperationSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %178 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP9OperationSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %178, label %.lr.ph51, label %._crit_edge52

179:                                              ; preds = %149, %167, %153, %151, %109
  %.pn38.pn = phi { ptr, i32 } [ %110, %109 ], [ %168, %167 ], [ %150, %149 ], [ %154, %153 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %180

180:                                              ; preds = %100, %102, %179
  %.pn38.pn.pn = phi { ptr, i32 } [ %.pn38.pn, %179 ], [ %103, %102 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @_ZNSt6vectorI9OperationSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn38.pn.pn
}

; 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 @_ZNSt6vectorI9OperationSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ5solvevENK3$_0clExx"(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9OperationSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) local_unnamed_addr #6

; 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 i64 @_ZNKSt6vectorI9OperationSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP9OperationSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

attributes #0 = { 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 #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 = { inlinehint 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_ZTS9Operation", !7, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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