; LLVM IR from tangjz/acm-icpc :: uoj (298)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type { i32, i32 }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>
%class.anon = type { i8 }
%class.anon.2 = type { i8 }

@n = external dso_local global i32, align 4
@dt = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@seq = external dso_local global [100001 x i32], align 16
@fa = external dso_local global [100001 x i32], align 16
@ord1 = external dso_local global [100001 x i32], align 16
@ord2 = external dso_local global [100001 x i32], align 16
@dis = external dso_local global [100001 x i64], align 16
@f = external dso_local global [100001 x i64], align 16
@g = external dso_local global [100001 x i64], align 16
@e = external dso_local global [100001 x %"class.std::vector"], align 16
@ban = external dso_local global [100001 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_Z3dfsi(i32 noundef) #1

; 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) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5solvex(i64 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair.0", align 4
  %7 = alloca %"struct.std::pair.0", align 4
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca { i64, i32 }, align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca { i64, i32 }, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca { i64, i32 }, align 8
  %16 = alloca %class.anon, align 1
  %17 = alloca %class.anon.2, align 1
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  br label %24

24:                                               ; preds = %204, %0
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @dt)
  %26 = icmp eq i32 %25, 2
  br i1 %26, label %27, label %37

27:                                               ; preds = %24
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %34, label %30

30:                                               ; preds = %27
  %31 = load i32, ptr @dt, align 4, !tbaa !5
  %32 = icmp ne i32 %31, 0
  %33 = xor i1 %32, true
  br label %34

34:                                               ; preds = %30, %27
  %35 = phi i1 [ false, %27 ], [ %33, %30 ]
  %36 = xor i1 %35, true
  br label %37

37:                                               ; preds = %34, %24
  %38 = phi i1 [ false, %24 ], [ %36, %34 ]
  br i1 %38, label %39, label %205

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %55, %39
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %58

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %50 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %50, ptr %6, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %54 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %54, ptr %7, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %55

55:                                               ; preds = %45
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %2, align 4, !tbaa !5
  br label %40, !llvm.loop !9

58:                                               ; preds = %44
  store i64 0, ptr getelementptr inbounds ([100001 x i64], ptr @dis, i64 0, i64 1), align 8, !tbaa !11
  store i32 0, ptr getelementptr inbounds ([100001 x i32], ptr @fa, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %59 = call { i64, i32 } @_Z3dfsi(i32 noundef 1)
  store { i64, i32 } %59, ptr %9, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 12, i1 false)
  %60 = getelementptr inbounds %"struct.std::pair", ptr %8, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !13
  store i32 %61, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  %62 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %63
  store i64 0, ptr %64, align 8, !tbaa !11
  %65 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %66
  store i32 0, ptr %67, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %68 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %69 = call { i64, i32 } @_Z3dfsi(i32 noundef %68)
  store { i64, i32 } %69, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %11, i64 12, i1 false)
  %70 = getelementptr inbounds %"struct.std::pair", ptr %10, i32 0, i32 1
  %71 = load i32, ptr %70, align 8, !tbaa !13
  store i32 %71, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %72 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  store i32 %72, ptr %12, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %98, %58
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %103

77:                                               ; preds = %73
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = load i32, ptr @m, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr @m, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %81
  store i32 %78, ptr %82, align 4, !tbaa !5
  %83 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @seq, i64 0, i64 1), align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = sub nsw i64 %86, %90
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100001 x i64], ptr @f, i64 0, i64 %93
  store i64 %91, ptr %94, align 8, !tbaa !11
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %96
  store i8 1, ptr %97, align 1, !tbaa !15
  br label %98

98:                                               ; preds = %77
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  store i32 %102, ptr %12, align 4, !tbaa !5
  br label %73, !llvm.loop !17

103:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %139, %103
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = load i32, ptr @m, align 4, !tbaa !5
  %107 = icmp sle i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %142

109:                                              ; preds = %104
  %110 = load i32, ptr %13, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %114
  store i64 0, ptr %115, align 8, !tbaa !11
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %120
  store i32 0, ptr %121, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = call { i64, i32 } @_Z3dfsi(i32 noundef %125)
  store { i64, i32 } %126, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 12, i1 false)
  %127 = getelementptr inbounds %"struct.std::pair", ptr %14, i32 0, i32 0
  %128 = load i64, ptr %127, align 8, !tbaa !18
  %129 = load i32, ptr %13, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100001 x i64], ptr @g, i64 0, i64 %130
  store i64 %128, ptr %131, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = load i32, ptr %13, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100001 x i32], ptr @ord2, i64 0, i64 %134
  store i32 %132, ptr %135, align 4, !tbaa !5
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100001 x i32], ptr @ord1, i64 0, i64 %137
  store i32 %132, ptr %138, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %109
  %140 = load i32, ptr %13, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %13, align 4, !tbaa !5
  br label %104, !llvm.loop !19

142:                                              ; preds = %108
  %143 = load i32, ptr @m, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr @ord1, i64 %144
  %146 = getelementptr inbounds i32, ptr %145, i64 1
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef getelementptr inbounds (i32, ptr @ord1, i64 1), ptr noundef %146)
  %147 = load i32, ptr @m, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr @ord2, i64 %148
  %150 = getelementptr inbounds i32, ptr %149, i64 1
  call void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef getelementptr inbounds (i32, ptr @ord2, i64 1), ptr noundef %150)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %151 = load i32, ptr @m, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100001 x i64], ptr @f, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !11
  store i64 %154, ptr %19, align 8, !tbaa !11
  br label %155

155:                                              ; preds = %171, %142
  %156 = load i64, ptr %18, align 8, !tbaa !11
  %157 = load i64, ptr %19, align 8, !tbaa !11
  %158 = icmp slt i64 %156, %157
  br i1 %158, label %159, label %173

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %160 = load i64, ptr %18, align 8, !tbaa !11
  %161 = load i64, ptr %19, align 8, !tbaa !11
  %162 = add nsw i64 %160, %161
  %163 = ashr i64 %162, 1
  store i64 %163, ptr %20, align 8, !tbaa !11
  %164 = load i64, ptr %20, align 8, !tbaa !11
  %165 = call noundef zeroext i1 @_Z5solvex(i64 noundef %164)
  br i1 %165, label %166, label %168

166:                                              ; preds = %159
  %167 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %167, ptr %19, align 8, !tbaa !11
  br label %171

168:                                              ; preds = %159
  %169 = load i64, ptr %20, align 8, !tbaa !11
  %170 = add nsw i64 %169, 1
  store i64 %170, ptr %18, align 8, !tbaa !11
  br label %171

171:                                              ; preds = %168, %166
  %172 = phi ptr [ %19, %166 ], [ %18, %168 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %155, !llvm.loop !20

173:                                              ; preds = %155
  %174 = load i64, ptr %18, align 8, !tbaa !11
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %174)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %185, %173
  %177 = load i32, ptr %21, align 4, !tbaa !5
  %178 = load i32, ptr @n, align 4, !tbaa !5
  %179 = icmp sle i32 %177, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %188

181:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #8
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  %182 = load i32, ptr %21, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %183
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %184) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  br label %185

185:                                              ; preds = %181
  %186 = load i32, ptr %21, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %21, align 4, !tbaa !5
  br label %176, !llvm.loop !21

188:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %201, %188
  %190 = load i32, ptr %23, align 4, !tbaa !5
  %191 = load i32, ptr @m, align 4, !tbaa !5
  %192 = icmp sle i32 %190, %191
  br i1 %192, label %194, label %193

193:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %204

194:                                              ; preds = %189
  %195 = load i32, ptr %23, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %199
  store i8 0, ptr %200, align 1, !tbaa !15
  br label %201

201:                                              ; preds = %194
  %202 = load i32, ptr %23, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %23, align 4, !tbaa !5
  br label %189, !llvm.loop !22

204:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %24, !llvm.loop !23

205:                                              ; preds = %37
  ret i32 0
}

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

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

; 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: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) #6

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSSt4pairIxiE", !12, i64 0, !6, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = !{!14, !12, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type { i32, i32 }

