; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101412H.ll (Z5checki)

; 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"

%struct.Info = type { i32, i32, i32 }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [2 x i64] }

@n = external dso_local global i32, align 4
@que = external dso_local global [10001 x %struct.Info], align 16
@f = external dso_local global [101 x %"class.std::bitset"], align 16
@g = external dso_local global [101 x %"class.std::bitset"], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checki(i32 noundef %0) #0 {
  %2 = alloca i1, align 1
  %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
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::bitset", align 8
  %13 = alloca %"class.std::bitset", align 8
  %14 = alloca %"class.std::bitset", align 8
  %15 = alloca %"class.std::bitset", align 8
  %16 = alloca %"class.std::bitset", align 8
  %17 = alloca %"class.std::bitset", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %38, %1
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %41

23:                                               ; preds = %18
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #4
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %30, i64 noundef %32, i1 noundef zeroext true)
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %35
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %36) #4
  br label %38

38:                                               ; preds = %23
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %4, align 4, !tbaa !5
  br label %18, !llvm.loop !9

41:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %92, %41
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %42
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.Info, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = icmp sle i32 %52, 2
  br i1 %53, label %54, label %91

54:                                               ; preds = %47
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.Info, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !13
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %63
  %65 = getelementptr inbounds %struct.Info, ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 4, !tbaa !14
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %61, i64 noundef %67, i1 noundef zeroext true)
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %70
  %72 = getelementptr inbounds %struct.Info, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 4, !tbaa !11
  %74 = icmp eq i32 %73, 2
  br i1 %74, label %75, label %90

75:                                               ; preds = %54
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %77
  %79 = getelementptr inbounds %struct.Info, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 4, !tbaa !14
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %81
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %84
  %86 = getelementptr inbounds %struct.Info, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !13
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %82, i64 noundef %88, i1 noundef zeroext true)
  br label %90

90:                                               ; preds = %75, %54
  br label %91

91:                                               ; preds = %90, %47
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %5, align 4, !tbaa !5
  br label %42, !llvm.loop !15

95:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %127, %95
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = load i32, ptr @n, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %130

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %123, %101
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

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

107:                                              ; preds = %102
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %109
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %110, i64 noundef %112)
  br i1 %113, label %114, label %122

114:                                              ; preds = %107
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %116
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %119
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull align 8 dereferenceable(16) %117) #4
  br label %122

122:                                              ; preds = %114, %107
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %8, align 4, !tbaa !5
  br label %102, !llvm.loop !16

126:                                              ; preds = %106
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %6, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %6, align 4, !tbaa !5
  br label %96, !llvm.loop !17

130:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %199, %130
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %202

136:                                              ; preds = %131
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.Info, ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 4, !tbaa !11
  %142 = icmp eq i32 %141, 4
  br i1 %142, label %143, label %198

143:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %194, %143
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %197

149:                                              ; preds = %144
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %151
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.Info, ptr %155, i32 0, i32 1
  %157 = load i32, ptr %156, align 4, !tbaa !13
  %158 = sext i32 %157 to i64
  %159 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %152, i64 noundef %158)
  br i1 %159, label %160, label %171

160:                                              ; preds = %149
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %162
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %165
  %167 = getelementptr inbounds %struct.Info, ptr %166, i32 0, i32 2
  %168 = load i32, ptr %167, align 4, !tbaa !14
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %163, i64 noundef %169, i1 noundef zeroext true)
  br label %171

171:                                              ; preds = %160, %149
  %172 = load i32, ptr %10, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %173
  %175 = load i32, ptr %9, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %176
  %178 = getelementptr inbounds %struct.Info, ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 4, !tbaa !14
  %180 = sext i32 %179 to i64
  %181 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %174, i64 noundef %180)
  br i1 %181, label %182, label %193

182:                                              ; preds = %171
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %184
  %186 = load i32, ptr %9, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %187
  %189 = getelementptr inbounds %struct.Info, ptr %188, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !13
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %185, i64 noundef %191, i1 noundef zeroext true)
  br label %193

193:                                              ; preds = %182, %171
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %10, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %10, align 4, !tbaa !5
  br label %144, !llvm.loop !18

197:                                              ; preds = %148
  br label %198

198:                                              ; preds = %197, %136
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %9, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %9, align 4, !tbaa !5
  br label %131, !llvm.loop !19

202:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %402, %202
  %204 = load i32, ptr %11, align 4, !tbaa !5
  %205 = load i32, ptr %3, align 4, !tbaa !5
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %203
  store i32 20, ptr %7, align 4
  br label %405

208:                                              ; preds = %203
  %209 = load i32, ptr %11, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %210
  %212 = getelementptr inbounds %struct.Info, ptr %211, i32 0, i32 0
  %213 = load i32, ptr %212, align 4, !tbaa !11
  %214 = icmp eq i32 %213, 3
  br i1 %214, label %215, label %297

215:                                              ; preds = %208
  %216 = load i32, ptr %11, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.Info, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !13
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %221
  %223 = load i32, ptr %11, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %224
  %226 = getelementptr inbounds %struct.Info, ptr %225, i32 0, i32 2
  %227 = load i32, ptr %226, align 4, !tbaa !14
  %228 = sext i32 %227 to i64
  %229 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %222, i64 noundef %228)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  br i1 %229, label %230, label %245

230:                                              ; preds = %215
  %231 = load i32, ptr %11, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %232
  %234 = getelementptr inbounds %struct.Info, ptr %233, i32 0, i32 2
  %235 = load i32, ptr %234, align 4, !tbaa !14
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %236
  %238 = load i32, ptr %11, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %239
  %241 = getelementptr inbounds %struct.Info, ptr %240, i32 0, i32 1
  %242 = load i32, ptr %241, align 4, !tbaa !13
  %243 = sext i32 %242 to i64
  %244 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %237, i64 noundef %243)
  br i1 %244, label %293, label %245

245:                                              ; preds = %230, %215
  %246 = load i32, ptr %11, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %247
  %249 = getelementptr inbounds %struct.Info, ptr %248, i32 0, i32 1
  %250 = load i32, ptr %249, align 4, !tbaa !13
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %251
  %253 = load i32, ptr %11, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %254
  %256 = getelementptr inbounds %struct.Info, ptr %255, i32 0, i32 1
  %257 = load i32, ptr %256, align 4, !tbaa !13
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %258
  %260 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %252, ptr noundef nonnull align 8 dereferenceable(16) %259) #4
  %261 = getelementptr inbounds %"class.std::bitset", ptr %12, i32 0, i32 0
  %262 = getelementptr inbounds %"struct.std::_Base_bitset", ptr %261, i32 0, i32 0
  %263 = getelementptr inbounds { i64, i64 }, ptr %262, i32 0, i32 0
  %264 = extractvalue { i64, i64 } %260, 0
  store i64 %264, ptr %263, align 8
  %265 = getelementptr inbounds { i64, i64 }, ptr %262, i32 0, i32 1
  %266 = extractvalue { i64, i64 } %260, 1
  store i64 %266, ptr %265, align 8
  %267 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  br i1 %267, label %268, label %291

268:                                              ; preds = %245
  %269 = load i32, ptr %11, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %270
  %272 = getelementptr inbounds %struct.Info, ptr %271, i32 0, i32 2
  %273 = load i32, ptr %272, align 4, !tbaa !14
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %274
  %276 = load i32, ptr %11, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %277
  %279 = getelementptr inbounds %struct.Info, ptr %278, i32 0, i32 2
  %280 = load i32, ptr %279, align 4, !tbaa !14
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %281
  %283 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %275, ptr noundef nonnull align 8 dereferenceable(16) %282) #4
  %284 = getelementptr inbounds %"class.std::bitset", ptr %13, i32 0, i32 0
  %285 = getelementptr inbounds %"struct.std::_Base_bitset", ptr %284, i32 0, i32 0
  %286 = getelementptr inbounds { i64, i64 }, ptr %285, i32 0, i32 0
  %287 = extractvalue { i64, i64 } %283, 0
  store i64 %287, ptr %286, align 8
  %288 = getelementptr inbounds { i64, i64 }, ptr %285, i32 0, i32 1
  %289 = extractvalue { i64, i64 } %283, 1
  store i64 %289, ptr %288, align 8
  %290 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  br label %291

291:                                              ; preds = %268, %245
  %292 = phi i1 [ false, %245 ], [ %290, %268 ]
  br label %293

293:                                              ; preds = %291, %230
  %294 = phi i1 [ true, %230 ], [ %292, %291 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  br i1 %294, label %295, label %296

295:                                              ; preds = %293
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %405

296:                                              ; preds = %293
  br label %401

297:                                              ; preds = %208
  %298 = load i32, ptr %11, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %299
  %301 = getelementptr inbounds %struct.Info, ptr %300, i32 0, i32 0
  %302 = load i32, ptr %301, align 4, !tbaa !11
  %303 = icmp eq i32 %302, 5
  br i1 %303, label %304, label %400

304:                                              ; preds = %297
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  %305 = load i32, ptr %11, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %306
  %308 = getelementptr inbounds %struct.Info, ptr %307, i32 0, i32 1
  %309 = load i32, ptr %308, align 4, !tbaa !13
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %310
  %312 = load i32, ptr %11, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %313
  %315 = getelementptr inbounds %struct.Info, ptr %314, i32 0, i32 1
  %316 = load i32, ptr %315, align 4, !tbaa !13
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %317
  %319 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %311, ptr noundef nonnull align 8 dereferenceable(16) %318) #4
  %320 = getelementptr inbounds %"class.std::bitset", ptr %14, i32 0, i32 0
  %321 = getelementptr inbounds %"struct.std::_Base_bitset", ptr %320, i32 0, i32 0
  %322 = getelementptr inbounds { i64, i64 }, ptr %321, i32 0, i32 0
  %323 = extractvalue { i64, i64 } %319, 0
  store i64 %323, ptr %322, align 8
  %324 = getelementptr inbounds { i64, i64 }, ptr %321, i32 0, i32 1
  %325 = extractvalue { i64, i64 } %319, 1
  store i64 %325, ptr %324, align 8
  %326 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  br i1 %326, label %396, label %327

327:                                              ; preds = %304
  %328 = load i32, ptr %11, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %329
  %331 = getelementptr inbounds %struct.Info, ptr %330, i32 0, i32 2
  %332 = load i32, ptr %331, align 4, !tbaa !14
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %333
  %335 = load i32, ptr %11, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %336
  %338 = getelementptr inbounds %struct.Info, ptr %337, i32 0, i32 2
  %339 = load i32, ptr %338, align 4, !tbaa !14
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %340
  %342 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %334, ptr noundef nonnull align 8 dereferenceable(16) %341) #4
  %343 = getelementptr inbounds %"class.std::bitset", ptr %15, i32 0, i32 0
  %344 = getelementptr inbounds %"struct.std::_Base_bitset", ptr %343, i32 0, i32 0
  %345 = getelementptr inbounds { i64, i64 }, ptr %344, i32 0, i32 0
  %346 = extractvalue { i64, i64 } %342, 0
  store i64 %346, ptr %345, align 8
  %347 = getelementptr inbounds { i64, i64 }, ptr %344, i32 0, i32 1
  %348 = extractvalue { i64, i64 } %342, 1
  store i64 %348, ptr %347, align 8
  %349 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  br i1 %349, label %396, label %350

350:                                              ; preds = %327
  %351 = load i32, ptr %11, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %352
  %354 = getelementptr inbounds %struct.Info, ptr %353, i32 0, i32 2
  %355 = load i32, ptr %354, align 4, !tbaa !14
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %356
  %358 = load i32, ptr %11, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %359
  %361 = getelementptr inbounds %struct.Info, ptr %360, i32 0, i32 1
  %362 = load i32, ptr %361, align 4, !tbaa !13
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %363
  %365 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %357, ptr noundef nonnull align 8 dereferenceable(16) %364) #4
  %366 = getelementptr inbounds %"class.std::bitset", ptr %16, i32 0, i32 0
  %367 = getelementptr inbounds %"struct.std::_Base_bitset", ptr %366, i32 0, i32 0
  %368 = getelementptr inbounds { i64, i64 }, ptr %367, i32 0, i32 0
  %369 = extractvalue { i64, i64 } %365, 0
  store i64 %369, ptr %368, align 8
  %370 = getelementptr inbounds { i64, i64 }, ptr %367, i32 0, i32 1
  %371 = extractvalue { i64, i64 } %365, 1
  store i64 %371, ptr %370, align 8
  %372 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  br i1 %372, label %396, label %373

373:                                              ; preds = %350
  %374 = load i32, ptr %11, align 4, !tbaa !5
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %375
  %377 = getelementptr inbounds %struct.Info, ptr %376, i32 0, i32 2
  %378 = load i32, ptr %377, align 4, !tbaa !14
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %379
  %381 = load i32, ptr %11, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %382
  %384 = getelementptr inbounds %struct.Info, ptr %383, i32 0, i32 2
  %385 = load i32, ptr %384, align 4, !tbaa !14
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %386
  %388 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %380, ptr noundef nonnull align 8 dereferenceable(16) %387) #4
  %389 = getelementptr inbounds %"class.std::bitset", ptr %17, i32 0, i32 0
  %390 = getelementptr inbounds %"struct.std::_Base_bitset", ptr %389, i32 0, i32 0
  %391 = getelementptr inbounds { i64, i64 }, ptr %390, i32 0, i32 0
  %392 = extractvalue { i64, i64 } %388, 0
  store i64 %392, ptr %391, align 8
  %393 = getelementptr inbounds { i64, i64 }, ptr %390, i32 0, i32 1
  %394 = extractvalue { i64, i64 } %388, 1
  store i64 %394, ptr %393, align 8
  %395 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #4
  br label %396

396:                                              ; preds = %373, %350, %327, %304
  %397 = phi i1 [ true, %350 ], [ true, %327 ], [ true, %304 ], [ %395, %373 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  br i1 %397, label %398, label %399

398:                                              ; preds = %396
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %405

399:                                              ; preds = %396
  br label %400

400:                                              ; preds = %399, %297
  br label %401

401:                                              ; preds = %400, %296
  br label %402

402:                                              ; preds = %401
  %403 = load i32, ptr %11, align 4, !tbaa !5
  %404 = add nsw i32 %403, 1
  store i32 %404, ptr %11, align 4, !tbaa !5
  br label %203, !llvm.loop !20

405:                                              ; preds = %398, %295, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %406 = load i32, ptr %7, align 4
  switch i32 %406, label %410 [
    i32 20, label %407
    i32 1, label %408
  ]

407:                                              ; preds = %405
  store i1 true, ptr %2, align 1
  br label %408

408:                                              ; preds = %407, %405
  %409 = load i1, ptr %2, align 1
  ret i1 %409

410:                                              ; preds = %405
  unreachable
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 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 = { 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 = { 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 #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4Info", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !6, i64 8}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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

%struct.Info = type { i32, i32, i32 }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [2 x i64] }

@n = external dso_local local_unnamed_addr global i32, align 4
@que = external dso_local local_unnamed_addr global [10001 x %struct.Info], align 16
@f = external dso_local global [101 x %"class.std::bitset"], align 16
@g = external dso_local global [101 x %"class.std::bitset"], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checki(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %"class.std::bitset", align 8
  %3 = alloca %"class.std::bitset", align 8
  %4 = alloca %"class.std::bitset", align 8
  %5 = alloca %"class.std::bitset", align 8
  %6 = alloca %"class.std::bitset", align 8
  %7 = alloca %"class.std::bitset", align 8
  %8 = load i32, ptr @n, align 4
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %.preheader78

.preheader78:                                     ; preds = %.lr.ph, %1
  %10 = phi i32 [ %8, %1 ], [ %17, %.lr.ph ]
  %11 = icmp sgt i32 %0, 0
  br i1 %11, label %.lr.ph83.preheader, label %.preheader77

.lr.ph83.preheader:                               ; preds = %.preheader78
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph83

.lr.ph:                                           ; preds = %1, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %1 ]
  %12 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %indvars.iv
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef %indvars.iv, i1 noundef zeroext true)
  %15 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %indvars.iv
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr @n, align 4
  %18 = sext i32 %17 to i64
  %19 = icmp slt i64 %indvars.iv.next, %18
  br i1 %19, label %.lr.ph, label %.preheader78, !llvm.loop !5

.preheader77.loopexit:                            ; preds = %43
  %.pre = load i32, ptr @n, align 4
  br label %.preheader77

.preheader77:                                     ; preds = %.preheader77.loopexit, %.preheader78
  %20 = phi i32 [ %.pre, %.preheader77.loopexit ], [ %10, %.preheader78 ]
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.preheader76, label %.preheader75

.lr.ph83:                                         ; preds = %.lr.ph83.preheader, %43
  %indvars.iv102 = phi i64 [ 0, %.lr.ph83.preheader ], [ %indvars.iv.next103, %43 ]
  %22 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %indvars.iv102
  %23 = load i32, ptr %22, align 4, !tbaa !7
  %24 = icmp slt i32 %23, 3
  br i1 %24, label %25, label %43

25:                                               ; preds = %.lr.ph83
  %26 = getelementptr inbounds i8, ptr %22, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %28
  %30 = getelementptr inbounds i8, ptr %22, i64 8
  %31 = load i32, ptr %30, align 4, !tbaa !13
  %32 = sext i32 %31 to i64
  %33 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %32, i1 noundef zeroext true)
  %34 = load i32, ptr %22, align 4, !tbaa !7
  %35 = icmp eq i32 %34, 2
  br i1 %35, label %36, label %43

36:                                               ; preds = %25
  %37 = load i32, ptr %30, align 4, !tbaa !13
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %38
  %40 = load i32, ptr %26, align 4, !tbaa !12
  %41 = sext i32 %40 to i64
  %42 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %39, i64 noundef %41, i1 noundef zeroext true)
  br label %43

43:                                               ; preds = %.lr.ph83, %36, %25
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count
  br i1 %exitcond.not, label %.preheader77.loopexit, label %.lr.ph83, !llvm.loop !14

.preheader76:                                     ; preds = %.preheader77, %._crit_edge
  %44 = phi i32 [ %48, %._crit_edge ], [ %20, %.preheader77 ]
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %._crit_edge ], [ 0, %.preheader77 ]
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph85, label %.preheader76.._crit_edge_crit_edge

.preheader76.._crit_edge_crit_edge:               ; preds = %.preheader76
  %.pre123 = sext i32 %44 to i64
  br label %._crit_edge

.lr.ph85:                                         ; preds = %.preheader76
  %46 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %indvars.iv108
  br label %50

.preheader75:                                     ; preds = %._crit_edge, %.preheader77
  %47 = phi i32 [ %20, %.preheader77 ], [ %48, %._crit_edge ]
  br i1 %11, label %.lr.ph90.preheader, label %.loopexit

.lr.ph90.preheader:                               ; preds = %.preheader75
  %wide.trip.count117 = zext nneg i32 %0 to i64
  br label %.lr.ph90

._crit_edge:                                      ; preds = %55, %.preheader76.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre123, %.preheader76.._crit_edge_crit_edge ], [ %57, %55 ]
  %48 = phi i32 [ %44, %.preheader76.._crit_edge_crit_edge ], [ %56, %55 ]
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %49 = icmp slt i64 %indvars.iv.next109, %.pre-phi
  br i1 %49, label %.preheader76, label %.preheader75, !llvm.loop !15

50:                                               ; preds = %.lr.ph85, %55
  %indvars.iv105 = phi i64 [ 0, %.lr.ph85 ], [ %indvars.iv.next106, %55 ]
  %51 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %indvars.iv105
  %52 = tail call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %51, i64 noundef %indvars.iv108)
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %46) #4
  br label %55

55:                                               ; preds = %50, %53
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %56 = load i32, ptr @n, align 4
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next106, %57
  br i1 %58, label %50, label %._crit_edge, !llvm.loop !17

.lr.ph92:                                         ; preds = %.loopexit74
  %59 = getelementptr inbounds i8, ptr %4, i64 8
  %60 = getelementptr inbounds i8, ptr %5, i64 8
  %61 = getelementptr inbounds i8, ptr %6, i64 8
  %62 = getelementptr inbounds i8, ptr %7, i64 8
  %63 = getelementptr inbounds i8, ptr %2, i64 8
  %64 = getelementptr inbounds i8, ptr %3, i64 8
  %65 = zext nneg i32 %0 to i64
  %wide.trip.count121 = zext nneg i32 %0 to i64
  br label %97

.lr.ph90:                                         ; preds = %.lr.ph90.preheader, %.loopexit74
  %66 = phi i32 [ %47, %.lr.ph90.preheader ], [ %96, %.loopexit74 ]
  %indvars.iv114 = phi i64 [ 0, %.lr.ph90.preheader ], [ %indvars.iv.next115, %.loopexit74 ]
  %67 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %indvars.iv114
  %68 = load i32, ptr %67, align 4, !tbaa !7
  %69 = icmp eq i32 %68, 4
  %70 = icmp sgt i32 %66, 0
  %or.cond = select i1 %69, i1 %70, i1 false
  br i1 %or.cond, label %.lr.ph88, label %.loopexit74

.lr.ph88:                                         ; preds = %.lr.ph90
  %71 = getelementptr inbounds i8, ptr %67, i64 4
  %72 = getelementptr inbounds i8, ptr %67, i64 8
  br label %73

73:                                               ; preds = %.lr.ph88, %92
  %indvars.iv111 = phi i64 [ 0, %.lr.ph88 ], [ %indvars.iv.next112, %92 ]
  %74 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %indvars.iv111
  %75 = load i32, ptr %71, align 4, !tbaa !12
  %76 = sext i32 %75 to i64
  %77 = tail call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %74, i64 noundef %76)
  br i1 %77, label %78, label %83

78:                                               ; preds = %73
  %79 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %indvars.iv111
  %80 = load i32, ptr %72, align 4, !tbaa !13
  %81 = sext i32 %80 to i64
  %82 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %79, i64 noundef %81, i1 noundef zeroext true)
  br label %83

83:                                               ; preds = %78, %73
  %84 = load i32, ptr %72, align 4, !tbaa !13
  %85 = sext i32 %84 to i64
  %86 = tail call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %74, i64 noundef %85)
  br i1 %86, label %87, label %92

87:                                               ; preds = %83
  %88 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %indvars.iv111
  %89 = load i32, ptr %71, align 4, !tbaa !12
  %90 = sext i32 %89 to i64
  %91 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE3setEmb(ptr noundef nonnull align 8 dereferenceable(16) %88, i64 noundef %90, i1 noundef zeroext true)
  br label %92

92:                                               ; preds = %83, %87
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %93 = load i32, ptr @n, align 4
  %94 = sext i32 %93 to i64
  %95 = icmp slt i64 %indvars.iv.next112, %94
  br i1 %95, label %73, label %.loopexit74, !llvm.loop !18

.loopexit74:                                      ; preds = %92, %.lr.ph90
  %96 = phi i32 [ %66, %.lr.ph90 ], [ %93, %92 ]
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next115, %wide.trip.count117
  br i1 %exitcond118.not, label %.lr.ph92, label %.lr.ph90, !llvm.loop !19

97:                                               ; preds = %.lr.ph92, %175
  %indvars.iv119 = phi i64 [ 0, %.lr.ph92 ], [ %indvars.iv.next120, %175 ]
  %98 = phi i1 [ false, %.lr.ph92 ], [ %176, %175 ]
  %99 = getelementptr inbounds [10001 x %struct.Info], ptr @que, i64 0, i64 %indvars.iv119
  %100 = load i32, ptr %99, align 4, !tbaa !7
  switch i32 %100, label %175 [
    i32 3, label %101
    i32 5, label %135
  ]

101:                                              ; preds = %97
  %102 = getelementptr inbounds i8, ptr %99, i64 4
  %103 = load i32, ptr %102, align 4, !tbaa !12
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %104
  %106 = getelementptr inbounds i8, ptr %99, i64 8
  %107 = load i32, ptr %106, align 4, !tbaa !13
  %108 = sext i32 %107 to i64
  %109 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %105, i64 noundef %108)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  br i1 %109, label %110, label %117

110:                                              ; preds = %101
  %111 = load i32, ptr %106, align 4, !tbaa !13
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %112
  %114 = load i32, ptr %102, align 4, !tbaa !12
  %115 = sext i32 %114 to i64
  %116 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE4testEm(ptr noundef nonnull align 8 dereferenceable(16) %113, i64 noundef %115)
  br i1 %116, label %.critedge, label %117

117:                                              ; preds = %110, %101
  %118 = load i32, ptr %102, align 4, !tbaa !12
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %119
  %121 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %119
  %122 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull align 8 dereferenceable(16) %121) #4
  %123 = extractvalue { i64, i64 } %122, 0
  store i64 %123, ptr %2, align 8
  %124 = extractvalue { i64, i64 } %122, 1
  store i64 %124, ptr %63, align 8
  %125 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %2) #4
  br i1 %125, label %126, label %.critedge2

126:                                              ; preds = %117
  %127 = load i32, ptr %106, align 4, !tbaa !13
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %128
  %130 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %128
  %131 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %129, ptr noundef nonnull align 8 dereferenceable(16) %130) #4
  %132 = extractvalue { i64, i64 } %131, 0
  store i64 %132, ptr %3, align 8
  %133 = extractvalue { i64, i64 } %131, 1
  store i64 %133, ptr %64, align 8
  %134 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  br i1 %134, label %.loopexit, label %175

.critedge:                                        ; preds = %110
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  br label %.loopexit

.critedge2:                                       ; preds = %117
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  br label %175

135:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %136 = getelementptr inbounds i8, ptr %99, i64 4
  %137 = load i32, ptr %136, align 4, !tbaa !12
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %138
  %140 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %138
  %141 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %139, ptr noundef nonnull align 8 dereferenceable(16) %140) #4
  %142 = extractvalue { i64, i64 } %141, 0
  store i64 %142, ptr %4, align 8
  %143 = extractvalue { i64, i64 } %141, 1
  store i64 %143, ptr %59, align 8
  %144 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  br i1 %144, label %.critedge4, label %145

145:                                              ; preds = %135
  %146 = getelementptr inbounds i8, ptr %99, i64 8
  %147 = load i32, ptr %146, align 4, !tbaa !13
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %148
  %150 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %148
  %151 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %149, ptr noundef nonnull align 8 dereferenceable(16) %150) #4
  %152 = extractvalue { i64, i64 } %151, 0
  store i64 %152, ptr %5, align 8
  %153 = extractvalue { i64, i64 } %151, 1
  store i64 %153, ptr %60, align 8
  %154 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  br i1 %154, label %.critedge4, label %155

155:                                              ; preds = %145
  %156 = load i32, ptr %146, align 4, !tbaa !13
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %157
  %159 = load i32, ptr %136, align 4, !tbaa !12
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %160
  %162 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %158, ptr noundef nonnull align 8 dereferenceable(16) %161) #4
  %163 = extractvalue { i64, i64 } %162, 0
  store i64 %163, ptr %6, align 8
  %164 = extractvalue { i64, i64 } %162, 1
  store i64 %164, ptr %61, align 8
  %165 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  br i1 %165, label %.critedge4, label %166

166:                                              ; preds = %155
  %167 = load i32, ptr %146, align 4, !tbaa !13
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @f, i64 0, i64 %168
  %170 = getelementptr inbounds [101 x %"class.std::bitset"], ptr @g, i64 0, i64 %168
  %171 = call { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16) %169, ptr noundef nonnull align 8 dereferenceable(16) %170) #4
  %172 = extractvalue { i64, i64 } %171, 0
  store i64 %172, ptr %7, align 8
  %173 = extractvalue { i64, i64 } %171, 1
  store i64 %173, ptr %62, align 8
  %174 = call noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br i1 %174, label %.loopexit, label %175

.critedge4:                                       ; preds = %135, %145, %155
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br label %.loopexit

175:                                              ; preds = %97, %.critedge2, %126, %166
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %176 = icmp uge i64 %indvars.iv.next120, %65
  %exitcond122 = icmp eq i64 %indvars.iv.next120, %wide.trip.count121
  br i1 %exitcond122, label %.loopexit, label %97, !llvm.loop !20

.loopexit:                                        ; preds = %175, %126, %166, %.preheader75, %.critedge4, %.critedge
  %177 = phi i1 [ %98, %.critedge4 ], [ %98, %.critedge ], [ true, %.preheader75 ], [ %176, %175 ], [ %98, %126 ], [ %98, %166 ]
  ret i1 %177
}

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm101EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZStanILm101EESt6bitsetIXT_EERKS1_S3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm101EE3anyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 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 = { 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 = { 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 #4 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTS4Info", !9, i64 0, !9, i64 4, !9, i64 8}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!8, !9, i64 4}
!13 = !{!8, !9, i64 8}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !6}
!18 = distinct !{!18, !6}
!19 = distinct !{!19, !6}
!20 = distinct !{!20, !6}


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