; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2015.12 (lightson)

; 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.std::pair" = type { i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12setAvailableRA100_A100_bPS_S2_RSt5queueISt4pairIiiESt5dequeIS5_SaIS5_EEEiii(ptr noundef nonnull align 1 dereferenceable(10000) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(80) %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair", align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !9
  %23 = load i32, ptr %12, align 4, !tbaa !9
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %25, label %46

25:                                               ; preds = %7
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = sub nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100 x i8], ptr %26, i64 %29
  %31 = load i32, ptr %13, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100 x i8], ptr %30, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !11, !range !13, !noundef !14
  %35 = trunc i8 %34 to i1
  %36 = xor i1 %35, true
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100 x [100 x i8]], ptr %37, i64 0, i64 %40
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100 x i8], ptr %41, i64 0, i64 %43
  %45 = zext i1 %36 to i8
  store i8 %45, ptr %44, align 1, !tbaa !11
  br label %46

46:                                               ; preds = %25, %7
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = load i32, ptr %14, align 4, !tbaa !9
  %49 = sub nsw i32 %48, 1
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %51, label %72

51:                                               ; preds = %46
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100 x i8], ptr %52, i64 %55
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100 x i8], ptr %56, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !11, !range !13, !noundef !14
  %61 = trunc i8 %60 to i1
  %62 = xor i1 %61, true
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100 x [100 x i8]], ptr %63, i64 0, i64 %66
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100 x i8], ptr %67, i64 0, i64 %69
  %71 = zext i1 %62 to i8
  store i8 %71, ptr %70, align 1, !tbaa !11
  br label %72

72:                                               ; preds = %51, %46
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %75, label %96

75:                                               ; preds = %72
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100 x i8], ptr %76, i64 %78
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = sub nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100 x i8], ptr %79, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !11, !range !13, !noundef !14
  %85 = trunc i8 %84 to i1
  %86 = xor i1 %85, true
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100 x [100 x i8]], ptr %87, i64 0, i64 %89
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = sub nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100 x i8], ptr %90, i64 0, i64 %93
  %95 = zext i1 %86 to i8
  store i8 %95, ptr %94, align 1, !tbaa !11
  br label %96

96:                                               ; preds = %75, %72
  %97 = load i32, ptr %13, align 4, !tbaa !9
  %98 = load i32, ptr %14, align 4, !tbaa !9
  %99 = sub nsw i32 %98, 1
  %100 = icmp slt i32 %97, %99
  br i1 %100, label %101, label %122

101:                                              ; preds = %96
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100 x i8], ptr %102, i64 %104
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100 x i8], ptr %105, i64 0, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !11, !range !13, !noundef !14
  %111 = trunc i8 %110 to i1
  %112 = xor i1 %111, true
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100 x [100 x i8]], ptr %113, i64 0, i64 %115
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100 x i8], ptr %116, i64 0, i64 %119
  %121 = zext i1 %112 to i8
  store i8 %121, ptr %120, align 1, !tbaa !11
  br label %122

122:                                              ; preds = %101, %96
  %123 = load i32, ptr %12, align 4, !tbaa !9
  %124 = load i32, ptr %14, align 4, !tbaa !9
  %125 = sub nsw i32 %124, 1
  %126 = icmp slt i32 %123, %125
  br i1 %126, label %127, label %154

127:                                              ; preds = %122
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100 x [100 x i8]], ptr %128, i64 0, i64 %131
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100 x i8], ptr %132, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !11, !range !13, !noundef !14
  %137 = trunc i8 %136 to i1
  br i1 %137, label %138, label %154

138:                                              ; preds = %127
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100 x i8], ptr %139, i64 %142
  %144 = load i32, ptr %13, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100 x i8], ptr %143, i64 0, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !11, !range !13, !noundef !14
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %154

149:                                              ; preds = %138
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %16, align 4, !tbaa !9
  %153 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i64 %153, ptr %15, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %150, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  br label %154

154:                                              ; preds = %149, %138, %127, %122
  %155 = load i32, ptr %12, align 4, !tbaa !9
  %156 = icmp sgt i32 %155, 0
  br i1 %156, label %157, label %184

157:                                              ; preds = %154
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100 x [100 x i8]], ptr %158, i64 0, i64 %161
  %163 = load i32, ptr %13, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [100 x i8], ptr %162, i64 0, i64 %164
  %166 = load i8, ptr %165, align 1, !tbaa !11, !range !13, !noundef !14
  %167 = trunc i8 %166 to i1
  br i1 %167, label %168, label %184

168:                                              ; preds = %157
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = load i32, ptr %12, align 4, !tbaa !9
  %171 = sub nsw i32 %170, 1
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [100 x i8], ptr %169, i64 %172
  %174 = load i32, ptr %13, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100 x i8], ptr %173, i64 0, i64 %175
  %177 = load i8, ptr %176, align 1, !tbaa !11, !range !13, !noundef !14
  %178 = trunc i8 %177 to i1
  br i1 %178, label %179, label %184