@n = external dso_local global i32, align 4
@dt = external dso_local global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@seq = external dso_local local_unnamed_addr global [100001 x i32], align 16
@fa = external dso_local local_unnamed_addr global [100001 x i32], align 16
@ord1 = external dso_local global [100001 x i32], align 16
@ord2 = external dso_local global [100001 x i32], align 16
@dis = external dso_local local_unnamed_addr global [100001 x i64], align 16
@f = external dso_local local_unnamed_addr global [100001 x i64], align 16
@g = external dso_local local_unnamed_addr global [100001 x i64], align 16
@e = external dso_local global [100001 x %"class.std::vector"], align 16
@ban = external dso_local local_unnamed_addr global [100001 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_Z3dfsi(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5solvex(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair.0", align 8
  %5 = alloca %"struct.std::pair.0", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @dt)
  %8 = icmp eq i32 %7, 2
  br i1 %8, label %.lr.ph83, label %.critedge

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph80, %.lr.ph80.preheader
  %indvars.iv94.unr = phi i64 [ 1, %.lr.ph80.preheader ], [ %indvars.iv.next95.3, %.lr.ph80 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph80.epil

.lr.ph80.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph80.epil
  %indvars.iv94.epil = phi i64 [ %indvars.iv.next95.epil, %.lr.ph80.epil ], [ %indvars.iv94.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph80.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %9 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv94.epil
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %11
  store i8 0, ptr %12, align 1, !tbaa !9
  %indvars.iv.next95.epil = add nuw nsw i64 %indvars.iv94.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph80.epil, !llvm.loop !11

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph80.epil, %.preheader
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @dt)
  %14 = icmp eq i32 %13, 2
  br i1 %14, label %.lr.ph83, label %.critedge, !llvm.loop !13

.lr.ph83:                                         ; preds = %0, %.loopexit
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %.not = icmp ne i32 %15, 0
  %16 = load i32, ptr @dt, align 4
  %.not52 = icmp ne i32 %16, 0
  %.not53 = select i1 %.not, i1 true, i1 %.not52
  br i1 %.not53, label %.preheader58, label %.critedge

.preheader58:                                     ; preds = %.lr.ph83
  %17 = icmp sgt i32 %15, 1
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader58
  store i64 0, ptr getelementptr inbounds (i8, ptr @dis, i64 8), align 8, !tbaa !15
  store i32 0, ptr getelementptr inbounds (i8, ptr @fa, i64 4), align 4, !tbaa !5
  %18 = call { i64, i32 } @_Z3dfsi(i32 noundef 1)
  %.fca.1.extract36 = extractvalue { i64, i32 } %18, 1
  store i32 %.fca.1.extract36, ptr getelementptr inbounds (i8, ptr @seq, i64 4), align 4, !tbaa !5
  %19 = sext i32 %.fca.1.extract36 to i64
  %20 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %19
  store i64 0, ptr %20, align 8, !tbaa !15
  %21 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %19
  store i32 0, ptr %21, align 4, !tbaa !5
  %22 = call { i64, i32 } @_Z3dfsi(i32 noundef %.fca.1.extract36)
  %.fca.1.extract30 = extractvalue { i64, i32 } %22, 1
  store i32 %.fca.1.extract30, ptr getelementptr inbounds (i8, ptr @seq, i64 4), align 4, !tbaa !5
  store i32 0, ptr @m, align 4, !tbaa !5
  %23 = icmp sgt i32 %.fca.1.extract30, 0
  br i1 %23, label %.lr.ph62, label %._crit_edge67

.lr.ph:                                           ; preds = %.preheader58, %.lr.ph
  %.04559 = phi i32 [ %33, %.lr.ph ], [ 1, %.preheader58 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %28 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %28, ptr %4, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %32 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %32, ptr %5, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %33 = add nuw nsw i32 %.04559, 1
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !17

.preheader57:                                     ; preds = %.lr.ph62
  %36 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %36, ptr @m, align 4, !tbaa !5
  br label %.lr.ph66

.lr.ph62:                                         ; preds = %._crit_edge, %.lr.ph62
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph62 ], [ 0, %._crit_edge ]
  %.04960 = phi i32 [ %49, %.lr.ph62 ], [ %.fca.1.extract30, %._crit_edge ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv.next
  store i32 %.04960, ptr %37, align 4, !tbaa !5
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @seq, i64 4), align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !15
  %42 = zext nneg i32 %.04960 to i64
  %43 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !15
  %45 = sub nsw i64 %41, %44
  %46 = getelementptr inbounds [100001 x i64], ptr @f, i64 0, i64 %indvars.iv.next
  store i64 %45, ptr %46, align 8, !tbaa !15
  %47 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %42
  store i8 1, ptr %47, align 1, !tbaa !9
  %48 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %42
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph62, label %.preheader57, !llvm.loop !18

._crit_edge67:                                    ; preds = %.lr.ph66, %._crit_edge
  %.pre-phi = phi i64 [ 0, %._crit_edge ], [ %69, %.lr.ph66 ]
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @ord1, i64 4), i64 %.pre-phi
  call void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull getelementptr inbounds (i8, ptr @ord1, i64 4), ptr noundef nonnull %gep)
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %gep81 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @ord2, i64 4), i64 %52
  call void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef nonnull getelementptr inbounds (i8, ptr @ord2, i64 4), ptr noundef nonnull %gep81)
  %53 = load i32, ptr @m, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100001 x i64], ptr @f, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !15
  %57 = icmp sgt i64 %56, 0
  br i1 %57, label %.lr.ph71, label %._crit_edge72

.lr.ph66:                                         ; preds = %.preheader57, %.lr.ph66
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph66 ], [ 1, %.preheader57 ]
  %58 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv88
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100001 x i64], ptr @dis, i64 0, i64 %60
  store i64 0, ptr %61, align 8, !tbaa !15
  %62 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %60
  store i32 0, ptr %62, align 4, !tbaa !5
  %63 = call { i64, i32 } @_Z3dfsi(i32 noundef %59)
  %.fca.0.extract = extractvalue { i64, i32 } %63, 0
  %64 = getelementptr inbounds [100001 x i64], ptr @g, i64 0, i64 %indvars.iv88
  store i64 %.fca.0.extract, ptr %64, align 8, !tbaa !15
  %65 = getelementptr inbounds [100001 x i32], ptr @ord2, i64 0, i64 %indvars.iv88
  %66 = trunc nuw nsw i64 %indvars.iv88 to i32
  store i32 %66, ptr %65, align 4, !tbaa !5
  %67 = getelementptr inbounds [100001 x i32], ptr @ord1, i64 0, i64 %indvars.iv88
  store i32 %66, ptr %67, align 4, !tbaa !5
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %68 = load i32, ptr @m, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %.not54.not = icmp slt i64 %indvars.iv88, %69
  br i1 %.not54.not, label %.lr.ph66, label %._crit_edge67, !llvm.loop !19

.lr.ph71:                                         ; preds = %._crit_edge67, %.lr.ph71
  %.04669 = phi i64 [ %.1, %.lr.ph71 ], [ %56, %._crit_edge67 ]
  %.04768 = phi i64 [ %.148, %.lr.ph71 ], [ 0, %._crit_edge67 ]
  %70 = add nuw nsw i64 %.04669, %.04768
  %71 = lshr i64 %70, 1
  %72 = call noundef zeroext i1 @_Z5solvex(i64 noundef %71)
  %73 = add nuw nsw i64 %71, 1
  %.148 = select i1 %72, i64 %.04768, i64 %73
  %.1 = select i1 %72, i64 %71, i64 %.04669
  %74 = icmp slt i64 %.148, %.1
  br i1 %74, label %.lr.ph71, label %._crit_edge72, !llvm.loop !20

._crit_edge72:                                    ; preds = %.lr.ph71, %._crit_edge67
  %.047.lcssa = phi i64 [ 0, %._crit_edge67 ], [ %.148, %.lr.ph71 ]
  %75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %.047.lcssa)
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %.not5574 = icmp slt i32 %76, 1
  br i1 %.not5574, label %.preheader, label %.lr.ph77

.preheader:                                       ; preds = %.lr.ph77, %._crit_edge72
  %77 = load i32, ptr @m, align 4, !tbaa !5
  %.not5678 = icmp slt i32 %77, 1
  br i1 %.not5678, label %.loopexit, label %.lr.ph80.preheader

.lr.ph80.preheader:                               ; preds = %.preheader
  %78 = zext nneg i32 %77 to i64
  %xtraiter = and i64 %78, 3
  %79 = icmp ult i32 %77, 4
  br i1 %79, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph80.preheader.new

.lr.ph80.preheader.new:                           ; preds = %.lr.ph80.preheader
  %unroll_iter = and i64 %78, 2147483644
  br label %.lr.ph80

.lr.ph77:                                         ; preds = %._crit_edge72, %.lr.ph77
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %.lr.ph77 ], [ 1, %._crit_edge72 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %80 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv91
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %80) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %.not55.not = icmp slt i64 %indvars.iv91, %82
  br i1 %.not55.not, label %.lr.ph77, label %.preheader, !llvm.loop !21

.lr.ph80:                                         ; preds = %.lr.ph80, %.lr.ph80.preheader.new
  %indvars.iv94 = phi i64 [ 1, %.lr.ph80.preheader.new ], [ %indvars.iv.next95.3, %.lr.ph80 ]
  %niter = phi i64 [ 0, %.lr.ph80.preheader.new ], [ %niter.next.3, %.lr.ph80 ]
  %83 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv94
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %85
  store i8 0, ptr %86, align 1, !tbaa !9
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %87 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv.next95
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %89
  store i8 0, ptr %90, align 1, !tbaa !9
  %indvars.iv.next95.1 = add nuw nsw i64 %indvars.iv94, 2
  %91 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv.next95.1
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %93
  store i8 0, ptr %94, align 1, !tbaa !9
  %indvars.iv.next95.2 = add nuw nsw i64 %indvars.iv94, 3
  %95 = getelementptr inbounds [100001 x i32], ptr @seq, i64 0, i64 %indvars.iv.next95.2
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100001 x i8], ptr @ban, i64 0, i64 %97
  store i8 0, ptr %98, align 1, !tbaa !9
  %indvars.iv.next95.3 = add nuw nsw i64 %indvars.iv94, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph80, !llvm.loop !22

.critedge:                                        ; preds = %.lr.ph83, %.loopexit, %0
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

; 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: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ4mainE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


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