; LLVM IR from Aryansh-S/USACO :: USACO/2020/Open/Silver (cereal)

; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@choice = external dso_local global [100000 x i32], align 16
@cereal = external dso_local global [100000 x %"class.std::queue"], align 16
@cowvals = external dso_local global [100000 x %"struct.std::pair"], align 16
@firstcheck = external dso_local global [100000 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = load ptr, ptr @stdin, align 8, !tbaa !8
  %15 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %14)
  %16 = load ptr, ptr @stdout, align 8, !tbaa !8
  %17 = call ptr @freopen(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef %16)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !11
  br label %20

20:                                               ; preds = %86, %0
  %21 = load i32, ptr %2, align 4, !tbaa !11
  %22 = load i32, ptr @n, align 4, !tbaa !11
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %89

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %28 = load i32, ptr %3, align 4, !tbaa !11
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr %3, align 4, !tbaa !11
  %30 = load i32, ptr %4, align 4, !tbaa !11
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr %4, align 4, !tbaa !11
  %32 = load i32, ptr %3, align 4, !tbaa !11
  %33 = load i32, ptr %2, align 4, !tbaa !11
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %34
  %36 = getelementptr inbounds %"struct.std::pair", ptr %35, i32 0, i32 0
  store i32 %32, ptr %36, align 8, !tbaa !13
  %37 = load i32, ptr %4, align 4, !tbaa !11
  %38 = load i32, ptr %2, align 4, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %39
  %41 = getelementptr inbounds %"struct.std::pair", ptr %40, i32 0, i32 1
  store i32 %37, ptr %41, align 4, !tbaa !15
  %42 = load i32, ptr %3, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100000 x i8], ptr @firstcheck, i64 0, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !16, !range !18, !noundef !19
  %46 = trunc i8 %45 to i1
  br i1 %46, label %56, label %47

47:                                               ; preds = %25
  %48 = load i32, ptr %3, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100000 x i8], ptr @firstcheck, i64 0, i64 %49
  store i8 1, ptr %50, align 1, !tbaa !16
  %51 = load i32, ptr %2, align 4, !tbaa !11
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %52
  store i32 1, ptr %53, align 4, !tbaa !11
  %54 = load i32, ptr @ans, align 4, !tbaa !11
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr @ans, align 4, !tbaa !11
  br label %85

56:                                               ; preds = %25
  %57 = load i32, ptr %4, align 4, !tbaa !11
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100000 x i8], ptr @firstcheck, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !16, !range !18, !noundef !19
  %61 = trunc i8 %60 to i1
  br i1 %61, label %74, label %62

62:                                               ; preds = %56
  %63 = load i32, ptr %4, align 4, !tbaa !11
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100000 x i8], ptr @firstcheck, i64 0, i64 %64
  store i8 1, ptr %65, align 1, !tbaa !16
  %66 = load i32, ptr %3, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %67
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %68, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %69 = load i32, ptr %2, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %70
  store i32 2, ptr %71, align 4, !tbaa !11
  %72 = load i32, ptr @ans, align 4, !tbaa !11
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr @ans, align 4, !tbaa !11
  br label %84

74:                                               ; preds = %56
  %75 = load i32, ptr %2, align 4, !tbaa !11
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %76
  store i32 3, ptr %77, align 4, !tbaa !11
  %78 = load i32, ptr %3, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %79
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %80, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %81 = load i32, ptr %4, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %82
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %83, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %84

84:                                               ; preds = %74, %62
  br label %85

85:                                               ; preds = %84, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %2, align 4, !tbaa !11
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %2, align 4, !tbaa !11
  br label %20, !llvm.loop !20

89:                                               ; preds = %24
  %90 = load i32, ptr @ans, align 4, !tbaa !11
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %93

93:                                               ; preds = %227, %89
  %94 = load i32, ptr %5, align 4, !tbaa !11
  %95 = load i32, ptr @n, align 4, !tbaa !11
  %96 = sub nsw i32 %95, 1
  %97 = icmp slt i32 %94, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %230

99:                                               ; preds = %93
  %100 = load i32, ptr @ans, align 4, !tbaa !11
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr @ans, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %102 = load i32, ptr %5, align 4, !tbaa !11
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %103
  %105 = getelementptr inbounds %"struct.std::pair", ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !13
  store i32 %106, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  br label %107

107:                                              ; preds = %218, %99
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %6, align 4, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %110
  %112 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %111)
  br i1 %112, label %171, label %113

113:                                              ; preds = %108
  %114 = load i32, ptr %6, align 4, !tbaa !11
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %115
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %116)
  %118 = load i32, ptr %117, align 4, !tbaa !11
  store i32 %118, ptr %7, align 4, !tbaa !11
  %119 = load i32, ptr %6, align 4, !tbaa !11
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %120
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %121)
  br label %122

122:                                              ; preds = %169, %113
  %123 = load i32, ptr %7, align 4, !tbaa !11
  %124 = load i32, ptr %5, align 4, !tbaa !11
  %125 = icmp sle i32 %123, %124
  br i1 %125, label %152, label %126

126:                                              ; preds = %122
  %127 = load i32, ptr %7, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !11
  %131 = load i32, ptr %7, align 4, !tbaa !11
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %132
  %134 = getelementptr inbounds %"struct.std::pair", ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !13
  %136 = load i32, ptr %6, align 4, !tbaa !11
  %137 = icmp eq i32 %135, %136
  br i1 %137, label %138, label %139

138:                                              ; preds = %126
  br label %149

139:                                              ; preds = %126
  %140 = load i32, ptr %7, align 4, !tbaa !11
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %141
  %143 = getelementptr inbounds %"struct.std::pair", ptr %142, i32 0, i32 1
  %144 = load i32, ptr %143, align 4, !tbaa !15
  %145 = load i32, ptr %6, align 4, !tbaa !11
  %146 = icmp eq i32 %144, %145
  %147 = zext i1 %146 to i64
  %148 = select i1 %146, i32 2, i32 3
  br label %149

149:                                              ; preds = %139, %138
  %150 = phi i32 [ 1, %138 ], [ %148, %139 ]
  %151 = icmp sle i32 %130, %150
  br label %152

152:                                              ; preds = %149, %122
  %153 = phi i1 [ true, %122 ], [ %151, %149 ]
  br i1 %153, label %154, label %170

154:                                              ; preds = %152
  %155 = load i32, ptr %6, align 4, !tbaa !11
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %156
  %158 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %157)
  br i1 %158, label %168, label %159

159:                                              ; preds = %154
  %160 = load i32, ptr %6, align 4, !tbaa !11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %161
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %162)
  %164 = load i32, ptr %163, align 4, !tbaa !11
  store i32 %164, ptr %7, align 4, !tbaa !11
  %165 = load i32, ptr %6, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %166
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %167)
  br label %169

168:                                              ; preds = %154
  br label %170

169:                                              ; preds = %159
  br label %122, !llvm.loop !22

170:                                              ; preds = %168, %152
  br label %172

171:                                              ; preds = %108
  br label %223

172:                                              ; preds = %170
  %173 = load i32, ptr %7, align 4, !tbaa !11
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !11
  %177 = icmp eq i32 %176, 3
  br i1 %177, label %178, label %193

178:                                              ; preds = %172
  %179 = load i32, ptr @ans, align 4, !tbaa !11
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr @ans, align 4, !tbaa !11
  %181 = load i32, ptr %7, align 4, !tbaa !11
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %182
  %184 = getelementptr inbounds %"struct.std::pair", ptr %183, i32 0, i32 0
  %185 = load i32, ptr %184, align 8, !tbaa !13
  %186 = load i32, ptr %6, align 4, !tbaa !11
  %187 = icmp eq i32 %185, %186
  %188 = zext i1 %187 to i64
  %189 = select i1 %187, i32 1, i32 2
  %190 = load i32, ptr %7, align 4, !tbaa !11
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %191
  store i32 %189, ptr %192, align 4, !tbaa !11
  br label %223

193:                                              ; preds = %172
  %194 = load i32, ptr %7, align 4, !tbaa !11
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %195
  %197 = getelementptr inbounds %"struct.std::pair", ptr %196, i32 0, i32 1
  %198 = load i32, ptr %197, align 4, !tbaa !15
  store i32 %198, ptr %6, align 4, !tbaa !11
  br label %199

199:                                              ; preds = %193
  %200 = load i32, ptr %7, align 4, !tbaa !11
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %201
  %203 = getelementptr inbounds %"struct.std::pair", ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 8, !tbaa !13
  %205 = load i32, ptr %6, align 4, !tbaa !11
  %206 = icmp eq i32 %204, %205
  br i1 %206, label %207, label %208

207:                                              ; preds = %199
  br label %218

208:                                              ; preds = %199
  %209 = load i32, ptr %7, align 4, !tbaa !11
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %210
  %212 = getelementptr inbounds %"struct.std::pair", ptr %211, i32 0, i32 1
  %213 = load i32, ptr %212, align 4, !tbaa !15
  %214 = load i32, ptr %6, align 4, !tbaa !11
  %215 = icmp eq i32 %213, %214
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, i32 2, i32 3
  br label %218

218:                                              ; preds = %208, %207
  %219 = phi i32 [ 1, %207 ], [ %217, %208 ]
  %220 = load i32, ptr %7, align 4, !tbaa !11
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %221
  store i32 %219, ptr %222, align 4, !tbaa !11
  br label %107, !llvm.loop !23

223:                                              ; preds = %178, %171
  %224 = load i32, ptr @ans, align 4, !tbaa !11
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %224)
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @.str.5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %227

227:                                              ; preds = %223
  %228 = load i32, ptr %5, align 4, !tbaa !11
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %5, align 4, !tbaa !11
  br label %93, !llvm.loop !24

230:                                              ; preds = %98
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !12, i64 0, !12, i64 4}
!15 = !{!14, !12, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@choice = external dso_local local_unnamed_addr global [100000 x i32], align 16
@cereal = external dso_local global [100000 x %"class.std::queue"], align 16
@cowvals = external dso_local local_unnamed_addr global [100000 x %"struct.std::pair"], align 16
@firstcheck = external dso_local local_unnamed_addr global [100000 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = load ptr, ptr @stdin, align 8, !tbaa !8
  %11 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %10)
  %12 = load ptr, ptr @stdout, align 8, !tbaa !8
  %13 = tail call ptr @freopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef %12)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !11
  %16 = load i32, ptr @n, align 4, !tbaa !11
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %59, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %18 = load i32, ptr @ans, align 4, !tbaa !11
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %18)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str.5)
  %21 = load i32, ptr @n, align 4, !tbaa !11
  %22 = icmp sgt i32 %21, 1
  br i1 %22, label %.lr.ph36, label %._crit_edge37

.lr.ph:                                           ; preds = %0, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = load i32, ptr %2, align 4, !tbaa !11
  %26 = add nsw i32 %25, -1
  store i32 %26, ptr %2, align 4, !tbaa !11
  %27 = load i32, ptr %3, align 4, !tbaa !11
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %3, align 4, !tbaa !11
  %29 = load i32, ptr %1, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %30
  store i32 %26, ptr %31, align 8, !tbaa !13
  %32 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %30, i32 1
  store i32 %28, ptr %32, align 4, !tbaa !15
  %33 = sext i32 %26 to i64
  %34 = getelementptr inbounds [100000 x i8], ptr @firstcheck, i64 0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !16, !range !18, !noundef !19
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %41, label %37

37:                                               ; preds = %.lr.ph
  store i8 1, ptr %34, align 1, !tbaa !16
  %38 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %30
  store i32 1, ptr %38, align 4, !tbaa !11
  %39 = load i32, ptr @ans, align 4, !tbaa !11
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr @ans, align 4, !tbaa !11
  br label %59

41:                                               ; preds = %.lr.ph
  %42 = sext i32 %28 to i64
  %43 = getelementptr inbounds [100000 x i8], ptr @firstcheck, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !16, !range !18, !noundef !19
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %53, label %46

46:                                               ; preds = %41
  store i8 1, ptr %43, align 1, !tbaa !16
  %47 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %33
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %47, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %48 = load i32, ptr %1, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %49
  store i32 2, ptr %50, align 4, !tbaa !11
  %51 = load i32, ptr @ans, align 4, !tbaa !11
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr @ans, align 4, !tbaa !11
  br label %59

53:                                               ; preds = %41
  %54 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %30
  store i32 3, ptr %54, align 4, !tbaa !11
  %55 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %33
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %55, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %56 = load i32, ptr %3, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %57
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %58, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %.pre = load i32, ptr %1, align 4, !tbaa !11
  br label %59

59:                                               ; preds = %46, %53, %37
  %60 = phi i32 [ %48, %46 ], [ %.pre, %53 ], [ %29, %37 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %1, align 4, !tbaa !11
  %62 = load i32, ptr @n, align 4, !tbaa !11
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %.lr.ph, label %._crit_edge, !llvm.loop !20

._crit_edge37:                                    ; preds = %.loopexit, %._crit_edge
  ret i32 0

.lr.ph36:                                         ; preds = %._crit_edge, %.loopexit
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ 0, %._crit_edge ]
  %64 = load i32, ptr @ans, align 4, !tbaa !11
  %65 = add nsw i32 %64, -1
  store i32 %65, ptr @ans, align 4, !tbaa !11
  %66 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %indvars.iv
  %67 = load i32, ptr %66, align 8, !tbaa !13
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %68
  %70 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %69)
  br i1 %70, label %.loopexit, label %.lr.ph33

.lr.ph33:                                         ; preds = %.lr.ph36, %100
  %71 = phi ptr [ %107, %100 ], [ %69, %.lr.ph36 ]
  %.02631 = phi i32 [ %103, %100 ], [ %67, %.lr.ph36 ]
  br label %72

72:                                               ; preds = %.critedge, %.lr.ph33
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %71)
  %74 = load i32, ptr %73, align 4, !tbaa !11
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %71)
  %75 = sext i32 %74 to i64
  %.not = icmp slt i64 %indvars.iv, %75
  br i1 %.not, label %76, label %.critedge

76:                                               ; preds = %72
  %77 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %75
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %75
  %80 = load i32, ptr %79, align 8, !tbaa !13
  %81 = icmp eq i32 %80, %.02631
  br i1 %81, label %87, label %82

82:                                               ; preds = %76
  %83 = getelementptr inbounds i8, ptr %79, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !15
  %85 = icmp eq i32 %84, %.02631
  %86 = select i1 %85, i32 2, i32 3
  br label %87

87:                                               ; preds = %76, %82
  %88 = phi i32 [ %86, %82 ], [ 1, %76 ]
  %.not28 = icmp sgt i32 %78, %88
  br i1 %.not28, label %split, label %.critedge

.critedge:                                        ; preds = %72, %87
  %89 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %71)
  br i1 %89, label %.critedge._crit_edge, label %72, !llvm.loop !22

.critedge._crit_edge:                             ; preds = %.critedge
  %.phi.trans.insert = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %75
  %.pre43 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !11
  br label %split

split:                                            ; preds = %87, %.critedge._crit_edge
  %90 = phi i32 [ %.pre43, %.critedge._crit_edge ], [ %78, %87 ]
  %91 = getelementptr inbounds [100000 x i32], ptr @choice, i64 0, i64 %75
  %92 = icmp eq i32 %90, 3
  br i1 %92, label %93, label %100

93:                                               ; preds = %split
  %94 = load i32, ptr @ans, align 4, !tbaa !11
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr @ans, align 4, !tbaa !11
  %96 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %75
  %97 = load i32, ptr %96, align 8, !tbaa !13
  %98 = icmp eq i32 %97, %.02631
  %99 = select i1 %98, i32 1, i32 2
  store i32 %99, ptr %91, align 4, !tbaa !11
  br label %.loopexit

100:                                              ; preds = %split
  %101 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @cowvals, i64 0, i64 %75
  %102 = getelementptr inbounds i8, ptr %101, i64 4
  %103 = load i32, ptr %102, align 4, !tbaa !15
  %104 = load i32, ptr %101, align 8, !tbaa !13
  %105 = icmp eq i32 %104, %103
  %spec.select = select i1 %105, i32 1, i32 2
  store i32 %spec.select, ptr %91, align 4, !tbaa !11
  %106 = sext i32 %103 to i64
  %107 = getelementptr inbounds [100000 x %"class.std::queue"], ptr @cereal, i64 0, i64 %106
  %108 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %107)
  br i1 %108, label %.loopexit, label %.lr.ph33, !llvm.loop !23

.loopexit:                                        ; preds = %100, %.lr.ph36, %93
  %109 = load i32, ptr @ans, align 4, !tbaa !11
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %109)
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef nonnull @.str.5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %112 = load i32, ptr @n, align 4, !tbaa !11
  %113 = add nsw i32 %112, -1
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next, %114
  br i1 %115, label %.lr.ph36, label %._crit_edge37, !llvm.loop !24
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !12, i64 0, !12, i64 4}
!15 = !{!14, !12, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


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