179:                                              ; preds = %168
  %180 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = sub nsw i32 %181, 1
  store i32 %182, ptr %18, align 4, !tbaa !9
  %183 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i64 %183, ptr %17, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %180, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #2
  br label %184

184:                                              ; preds = %179, %168, %157, %154
  %185 = load i32, ptr %13, align 4, !tbaa !9
  %186 = load i32, ptr %14, align 4, !tbaa !9
  %187 = sub nsw i32 %186, 1
  %188 = icmp slt i32 %185, %187
  br i1 %188, label %189, label %216

189:                                              ; preds = %184
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [100 x [100 x i8]], ptr %190, i64 0, i64 %192
  %194 = load i32, ptr %13, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100 x i8], ptr %193, i64 0, i64 %196
  %198 = load i8, ptr %197, align 1, !tbaa !11, !range !13, !noundef !14
  %199 = trunc i8 %198 to i1
  br i1 %199, label %200, label %216

200:                                              ; preds = %189
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = load i32, ptr %12, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [100 x i8], ptr %201, i64 %203
  %205 = load i32, ptr %13, align 4, !tbaa !9
  %206 = add nsw i32 %205, 1
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [100 x i8], ptr %204, i64 0, i64 %207
  %209 = load i8, ptr %208, align 1, !tbaa !11, !range !13, !noundef !14
  %210 = trunc i8 %209 to i1
  br i1 %210, label %211, label %216

211:                                              ; preds = %200
  %212 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #2
  %213 = load i32, ptr %13, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %20, align 4, !tbaa !9
  %215 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i64 %215, ptr %19, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %212, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #2
  br label %216

216:                                              ; preds = %211, %200, %189, %184
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = icmp sgt i32 %217, 0
  br i1 %218, label %219, label %246

219:                                              ; preds = %216
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = load i32, ptr %12, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [100 x [100 x i8]], ptr %220, i64 0, i64 %222
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = sub nsw i32 %224, 1
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [100 x i8], ptr %223, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !11, !range !13, !noundef !14
  %229 = trunc i8 %228 to i1
  br i1 %229, label %230, label %246

230:                                              ; preds = %219
  %231 = load ptr, ptr %10, align 8, !tbaa !5
  %232 = load i32, ptr %12, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [100 x i8], ptr %231, i64 %233
  %235 = load i32, ptr %13, align 4, !tbaa !9
  %236 = sub nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [100 x i8], ptr %234, i64 0, i64 %237
  %239 = load i8, ptr %238, align 1, !tbaa !11, !range !13, !noundef !14
  %240 = trunc i8 %239 to i1
  br i1 %240, label %241, label %246

241:                                              ; preds = %230
  %242 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #2
  %243 = load i32, ptr %13, align 4, !tbaa !9
  %244 = sub nsw i32 %243, 1
  store i32 %244, ptr %22, align 4, !tbaa !9
  %245 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %22)
  store i64 %245, ptr %21, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %242, ptr noundef nonnull align 4 dereferenceable(8) %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #2
  br label %246

246:                                              ; preds = %241, %230, %219, %216
  ret void
}

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

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

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

; 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 i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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 = { nounwind }

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

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


; 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.std::pair" = type { i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12setAvailableRA100_A100_bPS_S2_RSt5queueISt4pairIiiESt5dequeIS5_SaIS5_EEEiii(ptr nocapture noundef nonnull align 1 dereferenceable(10000) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr noundef nonnull align 8 dereferenceable(80) %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #0 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca i32, align 4
  store i32 %4, ptr %8, align 4, !tbaa !5
  store i32 %5, ptr %9, align 4, !tbaa !5
  %18 = icmp sgt i32 %4, 0
  br i1 %18, label %19, label %27

19:                                               ; preds = %7
  %20 = add nsw i32 %4, -1
  %21 = zext nneg i32 %20 to i64
  %22 = sext i32 %5 to i64
  %23 = getelementptr inbounds [100 x i8], ptr %1, i64 %21, i64 %22
  %24 = load i8, ptr %23, align 1, !tbaa !9, !range !11, !noundef !12
  %25 = xor i8 %24, 1
  %26 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %21, i64 %22
  store i8 %25, ptr %26, align 1, !tbaa !9
  br label %27

27:                                               ; preds = %19, %7
  %28 = add nsw i32 %6, -1
  %29 = icmp sgt i32 %28, %4
  br i1 %29, label %30, label %38

30:                                               ; preds = %27
  %31 = add nsw i32 %4, 1
  %32 = sext i32 %31 to i64
  %33 = sext i32 %5 to i64
  %34 = getelementptr inbounds [100 x i8], ptr %1, i64 %32, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !9, !range !11, !noundef !12
  %36 = xor i8 %35, 1
  %37 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %32, i64 %33
  store i8 %36, ptr %37, align 1, !tbaa !9
  br label %38

38:                                               ; preds = %30, %27
  %39 = icmp sgt i32 %5, 0
  br i1 %39, label %40, label %48

