; LLVM IR from eyangch/competitive-programming :: USACOcontests/platinum/2018.03 (disruption)

; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%struct.uwu = type { i64, i64, i64 }
%struct.lift = type { [20 x [500000 x i64]], [50000 x i64] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%class.anon = type { i8 }

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@P = external dso_local global [50000 x i64], align 16
@EI = external dso_local global [50000 x i64], align 16
@C = external dso_local global [50000 x i64], align 16
@ans = external dso_local global [50000 x i64], align 16
@G = external dso_local global [50000 x %"class.std::vector"], align 16
@E = external dso_local global [50000 x %"struct.std::pair"], align 16
@A = external dso_local global [50000 x %struct.uwu], align 16
@L = external dso_local global %struct.lift, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.uwu, align 8
  %14 = alloca %class.anon, align 1
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %25 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %27
  %29 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %28, ptr noundef null)
  %30 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %31 = load ptr, ptr @stdin, align 8, !tbaa !8
  %32 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %31)
  %33 = load ptr, ptr @stdout, align 8, !tbaa !8
  %34 = call ptr @freopen(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef %33)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  store i64 0, ptr %2, align 8, !tbaa !11
  br label %37

37:                                               ; preds = %57, %0
  %38 = load i64, ptr %2, align 8, !tbaa !11
  %39 = load i64, ptr @N, align 8, !tbaa !11
  %40 = sub nsw i64 %39, 1
  %41 = icmp slt i64 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %60

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %46 = load i64, ptr %3, align 8, !tbaa !11
  %47 = add nsw i64 %46, -1
  store i64 %47, ptr %3, align 8, !tbaa !11
  %48 = load i64, ptr %4, align 8, !tbaa !11
  %49 = add nsw i64 %48, -1
  store i64 %49, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %50 = load i64, ptr %2, align 8, !tbaa !11
  %51 = getelementptr inbounds [50000 x %"struct.std::pair"], ptr @E, i64 0, i64 %50
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  %53 = load i64, ptr %3, align 8, !tbaa !11
  %54 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %53
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %55 = load i64, ptr %4, align 8, !tbaa !11
  %56 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %55
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %57

57:                                               ; preds = %43
  %58 = load i64, ptr %2, align 8, !tbaa !11
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %2, align 8, !tbaa !11
  br label %37, !llvm.loop !13

60:                                               ; preds = %42
  %61 = load i64, ptr @N, align 8, !tbaa !11
  call void @_ZN4lift4initExRA50000_St6vectorIxSaIxEExxx(ptr noundef nonnull align 8 dereferenceable(80400000) @L, i64 noundef %61, ptr noundef nonnull align 8 dereferenceable(1200000) @G, i64 noundef 0, i64 noundef 0, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %62

62:                                               ; preds = %92, %60
  %63 = load i64, ptr %6, align 8, !tbaa !11
  %64 = load i64, ptr @N, align 8, !tbaa !11
  %65 = sub nsw i64 %64, 1
  %66 = icmp slt i64 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %95

68:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %69 = load i64, ptr %6, align 8, !tbaa !11
  %70 = getelementptr inbounds [50000 x %"struct.std::pair"], ptr @E, i64 0, i64 %69
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = load i64, ptr %71, align 16, !tbaa !15
  store i64 %72, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %73 = load i64, ptr %6, align 8, !tbaa !11
  %74 = getelementptr inbounds [50000 x %"struct.std::pair"], ptr @E, i64 0, i64 %73
  %75 = getelementptr inbounds %"struct.std::pair", ptr %74, i32 0, i32 1
  %76 = load i64, ptr %75, align 8, !tbaa !17
  store i64 %76, ptr %8, align 8, !tbaa !11
  %77 = load i64, ptr %7, align 8, !tbaa !11
  %78 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (%struct.lift, ptr @L, i32 0, i32 1), i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = load i64, ptr %8, align 8, !tbaa !11
  %81 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (%struct.lift, ptr @L, i32 0, i32 1), i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = icmp sgt i64 %79, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %68
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %85

85:                                               ; preds = %84, %68
  %86 = load i64, ptr %7, align 8, !tbaa !11
  %87 = load i64, ptr %8, align 8, !tbaa !11
  %88 = getelementptr inbounds [50000 x i64], ptr @P, i64 0, i64 %87
  store i64 %86, ptr %88, align 8, !tbaa !11
  %89 = load i64, ptr %6, align 8, !tbaa !11
  %90 = load i64, ptr %8, align 8, !tbaa !11
  %91 = getelementptr inbounds [50000 x i64], ptr @EI, i64 0, i64 %90
  store i64 %89, ptr %91, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %92

92:                                               ; preds = %85
  %93 = load i64, ptr %6, align 8, !tbaa !11
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %6, align 8, !tbaa !11
  br label %62, !llvm.loop !18

95:                                               ; preds = %67
  %96 = load i64, ptr @N, align 8, !tbaa !11
  %97 = getelementptr inbounds i64, ptr @C, i64 %96
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef @C, ptr noundef %97, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %98

98:                                               ; preds = %119, %95
  %99 = load i64, ptr %9, align 8, !tbaa !11
  %100 = load i64, ptr @M, align 8, !tbaa !11
  %101 = icmp slt i64 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %122

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %105, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %107 = load i64, ptr %10, align 8, !tbaa !11
  %108 = add nsw i64 %107, -1
  store i64 %108, ptr %10, align 8, !tbaa !11
  %109 = load i64, ptr %11, align 8, !tbaa !11
  %110 = add nsw i64 %109, -1
  store i64 %110, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  %111 = getelementptr inbounds %struct.uwu, ptr %13, i32 0, i32 0
  %112 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %112, ptr %111, align 8, !tbaa !19
  %113 = getelementptr inbounds %struct.uwu, ptr %13, i32 0, i32 1
  %114 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %114, ptr %113, align 8, !tbaa !21
  %115 = getelementptr inbounds %struct.uwu, ptr %13, i32 0, i32 2
  %116 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %116, ptr %115, align 8, !tbaa !22
  %117 = load i64, ptr %9, align 8, !tbaa !11
  %118 = getelementptr inbounds [50000 x %struct.uwu], ptr @A, i64 0, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %118, ptr align 8 %13, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %119

119:                                              ; preds = %103
  %120 = load i64, ptr %9, align 8, !tbaa !11
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %9, align 8, !tbaa !11
  br label %98, !llvm.loop !24

122:                                              ; preds = %102
  %123 = load i64, ptr @M, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct.uwu, ptr @A, i64 %123
  call void @"_ZSt4sortIP3uwuZ4mainE3$_0EvT_S3_T0_"(ptr noundef @A, ptr noundef %124)
  %125 = load i64, ptr @N, align 8, !tbaa !11
  %126 = getelementptr inbounds i64, ptr @ans, i64 %125
  %127 = getelementptr inbounds i64, ptr %126, i64 -1
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 -1, ptr %15, align 4, !tbaa !25
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @ans, ptr noundef %127, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %128

128:                                              ; preds = %199, %122
  %129 = load i64, ptr %16, align 8, !tbaa !11
  %130 = load i64, ptr @M, align 8, !tbaa !11
  %131 = icmp slt i64 %129, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %128
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %202

133:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %134 = load i64, ptr %16, align 8, !tbaa !11
  %135 = getelementptr inbounds [50000 x %struct.uwu], ptr @A, i64 0, i64 %134
  %136 = getelementptr inbounds %struct.uwu, ptr %135, i32 0, i32 0
  %137 = load i64, ptr %136, align 8, !tbaa !19
  store i64 %137, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %138 = load i64, ptr %16, align 8, !tbaa !11
  %139 = getelementptr inbounds [50000 x %struct.uwu], ptr @A, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.uwu, ptr %139, i32 0, i32 1
  %141 = load i64, ptr %140, align 8, !tbaa !21
  store i64 %141, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %142 = load i64, ptr %16, align 8, !tbaa !11
  %143 = getelementptr inbounds [50000 x %struct.uwu], ptr @A, i64 0, i64 %142
  %144 = getelementptr inbounds %struct.uwu, ptr %143, i32 0, i32 2
  %145 = load i64, ptr %144, align 8, !tbaa !22
  store i64 %145, ptr %20, align 8, !tbaa !11
  %146 = load i64, ptr %18, align 8, !tbaa !11
  %147 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !11
  store i64 %148, ptr %18, align 8, !tbaa !11
  %149 = load i64, ptr %19, align 8, !tbaa !11
  %150 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !11
  store i64 %151, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %152 = load i64, ptr %18, align 8, !tbaa !11
  %153 = load i64, ptr %19, align 8, !tbaa !11
  %154 = call noundef i64 @_ZN4lift3lcaExx(ptr noundef nonnull align 8 dereferenceable(80400000) @L, i64 noundef %152, i64 noundef %153)
  store i64 %154, ptr %21, align 8, !tbaa !11
  %155 = load i64, ptr %21, align 8, !tbaa !11
  %156 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %155
  %157 = load i64, ptr %156, align 8, !tbaa !11
  store i64 %157, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store i64 0, ptr %22, align 8, !tbaa !11
  br label %158

158:                                              ; preds = %195, %133
  %159 = load i64, ptr %22, align 8, !tbaa !11
  %160 = icmp slt i64 %159, 2
  br i1 %160, label %162, label %161

161:                                              ; preds = %158
  store i32 14, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %198

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store i64 0, ptr %23, align 8, !tbaa !11
  br label %163

163:                                              ; preds = %185, %162
  %164 = load i64, ptr %18, align 8, !tbaa !11
  %165 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (%struct.lift, ptr @L, i32 0, i32 1), i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !11
  %167 = load i64, ptr %21, align 8, !tbaa !11
  %168 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (%struct.lift, ptr @L, i32 0, i32 1), i64 0, i64 %167
  %169 = load i64, ptr %168, align 8, !tbaa !11
  %170 = icmp sgt i64 %166, %169
  br i1 %170, label %171, label %194

171:                                              ; preds = %163
  %172 = load i64, ptr %18, align 8, !tbaa !11
  %173 = getelementptr inbounds [50000 x i64], ptr @EI, i64 0, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !11
  %175 = getelementptr inbounds [50000 x i64], ptr @ans, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !11
  %177 = xor i64 %176, -1
  %178 = icmp ne i64 %177, 0
  br i1 %178, label %185, label %179

179:                                              ; preds = %171
  %180 = load i64, ptr %20, align 8, !tbaa !11
  %181 = load i64, ptr %18, align 8, !tbaa !11
  %182 = getelementptr inbounds [50000 x i64], ptr @EI, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !11
  %184 = getelementptr inbounds [50000 x i64], ptr @ans, i64 0, i64 %183
  store i64 %180, ptr %184, align 8, !tbaa !11
  br label %185

185:                                              ; preds = %179, %171
  %186 = load i64, ptr %21, align 8, !tbaa !11
  %187 = load i64, ptr %18, align 8, !tbaa !11
  %188 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %187
  store i64 %186, ptr %188, align 8, !tbaa !11
  %189 = load i64, ptr %18, align 8, !tbaa !11
  %190 = getelementptr inbounds [50000 x i64], ptr @P, i64 0, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !11
  %192 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %191
  %193 = load i64, ptr %192, align 8, !tbaa !11
  store i64 %193, ptr %18, align 8, !tbaa !11
  br label %163, !llvm.loop !27

194:                                              ; preds = %163
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %195

195:                                              ; preds = %194
  %196 = load i64, ptr %22, align 8, !tbaa !11
  %197 = add nsw i64 %196, 1
  store i64 %197, ptr %22, align 8, !tbaa !11
  br label %158, !llvm.loop !28

198:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %199

199:                                              ; preds = %198
  %200 = load i64, ptr %16, align 8, !tbaa !11
  %201 = add nsw i64 %200, 1
  store i64 %201, ptr %16, align 8, !tbaa !11
  br label %128, !llvm.loop !29

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

203:                                              ; preds = %215, %202
  %204 = load i64, ptr %24, align 8, !tbaa !11
  %205 = load i64, ptr @N, align 8, !tbaa !11
  %206 = sub nsw i64 %205, 1
  %207 = icmp slt i64 %204, %206
  br i1 %207, label %209, label %208

208:                                              ; preds = %203
  store i32 19, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %218

209:                                              ; preds = %203
  %210 = load i64, ptr %24, align 8, !tbaa !11
  %211 = getelementptr inbounds [50000 x i64], ptr @ans, i64 0, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !11
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %212)
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %213, i8 noundef signext 10)
  br label %215

215:                                              ; preds = %209
  %216 = load i64, ptr %24, align 8, !tbaa !11
  %217 = add nsw i64 %216, 1
  store i64 %217, ptr %24, align 8, !tbaa !11
  br label %203, !llvm.loop !30

218:                                              ; preds = %208
  %219 = load i32, ptr %1, align 4
  ret i32 %219
}

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4lift4initExRA50000_St6vectorIxSaIxEExxx(ptr noundef nonnull align 8 dereferenceable(80400000), i64 noundef, ptr noundef nonnull align 8 dereferenceable(1200000), i64 noundef, i64 noundef, i64 noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, 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) #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIP3uwuZ4mainE3$_0EvT_S3_T0_"(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #7

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN4lift3lcaExx(ptr noundef nonnull align 8 dereferenceable(80400000), i64 noundef, i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !12, i64 0, !12, i64 8}
!17 = !{!16, !12, i64 8}
!18 = distinct !{!18, !14}
!19 = !{!20, !12, i64 0}
!20 = !{!"_ZTS3uwu", !12, i64 0, !12, i64 8, !12, i64 16}
!21 = !{!20, !12, i64 8}
!22 = !{!20, !12, i64 16}
!23 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 8, !11}
!24 = distinct !{!24, !14}
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !10, i64 0}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%struct.uwu = type { i64, i64, i64 }
%struct.lift = type { [20 x [500000 x i64]], [50000 x i64] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@P = external dso_local local_unnamed_addr global [50000 x i64], align 16
@EI = external dso_local local_unnamed_addr global [50000 x i64], align 16
@C = external dso_local global [50000 x i64], align 16
@ans = external dso_local global [50000 x i64], align 16
@G = external dso_local global [50000 x %"class.std::vector"], align 16
@E = external dso_local global [50000 x %"struct.std::pair"], align 16
@A = external dso_local global [50000 x %struct.uwu], align 16
@L = external dso_local global %struct.lift, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %18 = load ptr, ptr @stdin, align 8, !tbaa !8
  %19 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %18)
  %20 = load ptr, ptr @stdout, align 8, !tbaa !8
  %21 = tail call ptr @freopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef %20)
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %24 = load i64, ptr @N, align 8, !tbaa !11
  %25 = icmp sgt i64 %24, 1
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa34 = phi i64 [ %24, %0 ], [ %41, %.lr.ph ]
  call void @_ZN4lift4initExRA50000_St6vectorIxSaIxEExxx(ptr noundef nonnull align 8 dereferenceable(80400000) @L, i64 noundef %.lcssa34, ptr noundef nonnull align 8 dereferenceable(1200000) @G, i64 noundef 0, i64 noundef 0, i64 noundef 0)
  %26 = load i64, ptr @N, align 8, !tbaa !11
  %27 = icmp sgt i64 %26, 1
  br i1 %27, label %.lr.ph38, label %._crit_edge39

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02635 = phi i64 [ %40, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %30 = load i64, ptr %1, align 8, !tbaa !11
  %31 = add nsw i64 %30, -1
  store i64 %31, ptr %1, align 8, !tbaa !11
  %32 = load i64, ptr %2, align 8, !tbaa !11
  %33 = add nsw i64 %32, -1
  store i64 %33, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %34 = getelementptr inbounds [50000 x %"struct.std::pair"], ptr @E, i64 0, i64 %.02635
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %36 = load i64, ptr %1, align 8, !tbaa !11
  %37 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %36
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %38 = load i64, ptr %2, align 8, !tbaa !11
  %39 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %38
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %40 = add nuw nsw i64 %.02635, 1
  %41 = load i64, ptr @N, align 8, !tbaa !11
  %42 = add nsw i64 %41, -1
  %43 = icmp slt i64 %40, %42
  br i1 %43, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge39:                                    ; preds = %58, %._crit_edge
  %.lcssa33 = phi i64 [ %26, %._crit_edge ], [ %59, %58 ]
  %44 = getelementptr inbounds i64, ptr @C, i64 %.lcssa33
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef nonnull @C, ptr noundef nonnull %44, i32 noundef 0)
  %45 = load i64, ptr @M, align 8, !tbaa !11
  %46 = icmp sgt i64 %45, 0
  br i1 %46, label %.lr.ph43, label %._crit_edge44

.lr.ph38:                                         ; preds = %._crit_edge, %58
  %47 = phi i64 [ %59, %58 ], [ %26, %._crit_edge ]
  %.02836 = phi i64 [ %64, %58 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %48 = getelementptr inbounds [50000 x %"struct.std::pair"], ptr @E, i64 0, i64 %.02836
  %49 = load i64, ptr %48, align 16, !tbaa !15
  store i64 %49, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %50 = getelementptr inbounds i8, ptr %48, i64 8
  %51 = load i64, ptr %50, align 8, !tbaa !17
  store i64 %51, ptr %5, align 8, !tbaa !11
  %52 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %49
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %51
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = icmp sgt i64 %53, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %.lr.ph38
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %.pre = load i64, ptr %4, align 8, !tbaa !11
  %.pre60 = load i64, ptr %5, align 8, !tbaa !11
  %.pre61 = load i64, ptr @N, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %57, %.lr.ph38
  %59 = phi i64 [ %.pre61, %57 ], [ %47, %.lr.ph38 ]
  %60 = phi i64 [ %.pre60, %57 ], [ %51, %.lr.ph38 ]
  %61 = phi i64 [ %.pre, %57 ], [ %49, %.lr.ph38 ]
  %62 = getelementptr inbounds [50000 x i64], ptr @P, i64 0, i64 %60
  store i64 %61, ptr %62, align 8, !tbaa !11
  %63 = getelementptr inbounds [50000 x i64], ptr @EI, i64 0, i64 %60
  store i64 %.02836, ptr %63, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %64 = add nuw nsw i64 %.02836, 1
  %65 = add nsw i64 %59, -1
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %.lr.ph38, label %._crit_edge39, !llvm.loop !18

._crit_edge44:                                    ; preds = %.lr.ph43, %._crit_edge39
  %.lcssa = phi i64 [ %45, %._crit_edge39 ], [ %83, %.lr.ph43 ]
  %67 = getelementptr inbounds %struct.uwu, ptr @A, i64 %.lcssa
  call void @"_ZSt4sortIP3uwuZ4mainE3$_0EvT_S3_T0_"(ptr noundef nonnull @A, ptr noundef nonnull %67)
  %68 = load i64, ptr @N, align 8, !tbaa !11
  %69 = getelementptr inbounds i64, ptr @ans, i64 %68
  %70 = getelementptr inbounds i8, ptr %69, i64 -8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 -1, ptr %9, align 4, !tbaa !19
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @ans, ptr noundef nonnull %70, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %71 = load i64, ptr @M, align 8, !tbaa !11
  %72 = icmp sgt i64 %71, 0
  br i1 %72, label %.lr.ph52, label %.preheader

.lr.ph43:                                         ; preds = %._crit_edge39, %.lr.ph43
  %.03041 = phi i64 [ %82, %.lr.ph43 ], [ 0, %._crit_edge39 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %75 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %76 = load i64, ptr %6, align 8, !tbaa !11
  %77 = add nsw i64 %76, -1
  %78 = load i64, ptr %7, align 8, !tbaa !11
  %79 = add nsw i64 %78, -1
  %80 = load i64, ptr %8, align 8, !tbaa !11
  %81 = getelementptr inbounds [50000 x %struct.uwu], ptr @A, i64 0, i64 %.03041
  store i64 %77, ptr %81, align 8, !tbaa !11
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %81, i64 8
  store i64 %79, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !11
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %81, i64 16
  store i64 %80, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %82 = add nuw nsw i64 %.03041, 1
  %83 = load i64, ptr @M, align 8, !tbaa !11
  %84 = icmp slt i64 %82, %83
  br i1 %84, label %.lr.ph43, label %._crit_edge44, !llvm.loop !21

.preheader:                                       ; preds = %139, %._crit_edge44
  %85 = load i64, ptr @N, align 8, !tbaa !11
  %86 = icmp sgt i64 %85, 1
  br i1 %86, label %.lr.ph54, label %._crit_edge55

.lr.ph52:                                         ; preds = %._crit_edge44, %139
  %.02950 = phi i64 [ %140, %139 ], [ 0, %._crit_edge44 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %87 = getelementptr inbounds [50000 x %struct.uwu], ptr @A, i64 0, i64 %.02950
  %88 = load i64, ptr %87, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %89 = getelementptr inbounds i8, ptr %87, i64 8
  %90 = load i64, ptr %89, align 8, !tbaa !24
  %91 = getelementptr inbounds i8, ptr %87, i64 16
  %92 = load i64, ptr %91, align 8, !tbaa !25
  %93 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %88
  %94 = load i64, ptr %93, align 8, !tbaa !11
  store i64 %94, ptr %10, align 8, !tbaa !11
  %95 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %90
  %96 = load i64, ptr %95, align 8, !tbaa !11
  store i64 %96, ptr %11, align 8, !tbaa !11
  %97 = call noundef i64 @_ZN4lift3lcaExx(ptr noundef nonnull align 8 dereferenceable(80400000) @L, i64 noundef %94, i64 noundef %96)
  %98 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !11
  %.promoted = load i64, ptr %10, align 8, !tbaa !11
  %102 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %.promoted
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = icmp sgt i64 %103, %101
  br i1 %104, label %.lr.ph46, label %.preheader32.1

.lr.ph46:                                         ; preds = %.lr.ph52, %111
  %105 = phi i64 [ %116, %111 ], [ %.promoted, %.lr.ph52 ]
  %106 = getelementptr inbounds [50000 x i64], ptr @EI, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !11
  %108 = getelementptr inbounds [50000 x i64], ptr @ans, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %.not = icmp eq i64 %109, -1
  br i1 %.not, label %110, label %111

110:                                              ; preds = %.lr.ph46
  store i64 %92, ptr %108, align 8, !tbaa !11
  br label %111

111:                                              ; preds = %110, %.lr.ph46
  %112 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %105
  store i64 %99, ptr %112, align 8, !tbaa !11
  %113 = getelementptr inbounds [50000 x i64], ptr @P, i64 0, i64 %105
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !11
  %117 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !11
  %119 = icmp sgt i64 %118, %101
  br i1 %119, label %.lr.ph46, label %._crit_edge47, !llvm.loop !26

._crit_edge47:                                    ; preds = %111
  store i64 %116, ptr %10, align 8, !tbaa !11
  br label %.preheader32.1

.preheader32.1:                                   ; preds = %._crit_edge47, %.lr.ph52
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %120 = load i64, ptr %100, align 8, !tbaa !11
  %.promoted.1 = load i64, ptr %10, align 8, !tbaa !11
  %121 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %.promoted.1
  %122 = load i64, ptr %121, align 8, !tbaa !11
  %123 = icmp sgt i64 %122, %120
  br i1 %123, label %.lr.ph46.1, label %139

.lr.ph46.1:                                       ; preds = %.preheader32.1, %130
  %124 = phi i64 [ %135, %130 ], [ %.promoted.1, %.preheader32.1 ]
  %125 = getelementptr inbounds [50000 x i64], ptr @EI, i64 0, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !11
  %127 = getelementptr inbounds [50000 x i64], ptr @ans, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !11
  %.not.1 = icmp eq i64 %128, -1
  br i1 %.not.1, label %129, label %130

129:                                              ; preds = %.lr.ph46.1
  store i64 %92, ptr %127, align 8, !tbaa !11
  br label %130

130:                                              ; preds = %129, %.lr.ph46.1
  %131 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %124
  store i64 %99, ptr %131, align 8, !tbaa !11
  %132 = getelementptr inbounds [50000 x i64], ptr @P, i64 0, i64 %124
  %133 = load i64, ptr %132, align 8, !tbaa !11
  %134 = getelementptr inbounds [50000 x i64], ptr @C, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !11
  %136 = getelementptr inbounds [50000 x i64], ptr getelementptr inbounds (i8, ptr @L, i64 80000000), i64 0, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !11
  %138 = icmp sgt i64 %137, %120
  br i1 %138, label %.lr.ph46.1, label %._crit_edge47.1, !llvm.loop !26

._crit_edge47.1:                                  ; preds = %130
  store i64 %135, ptr %10, align 8, !tbaa !11
  br label %139

139:                                              ; preds = %._crit_edge47.1, %.preheader32.1
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %140 = add nuw nsw i64 %.02950, 1
  %141 = load i64, ptr @M, align 8, !tbaa !11
  %142 = icmp slt i64 %140, %141
  br i1 %142, label %.lr.ph52, label %.preheader, !llvm.loop !27

._crit_edge55:                                    ; preds = %.lr.ph54, %.preheader
  ret i32 0

.lr.ph54:                                         ; preds = %.preheader, %.lr.ph54
  %.053 = phi i64 [ %147, %.lr.ph54 ], [ 0, %.preheader ]
  %143 = getelementptr inbounds [50000 x i64], ptr @ans, i64 0, i64 %.053
  %144 = load i64, ptr %143, align 8, !tbaa !11
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %144)
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %145, i8 noundef signext 10)
  %147 = add nuw nsw i64 %.053, 1
  %148 = load i64, ptr @N, align 8, !tbaa !11
  %149 = add nsw i64 %148, -1
  %150 = icmp slt i64 %147, %149
  br i1 %150, label %.lr.ph54, label %._crit_edge55, !llvm.loop !28
}

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4lift4initExRA50000_St6vectorIxSaIxEExxx(ptr noundef nonnull align 8 dereferenceable(80400000), i64 noundef, ptr noundef nonnull align 8 dereferenceable(1200000), i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN4lift3lcaExx(ptr noundef nonnull align 8 dereferenceable(80400000), i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !12, i64 0, !12, i64 8}
!17 = !{!16, !12, i64 8}
!18 = distinct !{!18, !14}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !10, i64 0}
!21 = distinct !{!21, !14}
!22 = !{!23, !12, i64 0}
!23 = !{!"_ZTS3uwu", !12, i64 0, !12, i64 8, !12, i64 16}
!24 = !{!23, !12, i64 8}
!25 = !{!23, !12, i64 16}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}


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