; LLVM IR from kazunetakahashi/atcoder :: 2017/1124_code-fes-2016-final (G)

; 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::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@Q = external dso_local global i32, align 4
@A = external dso_local global [200010 x i32], align 16
@B = external dso_local global [200010 x i32], align 16
@C = external dso_local global [200010 x i64], align 16
@X = external dso_local global [200010 x i64], align 16
@V = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL5infty = external hidden constant i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5uniteii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::tuple", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::tuple", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) @Q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %41, %0
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr @Q, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200010 x i32], ptr @A, i64 0, i64 %30
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [200010 x i32], ptr @B, i64 0, i64 %34
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [200010 x i64], ptr @C, i64 0, i64 %38
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(8) %39)
  br label %41

41:                                               ; preds = %28
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %23, !llvm.loop !9

44:                                               ; preds = %27
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @X, ptr noundef getelementptr inbounds (i64, ptr @X, i64 200010), ptr noundef nonnull align 8 dereferenceable(8) @_ZL5infty)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %98, %44
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = load i32, ptr @Q, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %101

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #7
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [200010 x i64], ptr @C, i64 0, i64 %52
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [200010 x i32], ptr @A, i64 0, i64 %55
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200010 x i32], ptr @B, i64 0, i64 %58
  call void @_ZNSt5tupleIJxiiEEC2IJRxRiS3_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS5_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(4) %59) #7
  call void @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @V, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [200010 x i32], ptr @A, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200010 x i64], ptr @C, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !11
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %5, align 8, !tbaa !11
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %72 = load i64, ptr %71, align 8, !tbaa !11
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [200010 x i32], ptr @A, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %77
  store i64 %72, ptr %78, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200010 x i32], ptr @B, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [200010 x i64], ptr @C, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !11
  %89 = add nsw i64 %88, 2
  store i64 %89, ptr %6, align 8, !tbaa !11
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [200010 x i32], ptr @B, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %96
  store i64 %91, ptr %97, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %98

98:                                               ; preds = %50
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %3, align 4, !tbaa !5
  br label %45, !llvm.loop !13

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

102:                                              ; preds = %130, %101
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = load i32, ptr @N, align 4, !tbaa !5
  %105 = mul nsw i32 3, %104
  %106 = icmp slt i32 %103, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %133

108:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = load i32, ptr @N, align 4, !tbaa !5
  %111 = srem i32 %109, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = add nsw i64 %114, 2
  store i64 %115, ptr %8, align 8, !tbaa !11
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  %118 = load i32, ptr @N, align 4, !tbaa !5
  %119 = srem i32 %117, %118
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %120
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %121)
  %123 = load i64, ptr %122, align 8, !tbaa !11
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  %126 = load i32, ptr @N, align 4, !tbaa !5
  %127 = srem i32 %125, %126
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %128
  store i64 %123, ptr %129, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %130

130:                                              ; preds = %108
  %131 = load i32, ptr %7, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %7, align 4, !tbaa !5
  br label %102, !llvm.loop !14

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

134:                                              ; preds = %147, %133
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = load i32, ptr @N, align 4, !tbaa !5
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %150

139:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  %145 = load i32, ptr @N, align 4, !tbaa !5
  %146 = srem i32 %144, %145
  store i32 %146, ptr %11, align 4, !tbaa !5
  call void @_ZNSt5tupleIJxiiEEC2IJRxRiiELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS5_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %11) #7
  call void @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @V, ptr noundef nonnull align 8 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %147

147:                                              ; preds = %139
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %9, align 4, !tbaa !5
  br label %134, !llvm.loop !15

150:                                              ; preds = %138
  %151 = call ptr @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @V) #7
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call ptr @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @V) #7
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %156, ptr %158)
  call void @_Z4initv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %159 = call ptr @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @V) #7
  %160 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %159, ptr %160, align 8
  br label %161

161:                                              ; preds = %187, %150
  %162 = load i32, ptr %14, align 4, !tbaa !5
  %163 = load i32, ptr @N, align 4, !tbaa !5
  %164 = sub nsw i32 %163, 1
  %165 = icmp slt i32 %162, %164
  br i1 %165, label %166, label %190

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %167 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %167) #7
  %169 = load i64, ptr %168, align 8, !tbaa !11
  store i64 %169, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %170) #7
  %172 = load i32, ptr %171, align 4, !tbaa !5
  store i32 %172, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %173 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %173) #7
  %175 = load i32, ptr %174, align 4, !tbaa !5
  store i32 %175, ptr %19, align 4, !tbaa !5
  %176 = load i32, ptr %18, align 4, !tbaa !5
  %177 = load i32, ptr %19, align 4, !tbaa !5
  %178 = call noundef zeroext i1 @_Z6issameii(i32 noundef %176, i32 noundef %177)
  br i1 %178, label %187, label %179

179:                                              ; preds = %166
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %14, align 4, !tbaa !5
  %182 = load i64, ptr %17, align 8, !tbaa !11
  %183 = load i64, ptr %15, align 8, !tbaa !11
  %184 = add nsw i64 %183, %182
  store i64 %184, ptr %15, align 8, !tbaa !11
  %185 = load i32, ptr %18, align 4, !tbaa !5
  %186 = load i32, ptr %19, align 4, !tbaa !5
  call void @_Z5uniteii(i32 noundef %185, i32 noundef %186)
  br label %187

187:                                              ; preds = %179, %166
  %188 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef 0) #7
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %161, !llvm.loop !16

190:                                              ; preds = %161
  %191 = load i64, ptr %15, align 8, !tbaa !11
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %191)
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  %194 = load i32, ptr %1, align 4
  ret i32 %194
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #5

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { "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 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<long long, int, int>, std::allocator<std::tuple<long long, int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@Q = external dso_local global i32, align 4
@A = external dso_local global [200010 x i32], align 16
@B = external dso_local global [200010 x i32], align 16
@C = external dso_local global [200010 x i64], align 16
@X = external dso_local global [200010 x i64], align 16
@V = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL5infty = external hidden constant i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5uniteii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %"class.std::tuple", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::tuple", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) @Q)
  %11 = load i32, ptr @Q, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  tail call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @X, ptr noundef nonnull getelementptr inbounds (i8, ptr @X, i64 1600080), ptr noundef nonnull align 8 dereferenceable(8) @_ZL5infty)
  %13 = load i32, ptr @Q, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph41, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %15 = getelementptr inbounds [200010 x i32], ptr @A, i64 0, i64 %indvars.iv
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %17 = getelementptr inbounds [200010 x i32], ptr @B, i64 0, i64 %indvars.iv
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %19 = getelementptr inbounds [200010 x i64], ptr @C, i64 0, i64 %indvars.iv
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr @Q, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next, %22
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph41, %._crit_edge
  %24 = load i32, ptr @N, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph43, label %._crit_edge44.thread

._crit_edge44.thread:                             ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  br label %._crit_edge48

.lr.ph41:                                         ; preds = %._crit_edge, %.lr.ph41
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %.lr.ph41 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #7
  %26 = getelementptr inbounds [200010 x i64], ptr @C, i64 0, i64 %indvars.iv55
  %27 = getelementptr inbounds [200010 x i32], ptr @A, i64 0, i64 %indvars.iv55
  %28 = getelementptr inbounds [200010 x i32], ptr @B, i64 0, i64 %indvars.iv55
  call void @_ZNSt5tupleIJxiiEEC2IJRxRiS3_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS5_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28) #7
  call void @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @V, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #7
  %29 = load i32, ptr %27, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %32 = load i64, ptr %26, align 8, !tbaa !11
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %2, align 8, !tbaa !11
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = load i32, ptr %27, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %37
  store i64 %35, ptr %38, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %39 = load i32, ptr %28, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %42 = load i64, ptr %26, align 8, !tbaa !11
  %43 = add nsw i64 %42, 2
  store i64 %43, ptr %3, align 8, !tbaa !11
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = load i32, ptr %28, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %47
  store i64 %45, ptr %48, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %49 = load i32, ptr @Q, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next56, %50
  br i1 %51, label %.lr.ph41, label %.preheader, !llvm.loop !13

._crit_edge44:                                    ; preds = %.lr.ph43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %52 = icmp sgt i32 %65, 0
  br i1 %52, label %.lr.ph47, label %._crit_edge48

.lr.ph43:                                         ; preds = %.preheader, %.lr.ph43
  %53 = phi i32 [ %65, %.lr.ph43 ], [ %24, %.preheader ]
  %.03442 = phi i32 [ %59, %.lr.ph43 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %54 = srem i32 %.03442, %53
  %55 = zext nneg i32 %54 to i64
  %56 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = add nsw i64 %57, 2
  store i64 %58, ptr %4, align 8, !tbaa !11
  %59 = add nuw nsw i32 %.03442, 1
  %60 = srem i32 %59, %53
  %61 = zext nneg i32 %60 to i64
  %62 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %61
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %62)
  %64 = load i64, ptr %63, align 8, !tbaa !11
  %65 = load i32, ptr @N, align 4, !tbaa !5
  %66 = srem i32 %59, %65
  %67 = zext nneg i32 %66 to i64
  %68 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %67
  store i64 %64, ptr %68, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %69 = mul nsw i32 %65, 3
  %70 = icmp slt i32 %59, %69
  br i1 %70, label %.lr.ph43, label %._crit_edge44, !llvm.loop !14

._crit_edge48:                                    ; preds = %.lr.ph47, %._crit_edge44.thread, %._crit_edge44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %71 = call ptr @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @V) #7
  %72 = call ptr @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @V) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %71, ptr %72)
  call void @_Z4initv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %73 = call ptr @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @V) #7
  store ptr %73, ptr %8, align 8
  %74 = load i32, ptr @N, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 1
  br i1 %75, label %.lr.ph52, label %._crit_edge53

.lr.ph47:                                         ; preds = %._crit_edge44, %.lr.ph47
  %76 = phi i32 [ %83, %.lr.ph47 ], [ %65, %._crit_edge44 ]
  %storemerge45 = phi i32 [ %82, %.lr.ph47 ], [ 0, %._crit_edge44 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %77 = sext i32 %storemerge45 to i64
  %78 = getelementptr inbounds [200010 x i64], ptr @X, i64 0, i64 %77
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %79 = add nsw i32 %storemerge45, 1
  %80 = srem i32 %79, %76
  store i32 %80, ptr %7, align 4, !tbaa !5
  call void @_ZNSt5tupleIJxiiEEC2IJRxRiiELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS5_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7) #7
  call void @_ZNSt6vectorISt5tupleIJxiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @V, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %5, align 4, !tbaa !5
  %83 = load i32, ptr @N, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %.lr.ph47, label %._crit_edge48, !llvm.loop !15

.lr.ph52:                                         ; preds = %._crit_edge48, %98
  %.03550 = phi i32 [ %.1, %98 ], [ 0, %._crit_edge48 ]
  %.03649 = phi i64 [ %.137, %98 ], [ 0, %._crit_edge48 ]
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %85) #7
  %87 = load i64, ptr %86, align 8, !tbaa !11
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %88) #7
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %91) #7
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = call noundef zeroext i1 @_Z6issameii(i32 noundef %90, i32 noundef %93)
  br i1 %94, label %98, label %95

95:                                               ; preds = %.lr.ph52
  %96 = add nsw i32 %.03550, 1
  %97 = add nsw i64 %87, %.03649
  call void @_Z5uniteii(i32 noundef %90, i32 noundef %93)
  br label %98

98:                                               ; preds = %95, %.lr.ph52
  %.137 = phi i64 [ %.03649, %.lr.ph52 ], [ %97, %95 ]
  %.1 = phi i32 [ %.03550, %.lr.ph52 ], [ %96, %95 ]
  %99 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #7
  %100 = load i32, ptr @N, align 4, !tbaa !5
  %101 = add nsw i32 %100, -1
  %102 = icmp slt i32 %.1, %101
  br i1 %102, label %.lr.ph52, label %._crit_edge53, !llvm.loop !16

._crit_edge53:                                    ; preds = %98, %._crit_edge48
  %.036.lcssa = phi i64 [ 0, %._crit_edge48 ], [ %.137, %98 ]
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.036.lcssa)
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJxiiEESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJxiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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


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