40:                                               ; preds = %38
  %41 = sext i32 %4 to i64
  %42 = add nsw i32 %5, -1
  %43 = zext nneg i32 %42 to i64
  %44 = getelementptr inbounds [100 x i8], ptr %1, i64 %41, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !9, !range !11, !noundef !12
  %46 = xor i8 %45, 1
  %47 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %41, i64 %43
  store i8 %46, ptr %47, align 1, !tbaa !9
  br label %48

48:                                               ; preds = %40, %38
  %49 = icmp sgt i32 %28, %5
  br i1 %49, label %50, label %58

50:                                               ; preds = %48
  %51 = sext i32 %4 to i64
  %52 = add nsw i32 %5, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100 x i8], ptr %1, i64 %51, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !9, !range !11, !noundef !12
  %56 = xor i8 %55, 1
  %57 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %51, i64 %53
  store i8 %56, ptr %57, align 1, !tbaa !9
  br label %58

58:                                               ; preds = %50, %48
  br i1 %29, label %59, label %72

59:                                               ; preds = %58
  %60 = add nsw i32 %4, 1
  %61 = sext i32 %60 to i64
  %62 = sext i32 %5 to i64
  %63 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %61, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !9, !range !11, !noundef !12
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %66, label %72

66:                                               ; preds = %59
  %67 = getelementptr inbounds [100 x i8], ptr %2, i64 %61, i64 %62
  %68 = load i8, ptr %67, align 1, !tbaa !9, !range !11, !noundef !12
  %69 = trunc nuw i8 %68 to i1
  br i1 %69, label %70, label %72

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #2
  store i32 %60, ptr %11, align 4, !tbaa !5
  %71 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %71, ptr %10, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #2
  %.pre30.pre = load i32, ptr %9, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %70, %66, %59, %58
  %.pre30 = phi i32 [ %.pre30.pre, %70 ], [ %5, %66 ], [ %5, %59 ], [ %5, %58 ]
  br i1 %18, label %73, label %86

73:                                               ; preds = %72
  %74 = add nsw i32 %4, -1
  %75 = zext nneg i32 %74 to i64
  %76 = sext i32 %.pre30 to i64
  %77 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %75, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !9, !range !11, !noundef !12
  %79 = trunc nuw i8 %78 to i1
  br i1 %79, label %80, label %86

80:                                               ; preds = %73
  %81 = getelementptr inbounds [100 x i8], ptr %2, i64 %75, i64 %76
  %82 = load i8, ptr %81, align 1, !tbaa !9, !range !11, !noundef !12
  %83 = trunc nuw i8 %82 to i1
  br i1 %83, label %84, label %86

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #2
  store i32 %74, ptr %13, align 4, !tbaa !5
  %85 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %85, ptr %12, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #2
  %.pre = load i32, ptr %9, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %84, %80, %73, %72
  %87 = phi i32 [ %.pre, %84 ], [ %.pre30, %80 ], [ %.pre30, %73 ], [ %.pre30, %72 ]
  %88 = icmp slt i32 %87, %28
  br i1 %88, label %89, label %thread-pre-split

89:                                               ; preds = %86
  %90 = sext i32 %4 to i64
  %91 = add nsw i32 %87, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %90, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !9, !range !11, !noundef !12
  %95 = trunc nuw i8 %94 to i1
  br i1 %95, label %96, label %thread-pre-split

96:                                               ; preds = %89
  %97 = getelementptr inbounds [100 x i8], ptr %2, i64 %90, i64 %92
  %98 = load i8, ptr %97, align 1, !tbaa !9, !range !11, !noundef !12
  %99 = trunc nuw i8 %98 to i1
  br i1 %99, label %100, label %thread-pre-split

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #2
  store i32 %91, ptr %15, align 4, !tbaa !5
  %101 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i64 %101, ptr %14, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #2
  %.pr.pre = load i32, ptr %9, align 4, !tbaa !5
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %100, %96, %89, %86
  %102 = phi i32 [ %87, %86 ], [ %87, %89 ], [ %87, %96 ], [ %.pr.pre, %100 ]
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %104, label %118

104:                                              ; preds = %thread-pre-split
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = add nsw i32 %102, -1
  %108 = zext nneg i32 %107 to i64
  %109 = getelementptr inbounds [100 x [100 x i8]], ptr %0, i64 0, i64 %106, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !9, !range !11, !noundef !12
  %111 = trunc nuw i8 %110 to i1
  br i1 %111, label %112, label %118

112:                                              ; preds = %104
  %113 = getelementptr inbounds [100 x i8], ptr %2, i64 %106, i64 %108
  %114 = load i8, ptr %113, align 1, !tbaa !9, !range !11, !noundef !12
  %115 = trunc nuw i8 %114 to i1
  br i1 %115, label %116, label %118

116:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #2
  store i32 %107, ptr %17, align 4, !tbaa !5
  %117 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i64 %117, ptr %16, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #2
  br label %118

118:                                              ; preds = %116, %112, %104, %thread-pre-split
  ret void
}

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

; 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 uwtable
declare dso_local i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; 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 i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass