; LLVM IR from VastoLorde95/Competitive-Programming :: HackerEarth/Tesco 2016/Problem C/my (C)

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

@del = external dso_local global [24 x [4 x %"struct.std::pair"]], align 16
@vis = external dso_local global [211 x [211 x i32]], align 16
@gen = external dso_local global i32, align 4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z7inrangeii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %0, i64 %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #1 {
  %4 = alloca i1, align 1
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca %"struct.std::pair", align 4
  store i64 %0, ptr %5, align 4
  store i64 %1, ptr %6, align 4
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  br i1 %15, label %16, label %18

16:                                               ; preds = %3
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store i1 true, ptr %4, align 1
  br label %90

18:                                               ; preds = %3
  %19 = load i32, ptr @gen, align 4, !tbaa !9
  %20 = getelementptr inbounds %"struct.std::pair", ptr %5, i32 0, i32 0
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %22
  %24 = getelementptr inbounds %"struct.std::pair", ptr %5, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [211 x i32], ptr %23, i64 0, i64 %26
  store i32 %19, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %28 = call noundef i32 @_Z8fastrandv()
  %29 = srem i32 %28, 24
  store i32 %29, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %83, %18
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = icmp slt i32 %31, 4
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 2, ptr %10, align 4
  br label %86

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %35 = getelementptr inbounds %"struct.std::pair", ptr %5, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !11
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [24 x [4 x %"struct.std::pair"]], ptr @del, i64 0, i64 %38
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [4 x %"struct.std::pair"], ptr %39, i64 0, i64 %41
  %43 = getelementptr inbounds %"struct.std::pair", ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = add nsw i32 %36, %44
  store i32 %45, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %46 = getelementptr inbounds %"struct.std::pair", ptr %5, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [24 x [4 x %"struct.std::pair"]], ptr @del, i64 0, i64 %49
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [4 x %"struct.std::pair"], ptr %50, i64 0, i64 %52
  %54 = getelementptr inbounds %"struct.std::pair", ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !13
  %56 = add nsw i32 %47, %55
  store i32 %56, ptr %12, align 4, !tbaa !9
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %57, i32 noundef %58)
  br i1 %59, label %60, label %79

60:                                               ; preds = %34
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %62
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [211 x i32], ptr %63, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !9
  %68 = load i32, ptr @gen, align 4, !tbaa !9
  %69 = icmp ne i32 %67, %68
  br i1 %69, label %70, label %79

70:                                               ; preds = %60
  %71 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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) %12)
  store i64 %71, ptr %13, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %6, i64 8, i1 false)
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load i64, ptr %13, align 4
  %74 = load i64, ptr %14, align 4
  %75 = call noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %73, i64 %74, ptr noundef nonnull align 8 dereferenceable(24) %72)
  br i1 %75, label %76, label %78

76:                                               ; preds = %70
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store i1 true, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %80

78:                                               ; preds = %70
  br label %79

79:                                               ; preds = %78, %60, %34
  store i32 0, ptr %10, align 4
  br label %80

80:                                               ; preds = %79, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %81 = load i32, ptr %10, align 4
  switch i32 %81, label %86 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %9, align 4, !tbaa !9
  br label %30, !llvm.loop !14

86:                                               ; preds = %80, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %87 = load i32, ptr %10, align 4
  switch i32 %87, label %89 [
    i32 2, label %88
  ]

88:                                               ; preds = %86
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %89

89:                                               ; preds = %88, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %90

90:                                               ; preds = %89, %16
  %91 = load i1, ptr %4, align 1
  ret i1 %91
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z8fastrandv() #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !10, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

@del = external dso_local local_unnamed_addr global [24 x [4 x %"struct.std::pair"]], align 16
@vis = external dso_local local_unnamed_addr global [211 x [211 x i32]], align 16
@gen = external dso_local local_unnamed_addr global i32, align 4

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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 #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z7inrangeii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %0, i64 %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 {
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i64 %0, ptr %4, align 8
  store i64 %1, ptr %5, align 8
  %8 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
  br i1 %8, label %9, label %10

9:                                                ; preds = %3
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %5)
  br label %.critedge17

10:                                               ; preds = %3
  %11 = load i32, ptr @gen, align 4, !tbaa !5
  %12 = load i32, ptr %4, align 8, !tbaa !9
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds i8, ptr %4, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %13, i64 %16
  store i32 %11, ptr %17, align 4, !tbaa !5
  %18 = call noundef i32 @_Z8fastrandv()
  %19 = srem i32 %18, 24
  %20 = sext i32 %19 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %21 = load i32, ptr %4, align 8, !tbaa !9
  %22 = getelementptr inbounds [24 x [4 x %"struct.std::pair"]], ptr @del, i64 0, i64 %20, i64 0
  %23 = load i32, ptr %22, align 16, !tbaa !9
  %24 = add nsw i32 %23, %21
  store i32 %24, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %25 = load i32, ptr %14, align 4, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %22, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !11
  %28 = add nsw i32 %27, %25
  store i32 %28, ptr %7, align 4, !tbaa !5
  %29 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %24, i32 noundef %28)
  br i1 %29, label %30, label %39

30:                                               ; preds = %10
  %31 = sext i32 %24 to i64
  %32 = sext i32 %28 to i64
  %33 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %31, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr @gen, align 4, !tbaa !5
  %.not = icmp eq i32 %34, %35
  br i1 %.not, label %39, label %36

36:                                               ; preds = %30
  %37 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.sroa.0.0.copyload = load i64, ptr %5, align 8
  %38 = call noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %37, i64 %.sroa.0.0.copyload, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %38, label %.critedge, label %39

.critedge:                                        ; preds = %99, %78, %57, %36
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %.critedge17

39:                                               ; preds = %10, %30, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %40 = load i32, ptr %4, align 8, !tbaa !9
  %41 = getelementptr inbounds [24 x [4 x %"struct.std::pair"]], ptr @del, i64 0, i64 %20, i64 1
  %42 = load i32, ptr %41, align 8, !tbaa !9
  %43 = add nsw i32 %42, %40
  store i32 %43, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %44 = load i32, ptr %14, align 4, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %41, i64 4
  %46 = load i32, ptr %45, align 4, !tbaa !11
  %47 = add nsw i32 %46, %44
  store i32 %47, ptr %7, align 4, !tbaa !5
  %48 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %43, i32 noundef %47)
  br i1 %48, label %49, label %60

49:                                               ; preds = %39
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %51, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr @gen, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %55, %56
  br i1 %.not.1, label %60, label %57

57:                                               ; preds = %49
  %58 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.sroa.0.0.copyload.1 = load i64, ptr %5, align 8
  %59 = call noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %58, i64 %.sroa.0.0.copyload.1, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %59, label %.critedge, label %60

60:                                               ; preds = %57, %49, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %61 = load i32, ptr %4, align 8, !tbaa !9
  %62 = getelementptr inbounds [24 x [4 x %"struct.std::pair"]], ptr @del, i64 0, i64 %20, i64 2
  %63 = load i32, ptr %62, align 16, !tbaa !9
  %64 = add nsw i32 %63, %61
  store i32 %64, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %65 = load i32, ptr %14, align 4, !tbaa !11
  %66 = getelementptr inbounds i8, ptr %62, i64 4
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = add nsw i32 %67, %65
  store i32 %68, ptr %7, align 4, !tbaa !5
  %69 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %64, i32 noundef %68)
  br i1 %69, label %70, label %81

70:                                               ; preds = %60
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %72, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = load i32, ptr @gen, align 4, !tbaa !5
  %.not.2 = icmp eq i32 %76, %77
  br i1 %.not.2, label %81, label %78

78:                                               ; preds = %70
  %79 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.sroa.0.0.copyload.2 = load i64, ptr %5, align 8
  %80 = call noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %79, i64 %.sroa.0.0.copyload.2, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %80, label %.critedge, label %81

81:                                               ; preds = %78, %70, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %82 = load i32, ptr %4, align 8, !tbaa !9
  %83 = getelementptr inbounds [24 x [4 x %"struct.std::pair"]], ptr @del, i64 0, i64 %20, i64 3
  %84 = load i32, ptr %83, align 8, !tbaa !9
  %85 = add nsw i32 %84, %82
  store i32 %85, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %86 = load i32, ptr %14, align 4, !tbaa !11
  %87 = getelementptr inbounds i8, ptr %83, i64 4
  %88 = load i32, ptr %87, align 4, !tbaa !11
  %89 = add nsw i32 %88, %86
  store i32 %89, ptr %7, align 4, !tbaa !5
  %90 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %85, i32 noundef %89)
  br i1 %90, label %91, label %.critedge17.loopexit

91:                                               ; preds = %81
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [211 x [211 x i32]], ptr @vis, i64 0, i64 %93, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr @gen, align 4, !tbaa !5
  %.not.3 = icmp eq i32 %97, %98
  br i1 %.not.3, label %.critedge17.loopexit, label %99

99:                                               ; preds = %91
  %100 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.sroa.0.0.copyload.3 = load i64, ptr %5, align 8
  %101 = call noundef zeroext i1 @_Z9randomDFSSt4pairIiiES0_RSt6vectorIS0_SaIS0_EE(i64 %100, i64 %.sroa.0.0.copyload.3, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %101, label %.critedge, label %.critedge17.loopexit

.critedge17.loopexit:                             ; preds = %99, %91, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %.critedge17

.critedge17:                                      ; preds = %.critedge17.loopexit, %.critedge, %9
  %.4 = phi i1 [ true, %9 ], [ true, %.critedge ], [ false, %.critedge17.loopexit ]
  ret i1 %.4
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z8fastrandv() local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass